Looking for guidance to improve my code

Hey everyone!

I’ve been using Sonic Pi for the last couple of years and have currently been doing live coding gigs across Melbourne (Australia) at both experimental nights but also opening for bands (really fun). I completed my Bachelor of Science (Mathematics) a while ago and did one coding subject - foundations of computing (python), plus used Matlab for a few subjects, however this is the depth of my coding knowledge. Although its helped considerably i.e. my understanding of data structures, loops and conditional statements, I feel like I’ve plateaued in my ability to make more complex music with Sonic Pi beyond the in-built tutorial. It seems when I watch some Sonic Pi live coding streams, I can sometimes feel lost due to a lack of theoretical coding knowledge.

I would love some guidance on where I should keep learning (beyond practicing/making music which I am doing). Some things I have considered:

  • Finding a Sonic Pi tutor to get me to the next level (very happy to do virtual lessons)
  • Doing a short course - is there one for Ruby anyone would recommend? Does all Ruby syntax work in Sonic Pi?
  • Potentially going back to university for Creative Coding (this is not yet common in Australia, so this is the most difficult option)

I really love using Sonic Pi, and my end goals are:

  • to simplify my code so shorter lines do more. I currently have somewhat clunky, long lines of code and mostly change parameters, stop/start, randomise things live. Simplifying my code will help me greatly.
  • understanding how to implement classes
  • more confidently routing audio from Sonic Pi to other programs e.g. Hydra, ps5 - this is in the tutorial but I think I need more support
  • integrating Sonic Pi with multiple instruments - I currently use my mic for vocals and a midi keyboard
  • sending audio to up to 8 speakers at once (for sound installations/performances)
  • coding automation

I am very open to any guidance on this! Maybe even what has worked for other people? If there are any Sonic Pi tutors, I’d also love that.

Thank you! :smiley:

Hi @halloworld

once my new studio is complete (hopefully in a few weeks) I plan to start recording tutorials covering basic to advanced Sonic Pi techniques.

However, for now - you could try asking some of these questions here in the forums. If you were to post an example of a long “clunky” line you wish to simplify it - the community might be able to offer some advice. In some cases it might not be a simple answer but rather another question - for example if you were to post a question about classes, I might respond by saying I can’t see a need to implement classes - so I’d be interested to know what you’re trying to represent with one.

However, thanks so much for your list of goals - if you (or anyone else) have any more things you’d like to see covered in an upcoming tutorial video - please do let me know - the more thoughts the better!


Something that sticks out to me about your post is that everything is very much related to code as opposed to music. You mentioned that you feel you’ve plateaued in your ability to make more complex music. I would suggest you should also consider what you want to achieve musically. This might help give you more direction with what you want to do with your code.

Just something to consider :grinning:


Thank you @samaaron really looking forward to the tutorials! Hope the studio prep goes well! And good tip - I will post my code here :slight_smile: and maybe I’ll send through particularly confusing pieces of live code …

& thank you @mrbombmusic your tutorials have been helpful to me when I was learning! You’re right, maybe working the other way around - starting by defining what I want to represent/do musically and then finding a way to make it work through code!

I appreciate your responses, until next time.

  • Fetle