Environment: Siren
Instances of classes whose species is Pitch are used for the pitch or frequency parameters of musical events.
Examples:
Pitch value: 440.0 "create an instance with units of Hertz"
Pitch value: 77 "create an instance with units of MIDI key numbers"
Pitch value: #e4 "create a symbolic instance"
Pitch value: 'e4' "same as using a symbol"
Pitch value: 4/3 "create a ratio instance"
Note that new pitch representations such as music11-like pch (4.11 = 11th note in oct 4) or oct (4.1100 = oct4 + 1100 cts) notations can be added by overriding the float-to-Hz or float-to-midi conversions.
See also the class example.
MetaClass: Pitch class
instance creation
value: aValue
class constants
Answer the default color to display instances with.
initialize
Set up the class inst var, a generality table.
initializeGenerality
Set up the class inst var, a generality table.
mostGeneral
Answer the most general-purpose duration--Hertz
propertyName
Answer the receiver class's default property name.
relativeMember
Answer the receiver class's species member used as a relative magnitude.
species
Answer Pitch.
examples
Print a simple message to the transcript demonstrating the various types.
exampleAdC
Pitch exampleAdC