Created
June 21, 2024 14:18
-
-
Save emilyvomacka/c40669a042019b565bf70069bd92cbe6 to your computer and use it in GitHub Desktop.
hello-sonic-pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# suggestions: switch synths, play with the sound envelope, add samples, stretch/compress samples with :rate | |
define :phone do | |
use_bpm 60 | |
##| in_thread do | |
##| loop do | |
##| use_synth :dark_ambience | |
##| sync :first_cue | |
##| play chord(:A2, :minor), amp: 3, decay: 3 | |
##| use_synth :bass_foundation | |
##| play :A3, amp: 0.4 | |
##| end | |
##| end | |
##| in_thread do | |
##| loop do | |
##| use_synth :dark_ambience | |
##| sync :second_cue | |
##| play chord(:A2, :minor) | |
##| use_synth :bass_foundation | |
##| play :A3, amp: 0.4 | |
##| end | |
##| end | |
##| in_thread do | |
##| loop do | |
##| sample :drum_heavy_kick, rate: 0.25, amp: 0.2 | |
##| play 16 | |
##| sleep 1 | |
##| end | |
##| end | |
##| in_thread do | |
##| loop do | |
##| sync :first_ambi_cue | |
##| sample :ambi_lunar_land, rate: 0.5, amp: 0.1 | |
##| end | |
##| end | |
loop do | |
#use_synth <autocomplete!> | |
#with_fx <autocomplete!> do | |
loop do | |
cue :first_cue | |
cue :first_ambi_cue | |
7.times do | |
play :E4, amp: 0.25 #, attack: 0.25, release: 0.25 | |
sleep 0.5 | |
end | |
4.times do | |
play :A4, amp: 0.25 #, decay: 0.5 | |
sleep 0.5 | |
end | |
4.times do | |
play :G4, amp: 0.25 | |
sleep 0.5 | |
end | |
play :D4, amp: 0.25 | |
sleep 0.5 | |
cue :second_cue | |
2.times do | |
7.times do | |
play :E4, amp: 0.25 | |
sleep 0.5 | |
end | |
play :A4, amp: 0.25 | |
sleep 0.5 | |
end | |
end | |
end | |
end | |
phone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# single notes with numbers | |
play 70 | |
sleep 1 | |
play 74 | |
sleep 1 | |
play 77 | |
sleep 1 | |
play 82 | |
sleep 3 | |
# single notes with letters | |
play :C4 | |
sleep 1 | |
play :E4 | |
sleep 1 | |
play :G4 | |
sleep 1 | |
play :C5 | |
sleep 3 | |
# a random melody | |
20.times do | |
play rrand_i(58, 82) | |
sleep rrand(0.25, 0.75) | |
end | |
sleep 3 | |
# harmony | |
play chord(:E3, :m7) | |
sleep 1 | |
play chord(:E3, :minor) | |
sleep 1 | |
play chord(:E3, :dim7) | |
sleep 1 | |
play chord(:E3, :dom7) | |
sleep 3 | |
# random harmony | |
8.times do | |
play choose(chord(:E3, :minor)), release: 0.3, cutoff: rrand(60, 120) | |
sleep 0.25 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment