use_bpm 120
use_synth :pianolive_loop :a do
eval_file ‘C:\songs\trackOne.rb’
sleep 1
endlive_loop :b do
eval_file ‘C:\songs\trackTwo.rb’
sleep 1
end
The above code will run infinitely.
How to make the two loops to run only once.
use_bpm 120
use_synth :pianolive_loop :a do
eval_file ‘C:\songs\trackOne.rb’
sleep 1
endlive_loop :b do
eval_file ‘C:\songs\trackTwo.rb’
sleep 1
end
The above code will run infinitely.
How to make the two loops to run only once.
If you don’t want something to loop, then the simplest solution is to not use loops
I’m assuming you still want the two ‘tracks’ to start at the same time however. Sonic Pi’s way to achieve this is to use threads. For that, see the Lang section of the help for the command in_thread
.
(Threads are also explained in Sonic Pi - Tutorial).
Yes. in_thread works.