Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Logarithmic Frequency Sweep

DSP related issues, mathematics, processing and techniques

Logarithmic Frequency Sweep

Postby SBMastering » Thu May 02, 2013 6:10 am

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?
Attachments
Linear Frequency Sweep.fsm
(1.61 KiB) Downloaded 1398 times
User avatar
SBMastering
 
Posts: 17
Joined: Tue Jun 12, 2012 11:47 pm

Re: Logarithmic Frequency Sweep

Postby trogluddite » Thu May 02, 2013 8:44 am

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)
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Logarithmic Frequency Sweep

Postby SBMastering » Wed May 15, 2013 5:52 am

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.

Image

BTW, Trog, I am going to PM you about something unrelated.
User avatar
SBMastering
 
Posts: 17
Joined: Tue Jun 12, 2012 11:47 pm

Re: Logarithmic Frequency Sweep

Postby Tronic » Wed May 15, 2013 6:08 am

use pow(e,n) for ^
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Logarithmic Frequency Sweep

Postby SBMastering » Wed May 15, 2013 7:05 am

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.
User avatar
SBMastering
 
Posts: 17
Joined: Tue Jun 12, 2012 11:47 pm

Re: Logarithmic Frequency Sweep

Postby tester » Wed May 15, 2013 10:24 am

?

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.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet


Return to DSP

Who is online

Users browsing this forum: No registered users and 7 guests