Grainshifter v1.1 ~ granular looping M4L device

Grainshifter

a granular looper for timestretching and pitch shifting pre-recorded clips or live input

gshift

Grainshifter is the culmination of about a month’s worth of granular studies with gen~ and Max 8’s mc. This device is itself a long-winded spinoff of a standalone Max patch I was working on, but as someone who uses Max patches as performance tools and Max for Live devices as compositional tools within Ableton Live, it seemed well worth the personal time investment to refine the granular engine, add in some Live API tricks, and craft a device that might appeal to a variety of musicians and composers.

I originally sketched this out as a way to entice myself to use more rhythmic elements in my music. When time stretching is presented in an interactive way like this, it becomes super easy and compelling to explore variations of a simple drum loop, with a much different result than if you had simply composed the same rhythms with MIDI notes or a sequencer before sound generation. Having said that, melodic or chordal elements are also really fun with Grainshifter. Live input recording leads you towards rhythmic granular and pitch-shifted delay territory.

Requirements

Max 8, Live 10

instructions copied from the GitHub read-me

Main Concepts

Grainshifter divides audio clips into 16 segments, each with their own shift and warp settings. Shift allows for re-ordering of segments, leading to rhythmic sub-loops and creative rearrangement of pre-recorded audio. Warp is the playback speed of that segment, allowing you to speed up or slow down the audio by 2 or 4 times, without affecting the pitch.

Clicking the sequencer button will open a secondary window, revealing four sets of shift and warp control sections, each representing a step in a four stage sequencer. The shift and warp can sequences can have independent lengths assigned to them, allowing for a 3-step shift sequence over a 4-step warp sequence, for example.

The track and clip menus provide access to all tracks and clips shown in session view, allowing you to pull a clip from anywhere in your Live Set. These menus will auto populate when you first add the device, but later changes to the number of clips and tracks will need a manual refresh, which can be done by clicking the track and clip labels.

Sync locks playback to Live’s transport. Various settings of warp easily allow for clips to become longer than the original audio file, but synced playback will keep things in time with the rest of your live set. Or leave things unsynced for explorations in phasing rhythms and melodies.

Pitch is a transposition control for the processed audio, fully independent of playback speed. Clicking the pitch label will switch between absolute pitch and semitone adjustments.

A tab-button labeled buffer and grain swaps between a waveform display of the audio buffer and playhead, and various parameters for grain generation and playback, respectively.

Grain Parameters

grain rate determines the lifespan of a grain in Hz, extending all the way up to 1000hz for audio rate granulation. Modulation of grain rate occurs two ways: retro and constant . retro behaves like tape or simple sampler playback, introudcing pitch changes as grain rate is modified, and likewise constant maintains pitch, allowing for expressive modulation of grain rate without unstable tonality. Note that in retro mode, pitch will gradually return to the value specified by pitch , but how fast this happens is dependent upon grain rate .

Grainshifter also features a set of precalculated window-functions for grains. Smooth interpolation between the 32 stored windows and the ability to skew and tilt the contour of the window provide a superb amount of control of grain amplitude and phase relationships, and even timbre changes at audio-rate granulation.

voices determines how many grains will be active for playback. Grains are evenly offset by phase from each other within one cycle of the current grain rate . Take consideration of voices when used in combination with the other grain parameters, and it becomes possible to stretch and warp most sounds with minimal artifacts, or shape them into entirely new identities.

Live Input

Selecting “~ live input ~” in the clips menu will reveal 3 additional controls. Input is a gain control for boosting or reducing levels recorded into Grainshifter’s internal buffer. Overdub determines how much of the previous audio remains on the next write cycle. Hi pass is a subtle high pass filter for reducing low-end frequency content up to 1000 Hz, useful for pitch shifting live input without muddying the sound.

When live input recording is enabled, sync will automatically be enabled, but switcing to a pre-recorded clip will return sync to its previous value.

Currently, the live input buffer will capture one measure of Live’s current tempo.

Download v1.1

Grainshifter-master.zip (86.7 KB)

42 Likes

Thanks so much, Jacob! This is what I was talking about seeing on your Instagram :slight_smile:

Can’t wait to try it out…

1 Like

Congrats!

7 Likes

saving up for a max upgrade so i can try it out
just want to say, again, this is a powerful app to foster creativity

thanks for building it!

1 Like

are you on live 10 @glia ? don’t think max version matters there

1 Like

@glia ah right, i think @andrew is correct. you should just be able to download the most recent version of max 8, and then within live’s preferences you can choose to run an external max application instead of the one bundled in live 10. as long as you have live 10 suite or a max for live license, it shouldn’t matter if you have a standalone max 8 license or not.

could be wrong tho, i’ve had both live and max licenses for quite awhile now

1 Like

rad i’ll try tonight!

thanks for the tips yall

ohh weird does this app not work with bundled m4l inside 10 ?

^ says there bundled == max 8 ?

i think j was on live 9, which prompted the q.

fwiw, bundled max is a different build that doesn’t always stay in lockstep with the point updates. whenever folks experience weirdness with m4l, installing standalone max and pointing to it often helps because there might be bug fixes from cycling that Live hasn’t ingested yet. currently, Max 8.1.3 is bundled with Live 10.1.13, though :slight_smile:

2 Likes

thanks for the specifics about versioning, that’s good to know going forward as I get questions from people interested in the device

this is true! but building off of what dan said about live’s versions, a bit after @glia’s first post i got a dm from someone on my instagram who was using live 10 suite with a bundled version of max. however, they sent me a screenshot of the max console throwing a whole lot of errors along the lines of newobj - mc.unpack~: no such object for all the mc objects, even though i could tell in the screenshot it was max 8.

i recall when live 10 came out some months before the release of max 8, there was an intermediary version of 8 bundled in with live, but this was still (I’m assuming) before many of the additions in max 8 were finalized and released to the public, so that version didn’t have mc support

dunno - seems like bundled is workin for me, maybe that person just hadn’t updated ableton ?

but more importantly, this thing sounds great. downloaded just to test and like 3 minutes of running a file on my desktop thru three of these + prosody fx led to this:

( summoning @matthewdavid to check out this granular bliss device )

6 Likes

oop yeah, meant to include the fact that i figured they prob didn’t update ableton but alas

but hey yeah, sounds from this device are what matter most. glad you’re enjoying it and thanks very much for sharing a clip of some sounds.

my fav part of this device being out in the open is hearing the things people make ~~~

2 Likes

Playing around with the ~ live input ~ (starting at 8s) for a quasi-S&H filter effect.

3 Likes

hello! it’s been awhile. 1.1 update is now up in the top post!

1.1 update adds some fun things: wavetable-like morphing grain shapes, the ability to maintain constant pitch when changing the grain rate, and the ability to rotate your shift and warp settings to make it easier to lock into time with other sequences/loops/etc.

3 Likes

The 1.1 update seems to crash my Ableton 10.1.15 instance whenever I try to load it fyi

shoot, sorry for the trouble. can you tell me a bit more info about the live sets you’re trying to use it with? are they new live sets (no clips or anything) or existing live sets you’ve been working on?

this was something i experienced a bit while working on the update, but thought i had resolved it :thinking:

1 Like

Hi Jacob,

Nice update, just trying this with Push 2 for the first time, and it’s nice to see some parameters exposed to the Push knobs! I’ll have to explore more!

Thanks!

Ed

1 Like

I tried replicating the bug I had earlier but it seems to be working now! If it happens again I’ll let you know! Thanks for the great device! Btw, whenever I open the sequencer window it opens in fullscreen (I usually use Ableton fullscreen, for reference) and I don’t have any way to close the sequencer window apart from restarting Ableton.

1 Like

glad it’s working now! and thanks for the report on fullscreen behavior, that was not something i considered but should be something easily fixed

1 Like