lfo0 = (line 70, 100, inclusive: true, steps: 16).mirror
with_fx :lpf do |lpf|
live_loop :bass do
control lpf, cutoff: lfo0.look
puts tick
use_synth :chipbass
play (octs :e1, 3).look
sleep 0.5
end
end
would also work as:
lfo0 = (line 70, 100, inclusive: true, steps: 16).mirror
with_fx :lpf do |lpf|
live_loop :bass do
control lpf, cutoff: lfo0.tick
puts look
use_synth :chipbass
play (octs :e1, 3).look
sleep 0.5
end
end
I think it’s also better to put your FX outside the loop - that way your computer won’t re-load the whole effect with every iteration (from what I’ve read).
Also – your question is somewhat relevant to what I’m messing around with (which I mentioned in a comment to you elsewhere just a moment ago):
use_debug false
#varz
n=knit(:e1,8, :gs1,4, :a1,4)
live_loop :lvlset do
clvl = [40,50,60,70,80,90,100].choose
set :c, clvl
puts clvl
sleep 4
end
#roxtedy
live_loop :bdwon do
sample :bd_tek
sleep knit(0.5,2, 1,3).tick
end
live_loop :beedeetoo, sync: :bdwon do
sample :bd_haus, cutoff: 95
sleep knit(1,2, 0.75,1, 0.25,5).tick
end
sleep 8
#movers, shakers.
with_fx :reverb do
with_fx :rlpf do |f|
with_fx :eq, high: -0.75 do
live_loop :octobass do
6.times do
play ring(:e1, :gs1, :a1).look,
sustain: 2, pan: -1
4.times do
use_synth :chipbass
play octs(n.tick,3).choose,
pan: [1,-1].look
sleep 0.25 end
end
control f, cutoff: get[:c],
cutoff_slide: 5
cue :dingy
end end
end end
with_fx :distortion do |d|
with_fx :rhpf do |hpf|
with_fx :ping_pong do
live_loop :dingy do
wait :octobass
9.times do
use_synth knit(:pretty_bell,33, :dull_bell,14).tick
use_synth_defaults amp: 0.5
control d, distort: dice(9)*0.1,
distort_slide: 0.5
play [:e4,:cs3].choose, amp: 0.2,
pan: [-1,1].look
density 1+look%4 do
play octs(:cs1,5).pick(2)
sleep 0.2
play octs(n.look,3).pick(3)
sleep [0.3,0.45,0.8].choose end
end
sleep 12
control hpf, cutoff: get[:c]+dice(15), cutoff_slide: 6
end
end end
end
with_fx :tremolo do
with_fx :slicer, phase: 0.125 do |sl|
with_fx :echo, mix: 0.25 do
sleep 6
live_loop :ch, sync: :beedeetoo do
control sl, wave: [1,2,3,0].look
use_synth knit(:prophet,3,
:growl,3,
:organ_tonewheel,3,
:blade, 3).shuffle.tick
use_synth_defaults release: 4, decay: 12, amp: 0.6
3.times do
control sl, phase: get[:c]*0.0125, phase_slide: 5
play scale(:e1, :phrygian, num_octaves: 5).pick(4, skip: 2)
sleep 6 end
sleep 9
end
end end end
Notice in here that the first live loop is actually just iterating through a line of cutoff levels, and I use the global variable for a slicer as well. The way the math works out, as the cutoff drops, the slicer gets spaced further apart. When the cutoff is high, the slices are smaller, sorta reflecting the frequency of the other waves. Due to the staggered timing of the gets, sometimes the change in chords’ slicephase is leading another instrument’s filter, and sometimes following. It’s a fun effect, and I can actually just let this loop drone on for quite a while without starting to get annoyed, haha.