If you’re playing notes from sheet music that is set in a different key than C major, is there a command in Sonic Pi to set the key or do you just have to change the affected notes by hand? Thanks.
What do you mean ?
If you are looking for transposing stuff Transposing a play pattern to a key
If you’re entering note names directly, Sonic Pi lets you specify sharps or flats by adding “s” or “f” to the note name:
play :gs4 sleep 0.5 play :fs4 sleep 0.5 play :e4
If you’d rather specify a melody in terms of a key, then @nlb’s advice is correct: you can use a
scale object and access it by index:
s = scale(:e4, :major) play s sleep 0.5 play s sleep 0.5 play s
You can then “change the key signature” by using a different
Does this make sense? I hope it helps.