Environment: Siren
Instances of MIDIPitch are well-tempered piano key numbers where 60 is middle-c (c3) according to the MIDI standard.
The translation key <--> Hz. is done with the logarithm or 27.5 Hz. (very low A = 440/16).
Note that AdC's additions make fractional MIDI pitches possible, whereby the first 2 digits to the right of the decimal point signify pitch cents. There are coercion methods such as asFracMIDI for handling microtonal MIDI pitches.
printing
private
Answer Pitch.
converting
Answer a fractionalMIDIPitch (or integer if value is no fraction).
asFracSymbol
Assuming value is a key number, answer a symbolic pitch name
asHertz
Assuming value is a key number, answer a frequency
asHz
Assuming value is a key number, answer a frequency
asMIDI
Answer a MIDIPitch.
asSymbol
Assuming value is a key number, answer a symbolic pitch name
mostGeneral
Answer the most numerically meaningful version of the receiver.
MetaClass: MIDIPitch class
class initialization
Initialize the class instance variable.
coercion
Answer the selector to be used in coercing double-dispatching messages.