Analog Modeling oscillators?

Kieran Murphy's icon

Hi Everyone!

I have a 40106 based Hex Schmitt trigger oscillator breadboarded on my bench and it got me wondering how to go about modelling analog oscillators in Max?

Does anyone have any resources on analog modelling inside max?

Thank you!

👽'tW∆s ∆lienz👽's icon

much of the best analog modelling stuff out there will be proprietary algorithms that many people who make plugins, etc. probably won't share, but at the heart of it all is attempting to create the smooth/continuous information that might come between samples in a digital realm.
for example, going by this video:
https://www.youtube.com/watch?v=FaoJaLmZaL4

you can see a huge part of the analog sound over this square-wave oscillator is how the capacitor discharges(capacitors charge and discharge with a certain kind of 'slew' rate(creates a smooth/gradual slope), whereas digital signals are often stepped discretely in a 'quantized' manner to emulate a similar slope). to mimic the smoothness we often use some type of interpolation. in addition, it's also good to use an 'anti-aliased' algorithm for the digital oscillator, so for something like the square wave of a 40106, you could start with the anti-aliased 'rect~' object, along with 'slide~' object for a bit of 'slew rate' emulation(there's also 'rampsmooth~' and other forms of interp you can create on your own), here's a very basic example:

Max Patch
Copy patch and select New From Clipboard in Max.

from there, much of what can help create an analog sound will be in the filtering. for more advanced stuff in that realm, i'd recommend downloading(using Max's "Package Manager"(see "File" menu in Max)) the 'smFilterPack' by Surreal Machines, they've been very generous in giving many mathematical tricks, and great sounding filters that can help get you pretty close in analog-emulation.

hope it helps 🍻

Iain Duncan's icon

listening.... :-)

Graham Wakefield's icon

Search "beat frei digital sound generation" -- has some really good materials for VA oscillator design.