[−][src]Module helgoboss_midi::controller_numbers
Contains predefined controller numbers.
Design
These are not associated constants of ControllerNumber
because then we could only access
them prefixed with ControllerNumber::
. Making ControllerNumber
an enum would have been the
alternative, but this has other downsides such as having to introduce a special variant for
undefined controllers and unnecessary conversion from and to integers. From the MIDI spec
perspective, a controller number seems closer to a plain 7-bit integer than to an enum with
well-defined values. Not all of the controller numbers have a special meaning, and if they do,
this meaning is not necessarily important. In practice, controller numbers are often used for
other things than they were intended for, especially the exotic ones.