Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set tempo to 120. // adjust tempo as desired
- set rootnote to 55. // adjust root note as desired
- // define notes
- set n0 to rootnote.
- set n1 to n0 + 2.
- set n2 to n1 + 2.
- set n3 to n2 + 1.
- set n4 to n3 + 2.
- set n5 to n4 + 2.
- set n6 to n5 + 1.
- // define durations
- set d1 to 1 / 16. // sixteenth note
- set d2 to 2 * d1 // eighth note
- set d4 to 2 * d2 // quarter note
- set d8 to 2 * d4 // half note
- // define melody
- set melody to list(n0, n1, n2, n3, n4, n5, n6, n5, n4, n3, n2, n1).
- // define durations for melody
- set durations to list(d4, d8, d8, d4, d8, d8, d2, d2, d2, d2, d2, d2).
- // play melody
- for i in range(0, length(melody) - 1) {
- skid:play(1, melody[i], durations[i] * tempo).
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement