• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Anyone know anything about tremolos?

JohnCU

Banned
I'm supposed to write a Matlab program to produce a tremolo (for ECE homework). This is what I got so far...

freq=input('Specify frequency (Hz): ');
rfreq = 2*pi*freq;
tSpeed=input('Specify tremolo speed (s): ');
tDepth=input('Specify tremolo depth (0 < depth < 1): ');
Ts=[linspace(0,4,8192*4)];
signal = cos(rfreq*Ts);

I know I gotta somehow have another signal that envelopes that first signal, so that it the loudness fades in and out but I'm not sure how...?
 
I forgot what a tremolo is. But if you want to adjust the loudness, why not multiply your signal with what you want as your tremolo?

signal = (1-cos(tremfreq*Ts))*cos(rfreq*Ts)... kinda like amplitude modulation.
 
I wish the mods wouldn't have moved this, it's more about the math of creating a tremolo than programming...
 
I was wondering where this thread went. So for a violin, can you describe the act of a tremolo? I think I can offer ideas then.
 
The loudness varies. Loud->low->loud->low, it's alternating patterns of higher and softer tones I guess.

like WOOOO, woooo, WOOOOO, wooo...
 
So I'm guessing you want something very similiar to amplitude modulation. So instead of having a constant amplitude.

Amplitude*cos(freq*Time), you want to make your amplitude a function of time. So it'll look like.

(1-depth*cos(tremfreq*Time)).*cos(rfreq*Time). So now your signal will be enveloped by your trembolo function.
 
Now here's a bigger question, how do you decay the tremolo so that the fading in and out decays, but the signal keeps going, it just doesn't change loudness (it evenutally levels off).

I know I can multiply the signal by e^(-T/Time Constant), but that decays the whole signal to 0...
 
Back
Top