I’d like to create an amplitude modulation (tremolo) effect where the tremolo frequency is determined by the pitch of a modulator sample. So, for example, if the modulator is playing a sine wave at 65Hz, the volume of the carrier will go up and down at 65Hz.
It seems like this should be fairly simple to do, perhaps with Audacity’s default tools, but I just can’t work out how. Maybe there’s a script for it?
65Hz is way too fast for musical amplitude-modulation (tremolo) effect.
You’d have to find the fundamental frequency of the note, then apply tremolo at ~1/100th of that frequency.
Amplitude (volume) dependent tremolo would an easier project than pitch (frequency) dependent tremolo.
(e.g. slowing tremolo as the music volume decays).
To clarify, this isn’t for musical tremolo. What I’m actually trying to do is take sound effects and filter them using combinations of multiple tones, to create interesting effects. Kind of like a ring modulator, I guess.
Thanks but this isn’t really what I want. This code produces a specific tremolo at 65Hz. I want the tremolo to be dynamic - based on whatever pitch the modulator is playing. So, if the modulator waveform features an upwards pitch slide, the tremolo will get faster and faster.
Quite simply, I just want the phase of waveform A to determine the volume of waveform B.
Sorry for the confusion. How about this explanation…
When the modulator’s waveform is at the top, I want the carrier to play at 100% volume.
When the modulator’s waveform is at the bottom, I want the carrier to be silent.
Another way of putting it is… I want to perform a volume envelope on Waveform A based on the shape of Waveform B.
Where are your “modulator” and “carrier” waves coming from? Are you wanting to generate them, or use the track audio for one or both of them?
If you are wanting to track the pitch of an arbitrary sound, then that is very difficult to do, and you may be best to start looking for a VST effect that gives you what you want.
If you are wanting to generate the tones, then your new description is very much like the code that I’ve already given:
Obviously this isn’t as simple as I had thought it would be!
Both of them are samples (track audio). To me it seemed like a simple thing to do: just map the phase of one to the amplitude of the other?
Thanks, and I do use plug-ins like that all the time, but that doesn’t do what I’m trying to do here as it doesn’t use a high enough time resolution. It will work for very low frequencies like 10Hz, but I want to use frequencies like 2KHz or higher.
In other words, I want to make the volume of a waveform go up and down thousands of times per second.
Make the two audio tracks into a stereo-pair, then apply this code in Nyquist prompt to multiply them …
(mult (aref *track* 0)(aref *track* 1))
The right channel will be amplitude-modulated by the left.
Using the identical track for both channels will probably sound horrible.
IMO need to low-pass-filter, or pitch-shift-down, the left version if it’s a musical-instrument or voice.