while statements and BPM variables #UnO2

C Mesibov

Hi experts,
I am trying to do a loop where I increment the midi BPM.
So it seemed logical to assign a initial BPM to a variable $BPM, say 10, then go into a while loop, use a wait statement and increment until the while conditional is met.
The editor seems to be rejecting my $BPM variable not recognizing the value I initialized to to, in this case 10.  It just doesn't like a variable in the SendRealtime MIDIClock $BPM BPM statement.
is this a bug?
Anything else I should look out  for?



indeed, you cannot use a variable as BPM. Reason is that the compiler does some calculations with the BPM value before storing it in the binary setup which is sent to the UnO2 firmware. The firmware can't do those calculations. 
Also, be aware that the Wait statement is blocking. You would need to use the new "WaitWithoutBlocking" command introduced in UnO2 v.1.4