Page 1 of 1
Logarithmic Frequency Sweep
Posted: Thu May 02, 2013 6:10 am
by SBMastering
Hi,
Some time ago I did a linear frequency sweep in Synthmaker. I'm attaching the FSM file.
I now have a necessity for a logarithmic frequency sweep instead. Does anyone have any ideas how this might be accomplished?
Re: Logarithmic Frequency Sweep
Posted: Thu May 02, 2013 8:44 am
by trogluddite
A simple power function should get you a nice log sweep, for example...
freq = base_freq * (2 ^ time)
...would rise by one octave from the base_freq each time 'time'; increases by one. In Ruby, the power operator is '**' not '^', so it would be... freq = base_freq * (2 ** time)
Re: Logarithmic Frequency Sweep
Posted: Wed May 15, 2013 5:52 am
by SBMastering
I couldn't get the power operator to work in the regular code window with "^". It just turns everything into black text. I have looked all over. I'd hope to avoid doing it in Ruby because I haven't been working in Ruby much yet and this just needs this one little tweak!
I'm posting a screenshot of the sweep. Also, please check out my uploaded example on my previous post.

BTW, Trog, I am going to PM you about something unrelated.
Re: Logarithmic Frequency Sweep
Posted: Wed May 15, 2013 6:08 am
by Tronic
use pow(e,n) for ^
Re: Logarithmic Frequency Sweep
Posted: Wed May 15, 2013 7:05 am
by SBMastering
Ok, I got it working with pow and increasing logarithmically. Now I'm working on trying to figure out how to get it to decrease logarithmically after it reaches it's highest point.
Re: Logarithmic Frequency Sweep
Posted: Wed May 15, 2013 10:24 am
by tester
?
What makes the "movement" logarithmic - is the signal scaling itself, not direction you go. It works like this. If you rescale your values into (0-1) range, and apply lin to log transformation, then what will change is the curve between 0 and 1, but the range remains the same (then you may rescale it back into whatever you wish). By curve I mean corresponding y values to x values. In linear case y=x (or y=nx, depending on initial scaling). In other cases - all depends on what you used.