Hi everybody,
I always have troubles with sync in sonic pi…
if somebody can explain why this following code do run as it runs, it would be kind !
use_bpm 120
beats_per_bar = 4
############################### TOOLS ###############################
live_loop :metronome do
use_synth :beep
play :a4, release: 0.5
sleep 1
end
live_loop :_1_bar do
use_synth :beep
play :as5, release: 0.5
sleep beats_per_bar
# the cue is sent ONLY NOW /:( so sad no ?
end
live_loop :_4_bars do
sleep beats_per_bar*4
end
live_loop :_8_bars do
sleep beats_per_bar*8
end
live_loop :_16_bars do
sleep beats_per_bar*16
end
############################### live_l_o(U)pssssssssss ###############################
# this loop will start once _4_bars has finished once and become free as as bird no synchronicity
live_loop :loop_sans_sync, sync: :_4_bars do
sample :drum_cymbal_hard
sleep 4
end
live_loop :loop_8_beats do
# après la durée de la boucle _1_bar 4 beats
sync :_1_bar
use_synth :sine
riff_8_notes = (ring :c3, :d3, :e3, :f3, :g3, :a3, :b3, :c4)
# this pattern last 8 beats
play_pattern_timed riff_8_notes, 1
# oh it's strange i "miss" the cue "/live_loop/_1_bar" why have i wait the next one ?????
#
end
live_loop :loop_7_beats do
# _1_bar last 4 beats
sync :_1_bar
use_synth :pretty_bell
riff_7_notes = (ring :c6, :d6, :e6, :f6, :g6, :a6, :b6)
# this pattern last 7 beats
play_pattern_timed riff_7_notes, 1
end
``
cheers