Skip to content

Instantly share code, notes, and snippets.

@rtsho
Created April 11, 2016 05:44
Show Gist options
  • Save rtsho/42b778b0a9946fceb67e8bca64bc6eeb to your computer and use it in GitHub Desktop.
Save rtsho/42b778b0a9946fceb67e8bca64bc6eeb to your computer and use it in GitHub Desktop.
unfinished piece...#sonicpi
use_random_seed(1)
t = 0
m = 0
# t goes from 0 to 9, which is 3 measures
live_loop :main do
cue :_whatnow_ if t.modulo(3)==0 && m<6
cue :_boom_ if t==0 && m>=1
cue :_wizz_ if t==0 && m>=2 && m<6
cue :_clap_ if t==0 && m>=1
cue :_boomboom_ if m>=3
cue :_shhh_ if m>=3
cue :_tactac_ if m>=4
cue :_fukboom_ if m>=6
cue :_fuktac_ if m>=6
sleep 1
t = t + 1
if t==9
t = 0
m = m + 1
end
end
live_loop :boom do
sync :_boom_
#stop
with_fx :gverb do
with_fx :bitcrusher do
synth :dsaw, note: :E1, attack:0.05, sustain:0.25, release:0.05
sample :drum_heavy_kick
sample :bass_voxy_hit_c
sleep 0.5
synth :dsaw, note: :E1, attack:0.05, sustain:0.25, release:0.5
sample :drum_heavy_kick
sample :bass_voxy_hit_c, rate:0.75
sleep 0.5
end
end
end
live_loop :clap do
sync :_clap_
with_fx :bitcrusher do
sleep 1
32.times do
sample :perc_snap, cutoff:[70,90,100].choose
sleep 0.125
end
end
end
live_loop :wizz1 do
sync :_wizz_
sleep [1, 1.5].choose
with_fx :slicer, phase:[0.125, 0.25].choose, phase_slide:2 do |f|
with_fx :krush do
with_fx :bitcrusher do
s = synth :prophet, note: [:E5, :E3].choose, note_slide:0.25, sustain:[2, 2.5, 3].choose, release:1, cutoff:[60, 70, 80].choose
control s, note: :E2
control f, phase:[0.5].choose
sleep 1
control s, note: [:G4, :E4].choose
control f, phase:[0.125, 0.5].choose
sleep 1
end
end
end
end
live_loop :wizz2 do
sync :_wizz_
sleep [1, 3].choose
with_fx :reverb do
with_fx :slicer, phase:[0.125, 0.25].choose, phase_slide:2 do |f|
with_fx :krush do
with_fx :bitcrusher do
s = synth :blade, note: [:E5, :E2].choose, note_slide:0.25, sustain:[2, 2.5, 3].choose, release:1, cutoff:[60, 70, 80].choose
control s, note: [:E2, :G3].choose
control f, phase:[0.5].choose
sleep 1
control s, note: [:B4, :As3, :E5].choose
control f, phase:[0.125, 0.5].choose
sleep 1
end
end
end
end
end
live_loop :wizz3 do
sync :_wizz_
sleep [2, 4].choose
with_fx :reverb do
with_fx :slicer, phase:[0.125, 0.25].choose, phase_slide:2 do |f|
with_fx :krush do
with_fx :bitcrusher do
s = synth :tb303, note: [:E1, :E2].choose, note_slide:0.25, sustain:[2, 2.5, 3].choose, release:1, cutoff:[60, 70, 80].choose
control s, note: [:E3, :G3].choose
control f, phase:[0.5].choose
sleep 1
control s, note: [:B4, :E2, :G4, :E5].choose
control f, phase:[0.125, 0.5].choose
sleep 1
end
end
end
end
end
live_loop :wizz4 do
sync :_wizz_
sleep [3, 5].choose
with_fx :reverb do
with_fx :slicer, phase:[0.125, 0.25].choose, phase_slide:2 do |f|
with_fx :krush do
with_fx :bitcrusher do
s = synth :tb303, note: [:E1, :E2].choose, note_slide:0.25, sustain:[2, 2.5, 3].choose, release:1, cutoff:[60, 70, 80].choose
control s, note: [:E4, :G4].choose
control f, phase:[0.5].choose
sleep 1
control s, note: [:B4, :As3, :As4, :G3, :E5].choose
control f, phase:[0.125, 0.5].choose
sleep 1
end
end
end
end
end
live_loop :whatnow do
sync :_whatnow_
with_fx :bitcrusher do
with_fx :reverb do
with_fx :echo, phase:1 do |f|
synth :prophet, note: [:E2, :G2, :B2].choose, attack:0.5, sustain:1, release:0.5, cutoff:[65, 75].choose
synth :prophet, note: [:G4, :G5].choose, attack:0.5, sustain:1, release:0.5, cutoff:[65, 75].choose if [true, false].choose
synth :prophet, note: [:B4, :B5].choose, attack:0.5, sustain:1, release:0.5, cutoff:[65, 75].choose if [true, false].choose
synth :prophet, note: [:As4, :As5].choose, attack:0.5, sustain:1, release:0.5, cutoff:[65, 75].choose if [true, false].choose
sleep 3
end
end
end
end
live_loop :boomboom do
sync :_boomboom_
with_fx :gverb do
sample :bd_haus
sample :bd_zum
sleep 1
end
end
live_loop :shhh do
sync :_shhh_
with_fx :gverb do
with_fx :distortion do
sample :drum_cymbal_open, rate:-3, cutoff:100
sleep 3
end
end
end
live_loop :tacatac do
sync :_tactac_
with_fx :echo do
sample :elec_hi_snare
sleep 0.5
end
end
live_loop :fukboom do
sync :_fukboom_
with_fx :gverb do
with_fx :echo do
sample :drum_heavy_kick
sample :bd_sone
sample :drum_splash_hard, cutoff:90, rate:2
sleep 1
end
end
end
live_loop :fuktac do
sync :_fuktac_
with_fx :reverb do
with_fx :echo do
sample :elec_hi_snare if (spread 3, 8).tick
sample :perc_snap if (spread 3, 8).look
sleep 0.125
end
end
end
s1 = (spread 1, 4)
s2 = (spread 3, 8)
s3 = (spread 5, 16, rotate:2)
notes1 = (ring :E1, :As1)
notes2 = ring(:B1, :G1)
notes3 = ring(:As2, :B2, :E2)
live_loop :whatnow2 do
if m >= 6
with_fx :bitcrusher do
with_fx :slicer, phase:0.25 do
with_fx :echo, phase:0.25, mix:0.1, decay:1 do
synth :tb303, note: notes1.tick(:note1), attack:0.05, sustain:0.125, release:0.05, cutoff:[75, 75].choose if s1.tick(:time)
synth :tb303, note: notes2.tick(:note2), attack:0.05, sustain:0.125, release:0.05, cutoff:[65, 75].choose if s2.look(:time)
synth :tb303, note: notes3.tick(:note3), attack:0.05, sustain:0.125, release:0.05, cutoff:[60, 75].choose if s3.look(:time)
end
end
end
end
sleep 0.125
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment