i discover today the ramp function.
live_loop :testRamp do n = (ramp 1,2,5,15).tick puts n sleep 0.125 n2 = (line 0,10, steps: 21, inclusive: true).ramp.tick("gloups") puts n2 sleep 0.25 end
A drunk pianist finally finding the right notes to play
use_bpm 120 live_loop :rampTune do v = (range 0,1, step: 0.1, inclusive: true).ramp.tick("volume") c = (line 50,120, steps: 31, inclusive: true).ramp.tick("cutoff") puts c tune = (ring :c1, :c3, :f2, :f4, :g1, :g3, :f3, :f2) use_synth :prophet play tune.look, cutoff: c, amp: v use_synth :piano play tune.look + (line -12, 12, steps: 30, inclusive: true).ramp.tick("tok"), amp: v, sustain: 1 tick sleep 0.5 end live_loop :drums do sample :drum_bass_hard sleep 1 sample :drum_bass_hard sample :drum_roll, amp: 0.5, finish: 0.1 sleep 1 end
Note that it crashes quickly if i decrease the sleep value. Why ?
Hope it helps