Skip to content

Instantly share code, notes, and snippets.

@AlexandreRangel
Created May 2, 2016 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexandreRangel/2c22e67e7d714871830eafd5e113d52b to your computer and use it in GitHub Desktop.
Save AlexandreRangel/2c22e67e7d714871830eafd5e113d52b to your computer and use it in GitHub Desktop.
# Alexandre rANGEL
# www.quasecinema.org
# Bast - v06
# 1 May 2016
# Sonic Pi 2.10
set_sched_ahead_time! 2
use_random_seed 3.14
y = 0
d3= 0
use_bpm 144
set_volume! 0.8
sample_pim = '/Users/rangel/pisamples/pim.wav'
#http://www.freesound.org/people/SpankMyFilth/sounds/215491/
sample_bottle = '/Users/rangel/pisamples/bottle.wav'
#http://www.freesound.org/people/LG/sounds/101401/
bar = 0
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 :metroFast do
##| sleep 0.5
##| end #metroFast
#############################################################
# countdown sync
##| use_synth :beep
##| play 90, attack: 0, sustain: 1, release: 0, amp: 0.75
##| sleep 2
##| play 90, attack: 0, sustain: 1, release: 0, amp: 0.75
##| sleep 3
########################################################################
p1 = 0
live_loop :perc1 do
cue :metro
if bar > 16
use_synth :pulse
play 18,
attack: (ring 2,3,4)[p1], sustain: 1, release: (ring 4,3,2)[p1],
pan: rrand(-0.18,0.18), pan_slide: 1,
amp: [0.25,0.5,0.75,1,1.25,1.5,1.75].choose * 0.333
end
sleep 4 / 1.5
p1 = p1 + 1
end
########################################################################
live_loop :pulso do
cue :metro
use_synth :dsaw
with_fx :echo, phase: 2 do
play 24,
attack: (ring 2,3,4)[tick], sustain: 1, release: (ring 4,3,2)[tick],
pan: rrand(-0.18,0.18), pan_slide: [0.5,1,2,4,8].choose,
amp: rrand([0.222,0.333].choose,[0.555,0.666].choose)
end #fx
sleep 4
end
########################################################################
e1 = 0
live_loop :eim do
use_synth :growl
play 18+(ring 36,48,60)[(e1/3.0).to_int],
pan: rrand(-0.25,0.25), pan_slide: 2,
attack: (ring 2,3,4)[e1], sustain: 1,
release: (ring 4,3,2)[e1],
amp: rrand(0.9,1.222)
sleep 4
e1 = e1 + 1
end
########################################################################
live_loop :kick do
if bar > 22
sample :bd_haus, amp: 2.0
end
sleep 1
end #end
########################################################################
live_loop :kick2 do
if bar > 28
with_fx :slicer, phase: [0.25,0.5,1,2].choose, mix: [0,0.5,1].choose do
with_fx :echo, phase: 1.5 do
sample :sn_dub, rate: 1, amp: rrand(1.3,1.5) *0.6,
pitch: [-1,0,0,0].choose
sample :sn_dub, rate: rrand(0.38,0.4), amp: 0.9 *rrand(0.666,0.7)
end
end
end
sleep 4
end #end
########################################################################
live_loop :bottle do
x = (rrand_i(1,3))
case x
when 1
with_fx :slicer, phase: [0.25,0.5,1].choose do
with_fx :echo, phase: [2,4,8].choose, reps: 2 do
with_fx :pitch_shift, pitch: rrand(-6,4),
window_size: rrand(0.001,0.003) do
with_fx :gverb do
sample sample_pim, amp: rrand(1.0,1.5),
rate: [1.0/8,0.25,0.5,1].choose
end
end
end
end
sleep [1,2,4,8,16].choose
when 2 then
with_fx :wobble, phase: [1.0/8,0.25,0.5,1].choose,
wave: [0, 1, 2, 3].choose, smooth: 0.1 do
with_fx :vowel, vowel_sound: [1, 2, 3, 4, 5].choose do
with_fx :slicer, phase: [0.25,0.5].choose do
with_fx :pitch_shift, pitch: rrand(4,12),
window_size: rrand(0.001,0.003) do
with_fx :gverb do
sample sample_bottle, amp: rrand(1.0,1.1) * 1.5,
rate: [-1,-0.5,0.5,1].choose,
start: rrand(0.03,0.05)
end
end
end
end
end
sleep [2,2,2,2,4,4,4,8,8,16].choose
when 3
sleep 2
end
end
########################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment