Thanks a million, this was the help I needed! It's satisfying to see that this goes up the C major scale:
d4 $ fast 2 $ n (scale "major" $ "0 1 [2 3]" + "<0 4>") # sound "midi"
(And I could mention that the meaning of numbers and letters had me confused -- for example, that 4
here means the fifth note in the scale.)
I should add that I have also been scratching my head over how to select the key, and proudly display the following (using this post), going to D3:
d4 $ fast 2 $ n (scale "major" $ "0 1 [2 3]" + "<0 4>") |+ n "d3" # sound "midi"
Looking at this, wouldn't it would be more convenient to have a variant of scale
that accepted the key as an argument?