Last active
November 29, 2020 19:18
-
-
Save dviramontes/06e8b106a997293380262a68c3c5ee24 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
rels = (ring 0.33,1, 1.4, 2, 4) # ring allows us to `tick` aka cycle through diff values - useful for creating rhythms | |
times = (ring 0.25, 0.125, 0.5, 1) | |
live_loop :___ do | |
in_thread do | |
sample :loop_mehackit2, # this sample comes from the sonic pi library | |
beat_stretch: 3, | |
rate: 0.75, # how fast we play the given sample | |
decay: 6, | |
finish: [0.25, 0.5].choose, # this makes the sample 50% shorter | |
amp: 0.35 # amplitude: aka volume! | |
end | |
sleep [1, 3].choose | |
end | |
live_loop :____ do ### | |
n = (scale [:e1, :e2, :e3, :e4].choose,:aeolian, num_octaves: 4).shuffle | |
s = synth [:fm, :blade].choose, release: rels.choose | |
in_thread do | |
a = 1 | |
64.times do | |
control s, note: n.choose, amp: a | |
sleep times.choose | |
control s, note: n.choose, amp: a | |
sleep times.choose | |
control s, note: n.choose, amp: a | |
sleep times.choose | |
end | |
end | |
in_thread do | |
use_synth [:fm, :blade].choose | |
with_fx :wobble, reps: 2 do | |
play n.tick, amp: 0.5, release: 2, decay: 2 | |
end | |
sleep 2 | |
end | |
sleep 1 # 0.75 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment