Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redraw vowel plot using native graphics primitives #22

Open
fulldecent opened this issue Nov 26, 2019 · 7 comments
Open

Redraw vowel plot using native graphics primitives #22

fulldecent opened this issue Nov 26, 2019 · 7 comments

Comments

@fulldecent
Copy link
Owner

Currently the vowel plot is drawn using a rendered picture.

This can be improved to use actual drawing primitives.

@yaroslav-zhurakovskiy
Copy link

vowelPlotBackground

I can draw the grid, but what about the colored ovals? Using what principles should they be drawn?

@fulldecent
Copy link
Owner Author

Cool. You can model like this:

(centerF1, centerF2, slope, majorLength, minorLength, letter, color)

And then adjust so it looks approximately like the graphic above.

Actually these are subjective items so being off by a few Hz is not a problem.

@yaroslav-zhurakovskiy
Copy link

Ok. What are these variables? I don't see how they are calculated. Can you give me at least some link, so I can read about it.

@fulldecent
Copy link
Owner Author

Here is some reading:

https://ccrma.stanford.edu/~jmccarty/formant.htm

https://www.phon.ucl.ac.uk/home/wells/formants/relamp-uni.htm


I am just guessing one of the variable sets

(centerF1=350, centerF2=800, slope=20, majorLength=700, minorLength=200, letter=u, color=green)

I am just estimating.

Or if you have another recommendation we can try that.

69660131-4eb06080-1088-11ea-995e-e0283a2c96c1

@yaroslav-zhurakovskiy
Copy link

I was thinking may be we should rather use https://github.com/i-schuetz/SwiftCharts instead of building a plot view from scratch? Building such a view ourselves will be tedious and will take a lot more time.

@fulldecent
Copy link
Owner Author

fulldecent commented Dec 2, 2019

It seems that library does not support logarithms or a detached axis (500 is the minimum)

This is not really a chart. it is just a dot on top of a picture. Right now the picture is a PNG. We do not need a full chart library. For example the scale will never change. This can probably be done in SwiftUI nicely.

@fulldecent
Copy link
Owner Author

An easier starting point here would be a graphic like the "Formant estimation" on https://en.wikipedia.org/wiki/Formant

The bounds for the graphic will always be 0–1200 for X and then 500–4000 for Y. Other things get plated on the chart.

The data "Average vowel formants for a male voice" on Wikipedia are also good to use as a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants