Random Oscillator


Random Oscillator

I originally developed this for the Ridiculously Complex Waveform Generator and I thought it might be useful on its own. It loads a 16 channel mux with a set of random values and uses them as a wavetable to generate the output wave. To ensure that there is a strong fundamental, the table is scanned forward and positive values are output and then the table is scanned backwards and negative values are output. A gate on the scramble input will load a new set of values and create a new random waveform. There is a low pass filter on the output to reduce some of the high frequency overtones. To make it easier to incorporate into other modules the pitch input is in Hz rather than 1 per octave.


Input Signal Range Notes
scramble 0 to 1 gate loads a new set of random values into the wavetable
Hz 0 to Nyquist frequency oscillator frequency
amp 0 to 1 amplitude
sync 0 to 1 gate oscillator sync

Output Signal Range Notes
out -1 to 1 audio oscillator output

Version History

Revision File Date Notes
1.0 Random Oscillator V1.0.audulus (49.8 KB) 08/13/2019 initial upload


Revision File Date Notes
1.0 Random Oscillator V1.0 demo.audulus (67.4 KB) 08/13/2019 initial upload

I’m gonna have to try this one out! Your patches are always inspiring!

1 Like

Thanks for the compliment :cowboy_hat_face:. This is my third or fourth try at making a “random” oscillator. Too random and you end up with noise, not enough and it doesn’t have much variation in timbre. I think this is the best so far but I’ll probably keep tinkering with it.

Very interesting idea! I will have to put this under the microscope.

1 Like

I was inspired by the Twisted Waveform Generator’s ability to scan parts of the operating system and use them as a type of wavetable. I built a 16 stage S&H that can be loaded with a set of random values using a demux and a clock. I then scan the array using a mux to generate the output waveform. The biggest issue is how to deal with positive and negative parts of the waveform. If you simply scale the random values from -1 to 1, and scan the result, the fundamental is often lost in the noise and the output tends to be primarily the higher harmonics. In order to keep the fundamental prominent, I chose to scan the table forward for half a cycle and output positive values, then scan it in reverse and output negative values. A complete cycle of the waveform is actually 32 steps wide. Even using this approach, the result ws pretty raspy and aliasing was fairly noticeable so I incorporated a 6dB per octave low-pass filter to tame things down a bit. I think it provides some useful variation in timbre without degenerating into noise.

Yeah I thought it was pretty clever how the filter tracks the oscillator so the waveform can be used in as an LFO.

I think this type of waveform is likely to have a similar flavor so there probably should be some further way of augmenting the waveform. But I really like the overall design.

One possibility would be to introduce a more random scan. Currently it scans 16 forward outputting positive values and 16 backwards with with negative. Maybe you could vary the point at which the wave flips or even the number of flips in a cycle. Either would change the harmonic context more drastically.

Random Oscillator V1.0 with LP slew.audulus (51.0 KB)

I brought the LP filter cutoff frequency tracking to the front. I don’t think does anything exciting to the sound but it does make for a very interesting LFO that can be randomized. I am also experimenting with making the scrambling a continuous morph rather than a jump, but that one’s not quite ready yet.

1 Like

I had a couple of earlier designs that had a continuous morph. These are high speed 16 stage analog shift registers that you might find useful. They will shift a new “analog” value into the register with each clock. Each stage has a separate output so they’re easy to scan. The Z-1 based unit will clock at over 10kHz so one approach is to loop the 16th value back into the input to create a ring buffer and introduce the occasional random change into the value you feed back. The audio output is derived from stage 1. The other unit will still clock at 1 kHz or so if you prefer to have the scanning separate from the buffer. Then you can just shift in a new value at whatever your morph rate is.
High speed shfit registers.audulus (368.2 KB)

1 Like

Oh yeah shift registers kind of already do this! I was thinking of a dual core that would crossfade back and forth.

1 Like

That would be cool. Crossfade to one then reload the other. You woul$ have a continuous morph using the same basic design.