Created
May 15, 2016 23:48
-
-
Save AlexandreRangel/e4fd6737465b06230c5cec2c85236f2e 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 | |
# www.quasecinema.org | |
# "a new bark in town" v01 | |
# 15 May 2016 | |
# Sonic Pi 2.10 | |
use_bpm 48 | |
sample_drawer = '/Users/rangel/pisamples/drawer.wav' | |
#http://www.freesound.org/people/jesabat/sounds/119725/ | |
############################################################# | |
puts "let's go!" | |
live_loop :metro do | |
clock = tick(:metro) | |
bar = clock / 4 | |
puts "bar : #{bar}" | |
puts (ring "1 |","2 | |","3 | | |","4 | | | |")[clock] | |
sleep 1 | |
end #metro | |
############################################################# | |
live_loop :kick1 do | |
with_fx :echo do | |
sample :bd_klub, rate: 0.75, amp: 2.15 | |
end | |
sleep 4 | |
end | |
############################################################# | |
sleep 2 | |
############################################################# | |
live_loop :kick2 do | |
with_fx :echo, mix: rrand(0.111,0.222) do | |
with_fx [:reverb].choose, mix: [0.4,0.5].choose do | |
sample :bd_haus, rate: 0.5, amp: rrand(0.8,0.9) *1.1, | |
pan: rrand(-0.55555,0.55555), | |
pan_slide: [0,0.25,0.5,1].choose | |
end | |
end | |
sleep 4 | |
end | |
############################################################# | |
sleep 1 | |
############################################################# | |
b = 0 | |
live_loop :beep do | |
use_synth :beep | |
with_fx :slicer, | |
phase: (ring 1, 0.25, 0.25, 0.5, 2)[b.to_int] do | |
with_fx :compressor, | |
slope_below: 2.5, slope_above: 0.6, mix: 0.8 do | |
with_fx :pitch_shift, pitch: rrand(-4,4), | |
window_size: rrand(0.001,0.01), | |
window_size_slide: [0,0.25,0.5].choose, | |
mix: 0.75 do | |
with_fx :echo, phase: [0.25,0.5].choose, | |
decay: [0.1,0.5,0.9].choose do | |
with_fx :pitch_shift, pitch: rrand(-6,8), | |
window_size: rrand(0.0001,0.001), | |
window_size_slide: [0.1,0.5,1,2,4].choose, | |
mix: 0.75 do | |
with_fx :flanger, phase: [0.25,0.333,0.5,1,2,3,4].choose, | |
mix: rrand(0.5,1) do | |
with_fx :reverb, mix: 0.5 do | |
play [:F4,:G3,:F3,:G2,:F2].choose, | |
attack: 1, release: 2, | |
amp: rrand(0.37,0.444), | |
pan: rrand(-0.55555,0.55555), | |
pan_slide: [0,0.25,0.5,1,2,3,4,8].choose | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
sleep 3 | |
b = b + (1.0/3) | |
end | |
############################################################# | |
sleep 1 | |
############################################################# | |
c = 0 | |
live_loop :prophet do | |
use_synth :prophet | |
with_fx :slicer, | |
phase: (ring 0.25, 0.25/2)[c.to_int] do | |
with_fx :compressor, | |
slope_below: 2.5, slope_above: 0.6, mix: 0.8 do | |
with_fx :pitch_shift, pitch: rrand(-8,8), | |
window_size: rrand(0.0001,0.003), | |
window_size_slide: [0,0.25,0.5].choose, | |
mix: 0.75 do | |
with_fx :echo, phase: [0.25,0.5].choose, | |
decay: [0.3,0.5,0.7].choose do | |
with_fx :pitch_shift, pitch: rrand(-6,8), | |
window_size: rrand(0.0001,0.001), | |
window_size_slide: [0.1,0.5,1,2,4].choose, | |
mix: 0.75 do | |
with_fx :flanger, phase: [0.25,0.333,0.5,1].choose, | |
mix: rrand(0.5,1) do | |
with_fx :reverb, mix: 0.5 do | |
play [:F4,:G3,:F3].choose, | |
attack: 1, release: 2, | |
amp: rrand(0.37,0.444), | |
pan: rrand(-0.7,0.7), | |
pan_slide: [0,0.25,0.5,1,2,3,4,8].choose | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
sleep 3 | |
c = c + (1.0/3) | |
end | |
############################################################# | |
r1 = 0 | |
live_loop :cowbell do | |
with_fx :echo, phase: 0.5, decay: 0.4, mix: 0.7 do | |
with_fx [:reverb,:gverb].choose, mix: rrand(0.5,0.67) do | |
18.times do | |
i = r1.to_int + [-1,-1,0,0,0,0,1,2,3].choose | |
ampVal = (ring 0.3,0.01,0.3,0.02,0.03,0.05,0.06,0.08) [i] | |
if ampVal > 0.0 | |
ampVal = ampVal * rrand(0.4444,0.55555) * 0.333 | |
end | |
sample :drum_cowbell, | |
amp: ampVal, | |
pan: rrand(-0.7,0.7), | |
pan_slide: 0.25 | |
sleep 1.0/3 * [2,1,3].choose | |
end | |
end | |
end | |
r1 = r1 + 0.75 | |
sleep 2 if one_in(4) | |
end | |
############################################################# | |
sleep 3 | |
############################################################# | |
live_loop :kick3 do | |
with_fx :level, amp: 0.75 do | |
with_fx :echo, decay: [0.2,0.333,0.5,0.8].choose do | |
sample sample_drawer, amp: rrand(1.4,2.0)*0.5, | |
start: rrand(0.04,0.045), finish: rrand(0.1,0.2), | |
pan: rrand(-0.7,0.7), pan_slide: 0.2 | |
end | |
end | |
sleep 3.0 | |
sleep 6 if one_in(4) | |
end | |
############################################################# | |
live_loop :kick4 do | |
sample :bd_haus, amp: rrand(1.7,3.4) *0.1 | |
sample :bd_klub, amp: rrand(1.0,1.2) *0.3 | |
sleep 0.75 | |
end | |
############################################################# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment