Audio Filters?

Finishing a couple thoughts exploring audio tools. Wondering if it would be possible to build an audio filter inside Vuo. Tinkering with the audio tools, having a couple audio filters is a missing link. Be nice to have a 2-pole “state variable” type filter, biquad or otherwise. Low pass/high pass/band pass/notch with frequency/cutoff and Q/resonance. (Shelves would be nice, too). This is a legit feature request, of course, but wondering if possible to put something together with built-in modules?

Thinking of designs like the family of filters known as ZDF filters – “zero delay feedback” filters – which cover a range of “virtual analog” style digital filters. A lot of these are not too daunting to get up and running. The question is, is it possible to create the zero delay feedback part at audio rate inside Vuo – i.e., the integrator. Could I do it with Enqueue, using the current and previous sampled value? Or is there another way to implement a recursive function? Or can the graph handle a feedback loop, with Hold nodes or whatever?

Also wondering about audio noise. Any built in noise node translate well to audio?

Edit: white-ish noise is no problem: Fire at Audio RateMake Random List (I set count to 512) → Convert Real List to Audio.

Spent a bit more time having the Audio Synth comp open and running – it starts to lag after running for a while. Stopping/starting the comp refreshes it. There are probably things I don’t get about how to audio works in Vuo, like event flow, for one. Also, I’m used to working with audio sample rate, and Vuo only has the Fire at Audio Rate node, I’m a bit fuzzy on the output considering its description, “The time at which the device became ready for another sample buffer” and how this actually plays out in the graph. (In my case the output device is the built-in headphones output on an M1 Mac Mini).

More Questions:

Is there a way to make a composition (or part of the composition/graph) with audio stuff run at audio sample rate? Or how should I view audio sample rate inside Vuo? (This is still related to the integrator part of audio filters, which require some way to have a feedback loop running at audio sample rate. I would imagine making a node might be the best way to approach this. Right now I am wondering what’s possible.)

Also wondering about the FM operator setup I have in the composition – I used a Wave node with time from Fire at Audio Rate, which works but produces unexpected results. Maybe it’s the “through-zero” aspect – meaning it looks like Make Audio Wave can accept negative frequencies (though is the (modulated) waveform with negative freqs actually a mirror of the waveform with positive freqs, as through-zero would be?)

Btw, just started up Vuo 2.3.0 – except for the lagging audio described above, no hitches so far, great!  


As a starting point for more advanced audio filters, you might examine the source code of the built-in Split Audio by Frequency node, which is a combination 2-pole IIR low-pass/band-pass/high-pass filter.

The Gamma audio library has a list of other audio functions that might be useful.

As to events, you may want to review “Buildup of Events” in the manual under the section “Solving Problems with Event Flow”. You have the choice to to choose whether the output of your Fire at Audio Rate and Fire Periodically nodes enqueue or drop events.

First off, @MartinusMagneson was right – Vuo audio stuff has real potential. Imho a couple basic effects would complete the basic tool set – I’d vote for spatial effects like a simple reverb and delay (with feedback).

This filter question actually had a simple answer, at least to get started – use Split by Audio Frequency. I overlooked it, the name of the node threw me off. (Fancier filters could be nice, e.g., something with resonance, but this gets the point across.)

Regarding the unexpected behavior with the FM operator setup, I think Wave simply cannot keep up with audio range Hz – 1/Period can create very small/fast values (unavoidable when using a “classic” frequency ratio setup, i.e., Make Audio Wave freq * freq ratio). Limiting parameters to keep things in range appears the simplest solution for now. (So much for emulating Buchla easel FM settings.)

To bigger issues – a bit better after a bit of clean up using Show Events, much better performance at present. This has been a bit of a kitchen sink experiment and at some point my attention became consumed tracking sputtering and slowdowns that were happening after a minute or so. This of course is not ok with audio – it’s like I can hear every complaint from Vuo! And forget adding fancy visualizers to this comp for now. Also in the comp there is a “Tap Delay” experiment that pushes Vuo over the edge when connected, unusable. Also, Show Events/cleanup process was a bit slow going because of hangs and force quits with the editor, beach balls running/stopping the comp, hanging when trying to open the comp from startup splash screen.

Questions at this point, forgive if covered elsewhere:

Are there more ways to optimize? Do cables showing slow down performance? And if events are being pushed to any part, processing is being chewed up, is that right? (Even if disconnected at output, or if some modulator is turned to 0?) Are there ways to run anything else here with something like the “Spin Off” concept – for example, can I run visuals in a parallel process? (How does Vuo use multiple cores?) And some things in the modulation section don’t necessarily need to be in sync, though they do need to run using Fire at Audio Rate. I think there are feature requests for things like disabling parts of a comp, right? That would be good with audio stuff – disable or pass through.

I would also love to package up some of commented sections as subcomps – no luck there, unstable business, hangs and crashes when subcomps are in the comp. (Or maybe I should give it another shot – upgraded to 2.3.0 midstream).

Questions regarding math operations I am using for waveshapers (wave folding, saturation, clipping):

Using Calculate List, what are proper formulas for trig functions like sin(X), tanh(x), atan(X) for audio in the range [-1,1]? For example, tanh(X) (or tanh(saturation*X)) doesn’t work – the description for trig functions says “in degrees”. Clipping using clamp(X,-1,1) is straightforward.

Same for the sin function wave folder – what is the proper formula for sin(X * n) to produce expected results in the [-1,1] range? I thought I had it working in the first run with sin(X * order), but since I have separated ch1/ch2 for stereo, not working as expected. (With sin wave folder, folding should only happen when audio goes out of [-1,1] range, then always stay in range as it gets folded back. In this case volume/amplitude diminishes to nil at lower order values, and requires huge values to do any expected folding – I am used to an order range of 1 to maybe 50 to produce good results – here I have 1 to 500.)

Where I’d like to go with this is to have subcomps for audio “modules”, GUI’s (prob need more UI elements to really do it justice, at least for mouse/computer operation), and of course have some nice visuals.

The attached comp has a bunch of stuff turned up, test mode. Ton of parameters published.  

AudioSynth.v0.21.vuo (149 KB)

Oh, saw your post after I already posted, @jmcc, thank you! I think I got the main points you mentioned covered, Show Events is a good tool. Now just need some help with optimizing and trig functions. Thank you for the specs on the built-in filter (Split Audio by Frequency) – makes sense from the sound of it.

Regarding the Gamma Audio Library, I guess you are pointing me towards coding nodes, and I may have given you the impression that I could – I am not even at the level of novice as a coder, just an occasional copy/paste. It is nice to see the possibilities there, most of the main points of audio synthesis are certainly covered. Maybe someday…  

One of my colleagues mentioned that you can convert radians to degrees as part of the expression, for example sin(radians * 180/PI) — where radians values 0 to 2*pi cover the circle, and it outputs values ranging from -1 to +1.

As to optimization, Vuo automatically analyzes the structure of your composition and, as much as possible, schedules nodes to execute across all of the computer’s CPU cores. @jstrecker gave a presentation on a deep dive into creating executable code from nodes, including handling synchronization. That information starts about minute 28.

Ok, I’m figuring out the trig questions, got tanh and sin (method for wave folding). Atan function still eludes me, though…  

@jmcc, thanks again for the follow up, hugely appreciated! Once again, I was editing a post as yours came in. :-) So I’m with you on Vuo trig functions and radians to degrees. And thank you so much on the link to Jaymie’s presentation.