Four way audio crossfader
Here’s a way to create a four-way audio crossfader.
Here’s a way to create a four-way audio crossfader.
If gain is set to 1, a teeth~ object with ‘feedforward gain’ and ‘feedback gain’ arguments set to 0 is bypassed/transparent, which can be used as a dry/wet control. This can be confirmed by reading the details tab of the help file, which shows the formula used by teeth~, or by making a simple test patch like this one to test the hypothesis yourself.
The example demonstrates two methods. This first one uses smoothing to create a ramp on and off instead of an instantaneous switch on and off. This second one waits a certain amount of time before it begins the release ramp, and if the input signal goes back above the threshold during that time it cancels the release (the default amplitude threshold being -40 dB).
This example shows different ways to interpolate between values, for the purpose of automating volume control.
The volume of two movies can be crossfaded between by sending each jit.qt.movie a vol $1 message with one being an inversion of the other.
To record the output of a line~ as a series of numbers, a buffer~ can be used to capture the entirety of its output. To record the output, connect the line~ to a record~ with the same name as the buffer~. The buffer can then be played back by creating a play~ object with the same name as the buffer~ and sending it a start message.
This example shows how you can turn on and off audio files with a single toggle –– as in swapping between one and the other. Since 1 is on and 0 is off, you can use a == 0 object to produce the opposite (to turn one thing off when you turn the other on and vice versa). This can be seen in action in the example on the left.
To better understand the function of a mtof object, it can be recreated with an expr object. There are very slight differences between the output of mtof and expr. The differences are pretty minuscule and should not be a problem in most cases, as they are on the order of a few 1/10,000ths of a Hz.
To sync an LFO to the onset of a note, drive it with a phasor~ object. Send a phase value of "0" into the right inlet of phasor~ when the note starts, as seen in this example.