Inspired by Jonathon Harvey's Mortuos Plango, Vivos Voco, this
patch enables glisses from one set of partials to another. Spectral
glissing can effect a sort of timbral "morphing," much like the bell
and boy sounds in the Harvey piece.
This patch analyzes incoming audio or a soundfile for the first twenty
partials present; it finds the first twenty peaks in the frequency
domain. It then sets twenty oscillators to these frequencies and
corresponding amplitudes, making the audio seem to "freeze." The
frequencies and amplitudes can be saved to one of two banks for later
recall. The glissing function changes the oscillators from one set of
partials to the other in the time specified.
The Patch
When the patch is opened, the soundfile "bell.aiff" is loaded into
array5. The soundfile is set to loop, though you don't hear it until
you set the amplitude of the loop in the upper-right corner:
Controls
You can choose the partial at which to start the range of partials
recorded, set gliss time, start an analysis, and choose a single
partial in four sections that act as controls for the recorded
analysis.
By clicking "snapshot bang", you choose that point in the soundfile to
analyze. If the oscillator amplitude is set (see the "Amplitudes"
above), you will also hear the snapshot you've taken. You can take a
snapshot without the loop-amp on.
The large boxes in the middle of the screen show the frequencies and their
corresponding amplitudes of any saved snapshot. By clicking on
"save1 bang" or "save2 bang" you will see the values change to reflect
your current snapshot.
The frequencies

The amplitudes
Once two sets of partials have been analyzed and saved, they can be
glissed in output from the part of the controls controlling gliss
time.
Live input
A toggle switch allows you to switch between a live input or a
soundfile.

The little section on the right allows you to make your own
looping soundfile from a live source.
The Score
The score included with the patch simply steps through the simplest
partial gliss from a live input. It is as follows:
0 0 comment --------------- STARTUP -----------------;
live-input 1;
0 1 comment --------------- EVENT 1 -------------------;
osc-amp 100;
snapshot bang;
0 2 comment --------------- EVENT 2 -------------------;
snapshot bang;
save1 bang;
0 3 comment --------------- EVENT 3 -------------------;
gliss 2000;
snapshot bang;
0 4 comment --------------- EVENT 4 -------------------;
recall1 bang;
0 5 comment --------------- EVENT 5 -------------------;
gliss 0;
snapshot bang;
At startup, this patch specifies that live-input will be used. At the first
event, it turns the oscillators on by setting the amplitude at
100. The patch takes a snapshot of the incoming audio, which sets the
oscillators to ring.
The next event takes another snapshot and saves it to the bank. At the
third event after startup, Pd glisses from the first set of partials
to the second.
The next event recalls the first set of partials. Event 5 changes partials
instantaneously (glisses from one to the other in 0 ms).
The Mechanics
The sinusoidal analysis is done using Fast Fourier Transforms
(FFTs). The fft patch is found in the "pd inputs" subpatch. The
switches for soundfile versus live input are also found in "pd
inputs."
In the fft subpatch, array3 and array4 display the frequency analysis
done by the rfft~ object. These arrays are analyzed for peaks and sent to
array1 and array2 by the pique object in "pd analysis" on the top page
of the patch.
Array1 and array2 are displayed in "pd arrays." Their values feed the
oscillator bank in "pd osc-bank" by going through "pd messpeak" and
untangled in "pd unpacker."