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
live_loop :anything do | |
sample :loop_amen, rate: 0.5 | |
sleep 3.5 | |
end |
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
live_loop :anythingyouwnat do | |
play (scale :e3, :minor_pentatonic).tick(:foo), release: 0.1 | |
sleep (ring 0.125, 0.25).tick(:bar) | |
end | |
sleep 8.5 | |
live_loop :anythinguwant do | |
sample :loop_garzul, rate: 0.5, finish: 0.25 | |
sample :loop_industrial, beat_stretch: 4, amp: 1 | |
sleep 4 |
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
# random drum machine | |
# an array of times for when samples should play | |
# we'll have a corresponding array for which | |
# sample to sound at a particular time | |
def times_beat(i) | |
# beats, quarter beats, and triplets | |
times_one = [0, 1.0/4, 1.0/3, 1.0/2.0, 2.0/3, 3.0/4] | |
times_one.map {|j| j + i} | |
end |