Wavefolders, Shapers, and Clippers


#1

Hi All,

First post on the new forums! Love the Audulus community. You guys are great. Was wondering a few things:

a) What’s the difference between wavefolding and waveshaping? Is it just a semantic difference, or a practical one?

b) I’m curious about the math behind tube, FET, Serge, and other “analog” type distortions and shapers. Where do I start?

c) On the old forum, a user had like a whole huge patch with hundreds of waveshaping expression nodes (I think it was Syrett). Any chance that user could re-upload that patch or offer some directions to start off in?

d) A user uploaded in a very brief response to a thread the Serge style wavefolding algorithm and I can’t find it anywhere. I would love to track down this little tidbit. (On a slightly related note, I can’t get the old forum to render, it could be a mobile issue. It’s not dead, is it?)

If you would like a more practical use case for background, I’m building a single voice and want some nice harmonic manipulations of basic waveforms to test out. No example patches yet as I sort of split my time between Audulus, Pure, and Max. Thanks in advance.

p.s. Not totally familiar with the categories so if this is in the wrong spot, feel free to move it.


#2

Hello @inscript, and welcome to the forum. I love messing about with waveforms also! Let me see if I can answer some questions.

a) All waveforlders are waveshapers but not the reverse. Waveshaping is simply the process of changing the periodic waveform of an incoming signal. Other examples of waveshapers could be full wave rectifiers (turning a sawtooth into a triangle) or a comparator (turning a sawtooth into a pulse wave). Wavefolders come in many designs but they usually describe a wave the reflects back towards the center rather than clip.

b) I think start with trigonometric functions. tanh(x) is a very useful expression for creating saturated distortion because no matter how much you scale x (you could amplify it 10 times even) it will never clip, since the tanh(x) never reaches one. sin(x) is also a pretty useful function since it naturally acts as a wave folder in the same way that tanh(x) will act like soft clipping amp. Hard clipping can be done by simply clamping your signal with an expression like clamp(x,-1,1).

c) Sounds like something I would do, I would be happy to post some example patches, although I 'm not sure which ones you are referring to.

d) I think the best way to emulate the serge wave folder is with the spline node and a little low pass filtering above 2kHz. There were some academic papers related to serge wavefolders that show what you want your spline to look like:
38%20AM
In practice, a sin(x) expression sounds very similar and is much easier to work with.

Yeah, that’s loads of fun. I like to make cascaded crossfades of waveforms using switches. You might enjoy my “Know Your Nodes” videos on youtube where I go over some of these topics.

I will upload some examples shortly.


#3

Ok, so here are the tasters choice of wave folders I have in my collection:

All of those signals went in as sine waves.

4 Wavefolders.audulus (129.9 KB)

Definitely feel free to open them up see how they work, and incorporate anything you find useful :slight_smile:

PS if you have trouble with the forum downloading patches on iOS check out the workflow app. @Paulenko made helpful video guide.


#4

And if you’ve updated to iOS 12, Workflow is now the Shortcuts app.


#5

For what it’s worth here’s the Hordijk waveshaper that I put together using one of @robertsyrett’s waveshapers (using the sin(x) function) as a starting point.

If you’re having problems with the old forum not rendering a possible cause could be that you’re using an (ad)blocker of some kind. At least that’s what happened to me when the forum shifted to the new discourse version. Whitelisting it should bring it all back.


#6

Yeah, that’s a well-written post for sure!


#7

Awesome. Thank you for the responses. This provides some great starting points. @robertsyrett I actually just watched all of your video series. Those are super useful, and exactly the kind of thing I’m looking for. I’m working my way through the Serge white paper. Does anyone have any resources on how to begin converting analog schematics into digital block diagram models? Seems like a bit of a daunting process, and I have very little familiarity with the analog EE side of things. @RudigerMeyer I’ve browsed all of your Hordijk clone threads, super high quality work, and the explanations are great. Look forward to getting through all of that seminar video series.


#8

The easiest thing is to find the block diagram of the model rather than try to create one from the schematic. They aren’t available for all synth modules, but for lots of them.

We’re not doing component-level modelling in Audulus, which would get you the most accurate representation (and consume a lot of CPU), but what you can aim for is to make it close enough. The best thing you can do to really nail something in Audulus is to tune the way the filters and distortions work within a circuit by comparing them to one another in an A/B listening test.