4.times do
play rrand_i(60, 90)
sleep 0.5
end
piano o3 g8 a b > c d e f+ g | a b > c d e f+ g4 g8 f+ e d c < b a g | f+ e d c < b a g4 << g1/>g/>g/b/>d/g
draft 2 - my idea
# define
use piano o3 g8 a b > c d e f+ g | a b > c d e f+ g4 g8 f+ e d c < b a g | f+ e d c < b a g4 << g1/>g/>g/b/>d/g
# function
4.times do
play rrand_i(60, 90)
sleep 0.5
end
4.times do
play piano
end
goals
I would like to extend sonic-pi’s powers with other music programming languages
Gather all the various people who love music and used some programming language to create music to extend sonic-pi programming language
Entirely possible, though dependent on priorities and finding the resources to do
Regarding your goals: we too are interested in allowing Sonic Pi to be extended with various types of mini-languages. (For example, adding petal is on the wishlist, and Sam has experimented in the past with adding support for IxiLang).
As @ethancrawford already said it’s entirely possible. I have also created (unofficial) extension for parsing generative numeric notation called Ziffers.
In ziffers it’s also possible to preparse note names to pitch classes / degrees, which is then very similar to alda in some ways. However ziffers is based around the idea of numerical/integer notation and includes some generative syntax and support for mathematical transformations etc.
In researching various music Domain Specific Languages (DSLs) it seems that quite a few folks have “mini” languages for more compact notations. While I know that can potentially add complexity if there are multiple ways to do things, I’ve found is that some of the notations map better for how I think about notes and music. Using sleep (x) to pause things doesn’t come natural to me. Strudel has a notation that seems very understandable: "e3 [b3 c3] d3 [c2 b3]"
This divides a bar into 4 equal parts with a quarter note, two eighth notes, another quarter note and two more eighth notes.
Of course, one man’s simplicity is another man’s complexity, so I am not saying this is the right way to go. But perhaps at some future version of Sonic Pi there might be a way to accommodate an alternate notation, whether it’s Strudel, Alda, Ziffer or something entirely new.