Class: MIDIPitch

Environment: Siren
Superclass: Siren.IntervalMagnitude
Category: Music-Models-Implementation

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

units
Answer the units string of the receiver.

private

species
Answer Pitch.

converting

asFracMIDI
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
Initialize the class instance variable.

coercion

ddMsgName
Answer the selector to be used in coercing double-dispatching messages.