How to handle multiple project files

Can any one help with a good workflow for managing .rb files and buffers, please? I’m losing track between experiments, and also want to save out sections.

Eg do you start with cleared buffers each time? Mine are always full with experiments, so I’m juggling between versions. How do you handle open/close files and keep on top of things?

And what is the underlying nature of the .rb file. When you ‘save’, does it save just that buffer?

I’ve tried editing .rb files in VS Code or text editor. Sometimes it’s then greyed out and I can’t reload.

I want to set up a good workflow and filing system, realised I need more info on how it works.

Any suggestions appreciated! Thanks.

Hi,

Like you, I also have multiple experimental code blocks (trying different params for example) in separate buffers. Pretty soon, the 10 buffers get used up. So, I tend to comment out the experimental code (in a buffer), run my normal code then comment out the normal code in order to continue with the experimental code. This is a bit of a clumsy routine so here’s what I do…

On an external drive I have set up a folder (directory) for all Sonic Pi files. Then, I create a bunch of sub-directories. They are as follows:

SonicPi_Samples: (containing my own .flack, .mp3 and .wav files. Naming each file meaningfully is important. This directory also provides consistent path/addressing for Sonic Pi to access the samples. I even keep a note file stating the tempo of each sample. I identify the tempo using Audacity and use Audacity to trim samples for looping contexts.

SonicPi_Completed: This directory contains all completed .rb files saved from individual buffers. These files are ready to play/run with no further editing require. They have intro, verses, chorus and tags/outros. Typically, each of these files has a bunch of live_loops, threads and def call. Whiles running them, I can live code for effect but essentially, they a complete. I often record them and keep the recorded .wav files in a sub-directory within the Completed directory called 'sonicPi_wav_Files.

SonicPi_template_Files: The contain my experimental file/templates which I can load when needed. I often use them for teaching also.

SonicPi_working: This is where I store incomplete works.

So, essentially I set up directories specifically for Sonic Pi files on an external drive for storage and recovery. I use separate folder/directory categories depending on requirements. I also set sub-directories for storing .wav files recorded from completed works.

I have tried using a github also but prefer the above. BTW, the files that are saved as .rb files are in note pad/simple text without format but I can open them in other editors ie Sublime.

Not sure if this is helpful or more confusing but it’s how I keep my craziness a bit more organised (or not :slight_smile: ). GL from Altan.

1 Like

Hi Altan,

Thanks so much! This is superhelpful and exactly what I needed. I’ve been using ‘comment out’ liberally :smiley: but got confused between versions, need something more granular and organised.

I particularly like your ‘template’ section which could also be used for listeners/interactive. This is the main experiment corner where I lose track of where I got to, between sessions. I did keep notes/diary but this has also become unwieldy!

Also, external drive will be a gamechanger, as I have Sonic Pi on three computers, have been using it locally until now.:tada: :folded_hands:

Think I’ll introduce a ‘start with clean buffers’ rule once everything is defragged :slight_smile:

Massive thanks for your help!