norns: SuperCollider engine studies

toward the end of 2021, we published rude mechanicals | monome/docs with generous guidance and support from @sixolet, @Dewb, @infinitedigits and @zebra. it built off of our own enthusiasm for the wonderful introductory workshops (on synthesis and working with samples) Zack led on SuperCollider and norns earlier in the year – to see so many artists digging into SuperCollider was deeply inspiring. it also highlighted a gap in our own studies for norns-centric SuperCollider play.

rude mechanicals outlined starting points for engine development on norns, using SuperCollider, by walking artists through each step in the process of coding their own Juno-inspired synth voice called Moonshine. the study starts with simple code execution in SuperCollider, outlining how to build a SynthDef with an envelope, filter, and control over noise level. the study then migrates the SuperCollider code to norns using an engine boilerplate and a few useful concepts:

  • using a SuperCollider Dictionary to hold parameters
  • leveraging SuperCollider’s built-in functions like .keysDo to establish norns-specific commands
  • building a Lua file to bundle with your engine, to easily integrate it into another script

to reduce complexity at the start of the learning journey, the first study’s Moonshine synth polled our parameter values as a voice was triggered – this meant that changes to the level parameter, for example, wouldn’t be articulated on an already-playing voice, but would serve as the starting point for the next note event. and while the engine was technically polyphonic, this was more a virtue of not establishing any specific way to handle individual voices.

so, with massive help from @zebra + very thoughtful feedback from @jaseknighter, the second entry has been published:

the skilled labor study iterates the Moonshine synth from rude mechanicals into 8 independent voices, each with their own parameters (where changes take audible effect in realtime), and new controls (eg. toggle on/off the filter envelope).

this second study aims to build on the artist-developer’s understanding of SuperCollider’s relationship to norns scripting by modeling how to:

  • break SuperCollider files into separate class and CroneEngine files, so your SuperCollider code can run on a non-norns computer
  • use Groups in SuperCollider to manage realtime parameter changes to a playing voice
  • approach polyphony and voice distribution in SuperCollider
  • structure a flexible template for populating Lua parameters
  • glue it all together into a sequins-powered norns script

this thread is a welcome space for questions about this new branch of the norns studies, experiments with the code, extensions on the concepts, and collaboration on the exercises at the end of each study. we have a third study already in the works (focused on using Busses to build FX chains / aux sends), but please share what you’re curious about seeing covered next!

:sparkles:

65 Likes

i’ve been looking forward to the SC study! :partying_face: :partying_face: :partying_face: thanks for all of the hard work <3

4 Likes

this is such a powerful resource @dan_derks , thanks for bringing it into the light. there is so much great information in this tutorial and in Moonshine - I’ve referred to Moonshine several times already when forgetting how to do things. in general SuperCollider tutorials are few and far between, these SuperCollider studies are just brilliant resources, I’m so glad you put them out in the universe!

6 Likes

hi @dan_derks and the team, thank you all for this it is really easy to get started with SC now with your tutorials. However after completing rude mechanicals I’m hitting a 100% CPU load and !!! question marks on my DIY shield. Do you think it is normal?

EDIT: Found it the envelope kr argument was doneaction instead of doneAction :man_facepalming: however I liked the glitchy sound better with the bug and was surprised that was picked as tutorial until I realized what’s happening

5 Likes

oooo i’m so glad folks are digging in!!

fantastic to hear you found the issue! thank you for sharing your journey – as folks report back about snags like this, i’ll be sure to add them to a ‘common troubles’ section to the studies :slight_smile:

if it helps for the future, you can use Ctrl-Shift-Space (Win) / Cmd-Shift-Space (macOS) to pull up the method call assistant if it doesn’t auto-display as you work, eg:

sounds like a fantastic starting point for your own Moonshine code remix :wink:
lots of great distortion UGens (like decimator) are available to add, as well as adapting glitch approaches from others :sparkles:
have fun!! please let us know if there’s anything we can do to help along the way!

2 Likes

I was doing it in maiden, so no syntax hightailing for me. Thank you so much these are really great resources to keep me engaged!

For anyone wondering here about what doneAction is doing and why CPU load was high you can refer to the official wiki and see that value of 2 supposed to free up resources after envelope release, but since it was not provided resources were not freed thus engine was overloaded

3 Likes

apologies, not sure where to ask this… and really sorry i didn’t bookmark it right where and when i saw it, but pretty sure some apps reroute softcut back into supercollider somehow… i can’t figure out where i read this(like a single line typed into REPL to achieve this temporarily), can anyone advise on how to do this?

and THANK YOU for these studies :pray:

[EDIT: woooot! found it from splnkrv and from there found in Zack’s github… thank you immensely @jaseknighter and @infinitedigits ]

3 Likes