Skip to content

Instantly share code, notes, and snippets.

View paradoxinversion's full-sized avatar
♠️
Around

Jedai Saboteur paradoxinversion

♠️
Around
  • The SANS Institute
  • San Francisco, CA
View GitHub Profile
@paradoxinversion
paradoxinversion / drums-vibes-set.rb
Created December 12, 2020 19:55
The buffer for a little random set I did. Uses samples from https://free-sample-packs.com/theplanbeats-drums-vibes/
set_mixer_control! amp: 0, amp_slide: 32
drum_sample = "G:/music-and-audio/Drums & Vibes Pack/Construction Kits/Everything About You [Fm][95BPM]/Drums/Full Drums [95BPM].wav"
live_loop :drums do
use_sample_bpm drum_sample, num_beats: 8
use_random_seed ring(1000, 1000, 1000, 2000).tick
with_fx :slicer, phase: 0.25, mix: 0 do
in_thread do
tick_set :mainTimer, 1
loop do
tick :mainTimer
puts look(:mainTimer)
cue :ones
cue :twos if look(:mainTimer) % 2 == 0
cue :fours if look(:mainTimer) % 4 == 0
cue :eights if look(:mainTimer) % 8 == 0
sleep 1
use_bpm 90
in_thread do
tick_set :mainTimer, 1
loop do
tick :mainTimer
puts look(:mainTimer)
cue :ones
cue :twos if look(:mainTimer) % 2 == 0
cue :fours if look(:mainTimer) % 4 == 0
# A global timer
live_loop :timer do
cue(:timer)
sleep 0
use_bpm 115
sleep 1
end
# An Arpeggiator
define :starterSynth do |n|
with_fx :hpf do
synth :beep, note: n, amp: 0.50, attack:0.50
end
synth :beep, note: n + 12 , amp: 0.150
with_fx :bpf, centre: 90 do
synth :saw, note: n, cutoff: 75
end
end
# A global timer
live_loop :timer do
use_bpm 115
tick(:fourths)
puts look(:fourths)
puts look(:fourths) % 4 == 0
cue :lolol if look(:fourths) % 4 == 0
sleep 1
end
set_mixer_control! amp: 1, amp_slide: 8
# Our global music bpm
global_bpm = 90
define :mainSynth do |n|
synth :beep, note: n
end