DSP LFO two cycles with different volumes

Started by markphaser, October 09, 2006, 09:04:31 PM

Previous topic - Next topic

markphaser

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

With DSP you can have any waveform you want.

markphaser

But how do u make different waveforms in software?

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


RaceDriver205

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

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

QuoteWith DSP u can make the first cycles amplitude half of the seconds cycles amplitude
Yep, you can do anything you want, including that.
QuoteBut 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

#6
Quote from: markphaser on October 10, 2006, 05:33:25 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).
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

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

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.