Hmmm… Hmmm…
I wonder… could you use the ‘at’ command to increment a
line.tick or a slide… it wouldnt then be worried about the loop
sleep time?
I’ll have to think on that some…
Eli…
EDIT: Ah! I wrote a whole song in at’s a long time back… it’s not what
you want, but could you mod it to fade in and out as part of the at’s ?
I even put in a fade_in line… but never really explored it further.
# Tune in a Box...
# Everything done in 1 Live_loop
# using 'at'.
# Eli...
use_bpm 90
bells = 0
clarinet = 0
clarinet_rhythm = (ring 0.25, 0.75, 1, 0.75, 0.25, 0.5, 0.5).shuffle
fade_in = (line 0, 3, inclusive: true, steps: 40).ramp
live_loop :everything do
at (ring 2,4) do
sample :drum_heavy_kick
end
at (range 0, 4, step: (ring 0.75, 1,1.25).choose) do
sample :elec_hollow_kick, finish: 0.125, amp: 0.5
end
at (range 0.5, 4.5, step: 2) do
if rand(1) < 0.6 then
sample :perc_snap, rate: 0.75, start: 0.0, finish: 0.5, amp: 0.2
else
sample :perc_snap2, rate: 0.75, start: 0.0, finish: 0.5, amp: 0.15
end
end
at (range 0, 4, step: 1) do
sample :drum_cymbal_pedal, rate: 1, start: 0.0, finish: 0.5, amp: 0.4
end
at (rrand_i(2, 3)) do
sample :drum_bass_soft , amp: 0.4
end
at (0) do
if bells == 0 then
256.times do
bells += 1
melody = [62,57,50,60,50,55,50,50,53,50,55,50,52,50,57,48,
62,57,48,60,48,55,48,48,53,48,55,48,52,48,57,45,
62,57,45,60,45,55,45,45,53,45,55,45,52,45,57,48,
62,57,48,60,48,55,48,48,53,48,55,48,52,48,57,50].ring
melody_octave = [0,0,1,0,1,0,1,0,1,2,0,1,0,1,0,1,
0,0,1,0,1,0,1,0,1,2,0,1,0,1,0,1,
0,0,1,0,1,0,1,0,1,2,0,1,0,1,0,1,
0,0,1,0,1,0,1,0,1,2,0,1,0,1,0,1].ring
use_synth :pretty_bell
play melody.look-(12*melody_octave.look), amp: 0.1#, release: [0.75, 0.5, 0.25].choose
sleep 0.25
tick
end
else
if bells == 256 then
bells = 0
end
end
end
at (3) do
if clarinet == 0 then
8.times do
clarinet += 1
use_synth :fm
if rand(1) < 0.8 then
clarinet_line = (ring :d3, :e3, :d3,:a3, :d3, :g3, :a3, :e4)
else
clarinet_line = (ring :d3, :e3, :d3,:a3, :d3, :g3, :a3, :e4).shuffle
end
use_synth_defaults divisor: 0.5, depth: 4, attack: 0.05, sustain: 0.3, release: 0.2, amp: 0.2
with_fx :reverb, room: 0.75, damp: 0.25 do
play clarinet_line.look
end
sleep 2 * clarinet_rhythm.look
tick
end
if clarinet == 8 then
clarinet = 0
end
end
end
sleep 1
end