Piano: Difference between revisions

From wikiluntti
No edit summary
Line 12: Line 12:
== Melody ==
== Melody ==


Use sleep command in between.
Use <code>sleep</code> command in between.


<syntaxhighlight >
<syntaxhighlight >
s  = 0.5
play 72
play 72
sleep 0.5
sleep s
play 75
play 75
sleep 0.5
sleep s
play 79
play 79
</syntaxhighlight>
</syntaxhighlight>

Revision as of 16:06, 12 October 2020

Notes

Sonic Pi plays all piano keys. The command play 70 means the 70th key, play 71 plays the next to the right. Sonic Pi plays also decimal notes, try play 71.67. Also, you can play multiple notes at the time:

play 72
play 75
play 79


Melody

Use sleep command in between.

s  = 0.5
play 72
sleep s
play 75
sleep s
play 79