Skip to content

Instantly share code, notes, and snippets.

@laurogripa
Created March 9, 2022 23:53
Show Gist options
  • Save laurogripa/f4208dd22481cb3a99956848f4d583d3 to your computer and use it in GitHub Desktop.
Save laurogripa/f4208dd22481cb3a99956848f4d583d3 to your computer and use it in GitHub Desktop.
# 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