Ruby Symbols in SPi

This is because Sonic Pi is not Ruby. This is something I try to emphasise but often seems to get pushed to the wayside. Sonic Pi is built on top of Ruby (currently) and therefore shares a lot of behaviour, but it also changes behaviour (often in subtle places) towards its goal of being a musical instrument and not a Ruby library.

Having :c4 know how to turn itself to the MIDI number 60 means that :c4 + 1 works by returning the MIDI note for :cs4. This isn’t something a typical programming language will do :slight_smile:

Also, calls like to_s and to_f are really not supported and you shouldn’t assume they’ll always be available and/or produce the same behaviour across versions.

I’d definitely look towards using hashes/maps such as {:foo => 3, :bar => 4} this is something I do hope to continue to support as the language evolves.