OCTAVE
 
Sets or returns the default musical octave.

Syntax


Octave octave
octave = Octave()


Description

OCTAVE sets the default octave for generated musical notes. Higher octave numbers produce higher notes; lower octave numbers produce lower notes.

This is mainly useful with NOTE and PLAY. If a note command or PLAY string does not provide its own octave change, it can use the current default set by OCTAVE.

Calling OCTAVE as a function returns the current default octave.


Example

octave 4
note "C", octave(), 0.25
play "c d e f"


Notes

  • Use NOTE with an explicit octave when a single note should not depend on the current default.


See also