Last active
April 25, 2017 07:08
-
-
Save brunotag/ffbf9acd89efd609540a91b5279c2844 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
basic_pitch = -2 | |
the_pitch = basic_pitch | |
sanity = [:e6,:e7,:g7,:b6,:b7] | |
insanity = [:e6,:e7,:g7,:b6,:b7,:f7,:c7,:d7] | |
more_insanity = [:e6,:e7,:g7,:b6,:b7,:f7,:c7,:d7,:ds6, :ds7,:c6, :gs7] | |
sanity_level = sanity | |
basic_sleep = 8 | |
sleep_interval = basic_sleep | |
pitch_randval = 0 | |
live_loop :set_sleep_interval do | |
sleep_randval = rrand(0,100) | |
if (sleep_randval <20) then sleep_interval = basic_sleep *2 | |
elsif (sleep_randval <40) then sleep_interval = basic_sleep *1.5 | |
else sleep_interval = basic_sleep end | |
sleep sleep_interval | |
end | |
live_loop :set_the_pitch do | |
pitch_randval = rrand(0,100) | |
if (pitch_randval<10) then the_pitch = basic_pitch +6 | |
elsif (pitch_randval<40) then the_pitch = basic_pitch -2 | |
elsif (pitch_randval<60) then the_pitch = basic_pitch -1 | |
else the_pitch = basic_pitch | |
end | |
sleep sleep_interval | |
end | |
live_loop :guit do | |
with_fx :echo, mix: 0.3, phase: rrand(0.15,0.35) do | |
panpot = choose([-0.9,-0.7,-0.5,0.5,0.7,0.9]) | |
sample :guit_em9, rate: 0.5 , pan: panpot, pitch: the_pitch | |
sample :guit_em9, release: 0.75, finish: sleep_interval * 0.5 * 0.1, rate: -0.5, pan: -panpot, pitch: the_pitch # off for now, too much artifact + choose([0,7,12]) | |
end | |
sleep sleep_interval | |
end | |
#changes the level of "sanity" | |
live_loop :sanityTrimming do | |
sanity_randval = rrand(0,100); | |
if (sanity_randval<20) then sanity_level = more_insanity | |
elsif (sanity_randval<50) then sanity_level = insanity | |
else sanity_level = sanity end | |
sleep sleep_interval * 4 | |
end | |
#plays the creepy sounds | |
live_loop :strings do | |
rate = rrand(2,6) | |
with_fx :reverb, mix: 0.8 do | |
use_synth :hollow | |
play choose(sanity_level), amp: rrand(0.4,0.9), attack: rate *0.5, release: rate * 1.25, pitch: the_pitch, pan: choose([-1,1]) | |
end | |
sleep choose([0.25,0.5,1]) * rate | |
end | |
#OFF - TODO:FIX plays the bell | |
#live_loop :random_bell do | |
# sample :perc_bell, rate: 0.2, amp: 0.2, attack_level: 20, sustain: 6, release: 2, pitch: the_pitch -12 | |
#sleep rrand(5,17) | |
#end | |
#plays the bass note | |
live_loop :bass do | |
with_fx :reverb do | |
use_synth :fm | |
play :e2, attack: 0, release: sleep_interval, sustain: sleep_interval *0.5, sustain_level: 0.4, pitch: the_pitch | |
end | |
sleep sleep_interval | |
end | |
#modulate the heartbeat | |
boomRandVal = 0 | |
live_loop :boom do | |
with_fx :compressor, amp: 0.6 do | |
with_fx :reverb, room: 1 do | |
sample :bd_boom, amp: 20, rate: 1 | |
sleep 0.25 | |
if(boomRandVal < 50) then | |
sample :bd_boom, amp: 10, rate: 1 | |
end | |
sleep sleep_interval - 0.50 | |
boomRandVal = rrand(0,100) | |
if(boomRandVal >= 50) then | |
sample :bd_boom, amp: 10, rate: 1 | |
end | |
sleep 0.25 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment