Skip to content

Instantly share code, notes, and snippets.

@lamegaton
Last active August 31, 2018 05:20
Show Gist options
  • Save lamegaton/a986a8f056805b70177ad0bb3ae35c42 to your computer and use it in GitHub Desktop.
Save lamegaton/a986a8f056805b70177ad0bb3ae35c42 to your computer and use it in GitHub Desktop.
Using this for Sonic Pi
# Welcome to Sonic Pi v3.1
# Romanza sheet is from Ukulele for Dummies
# Translate to Sonic Pi by Son Pham
# Keep learning and creating things!
# use in_thread to keep
#use_synth is for chosing your sound synthesizer, in this demonstration,
#I'm gonna use pluck which is guitar.
#use_bpm is for setting beat per minute for this piece of music.
#I'm gonna choose 90 which is recommended for Romanza
#I use in_thread to keep the next block run concurrently with the in_thread block.
#number.times loop is to indicate how many time the loop is repeated.
use_synth :pluck
use_bpm 90
in_thread(name: :picking) do
18.times do
sleep 0.3
play :e4
sleep 0.3
play :c4
sleep 0.3
end
end
4.times do
play :e5
sleep 0.9
end
play :e5
sleep 0.9
2.times do
play :c5
sleep 0.9
end
play :b5
sleep 0.9
2.times do
play :a5
sleep 0.9
end
play :c5
sleep 0.9
play :e5
sleep 0.9
4.times do
play :a6
sleep 0.9
end
play :g5
sleep 0.9
play :f5
sleep 0.9
in_thread(name: :picking1) do
6.times do
sleep 0.3
play :a5
sleep 0.3
play :f4
sleep 0.3
end
end
play :f5
sleep 0.9
play :e5
sleep 0.9
play :d5
sleep 0.9
play :d5
sleep 0.9
play :e5
sleep 0.9
play :f5
sleep 0.9
in_thread(name: :picking2) do
6.times do
sleep 0.3
play :a5
sleep 0.3
#play :f4
sleep 0.3
end
end
play :d5
sleep 0.6
play :a5
sleep 0.3
in_thread(name: :picking2) do
6.times do
sleep 0.3
play :a5
sleep 0.3
#play :f4
sleep 0.3
end
end
# how to play sharp and flat
#http://sonic-pi.mehackit.org/exercises/en/01-introduction/02-play-a-melody.html
play :e5
sleep 0.6
play :ab4
sleep 0.3
play :f5
sleep 0.6
play :g4
sleep 0.3
play :e5
sleep 0.6
play :Ab4
sleep 0.3
#sharp g5 is ab
play :ab5
sleep 0.6
#sharp of g4 is ab5
play :ab4
sleep 0.3
play :f5
sleep 0.6
play :g4
sleep 0.3
play :e5
sleep 0.6
play :ab4
sleep 0.3
in_thread(name: :picking3) do
6.times do
sleep 0.3
play :e4
sleep 0.3
play :c4
sleep 0.3
end
end
play :e5
sleep 0.9
play :d5
sleep 0.9
play :c5
sleep 0.9
play :c5
sleep 0.9
play :b5
sleep 0.9
play :a5
sleep 0.9
in_thread(name: :picking4) do
6.times do
sleep 0.3
play :e4
sleep 0.3
play :d4
sleep 0.3
end
end
in_thread do
4.times do
play :b5
sleep 0.9
end
end
play :c5
sleep 0.9
play :b5
sleep 0.9
3.times do
play :a5
sleep 0.3
play :e4
sleep 0.3
play :d4
sleep 0.3
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment