Author Topic: DSP LFO two cycles with different volumes  (Read 5967 times)

markphaser

DSP LFO two cycles with different volumes
« on: October 09, 2006, 09:04:31 PM »
DSP LFO two cycles with different volumes

I was looking at the LFO waveform on a DSP chorus and the LFO output had a lower volume like 5 volts on the first cycle
but the second cycle it went up to 10 volts how can this be done in hardware?

What other types of LFO waveform using DSP can be done creative like this?


RaceDriver205

Re: DSP LFO two cycles with different volumes
« Reply #1 on: October 09, 2006, 10:40:12 PM »
With DSP you can have any waveform you want.

markphaser

Re: DSP LFO two cycles with different volumes
« Reply #2 on: October 10, 2006, 01:13:43 AM »
But how do u make different waveforms in software?

What kind of DSP code or instructions in a general ball park?


RaceDriver205

Re: DSP LFO two cycles with different volumes
« Reply #3 on: October 10, 2006, 02:54:50 AM »
Well if your device as a digital->analog converter, you get it to repeat a sequence of voltages over and over.
For example, for a square wave you would tell it to output 5V for 0.2s, then 0V for 0.2s, and repeat.
For a triangle wave (example), you would increment the voltage each 0.01s until it reached 5V, then decrement each 0.01s until it reached 0V, and repeat. The smaller the increments, the more natural sounding the wave would be.

markphaser

Re: DSP LFO two cycles with different volumes
« Reply #4 on: October 10, 2006, 05:33:25 AM »
Thanks for the help

But what is it called when the first cycle is smaller amplitude than the second cycle is bigger amplitude?

My sinewave,trianglewave,squarewave LFO or function generator won't do this the cycle periods are the same amplitude for every cycle period

With DSP u can make the first cycles amplitude half of the seconds cycles amplitude
 

RaceDriver205

Re: DSP LFO two cycles with different volumes
« Reply #5 on: October 10, 2006, 08:40:18 AM »
Quote
With DSP u can make the first cycles amplitude half of the seconds cycles amplitude

Yep, you can do anything you want, including that.
Quote
But what is it called when the first cycle is smaller amplitude than the second cycle is bigger amplitude?
Dunno, sounds interesting idea, but to be fair it sounds like too much effort for something that would probably just be a novalty.

Transmogrifox

Re: DSP LFO two cycles with different volumes
« Reply #6 on: October 17, 2006, 12:26:34 AM »
But what is it called when the first cycle is smaller amplitude than the second cycle is bigger amplitude?

Amplitude Modulation (AM). 

One way this could be accomplished is to multiply a sine wave with a DC-offset square wave of 1/2 the frequency of the sine wave.  For instance, the square wave would vary between 3 Volts and 5 Volts.  It would be most graceful sounding for a guitar effect if the 0-crossings of the square and sine match so that each cycle of the sine wave is smooth and uninterrupted when it is not near 0.

You could accomplish this in analog land by making a sine-wave generator.   You feed the sinewave into a VCA (like and OTA or analog multiplier), and also into a high gain amp/ hard limiter to convert the sine to a square.  The converted square would go into a Toggle flip-flop to divide the frequency by 2.  You would then give it a DC offset and feed it into the VCA gain control.

If you have two function generators, some of them have an external input and sync function so you can do what I'm describing.

In DSP, this is real easy.  You can get a sine function (usually source code is supplied for these types of functions by the DSP manufacturer) with inputs where you can pass frequency, phase, amplitude, and duration.  You write a little segement of code to generate the sine wave for the duration of a cycle at one amplitude, then the next cycle at a different amplitude.

You could also generate two sine waves, one at f1 and another at 2*f1, with the same phase.  Multiply the two in the MAC register and feed to your modulated FX program, or to the D/A converter (depending on how you want to use the LFO).
« Last Edit: October 17, 2006, 12:28:59 AM by Transmogrifox »
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

markphaser

Re: DSP LFO two cycles with different volumes
« Reply #7 on: October 25, 2006, 04:47:06 AM »
Thanks Transmogrifox for the help on DSP

So u mean like a non-linear mixer? two LFO's signals going into a "non-linear" mixer?

The sine/cosine function can add different voltage values for each cycle period


Transmogrifox

Re: DSP LFO two cycles with different volumes
« Reply #8 on: October 25, 2006, 03:23:32 PM »
linear multiplier. 
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.