Class: RatioMagnitude

Environment: Siren
Superclass: Siren.NumericalMagnitude
Category: Music-Models-Implementation
Instance variables: relative

Instances of the RatioMagnitude subclasses are fractional values relative to some context-defined reference value--their relative. The relative may be provided, or it may be assumed if uninitialized (e.g., for a default whole note's duration or default reference pitch).

Instance Variable:
relative the reference value

accessing

realValue
Answer the receiver's value mapped to the receiver.

value
Answer the receiver's value mapped to the receiver.

converting

asRatio
Answer self.

map
Apply the receivers reference.

relativeTo: aRelative
Set the receivers reference.

MetaClass: RatioMagnitude class

instance creation

value: aValue relative: aMMagnitude
Answer and instance with the argument as its value.