Hi all,
Here's my latest project, supergran. It's a granular effect based on 3 new objects I made: a retriggerable, syncable dual buffer, a granular player, and a new clock object for sync.
It's got tons of parameters with lots of random/probability based options. It uses most of the axo's processing (the processing jumps up when lots of grains are playing). It's capable of playing up to 18 grains at once. Grains can be huge or tiny.
It's working pretty solidly, and I've tried to keep everything as modulate-able and click free as possible.
I've uploaded the patch set to a standard 1/4 division delay as a good starting point for playing around with its features.
A note on the clock syncing - it syncs the buffer length to the clock. The buffer length is 4 bars long, and the time based inlets are scaled from 0 to 4bars. The sync always locks to the nearest whole bpm. The time parameter dials have a 'z' integer parameter, this will scale the knobs to a smaller range. I like to have the z set to 2, giving a dial range of 0 to 1bar. So if the dial is at 32, the time would be half a bar. If dial is at 16, the time would be 1/4 bar.
Generally, dial settings for any time parameter that are multiples of 2 give nicely synced times. But other settings would give you unsynced times (that will still change with the bpm. If that makes sense).
supergran v1.0 upload.axp (105.1 KB)
Here's a run down of its parameters and what they do:
CLOCK
The sync will automatically switch to the last started clock. When the patch loads it will use the bpm setting. If midi clock is started, a tempo is tapped, or the bpm parameter is changed, the sync will switch.
- tap tempo. Tap a new tempo!
- bpm. Type in a new bpm
- revert to midi. If a midi clock is running in the background and you've tapped a different tempo, pressing this will go back to the midi clock.
MIXER
- dry/wet
- buffer/grain. This is the wet output, a blend of the delayed buffer and the grain playback. Mostly you'll want this at maximum for granular stuff.
- volume.
DELAY/FEEDBACK
- delay time. This is the main delay time setting
- feedback
- feedback type. At minimum the feedback control will feedback the delayed buffer playback, pre granulator. This results in repeats not being reprocessed by the granulator (a pitched delay will not keep stepping up in pitch as it feeds back). At maximum the feedback is post granulator and is reprocessed (a pitched delay will keep stepping up in pitch as it feeds back).
- freeze repeat. When turned on the buffer is frozen and the current repeat is looped. While the repeat is frozen you can use the 'grain pos' parameter to select a different repeat.
DIRECT MODE
- direct mode on. When direct mode is on the grain player stops following the delay time and is static. playback is frozen at the current position.
- grain pos. When direct mode is on, this will select a new position for the frozen grains. You can use it to scrub through the buffer.
- grain trigger. When direct mode is on and you trigger this the frozen grains will jump to the current delay position. Play around with it to understand.
BUFFER
- freeze buffer. When turned on the buffer stops recording and holds whatever is in the buffer (the last 4 bars of input)
- replace. While the buffer is frozen this acts as a momentary record button, replacing what is in the buffer with new input whenever it is held down.
GRAINS
- grainsize. This is the size of the grain. In the patch this is scaled (by the dial's z parameter) to a maximum of 1/2 a bar. Decrease the z paramater for longer grains.
- density. At 0 the grains will crossfade perfectly for good stretching/pitch shifting. Below 0 and the grains will spread apart further and further. Above 0 and grains will squash together and overlap more. The density is scaled directly from the grain size. If the grain size is a multiple of 2, and the density is a multiple of 2 you should get nicely synced rhythms.
- disintegrate. This is the probability a grain doesn't trigger. At 0 all grains trigger. At 32 there's a 50/50 chance a grain will not trigger.
- spray. This adds a random offset to each grains start position. Nice for high densities.
- reverse grains. This increases the probability that a grain will be reversed. At 0 grains play forwards, at 64 grains play reversed. At 32 the grains will alternate between forward and reversed. Inbetween these settings it will be a random probability. The clock will still be forward (you can reverse this elsewhere).
- shape. This controls the grain envelopes. At 0 the shape is a triangle, as you increase the dial it gets more and more trapezoid. At max it is almost square.
- curve. Adds an s shaped curve to the shape. A triangle will become a smooth hump. Having this on is slightly more expensive, so maximum grains goes down to 15.
PITCH
- pitch. Changes the pitch of grains in semitones
- pitch spray. Adds randomness to each grain's pitch
TIME
- reverse delay. This reverses the clock and the grains for traditional reverse delay effects. If grains are already reversed (by the reverse grains setting) they will play forwards. So for a normal reverse delay keep 'reverse grains' at 0 and turn this on.
- stretch. Stretches or compresses the delay repeats. It is scaled like pitch (-12 is half speed, +12 is double speed. Both this and the reverse delay setting are resynced to the delay time. If stretch is above 0 it will loop until the next repeat.
- corrupt probability. Increases the probability that a grain's position is set by the corrupt time instead of the delay clock. At maximum you get a kind of rhythmic freezing effect. Play with it!
-corrupt time. Controls the speed of the rhythmic freezing.
GRAIN ECHO
This is a separate delay that just the grain's are sent to. I like using short times for reverb ish effects
- grain echo volume
- grain echo feedback
- grain echo time
- feed grain echo back to granulator. This can get pretty mental, be careful!
SHUFFLE
This is like spray, but on the clock rather than the grains
- shuffle probability. Increases the chance a randomly different slice of the buffer is played.
- shuffle range. The range of the shuffle. At 32 it would shuffle within the last 1/2 bar of input. At 16 it would shuffle from the last 1/4 bar of input.
- shuffle size. Controls how big the shuffle's slices are. So, if the shuffle range is 64 (one bar) and shuffle size is 16 (1/4 bar) it would play random 1/4 bar slices from the last bar of input. Confusing, have a play around!
RANDOM OCTAVE
- random octave probability. The probability a grain plays at a different octave
- octave time. Changes the rate at which a random octave is chosen. At 0 each grain will have a random octave applied. At 16 it would change the random octave every 1/4 bar.
- octave mode. Controls the octave direction. 0 = octaves above pitch setting. 1= octaves below pitch setting. 2= octaves randomly either side of pitch setting.
- octave range. Controls the range of the random octave
LFO
(I highly recommend plugging an lfo into other parameters and experimenting, this is kept simple)
- LFO time.
- LFO wave. 0= triangle, 1=sine, 2= square
- lfo to grain time. Traditional delay time modulation but on the grain playback
- lfo to grain echo time
- lfo to delayed buffer time
EXTRA SETTINGS
(Because it doesn't have enough parameters already...)
- save buffer to sd card
- load buffer from sdcard (remember, if buffer is not frozen it will get over written)
- all grains on. Stops grains from stopping when they are supposed to. Leads to all kinds of craziness.
- mute grains
- density range. Only affects the densities below 0, allowing really slow grain triggering at low densities
- don't loop when stretching faster. Stops the stretch mechanism from looping.
- resync stretch/reverse to delay time or corruption time. When off (default) and stretched/reversed the delay resyncs at the same speed as the delay. When on it resyncs to the corruption time.
-lo fi pitch interpolation. When off interpolation is smooth. When on you're more likely to get aliasing, depending on what the pitch is doing. Sometimes it sounds nice.
Right, I think that's everything.
Here's some screenshots: