Open fulldecent opened 5 years ago
I can draw the grid, but what about the colored ovals? Using what principles should they be drawn?
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.
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.
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.
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.
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.
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.
Currently the vowel plot is drawn using a rendered picture.
This can be improved to use actual drawing primitives.