This is a collection of my patches for Max/MSP. Please let me know if you have any problems with them, or would like to suggest better ways of programming them.
This patch lets you granulate a sound file, with control over traversal through the file, transposition, pitch collections, and the normal granulation parameters. You can record the output of the patch into a sound file.
Download Granulator in either of two forms...
This patch sends the input sound into a bank of 16 bandpass filters, each with adjustable center frequency, gain and Q. Each band has its own delay line, with delay time, feedback and pan settings. The delay time controls are set up to facilitate short delays that create comb filtering effects, with fairly precise control over pitch, as well as long delays that make discrete echoes. Source sound can come from files or live input, and you can send the processed sound to a file to capture your performance.
All parameters listen to MIDI controllers, or in the case of center frequency, to MIDI note-on messages. Normally each band listens on its own MIDI channel — channel 1 for band 1, channel 2 for band 2, and so on. But the Omni switch lets you set center frequencies by playing notes on any channel. The incoming pitches are assigned to the bands in round-robin fashion.
A preset grid lets you save and recall groups of settings, and you can cross-fade between settings over an adjustable time span. Max/MSP programmers may be interested in the implementation of this preset system, which makes use of the pattr family of objects and a custom preset grid, based on the jit.cellblock object. Feel free to incorporate this grid into your own projects.
Download Multiband Delay in either of two forms...
To try it out, press the Open button in the Input section, and load in a sound file — for example, examples/sounds/jongly.aif in the MaxMSP application folder. Then press the Loop and speaker buttons, and click on any of the presets. (Gray squares are occupied; pale squares are empty.) Crank up the Fade time, and see what happens when you change presets.
Spectral Delay is similar to Multiband Delay, except that the band splitting is performed by FFT, rather than by a bank of IIR bandpass filters. It sounds different, but is less musically tweakable than Multiband Delay. (You can't set individual band center frequencies by playing the keyboard.)
This implementation splits the spectrum by seven crossover frequencies. Each of the eight resulting bands runs through its own inverse FFT before reaching a conventional delay line with feedback. The other way to do this would be to route each pair of real and imaginary components from all of the FFT bins through dedicated delay lines. For an example of this approach, download my spectral delay external, jg.spectdelay~. It's much more efficient and flexible than this patch.
Download Spectral Delay in either of two forms...
MIDIgran comprises two separate patches. These patches take the idea of granular synthesis and apply it to MIDI notes. Neither patch uses MSP at all.
MIDIgran [cloud] generates a stream of notes at a certain rate, specified by the time gap between successive notes. This gap, as well as the velocities and durations of the notes, can be randomized within a specific range. An on-screen keyboard lets you play chords, from which the grain pitches are randomly formed. You can transpose the chord over a four octave range.
You can assign MIDI controllers to adjust gap, velocity, duration, transposition and randomization parameters. Notes played on an external MIDI keyboard (or in a sequencer program) control the on-screen keyboard in two modes. Normally a note plays only while the note is held down, but when the Hold checkbox is ticked, a note stays on until you play it again.
Notes go out over a range of MIDI channels, making it possible to combine
several timbres. This also alleviates one of the problems with a MIDI-based
approach to granular synthesis: a note repeated on the same channel can cut
short the previous note, depending on the synthesizer.
Download MIDIgran [cloud] in either of two forms...
MIDIgran [streams] generates four grain streams, each with its own speed, density, pitch, velocity, velocity randomization and duration controls. You can play MIDI notes to set the pitches, and you can assign a MIDI controller to operate each of the four speed sliders. The four streams can be on different channels, so that you can have multiple timbres.
Download MIDIgran [streams] in either of two forms...