Created
December 4, 2016 21:41
-
-
Save AlexandreRangel/ec25c272961c40f1c5914479b349d127 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
# Alexandre rANGEL 'this is a dive' v06 | |
# www.quasecinema.org | |
# 4-Dez-2016 | |
# Sonic Pi 2.11 | |
set_recording_bit_depth! 32 | |
set_sched_ahead_time! 2 | |
set_volume! 0.6 | |
use_bpm 96 / 4 | |
note1 = -24 | |
note2 = -32 | |
play 60, amp: 7 | |
sleep 4 | |
arrangement = true | |
live_loop :haunt do | |
print status if spread(1,16).tick | |
note1previous = note1 | |
a = -24 | |
a = 0 if one_in(64) | |
a = -16 if one_in(16) | |
a = -8 if one_in(32) | |
note1 = ((scale(a,:blues_major,num_octaves: 3).tick)-16) if one_in(2) | |
note1 = note1previous - 1 if one_in(6) | |
note1 = note1previous - 2 if one_in(11) | |
note1 = note1previous if one_in(8) | |
note2previous = note2 | |
b = -24 | |
b = 0 if one_in(64) | |
b = -16 if one_in(14) | |
b = -8 if one_in(32) | |
note2 = ((scale(b,:blues_minor,num_octaves: 3).choose)-[0,8,16].choose) if one_in(2) | |
note2 = note2previous - 1 if one_in(4) | |
note2 = note2previous - 2 if one_in(8) | |
note2 = note2previous if one_in(6) | |
print "note1: #{note1}" | |
print "note2: #{note2}" | |
with_fx :bitcrusher, sample_rate: rrand(2000,48000), | |
sample_rate_slide: 1.0/[8,6,4,2].choose, | |
mix: rrand(0.2,0.8) do | |
if one_in(4) | |
with_fx :flanger, | |
phase: rrand(3,5), phase_slide: [0,0.1,0.25].choose, | |
mix: rrand(0.2,0.6) do | |
sample :ambi_haunted_hum, | |
rpitch: note1, amp: 0.9+rand(0.4444), | |
amp_slide: 0.25, | |
pan: rrand(-0.4,0.4), pan_slide: 0.25, | |
rate: rrand(0.9,1.05) | |
end | |
end | |
end | |
sleep 0.25 | |
end | |
sleep 8 | |
with_fx :reverb, mix: 0.333 do | |
live_loop :perc do | |
print status if spread(1,32).tick | |
note1previous = note1 | |
a = -24 | |
a = -16 if one_in(16) | |
a = -8 if one_in(32) | |
note1 = ((scale(a+8,:blues_major,num_octaves: 3).tick)-16) if one_in(2) | |
note1 = note1previous - 1 if one_in(6) | |
note1 = note1previous - 2 if one_in(11) | |
note1 = note1previous if one_in(8) | |
note2previous = note2 | |
b = -24 | |
b = -16 if one_in(14) | |
b = -8 if one_in(32) | |
note2 = ((scale(b,:blues_minor,num_octaves: 3).choose)-[0,8,16].choose) if one_in(2) | |
note2 = note2previous - 1 if one_in(4) | |
note2 = note2previous - 2 if one_in(8) | |
note2 = note2previous if one_in(6) | |
#print "note1: #{note1}" | |
#print "note2: #{note2}" | |
with_fx :bitcrusher, sample_rate: rrand(2000,44000), | |
sample_rate_slide: [0.125,0.5,1,2].choose, | |
mix: rrand(0.2,0.8) do | |
if one_in([24,32].choose) | |
with_fx :echo, phase: 0.25, decay: [4,2,8].choose, | |
mix: 0.7 do | |
sample :bass_thick_c, | |
rpitch: note2, amp: 1.2+rand(0.7), | |
amp_slide: [0.5,1,1,2].choose, | |
pan: rrand(-0.2,-0.2), pan_slide: 0.25, | |
rate: rrand(0.6,1.05) | |
print '!' | |
end | |
else | |
with_fx :flanger, phase: rrand(1.8,2.2), | |
mix: rrand(0.1,0.3), mix_slide: 0.1 do | |
with_fx :flanger, phase: rrand(0.2,1.2), | |
mix: rrand(0.1,0.5) do | |
sample :bass_hit_c, | |
rpitch: note2, amp: 0.8+rand(0.2), | |
pan: rrand(-0.2,-0.2), pan_slide: 0.25, | |
rate: rrand(0.4,1.05), | |
finish: rrand(0.3,0.999) if spread(3,4).tick | |
end | |
end | |
end | |
end | |
sleep 0.25 / 4 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment