Next up: porting a glottal source model. The one I use is based on the LF model with pulsed glottal noise for breathiness.
Original C code here:
https://git.sr.ht/~pbatch/mnodes/tree/master/item/glot/glot.c
Top-level
Next up: porting a glottal source model. The one I use is based on the LF model with pulsed glottal noise for breathiness. Original C code here: https://git.sr.ht/~pbatch/mnodes/tree/master/item/glot/glot.c 18 comments
dev logs I made while coding up the implementation: https://pbat.ch/recurse/tasks/implement_tract/ An initial interactive demo inside the browser! Hit begin, then use the sliders to control glottal and tract params: There has been a game jam this week, so it's distracted me from some of this vocal synth work. Velum support comes next, which is what is needed to get nasal sounds. Devlogs so far: https://pbat.ch/recurse/tasks/implement_velum/ @patchlore it is absolutely fascinating seeing you implement this. Porting the nasal sounds has been a bit of a bumpy ride. I have introduced a NaN somewhere. This kills the DSP. Now I need to track down where it has been introduced. My approach has been to use panic and counters to iteratively bisect and find the earliest instance of a NaN. It's slow and tedious work. The NaNhunt will resume tomorrow. @patchlore I made an oopsie and now the particular shapes I sculpted for this demo don't work anymore. Had to sculpt some new ones. They are okay enough though not as loud and pronounced as this one. Anyways, nasal/velum control seems to work I think. It's now a slider on the demo page. I've also turned on 2x oversampling, which will hopefully smooth things out a bit: @patchlore this project is super cool! My only experience with DSP/synths is in C++/JUCE, but I've been wanting to learn how to do it in Rust. I'll have to give this project a look @reillypascal still learning things. the actual DSP programming feels pretty similar to how I do it in C, at least with my current coding style. I'm sure I'll get rustier as I go. Rust is more strict about number types (float vs int), and has some funny notation for math functions (x.sin() instead of sin(x)). There is a huge performance difference between debug and release builds. |
The glottal component of my singing synthesizer has now been ported to Rust [0], which was translated from C. Rust like to use x.exp() instead of exp(x) for math funcs, so that tripped me up a few times.
The sound is pretty unremarkable [1], and will need a filter (tract) component to give it vowels.
0: https://github.com//PaulBatchelor/voxbox/blob/main/src/glot.rs
1: https://github.com/PaulBatchelor/voxbox/blob/main/examples/glot_simple.rs