Skip to content

Instantly share code, notes, and snippets.

@alex-esc

alex-esc/mfa.rb Secret

Created Sep 24, 2020
Embed
What would you like to do?
##| Music for airports
##| 2.5
sampchoir = "C:/Users/Alex/Music/samples/Music for Airports Loops/Music for Airports Loops/Choir"
samppiano = "C:/Users/Alex/Music/samples/Music for Airports Loops/Music for Airports Loops/Piano"
define :enoloop do |n, samp|
n.times do |i| #i goes from 0 to n-1
in_thread do
loop do
print i
sample samp, i
sleep sample_duration samp, i
end
end
end
end
enoloop 8, samppiano
##| enoloop 7, sampchoir
##| define :enoloop do |n, samp|
##| in_thread do
##| loop do
##| sample samp, (n - 1)
##| sleep sample_duration samp, (n - 1)
##| end
##| end
##| end
##| define :glooper do |instances, samplefolder|
##| internalcount = 1
##| while internalcount < instances
##| enoloop internalcount, samplefolder
##| internalcount + 1
##| end
##| end
##| glooper 8, samppiano
##| enoloop 1, samppiano
##| enoloop 2, samppiano
##| enoloop 3, samppiano
##| enoloop 4, samppiano
##| enoloop 5, samppiano
##| enoloop 6, samppiano
##| enoloop 7, samppiano
##| enoloop 8, samppiano
##| enoloop 1, sampchoir
##| enoloop 2, sampchoir
##| enoloop 3, sampchoir
##| enoloop 4, sampchoir
##| enoloop 5, sampchoir
##| enoloop 6, sampchoir
##| enoloop 7, sampchoir
##| live_loop :piano1 do
##| sample samppiano, 0
##| sleep sample_duration samppiano, 0
##| end
##| live_loop :piano2 do
##| sample samppiano, 1
##| sleep sample_duration samppiano, 1
##| end
##| live_loop :piano3 do
##| sample samppiano, 2
##| sleep sample_duration samppiano, 2
##| end
##| live_loop :piano4 do
##| sample samppiano, 3
##| sleep sample_duration samppiano, 3
##| end
##| live_loop :piano5 do
##| sample samppiano, 4
##| sleep sample_duration samppiano, 4
##| end
##| live_loop :piano6 do
##| sample samppiano, 5
##| sleep sample_duration samppiano, 5
##| end
##| live_loop :piano7 do
##| stop
##| sample samppiano, 6
##| sleep sample_duration samppiano, 6
##| end
##| live_loop :piano8 do
##| stop
##| sample samppiano, 7
##| sleep sample_duration samppiano, 7
##| end
##| live_loop :chorus1 do
##| stop
##| sample sampchoir, 0
##| sleep sample_duration sampchoir, 0
##| end
##| live_loop :chorus2 do
##| stop
##| sample sampchoir, 1
##| sleep sample_duration sampchoir, 1
##| end
##| live_loop :chorus3 do
##| stop
##| sample sampchoir, 2
##| sleep sample_duration sampchoir, 2
##| end
##| live_loop :chorus4 do
##| stop
##| sample sampchoir, 3
##| sleep sample_duration sampchoir, 3
##| end
##| live_loop :chorus5 do
##| stop
##| sample sampchoir, 4
##| sleep sample_duration sampchoir, 4
##| end
##| live_loop :chorus6 do
##| stop
##| sample sampchoir, 5
##| sleep sample_duration sampchoir, 5
##| end
##| live_loop :chorus7 do
##| stop
##| sample sampchoir, 6
##| sleep sample_duration sampchoir, 6
##| end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.