Created
March 9, 2022 23:53
-
-
Save laurogripa/f4208dd22481cb3a99956848f4d583d3 to your computer and use it in GitHub Desktop.
This file contains 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
# Welcome to Sonic Pi v2.10 | |
set_volume! 10 | |
use_bpm 30 | |
melody = ring( | |
chord_degree(5, :d, :major, 4), | |
chord_degree(4, :d, :major, 4), | |
chord_degree(1, :d, :major, 4), | |
) | |
tempo = ring(1, 0.5, 1) | |
pan = ring(-1, 0, 1) | |
live_loop :foo do | |
use_synth :beep | |
tick | |
play melody.look, attack_level: 0.5, attack: 1, amp: 1, cutoff: 30, pan: pan.look | |
sleep tempo.look | |
end | |
live_loop :offbeat do | |
use_synth :beep | |
time_warp 0.5 do | |
tick | |
play melody.look, attack_level: 0.5, attack: 1, amp: 1, cutoff: 30, pan: pan.look | |
sleep tempo.look | |
end | |
end | |
live_loop :bar do | |
use_synth :blade | |
tick | |
play melody.look.first, pitch: -12 | |
sleep tempo.look * 2 | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment