Music Constants
The music library defines many musical constants.
These constants (words and abbreviations) can be used in place of numbers in your code. In many cases, each value is represented by several alternate constants (words).
For example, the duration value 1.0 is equivalent to the constants QUARTER_NOTE and QN.
| Contents | Description |
|---|---|
| Pitch Constants | MIDI pitch values (e.g. C4, GS5). |
| Duration Constants | Note duration values (e.g. HALF_NOTE, QN ). |
| Dynamic Constants | Dynamic/Velocity/Volume values (e.g. FORTE, PIANISSIMO). |
| Panning Constants | Stereo sound position values (e.g. PAN_LEFT, PAN_RIGHT). |
| Instrument Constants | MIDI instrument values (e.g. PIANO, SYNTH). |
| Percussion Constants | MIDI percussion values (e.g. BASS_DRUM, OPEN_HI_HAT). |
| Scale Constants | Musical scale values (e.g. CHROMATIC_SCALE, MAJOR_SCALE). |