Skip to content

Miscellaneous Opcodes

Here is a list of opcodes that don't fall in any category:

  • floatsize - Returns the size of Csound's internal floating-point type in bytes.
  • directory - Reads a directory and outputs to a string array a list of file names.
  • nchnlshw - Returns the number of audio channels in the underlying hardware.
  • pwd - Asks the underlying operating system for the current directory name as a string.
  • select - Select sample value based on audio-rate comparisons.
  • system - Call an external program via the system call.
  • modmatrix - Modulation matrix opcode with optimizations for sparse matrices.
  • readscratch - Returns a value stored in the instance of an instrument.
  • writescratch - Writes a value into the scratchpad of the instance of an instrument.

  • typeof - Returns the Csound type of a variable or expression as a string.

Testing

Testing opcodes check conditions when --run-unit-tests is enabled. The assert family can stay in a composition with checks disabled during normal playback.