Skip to content

Instantly share code, notes, and snippets.

@kellishaver
Created December 9, 2016 03:50
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 kellishaver/3df0f6e1e081984d46005901d38ae2b4 to your computer and use it in GitHub Desktop.
Save kellishaver/3df0f6e1e081984d46005901d38ae2b4 to your computer and use it in GitHub Desktop.
define :guitar_chords do
in_thread do
4.times do
with_fx :echo, mix: 0.3, phase: 0.25 do
sample :guit_em9, rate: 1
end
sleep 4
end
end
end
define :synth_bike do
with_synth :dsaw do
with_fx(:slicer, phase: [0.25,0.125].choose) do
with_fx(:reverb, room: 0.5, mix: 0.3) do
start_note = chord([:b1, :b2, :e1, :e2, :b3, :e3].choose, :minor).choose
final_note = chord([:b1, :b2, :e1, :e2, :b3, :e3].choose, :minor).choose
p = play start_note, release: 8, note_slide: 4, cutoff: 30, cutoff_slide: 4, detune: rrand(0, 0.2), pan: rrand(-1, 0), pan_slide: rrand(4, 8)
control p, note: final_note, cutoff: rrand(80, 120), pan: rrand(0, 1)
end
end
end
end
in_thread do
guitar_chords
loop do
with_fx :reverb, room: 1 do
sample :bd_boom, amp: 10, rate: 1
end
sleep 4
end
end
sleep 12
in_thread do
synth_bike
loop do
sample :drum_bass_hard, amp: 0.8
sleep 0.25
play :e2, release: 0.2
sample :elec_cymbal, rate: 12, amp: 0.6
sleep 0.25
end
end
sleep 12
in_thread do
guitar_chords
end
sleep 16
synth_bike
sleep 16
in_thread do
use_random_seed 2000
128.times do
c = rrand(70, 130)
n = (scale :e1, :minor_pentatonic).take(3).choose
synth :tb303, note: n, release: 0.1, cutoff: c if rand < 0.9
sleep 0.125
end
2.times do
synth_bike
end
end
sleep 32
in_thread do
guitar_chords
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment