Just what the title says… I think this is the way to solve my
problems when trying to make a ‘drop’… nice long increase,
sudden decrease… I’ll experiment more tomorrow…
Eli…
# Syncronised fading with set & get
#Eli...
set_volume! 5
use_bpm 90
vrup=range(0.01,2.01,0.04)
vrdown=range(1.99,0,-0.04)
vr=vrup+vrdown
live_loop :fader do
set :vr, vr.tick
sleep 0.25
end
live_loop :kick do
vol = get :vr
sample :bd_ada,amp: vol / 2.0
sleep 1
sample :bd_ada,amp: vol / 2.0
sample :sn_dolf, sustain: 0, release: 0.08, hpf: 80,amp: vol / 2.0
sleep 1
end
with_fx :rhpf, res: 0.85, cutoff: 118, amp: 0.7 do
live_loop :hats do
vol = get :vr
use_synth_defaults sustain_level: 0.5
synth :chipnoise, sustain: 0, release: 0.09, freq_band: 15,amp: vol / 4.0
sleep 0.25
if rand(1) < 0.75 then
synth :chipnoise, sustain: 0, release: 0.09, freq_band: 15,amp: vol / 4.0
end
sleep 0.25
end
end
live_loop :rim do
vol = get :vr
with_fx :distortion do
sleep 0.5
use_sample_defaults
sample :elec_blip, sustain: 0.006, cutoff:110, rate: 0.8, amp: vol / 4.0
sleep 0.25
sample :elec_blip, sustain: 0.005, cutoff:110, rate: 0.8, amp: vol / 4.0 if one_in(5)
sleep 0.25
end
end
with_fx :flanger, stereo_invert_wave: 1, feedback: 0.625, amp: 0.3 do
with_fx :echo, mix: 0.8, phase: 0.75, decay: 4 do
live_loop :background do
vol = get :vr
use_synth :fm
mynote = (note_range, :g2, :g4, pitches: (scale, :g6, :minor_pentatonic))
play mynote.choose,amp: vol / 2.0
sleep 0.25
end
end
end
A nice solution Eli and probably a bit more flexible that the one I have used which is to wrap the live_loops you want to control in an fx :level loop. As an example here is your program modfied this way.
set_volume! 5
use_bpm 90
vrup=range(0.01,2.01,0.04)
vrdown=range(1.99,0,-0.04)
vr=vrup+vrdown
with_fx :level,amp: 0 do |v|
live_loop :fader do
control v,amp: vr.tick
sleep 0.25
end
live_loop :kick do
sample :bd_ada,amp: 0.5
sleep 1
sample :bd_ada,amp: 0.5
sample :sn_dolf, sustain: 0, release: 0.08, hpf: 80,amp: 0.5
sleep 1
end
with_fx :rhpf, res: 0.85, cutoff: 118, amp: 0.7 do
live_loop :hats do
use_synth_defaults sustain_level: 0.5
synth :chipnoise, sustain: 0, release: 0.09, freq_band: 15,amp: 0.25
if rand(1) < 0.75 then
synth :chipnoise, sustain: 0, release: 0.09, freq_band: 15,amp: 0.25
end
sleep 0.25
end
end
live_loop :rim do
with_fx :distortion do
sleep 0.5
use_sample_defaults
sample :elec_blip, sustain: 0.006, cutoff:110, rate: 0.8, amp: 0.25
sleep 0.25
sample :elec_blip, sustain: 0.005, cutoff:110, rate: 0.8, amp: 0.25 if one_in(5)
sleep 0.25
end
end
with_fx :flanger, stereo_invert_wave: 1, feedback: 0.625, amp: 0.3 do
with_fx :echo, mix: 0.8, phase: 0.75, decay: 4 do
live_loop :background do
use_synth :fm
mynote = (note_range, :g2, :g4, pitches: (scale, :g6, :minor_pentatonic))
play mynote.choose,amp: 0.5
sleep 0.25
end
end
end
end
Mine might be more flexible… but your’s deals with the echoes and after effects of things like
reverb, flanger, etc…
I’ll probably end up using a mix of the two… set/get on simple live_loops like kicks, hats, etc, and fx level for anything with really long echo’s. It takes so much code though, to create one of these ‘drops’ that I’m considering recording it as a wav then simply sampling it back into the actual song, to save resource.