Created
March 12, 2016 02:37
-
-
Save xavriley/84e23e9044b3c1dcc757 to your computer and use it in GitHub Desktop.
Final piece at BathRuby 2016
This file contains hidden or 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
define :bo do |idx| | |
"Users/xriley/Dropbox/Public/sounds/barack/b#{idx}.wav" | |
end | |
use_bpm 125 | |
live_loop :heartbeat do | |
sample :bd_tek, amp: 0, cutoff: (range 60, 90).mirror.tick | |
sleep 1 | |
end | |
live_loop :voice, sync: :heartbeat do | |
sync :bass | |
idx = (ramp *(range 1, 17)).tick | |
with_fx :none, probability: 0.8, amp_min: 0.4 do | |
with_fx :tanh, amp: 2 do | |
sample bo(idx), rate: 0.9, amp: 2 | |
sleep sample_duration(bo(idx)) | |
sleep 4 | |
end | |
end | |
end | |
live_loop :lead, sync: :aphex do | |
with_fx :echo, mix: 0.2 do | |
x = synth :chiplead, | |
note: :d4, | |
release: 0, | |
sustain: [1,2,3.9].choose, | |
note_slide: 0.04, | |
amp: 0.5 | |
if spread(3,4).tick(:structure) | |
16.times do | |
control(x, note: scale(:d5, :minor_pentatonic).choose) if one_in(3) | |
sleep 0.25 | |
end | |
else | |
16.times do | |
control(x, note: scale(:d5, :minor_pentatonic, num_octaves: 2).each_cons(4).to_a.flatten.reverse.ring.tick(:solo)) | |
sleep 0.25 | |
end | |
end | |
end | |
end | |
live_loop :aphex, sync: :heartbeat do | |
with_fx :none do | |
16.times do | |
sample all_sample_names.to_a.grep(/closed/).choose, | |
sustain: 0.25, | |
amp: 1.2, | |
pan: rdist(0.5), | |
on: spread(7,8).tick(:rhythm), | |
cutoff: (range 90, 110).mirror.tick(:co) | |
sleep 0.25 | |
end | |
end | |
end | |
live_loop :pad, sync: :aphex do | |
with_fx :slicer, probability: 0.8, cutoff_max: 100 do | |
16.times do | |
synth :prophet, | |
amp: 1, | |
note: (chord_degree (knit 1,8,2,8,4,8,1,8).tick(:chords), :d4, :dorian, 4), | |
release: (knit 2,3,0.5,3,0.25,2).look(:chords), | |
on: (spread 3, 8).tick | |
sleep 0.25 | |
end | |
end | |
end | |
live_loop :bass, sync: :aphex do | |
use_transpose (ring 0, 0, 0, 5).tick(:transpose) | |
16.times do | |
synth :mod_fm, note: (knit :d2, 13, :c3, 2, :d3, 2, :a2, 1).to_a.shuffle.ring.tick(:n), | |
amp: 1.5, | |
on: (knit spread(5,16).tick, 8, 0, 4, 0, 2, 1, 2).tick(:break), | |
release: 0.25, | |
depth: (range 1, 4, 0.1).mirror.tick(:co) | |
sleep 0.25 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment