Abstractions

please note: you may have to right-click a link and select "save as..." to properly download the file.

drawFFT~.pddraws a fast fourier transform of the signal connected to the audio inlet. the audio signal is passed out of the outlet~ unchanged.
counter.pda counter: it increments each time it receives a bang in its left inlet and outputs the counter's value. you can reset the value it starts counting from by sending numbers to the right inlet.
frequencyMod~.pdGenerates frequency modulation according to a carrier frequency (inlet 1), a modulator frequency (inlet 2) and a modulation index (inlet 3). outputs the resulting audio signal. (alternatively, all three variables may be sent as a list to the first inlet.)
randomRange.pdgenerates constrained random numbers. sending a bang to the first inlet will generate a random number between $1 and $2 and send it to the outlet. the low threshold can be adjusted by sending a number to the second inlet while the high threshold is adjusted with the third inlet.
audioEnvelope~.pdoutputs an audio-rate envelope when it receives a bang. it starts at 0 and goes to $2 (or inlet 2) over $1 (or inlet 1) milliseconds. then it goes back to 0 over $3 (or inlet 3) milliseconds. in other words, the inputs correspond to: attack time, peak value and decay time. sending a bang to inlet 1 will output the envelope with previously set values (through either inlets or creation arguments). sending a number to inlet 1 will change the attack time and also output the envelope.
quantize.pdround the input to the nearest $1 and output the result. for example, a creation argument of 0.5 will round all incoming numbers to the nearest +-0.5. you can change the quantizing value by sending a number to the second inlet.
pitchShift~.pdshifts the pitch of a signal without changing the speed. the audio signal goes in the left inlet and comes out the outlet. the transposition factor is in semitones and is set with $1 or by sending numbers to the right inlet. for example, a creation argument of -6 will transpose the signal down a tri-tone. this works by using variable delay lines and will distort the signal somewhat.
midi2NoteName.pdinput a MIDI note-number and output the letter-name pitch, the octave number and the detuning in cents. i.e. 60.84 becomes C#4 -16c.
randomWalk.pdwhen it receives a bang in its first inlet, it outputs a random value between $1 and $2 where $3 specifies the size of the deviation from the previous value as a fraction of the total range and $4 specifies the starting value as a fraction of the total range. so, if you created 'randomWalk 0 10 0.1 0', and sent the first inlet a bang, it would give 0. then, on each subsequent bang, a value between 0 and 10 would be created that is deviates a maximum of 10% ($3) of the total range from the previous value.
stereoPan~.pdpans a mono signal (inlet 1) between two outputs (outlet1 and outlet2) according to a panning coefficient between 0 and 1 (taken from inlet2 or $1). if the panning coefficient is 0, the sound is completely in the left outlet. if it is 1, it is completely in the right outlet. a value between 0 and 1 will change the amplitudes of the outlets to make it seem like the sound is somewhere in the middle of the stereo sound field.
loadSample.pdloads a mono soundfile into a table. the table is contained within the abstraction and can be refereed to by the same name as the soundfile. to play the sample, use playSample~.pd with the soundfile name as the first creation argument.
playSample~.pdplays audio from a table in PD's memory. $1 refers to the table name and be changed by sending a different name to inlet2. to play sounds, send a list of three numbers to the first inlet. they correspond to 1.) start time in milliseconds 2.) duration in milliseconds and 3.) transposition in semitones. so, the list '500 1000 2' will play the table starting at 0.5 seconds for 1 second at a transposition of 2 semitones. you can stop audio by sending a '0' to the first inlet. use in conjunction with loadSample.pd.