Skip to content

Instantly share code, notes, and snippets.

@mbutz
Created Apr 20, 2019
Embed
What would you like to do?
Geneva Live Coding Exercise
# Geneva Live Coding
# filename: perf-geneva.rb
blips = "~/projects/sonicpi/audio/samples/blips/"
use_bpm 120
live_loop :metro do
sleep 1
end
live_loop :bar, sync: :metro do
sleep 4
end
live_loop :bd, sync: :bar do
at (ring 0, 1, 2, 3, 4, 5, 6, 7, 7.75) do
sample blips, "easea", amp: 1.0
end
sleep 8
end
live_loop :hat, sync: :bar do
at (ring 0.5, 1.5, 2.5, 3.5) do
with_fx :panslicer, phrase: 0.5 do
sample blips, "ch_", 23, pan: -0.25, amp: 0.5
sample blips, "ch_", 16, pan: 0.75, amp: 0.5
end
end
sleep 4
end
live_loop :snare, sync: :bar do
at (ring 1, 3) do
with_fx :reverb, room: 0.75, mix: 0.5 do
sample blips, "sn_", 23, rate: 1.25, start: 0.05, amp: 0.25
end
end
sleep 4
end
live_loop :cym, sync: :bar do
at (ring 6) do
with_fx :slicer do
sample blips, "cy_", 4, attack: 0.5, release: 0.5, beat_stretch: 16, finish: 0.25, rate: -1 if one_in 3
end
end
sleep 8
end
live_loop :ambience, sync: :bar do
ctf = (ring 68,71,73,74,76,78,81,83,85,86,88,90,93,95,97,98,100.25,102.25)
with_fx :rlpf, cutoff: ctf.tick, res: (ring 0.5, 0.5, 0.975).choose do |rlp|
control rlp, cutoff: ctf.tick, cutoff_slide: (ring 0.25, 0.25, 0.5, 1).choose
with_fx :slicer, phase: (ring 0.25, 0.75).choose, mix: 0.75 do
sample mb + "ravel", 9, attack: 0.125, release: 0.25, start: 0.5, rate: -0.25, amp: 3
end
end
with_fx :slicer, phrase: 0.75, mix: 0.25 do
at (ring 0, 1) do
sample mb + "ravel", 9, attack: 0.125, release: 0.25, start: 0, rate: -0.5
end
end
sleep 2
end
live_loop :piano1, sync: :bar do
#stop
ptn = (ring 1,0,2,0, 1,2,0,1, 0,2,1,2, 0,2,2,0)
sample mb + "ravel", 1, start: 0.65, finish: 0.75, amp: ptn.tick
sample mb + "ravel", 0, start: 0.55, finish: (ring 0.575, 0.65, 0.65).choose, rate: (ring 1, 1.5).choose, amp: ptn.reverse.look
sleep 0.25
end
live_loop :piano2, sync: :bar do
#stop
ptn = (ring 2,0,1,0, 0,0,0,2, 0,0,0,0, 0,2,0,0)
sample mb + "ravel", 2, start: 0.25, finish: 0.35, amp: ptn.tick
sleep 0.25
end
live_loop :piano3, sync: :bar do
ptn = (ring 0,0,0,1, 1,0,2,0, 1,2,0,0, 0,0,2,1)
sample mb + "ravel", 3, release: 0.025, start: 0.25, finish: (ring 0.275, 0.35).choose, amp: ptn.tick
sleep 0.25
end
live_loop :bass, sync: :bar do
use_synth :fm
use_synth_defaults release: 2, depth: 1, divisor: 1
n = (ring :e2, :e1)
n = (ring :e2,:e1,:d2,:a1,:b1,:b2,:a2,:g2)
play n.tick
sleep 4
end
live_loop :synth, sync: :bar do
#stop
notes = (ring :e4, :b4, :b4, :d4, :e5)
#notes = (ring :e4, :a4, :b4, :d4, :d5)
#notes = (ring :e4, :a4, :b4, :d4, :fs5)
with_fx :rlpf, cutoff: 20, res: 0.5, amp: 0.25 do |rlp|
control rlp, cutoff: 120, cutoff_slide: 32,
amp: 0.5, amp_slide: 32,
res: 0.95, res_slide: 20
with_fx :panslicer, phase: 0.5, smooth: 0.5 do
s = synth :dsaw, note: notes, release: 64
end
end
sleep 64
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment