Oscillators

Post any examples or modules that you want to share here
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Oscillators

Post by RJHollins »

I've been looking forward this this section ... particularly the PINK generator.

I hope to get to this tonite, as I've noticed that different 'generator' actually sound different :shock:

Something else I'm looking at ...

I use pink-noise as a source to do quick'n'dirty gain staging through an effects chain [old school technique from back in the pure analogue daze].

One of the issue I'm watching is the changing level output. I understand the randomness required, but I'd like to get a more steady output level [minimal fluctuation]. Will look at this Martin creation tonite.

THANKS!!!
:)

BTW ... quick look ... NICE radio button design and function 8-)
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Oscillators

Post by KG_is_back »

You may also create Brownian noise. With a simple 1-pole lowpass filter (integrator) after white noise generator.
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Oscillators

Post by martinvicanek »

Thanks, Nix, for mentioning Brown noise. I think it can be useful so I added it in the original post.

KG_is_back wrote:You may also create Brownian noise. With a simple 1-pole lowpass filter (integrator) after white noise generator.
Right. I have used a slightly fancier integrator, though, one that goes all the way up to Nyquist. Probably does not make much difference, but anyway.

RJHollins wrote:BTW ... quick look ... NICE radio button design and function 8-)

Thank you. :)
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Oscillators

Post by tulamide »

Phew... with all these new things to learn, I can't keep up with the pace! KG's excellent ASM course, your brilliant oscillator course. But now, after having released the spline class, I will take the time to study all that I have missed. Thank you!
"There lies the dog buried" (German saying translated literally)
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Low-Frequency Oscillators

Post by martinvicanek »

(MV's Oscillators Part IV)

A low-frequency oscillator delivers a control signal to modulate sound. For example, a periodic amplitude or frequency modulation results in a tremolo or vibrato effect, respectively. Modulation, even if applied in subtle amounts, can add “life” to an otherwise sterile sound. This is particularly important in synthesisers, but is also applied to “natural” instruments in effect pedals etc. to make them sound “phat”.

Since LFOs operate in the time domain, aliasing or spectral purity is not a concern. However, LFO waveforms with discontinuities may result in unwanted clicks further down the processing chain. Even worse, if applied to the cutoff frequency of an ordinary biquad filter, a single discontinuity may interrupt the audio stream. Therefore, some sort of (preferably adjustable) smoothing is necessary for such waveforms.

LFO waveforms need not be periodic. In fact, periodic modulation is predictable and may sound boring or even annoying (ever listened to a pan-modulated Fender Rhodes with earphones?).

In the schematic below I have included some common waveforms as well as a number of random LFO waveforms.

As (a slight variation of :twisted: ) the signature of a prominent forum member says: Don't stagnate, create and modulate. Without randomness and serendipity the earth would be just another barren rock.

Edit: Added a bugfixed schematic (thx adamszabo for the report).
Attachments
MVsLFOs_fixed.fsm
(91.62 KiB) Downloaded 1627 times
MVsLFOs.fsm
(94.32 KiB) Downloaded 1986 times
Last edited by martinvicanek on Wed Mar 22, 2017 3:00 am, edited 1 time in total.
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Oscillators

Post by tester »

...which leads me to a question worth to ask I guess.

If stock shape oscillators are used, then after them - should be some sort of "de-zipper" added (stock? not so stock due to 1ms resolution of stock?), with transition time calculated from both - shape size (in samples) and frequency used for modulation?

I guess this refers to some rare cases only (i.e. I guess there are enough steps within jnd range / "just noticable difference" to give the impression of smoothness).

As for noises. Interesting one is called "grey noise" (equal loudness patterns), but it's somewhat subjective I guess.

I will definately check your randomness... :-) I remember I used dezipper and value trigger to achieve some interesting effects (and I guess some sort of curve shaper between points could be used too).
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Low-Frequency Oscillators

Post by MyCo »

martinvicanek wrote:Since LFOs operate in the time domain, aliasing or spectral purity is not a concern. However, LFO waveforms with discontinuities may result in unwanted clicks further down the processing chain.


Why are you using the BLEP code for the LFO then? Wouldn't it be cheaper to use the naive wave forms and pass them through a first order lowpass?

Here's a code suggestion for the sync parts (haven't checked how you do it in the ASM though):
Instead of:

Code: Select all

s = 1&(sync>0);
saw = saw0 - phase;
saw = saw + (-0.25 - saw)*s*(1 - s1);
s1 = s;


you can do:

Code: Select all

saw = saw0 - phase;
saw = saw + (-0.25 - saw) & ((sync<=0) | (s1>0));
s1 = sync;


When you do the sync input as streamboolin like the stock oscs, it can be even simpler:

Code: Select all

saw = saw0 - phase;
saw = saw + (-0.25 - saw) & ((sync==0) | s1);
s1 = sync;


Disclaimer: untested code!
BTW: I don't think the sync even works with the BLEP LFOs, because the cycle length of the BLEP get's completely messed up.
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Oscillators

Post by Tronic »

this algorithm help to make the hard sync version
Polynomial Transition Regions (PTR)...http://research.spa.aalto.fi/publicatio ... s/spl-ptr/
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Oscillators

Post by Tronic »

and here the better implementation
(EPTR) EFFICIENT POLYNOMIAL TRANSITION REGION ALGORITHM
http://smcnetwork.org/system/files/IMPR ... THESIS.pdf
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Oscillators

Post by martinvicanek »

Thanks for your comments guys. MyCo, Your suggestion to use a 1st order LP is valid, because it also works for the sync. I believe sync and s1 should be the other way around but I see your point, thanks. Tronic, thank you for the links, will check them out.
Post Reply