Supergran - live input granular delay/processor


#1

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:





#2

I forgot to mention - if you want a faster response for non-delay style effects it works really nicely if you set delay to 0 and the 'reverse grains' dial to maximum


#3

Cheers Matt, this looks awesome, can't wait


#4

WOW.
I´ve also been playing with this type of effect lately (triggered by the harassment I´m receiving from social media with the microcosm), but I didn´t come even close to get something as complete as this.
Congratulations man, I just tried it and It has so many posibilities.
Thanks for sharing, really :smiley:


#5

Thanks, glad you like it! I've been having so much fun playing around, lots of happy accidents. I kept getting lost making sounds when I was testing stuff :slight_smile:

I've actually got a little update coming:

I realised a lot of the higher densities are bunched up at the top range of the density control, so I've rescaled that. The density control has more sweet spots that way.

And i've reworked the attenuation for when density is high so that it's based more directly on how many grains are playing, and has some slight compression when things get out of hand with feedback.

I'll upload soon


#6

awesome, I´ll be waiting.
By the way, I also loved the disposition of the displays and controls all together on the top of the patch, it makes using it easier.


#7

So, I got distracted adapting the patch for my hardware controls (a lot of parameters to fit into 4 faders/4 knobs and some buttons!) but here's a new patch!

supergran v2.5 upload.axp (113.0 KB)

Changes -

I've combined the freeze repeat and direct mode into a new 'freeze mode'.

Freeze mode parameters:

Freeze - turn on to freeze at the current position

Grain trigger - when pressed the freeze position jumps to the current delay position. If you see what I mean.

Freeze position - direct control of the freeze position, 0-64 on the dial = 0 - 4 bars in the buffer

Freeze scrub - this is similar to the freeze position parameter, but it is relative to the last selected freeze position. It will select a new freeze position within a range either side of the current position. Confusing! In effect, if you turn on the freeze and then turn this dial, you can scrub 1/2 a bar either side of the frozen position.

Freeze size - set the size of the freeze. If at 0 it will freeze at the grain size. (This is how the direct mode worked before) If larger than 0 it will freeze a slice of the buffer, like a repeater. (This is more like how the freeze repeat button worked before).

Extra settings:

Hold when frozen - when this is on, the buffer is also held when freeze is turned on. When off, the buffer will keep recording when frozen.

Scrub amount - reduces the 'width' of the freeze scrub dial - it's currently set so the dial scrubs 1/2 a bar either side of the freeze position.

Other changes:

I've changed the attenuation for different densities. It lowers the volume of the granulator when lots of grains are playing (higher densities), and boosts it a little when the density control is below 0. There's also some compression, to try and control things when they get too loud. But it's still possible to get into tricky situations with feedback... It's hard to get this right, I'm still experimenting.

The density parameter has been re-scaled so that it's a more even, spread out range when it's above 0.

If anyone has any cool granular ideas I could implement, let me know! I've been playing around with the patch a lot, and it's working pretty solidly. I've adapted it for my hardware, with full midi cc input/output (It sounds ace with a load of automation!). It has presets with 'preset glide' where all parameters do a synced glide to the new settings when you change presets. I'll do a video and upload that patch at some point once it's finished.




#8

Hats Off Matt.....thank you again, will try as soon as time allows, it looks "SuperBuff"


#9

A little update - i've got a stereo version of supergran coming, it's sounding ace. I've got the patch working well in my hardware, but I'll make a version with on screen controls when I get the time and upload (hopefully) soon.


#10

So, here it is, supergran stereo v1!

Everything is stereo!

All probability based stuff is stereo (separate probability for each side), so stereo spray, pitch spray, random octave, shuffle, corrupt, grain reverse.
You can switch off the stereo on these individually.

Most time controls have a right offset control to delay one side for ping pong style effects.

Random pan - increases the chance a grain will be panned to a random position

Width - subtly offsets the delay time for left/right. Not noticeable if lots of stereo stuff is going on, but widens the repeats otherwise

Swap feedback channels - left is fed back to right, etc.

2x multi wave, multi destination, synced lfos with pulsewidth. Each lfo can be sent to any 2 destinations! Triangle, sine, square waves. All respond to pulsewidth (triangles turn into ramps, etc).

Presets! Save and load presets. Glide between them!

Full midi - sync, responds to cc's on channel 13 (can change this), same cc number as the label on the dial. Also responds to notes on the same channel for preset changing (notes are more fun than program changes because they're more easily sequenced!).

I'll try and do a more full write up on the controls at some point, but enjoy. if shit gets weird turn the feedback down quickly!

Hope the forum doesn't break again!


supergran stereo v1.0.axp (217.3 KB)


#11

Very nice! I’d love to hear some sounds! Thanks for sharing.


#12

Awesome Matt, very excited to give it a bash.


#13

Wow! Seems really exciting! A good occassion to dig out my axo again. Thanks for sharing this!


#14

This looks mental, can't wait to try it!