Hi everyone!
I just have a little question why my code is not working?
I just added a potentiometer via the midi canal to the sketch to set to sleep time.
But when the sleep time gets below zero I always get the same error.
CODE:
loop do
var, var1 = sync "/midi/iac-treiber_bus_1/0/1/control_change"
play 60
sleep (var1/10)
end
PROTOCOL
/midi/iac-treiber_bus_1/0/1/control_change [21, 1]
ERROR:
Runtime Error: [buffer 0, line 5] - RuntimeError
Thread death!
Timing Exception: thread got too far behind time.
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/sound.rb:4840:in `ensure_good_timing!'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/sound.rb:4446:in `trigger_synth'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/sound.rb:4386:in `trigger_inst'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/sound.rb:1533:in `synth'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/sound.rb:1627:in `play'
workspace_zero:5:in `block (3 levels) in __spider_eval'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/core.rb:2055:in `block (2 levels) in loop'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/core.rb:2276:in `block_duration'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/core.rb:2313:in `block_slept?'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/core.rb:2054:in `block in loop'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/core.rb:2052:in `loop'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/lang/core.rb:2052:in `loop'
workspace_zero:2:in `block (2 levels) in __spider_eval'
/Applications/Sonic Pi.app/app/