Skip to content

Instantly share code, notes, and snippets.

@datramt
Created February 2, 2019 20:30
Show Gist options
  • Save datramt/fb41b4a9c86d8eb368a9a8a3d2973f8c to your computer and use it in GitHub Desktop.
Save datramt/fb41b4a9c86d8eb368a9a8a3d2973f8c to your computer and use it in GitHub Desktop.
structuring song version 1
use_bpm 140
define :bassThread do
in_thread do
16.times do
tick
sample :bd_boom, amp: 3, rate: (ring, 1, 1, 1, 0.9, 1.19, 1.19, 1.06, 1.03).look
sleep 1
end
end
end
define :hhThread do
in_thread do
64.times do
tick
sample :drum_cymbal_soft,
rate: (ring, 1, 1, 1, 1, 4, 4, 5, 5).look,
amp: 0.5,
sustain: (ring, 0.01, 0.05, 0.1).look if (ring, 1, 0, 1, 1).shuffle.look == 1
sleep 0.25
end
end
end
define :pluckThread do
in_thread do
30.times do
with_fx :reverb, room: 1 do
tick
use_synth :pluck
notes = (scale, :b4, :phrygian).shuffle
play notes.look, amp: rrand(0.3, 0.7), pan: rrand(-1, 1)
sleep 0.75 if look%4 == 0
sleep 0.5 if look%7 == 2
sleep 0.125 if look%9 == 4
sleep 0.25
end
end
end
end
define :wobbleThread do
in_thread do
16.times do
with_fx :slicer, phase: (ring, 0.5, 0.5, 0.5, 0.333333, 0.66667).choose do
use_synth :chipbass
play :b2+rrand(-0.15, 0.15), amp: 2, release: 1, attack: 0.5, amp: 0.3
play :b1+rrand(-0.15, 0.15), amp: 2, release: 1, attack: 0.5, amp: 0.8
sleep 1
end
end
end
end
live_loop :song do
tick
bassThread if (ring, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1).look == 1
hhThread if (ring, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1).look == 1
pluckThread if (ring, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1).look == 1
wobbleThread if (ring, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1).look == 1
sleep 16
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment