## Expression for Log Scale Sweep Tone

GoldWave general discussions and community help
Dustin
Posts: 3
Joined: Fri Oct 20, 2017 2:22 pm

### Expression for Log Scale Sweep Tone

I'm trying to develop an expression to produce a sweep tone that crawls along the logarithmic scale from frequency x to frequency f with an amplitude of y, based upon

sin(2*pi*f*t)

in which I substitute an exponential function for f to produce the sweep crawl. However, it doesn't seem to behave as I would expect.

Using x=20, f=20000, and y=1, and the epxression (so far):
y*sin(2*pi*(2^((log(x)/log(2))+((n/N)*((log(f)/log(2))-(log(x)/log(2))))))*t)

The following fragment of the expression produces 20Hz (value for x) sinewave (as I would expect)
y*sin(2*pi*(2^((log(x)/log(2))))*t)

The following modification of the expression produces 20kHz (value for f) sinewave (as I would expect)
y*sin(2*pi*(2^((log(x)/log(2))+((1)*((log(f)/log(2))-(log(x)/log(2))))))*t)

Yet if I substitute (n/N) for the (1) above, which I would expect to go from 0 to 1, causing the frequency to up the scale from x to f, the results crawl way beyond f, leaving me confused.

Can anybody offer any insight into what I am doing wrong?

GoldWave Inc.
Posts: 4019
Joined: Wed Mar 10, 2004 6:43 pm
Location: St. John's, NL
Contact:

### Re: Expression for Log Scale Sweep Tone

The frequency varying function cannot be used directly. You need to use the integral of the frequency function.

Dustin
Posts: 3
Joined: Fri Oct 20, 2017 2:22 pm