Page 1 of 1

Chainsaw Oscillator

PostPosted: Thu Mar 18, 2021 7:35 pm
by martinvicanek
Hey gang, here is something I've been working on lately. I call it the chainsaw oscillator :lol: .

:idea: The basic idea is to take a random sequence of samples (= a chunk of noise) and repeat it periodically. Like a random wavetable. The result is a tone with a funamental frequency according to the repetition rate and a random harmonic spectrum. (Cut the trebble if it sounds too harsh. :mrgreen: ) The nice thing is that you can take a different random sequence and get a different random harmonic spectrum, so every note may sound slighlty different. It is very easy to generate a (pseudo-)random sequence.

Now if we slowly vary the random sequence, each sample individually while it is playing, we get a constant morphing between different timbres. At higher variation rates it sounds like many (hundreds) slightly detuned oscillators (phat! 8-) ). At still higher rates the sound gets more and more noisy.

You might think that it would be a tremendous CPU load to constantly update all samples of the random sequence. Like hundreds of simultaneous oscillators! The point is that you only need to update each sample once every cycle, not constantly. So the effective load is actually similar to one oscillator! :shock:

There are some details like what if the size of the sequence is not integer (which it never is), aliasing and so on. Perhaps the hardest part was to make the thing poly safe. Whatever.

Below is the chainsaw oscillator and a little demo synth. I imagine that it could be of use in EDM. However, with some proper filtering you can also create some very soft, evolving pad sounds.

Re: Chainsaw Oscillator

PostPosted: Thu Mar 18, 2021 8:11 pm
by Duckett
First to download ;)

I'm always delighted to have something genuinely new to play with (although taking something bog-standard and seeing how far you can go with it leads to some pretty amazing results too).

Of course, not only will this be fascinating to try as an osc, but as a modulation source etc.

Thank you so much!

Re: Chainsaw Oscillator

PostPosted: Thu Mar 18, 2021 9:10 pm
by guyman
2nd

Re: Chainsaw Oscillator

PostPosted: Thu Mar 18, 2021 9:49 pm
by martinvicanek
Below is a synth based on the chainsaw osc with filtering and a few more features. This implementation is in blue rather than poly (white). All presets use only one osc per note, and no chorus or other effects.

Re: Chainsaw Oscillator

PostPosted: Fri Mar 19, 2021 8:56 am
by Spogg
Another amazing oscillator idea Martin! :o :shock: :ugeek:

I did some quick experiments with envelope, LFO and audio rate modulation and got sounds that it would be difficult (and expensive) to get any other way. One I liked was a snare sound which was never the same per hit (just the snare, not the drum body). And all with one low CPU oscillator.

Martin, you are a treasure! Thank you so much for all you do for us. :D :D

Re: Chainsaw Oscillator

PostPosted: Sat Mar 20, 2021 8:11 pm
by Halon
Thank you! Very cool! :o

Re: Chainsaw Oscillator

PostPosted: Sun Mar 21, 2021 11:52 am
by adamszabo
Thanks Martin! You might want to upload an updated version with some fixes because it does not make sound in the alpha because of these errors (even though it doesnt show them, I had to hunt for them):

In the envelopes you comment the hop:
Code: Select all
//mov eax,ecx; and eax,15; cmp eax,0; jnz hop;


But do not comment out the closing tag.

In the Filter lowpass -> Approx. Matched LP module "movapsout,xmm0;" there is a whitespace typo in all of them.

Re: Chainsaw Oscillator

PostPosted: Sun Mar 21, 2021 9:49 pm
by martinvicanek
Thanks for all your comments, guys!
Adam, many thanks for taking the pain to hunt down those bugs. I should make it a habit to check my uploads with FS alpha before posting! :oops:

Re: Chainsaw Oscillator

PostPosted: Mon Mar 22, 2021 11:49 am
by adamszabo
The strange thing is that it didnt even show any errors in the alpha, it just didnt make any sound, so then I started investigating.