Skip to main content

Module bytecode

Module bytecode 

Source
Expand description

Portable instructions shared by patch compilers and interpreters.

A program starts with VERSION followed by instructions. Every instruction appends its outputs to a table of mono signal buffers (buses). Sources refer to earlier buses. All fields occupy one byte.

OpcodeOperandsOutputs
1 (call)object index, signal input count, signal output count, one source bus per signal inputOne bus per signal outlet, in order
2 (gain)source bus, unsigned gain (128 is unity)One bus
3 (mix)left bus, right busOne bus

Enums§

DecodeError
Errors decoding a single instruction.
EncodeError
Errors encoding a single instruction.
Op
A block-level signal graph instruction. Object IDs refer to stateful native instances installed by the application. A decoded call borrows its input bus indices directly from the bytecode.

Constants§

VERSION
Version byte that precedes a stream of encoded Ops.