goto label
where label is in the same instrument block and is not an expression, and where R is one of the Relational operators (<, =, <=, ==, !=) (and = for convenience, see also under Conditional Values).
Here is an example of the goto opcode. It uses the files goto.orc and goto.sco.
Example 15-1. Example of the goto opcode.
/* goto.orc */
; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1
; Instrument #1.
instr 1
a1 oscil 10000, 440, 1
goto playit
; The goto will go to the playit label.
; It will skip any code in between like this comment.
playit:
out a1
endin
/* goto.orc */
/* goto.sco */
; Table #1: a simple sine wave.
f 1 0 32768 10 1
; Play Instrument #1 for one second.
i 1 0 1
e
/* goto.sco */