six grains

three lands. each land has six grains. each grain moves with physics modeled by 1d kinematics of interlocked elastic beads of random masses. the width of the grain corresponds to the size of the sample. the speed, volume, pan, and direction of the sample is controlled through internalized random oscillations. these oscillations have a macro control, or micro control if you want to venture into editing the heavily commented code (encouraged!!).

this script was born out of creating a sampling demo for the ceti workshop series. it has a standalone SuperCollider implementation called Ube (though Ube is missing the organic physics controls). its origin is also in barcode which has its provenance in the softcut norns study #3.


  • norns


  • e2/e3 changes boundaries
  • k2/k3 navigates lands
  • e1 changes timescale
  • hold k1+k2 to load audio
  • hold k1+k3 to record audio
  • press k1 to toggle “favorites”
  • when in favorites mode:
  • e1 changes number of grains
  • e2 scrubs favorite
  • e3 creates favorites

check the options to tune things even further. there is an incredible reverb (a stereo variant from Jon Dattorro implemented by jpcima) and you can control the “velocity” when switching between favorites for some great performable gestures.


many thanks to @mpty who very patiently helped me beta test and shared this beautiful rendition (and kindly gave me permission to share it here):

also many thanks to people in the ceti workshop that played with ube and inspired to keep digging into it ( @24Franks , @jaseknighter , @dan_derks )


install with


after installing and you run, you may be prompted to install additional SuperCollider libraries. press k3 to install. this has been tested and seems to work on all devices I have access to, but let me know if you run into trouble.


i loved playing with the ube script at the workshop and i am very, very excited to dig into this one and figure out what 1d kinematics are all about. such a beautiful sound too!

sososo many thanks for this and all your contributions to the community @infinitedigits! <3333


Thank you @infinitedigits for this amazing script and for giving me an early access, It was my pleasure to help you beta test it :heart: :heart:


We’re blessed with another one! Can’t wait to try it and thank you for sharing it with us


Sounds awesome! Am twiddling the knobs and pressing the buttons and my shield is emitting some heavy bliss… Hope someone can post a (Slow! clear!) video explaining the “favourites” stuff at some point. Words written down make my brain heat up. Videos explaining things with visual references help me understand these things - that’s just the way I am.
Congrats Zack!


So good… thank you for sharing :pray:t3:

It’s making some beautiful sounds to put in my ears this morning (while the kids watch Pokémon…)


You can’t go wrong if you’ve loaded it up with Parmegiani!


beautiful work!! (as always :heart_eyes:) thanks for sharing!!

1 Like

Why aren’t E2 and E3 making the boundaries move?
Sometimes they do, but right now, they ain’t going nowhere…

1 Like

Because you’re in favourites mode, perhaps…

(Longer press on k1 gets you in and out of favourites mode - indicated by the selection extents markers going brighter - and the favourites are denoted by little tick markers at top/bottom of waveform. When in that mode you can nudge it between the favourites with e2, and create new ones with e3… I think)


Ace! Thanks. Figured it was something to do with favourites. Don’t think I was long-pressing on E1,…was just tapping it.
This thing sounds amazing!

1 Like

Lovely script! Thank you very much for sharing it.

I have two questions:

  • what does “Temperature” do?
  • is there a way to adjust pan? Some files seem to be panned entirely left (maybe mono files?).

Also maybe a bug:

  • if I change files via parameters, the file names displayed in the script don’t change.
1 Like

Oh thx again for another great one! Happy to see that’s possible to record live audio material!

1 Like

thanks all for the kind words. :heart:

yes! if someone doesn’t I will in about two weeks or so.

yes! the K1 toggles between favorites mode and regular mode. in favorites mode you can only move between favorites (I have an idea to improve this a little bit) or make/delete favorites. i realize this is a little wonky, I’m open to improving it. the idea is that the “favorites” mode is for easy recall of specific sections. and the regular mode is more for exploration. so if you find yourself not being able to move, press k1.

short answer: subtly affects how fast the bars move (which affects the sample start/end points).

long answer: its not obvious, but the length of each bar is set by the distance between two elastic masses. these masses bounce off each other and the boundaries, which is why you see expanding/contracting in the bars. the masses are also interconnected a bit so its not strictly two balls bouncing between each other - they interact with other bars. the temperature is a temperature in the physical sense: temperature is a measure of the mean translational kinetic energy. by setting the temperature lower, the kinetic energy of the masses (the velocity) will have random perturbations that bring it back towards the set temperature (i.e. it simulates a heat bath). basically a very very simple form of the Nosé–Hoover thermostat. initially this parameter was going to do more because I had planned to add way s to change masses, but the whole effect is pretty subtle and didn’t really need to get overcomplicated (it probably already is).

this is a bug! thanks. I forgot to add cases to handle mono files. will add soon.

also a bug! thanks, will fix this too.


Awesome script as always, @infinitedigits !
Just a first contact today, and when trying to map parameters to my 16n I see most of the parameters are missing en Map menu
Then checking in the parameters I can see tripled parameters as well ( f.e. 3x “move duration” in land 1.

Update Edit: there are 3x “move duration” in each land, but in the params menu the order is different inside each land menu

Edit 2: power off/on and load graintopia again, checking the MAP menu mow show almost all land 1 parameters but only the “move duration” for 2 & 3

Great work! Thanks a lot for sharing that little jewels


When I press K1 + K3 to start recording a message appears saying “press any key to stop recording”, but when I then press a key, rather than just stop the recording it loads the recording (?) Is this a bug ?

1 Like

I really liked the piano sample when i loaded the script first time. Were Can i find it again?

1 Like

If you navigate to code/graintopia/lib/ and scroll through the list, you’ll find the two starting audio files: choir_cm.flac & piano_cm.flac.


Came here to say thank you for this especially!! Fantastic! I always enjoy digging into granular but, the need to have a sample ready to go for some reason isn’t my ticket usually. SO being able to record like in grandchild is the bee’s knees! Amazing as always @infinitedigits !


Thank you for this @infinitedigits it’s beautiful, I spent hours creating sonic landscapes from my onboard tapes.

I have noticed it is pretty resource heavy, with 3 samples and live input I’m getting Softcut glitches and using 70-80% of the CPU (Pi3).

Any thoughts on how to minimise/optimise system resources? Do certain parameters increase/tax the load - smaller grains for example, or shorter windows etc?

Lastly is there a way to clear out a buffer or turn it off to reduce CPU load? Wondering if efficiencies can be found in enabling/disabling “worlds”?

Thanks again for the GEM of a script.