I am trying to get the following running:
If an ifreq is within a certain tolerance then I want to play the note.
If it is not, then I dont want to do anything.
When I do the following it seems both label and null get invoked and two notes are played all at once.
I am not able to selectively branch to blocks of code, it is as if each line of code is being executed sequentially independent of the conditioning.
I believe the problem is that there are nested reinit statements and one rireturn statement but I dont know any other combinations of opcodes to implement this logic.
Your advice sought. Instrument code follows.
ifreq = i(kfr)
if ((ifreq < ilower) || (ifreq > iupper)) igoto label
itimout 0, 0.5, chiama
idelta = ifreq * 0.02
ilower = ifreq - idelta
iupper = ifreq + idelta
inote = 69 + 12 * log(ifreq/440) / log(2)
vstnote gihandle1, 0, inote, 76, 10