How to make a formant filter?
  • So I ran across this in my internet travels the other day

    And I was like "wow, that's pretty cool, I wonder if I could make one in Audulus?"
    I've played with a few formant filters in software before, and I've got a guitar pedal that does a voweler sound as well ... but then I realized that I've not actually got any idea how they work.

    I suspect at the end of the day there's a gate and an adsr, modulating a filter cutoff and resonance ... but that kind of just makes an auto-wah ... I want that cool vowel sound.

    So I figured I'd ask the masterminds here :-)
    Anyone ever make a voweler? Mind sharing the recipe?
  • I sometimes get vowel-like sounds my sending a very attenuated audio-rate modulation signal to the band-pass filter. But I never took on the task specifically.

    The wikipedia article helpfully lists the constellations of resonance that make up vowel characteristics:

    So I would probably make some fixed filter banks as a starting point. Then I would start experiment with methods of morphing between vowels (cross-fading vs sweeping the filter frequencies). If any of that works, the kick-started very kindly has posted a diagram of the motormouth signal path that would be a good starting point as how to best organize the results into a module.
  • Thanks!
    I just also found this article which has a nice explanation

    Can't wait to get home and try this out tonight!
  • Well that was a rabbit hole well worth going down.
    Cooked up a morphing formant filter and a neat PWM to feed it.

    Next step ... perhaps a vocoder?
    formant frenzy.audulus
    Screen Shot 2017-03-11 at 1.15.22 PM.png
    536 x 365 - 46K
  • Damn, son! You gotta teach me how to use the BiQuad filter in Audulus. Also I like the new space sloth pic.
  • Guys ... I'm running into CPU issues and it's not where I'd have thought it'd be.

    The bottleneck seems to be my lookup formant table, which is literally just a 3 dimensional array. Doesn't seem like that should be using 5% CPU per instance.

    Anyone have an idea how I can implement a formant lookup table without killing the CPU?
    Screen Shot 2017-03-11 at 7.04.09 PM.png
    665 x 425 - 77K
  • It sorta makes sense - each Mux uses .05% and you have about 100 of them in each. I know Taylor has some efficiency tweaks he wants to implement that might bring stuff like this down, but for now the numbers check out.

    In the future, I'm hoping for an n-input Mux/Demux that will just expand to the number of inputs you have feeding it, and will make things like this easier to do.
  • Well ... I mean at the end of the day, it really is just a multi dimensional array of static values. Modelling that with mux's and stuff is really the problem I suspect. I hate to waste CPU on a lookup table of all things!

    Now. I know this is way out there, but ... I noticed that the patch files are JSON. This gives me ideas :-)

    The formant table is pretty darn small, and it'd be trivial to dump it into a JSON multidimensional array and paste it into the bottom of the patch file. How neat would it be to have a special node that gives me read access to that data structure?

    Or keeping it less hacky ... like a 2 dimensional array node. Like a spreadsheet that allows you to reference values by x,y coordinates. 3 of those would do the trick!
  • This is not the array you are looking - in Audulus 4 we'll have the "Data" node that will be able to load, record, and export audio and data, scrub through it, etc. It will do this but like times a million and much more efficiently (forgot to mention that earlier).
  • I'm all for a million times more efficient.
  • A million samples is only 22 seconds of 44.1k audio - you'll be able to do crazy things with the data node...
  • Plus we'll basically be bringing back the old tape cassette preset days with this - you can play data files as audio and they'll just sound like noise garbage - fun stuff
  • If anyone's confused: the Data node would record into a .wav file, and each sample could be a data point of 32 bit length. You'll be able to address samples individually, so you could use 1 second of "audio" as a string of 44,100 different numbers - which in the case of this patch could be all the values of the filter cutoff points.

    We'll then be able to share .wav files of lookup tables for lots of things!

    We're still thinking about how to properly implement this, but that's the basic idea.
  • wow! That would make some crazy crazy stuff possible!

    So ... let me ask you this. Is there any way to toggle a node on and off the CPU? Like a CPU bypass?

    Like .. I'm just guessing at how Audulus works, but there must be some kind of event loop or something that executes the node (perhaps at the sample rate)? If so, I can see how my nest of a thousand nodes to implement a lookup table would burn a boatload of CPU ... yeah, if it's traversing that rats nest 44k times a second ... shheeeeeeiiiii ...

    But here's the thing,I don't really need to sample that big matrix so often. like ... could I "hide" the rats nest behind a sample and hold node or something? Like ... get the values I need once on note-on, then "mute" the big lookup table ?
  • I like to think of it as a byzantine pattern more than a rats nest.
  • Everything is done at sample rate currently in Audulus. I don't know if Taylor has a plan to change this in the future - I think he tried something in the past but it interfered with how something else was working.

    The Data node ostensibly would be the super-powered sample and hold thing you're looking for.

    I think there already are some optimizations where if a calculation doesn't change, it doesn't do it over and over again - this might be only implemented in the + and x nodes at the moment though.
  • Actually a CPU gate node would be perfect.

    Just an on/off switch that hides everything in front of it from the execution cycle if the gate is low. Just a suggestion :-)
    Screen Shot 2017-03-12 at 3.54.14 PM.png
    1235 x 422 - 130K
  • So, I found a way around the CPU load of the formant table, by using a series of sample and hold nodes to "program" a filter bank from just one instance of the table. It uses a clock signal, a counter with a reset, and a set of logic gates to cycle the one formant table through to the selecte A and B parameters for each of the 5 formant filters.

    This is actually a really interesting way of doing it.I suspect it might be possible to cook up some interesting "programs" for this filter bank other than formants
    programmable formant filter.audulus
    2048 x 1536 - 364K
  • genius level = plurgid
  • brilliant!