Skip to content

Instantly share code, notes, and snippets.

@Freemoth
Created December 22, 2017 21:47
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 Freemoth/97d17858761646517e5af7273ad674c4 to your computer and use it in GitHub Desktop.
Save Freemoth/97d17858761646517e5af7273ad674c4 to your computer and use it in GitHub Desktop.
# Gooderham Creek Collage No.5, 22Apr2017
# Sonic K
load_sample "D:/SonicPi/my-samples/CreekAtCamleyCottageHaliburton2.wav"
load_sample "D:/SonicPi/my-samples/CreekAtCamleyCottageHaliburton.wav"
wait 2
water = "D:/SonicPi/my-samples/CreekAtCamleyCottageHaliburton2.wav"
waterb = "D:/SonicPi/my-samples/CreekAtCamleyCottageHaliburton.wav"
use_debug false
d = sample_duration water
db = sample_duration waterb
# puts d
live_loop :time do
timing = rrand_i(30, 100)
puts "pulse: #{timing}"
sync :creek
use_bpm timing # speed generates distance between loops
end
live_loop :creek do
x = rrand(0, 0.9)
y = x + rrand(0.02, 0.04)
p = rrand(-1, 1)
f = rrand_i(60, 120)
q = [30, 60].choose
puts "start:#{x} :: finish: #{y}"
if f < 80; a = 3.5; elsif f > 90; a = 0.75; else f > 80 && f < 90; a = 1.5; end
puts "cutoff: #{f} :: amp: #{a} :: pan: #{p}"
puts "rm freq: #{q}"
use_synth :growl
use_synth_defaults amp: 0.2, attack: 0.5, release: 6
with_fx :reverb do
with_fx :slicer, pre_amp:0.5, phase: [0.1, 0.25, 0.33].choose, pulse_width: [0.25, 0.5].choose do
play f*0.5, pan: rrand(-1, 1)
end
end
if f > 80
with_fx :ring_mod, mod_amp: 0.5, freq: q do
sample water, amp: a, start: x, finish: y, attack: rrand(1, 2), release: 4,
lpf: f, pan: p
end
else
sample water, amp: a, start: x, finish: y, attack: rrand(1, 2), release: 4,
lpf: f, pan: p
end
seglen = (y - x) * d
puts "segment length: #{seglen}"
sleep seglen + [1, 2, 4].choose
end
live_loop :creek2, delay: 6 do
xb = rrand(0, 0.9)
yb = xb + rrand(0.02, 0.04)
pb = rrand(-1, 1)
fb = rrand_i(60, 130)
qb = [15, 45].choose
seglenb = (yb - xb) * db
puts "start:#{xb} :: finish: #{yb}"
if fb < 80; ab = 2.5; elsif fb > 90; ab = 0.5; else fb > 80 && fb < 90; ab = 1.5; end
puts "cutoff: #{fb} :: amp: #{ab} :: pan: #{pb}"
use_synth :growl
use_synth_defaults amp: 0.2, attack: 0.75, release: 5
with_fx :reverb, room: 0.8 do
play [fb*0.5, fb].choose, pan: rrand(-1, 1)
end
puts "rm2 freq: #{qb}"
if fb < 80
with_fx :ring_mod, mod_amp: 0.5, freq: qb, mix: 0.8 do
sample water, amp: ab, start: xb, finish: yb, attack: rrand(1, 2), release: 4,
lpf: fb, pan: pb
end
else
if seglenb < 20
sample water, amp: ab, start: xb, finish: yb, attack: rrand(1, 2), release: 4,
lpf: fb, pan: pb
else
with_fx :vowel, vowel_sound: [4, 5].choose, voice: [3, 4].choose, mix: 0.1 do
sample water, amp: ab, start: xb, finish: yb, attack: rrand(1, 2), release: 4,
lpf: fb, pan: pb
end
end
puts "segment length: #{seglenb}"
end
sleep seglenb + [1, 2, 4].choose
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment