Class:            Duration

Environment:      Siren
Superclass:         Siren.Chronos
Category:         Music-Models-Representation

Instances of classes whose species is Duration are used for the duration parameters of musical events.
Durations come in several flavors, as in the classes RatioDuration, MSecondDuration and ConditionalDuration.
The class Duration is abstract, its class creation method answers an instance of a concrete Duration class.

Examples:
   Duration value: 0.77      "create an instance with seconds as the unit"
   Duration value: 770      "create an instance with milliseconds as the unit"
   Duration value: 1/4      "create an instance with beats as the unit"
   Duration value: [ :x | x > 4]   "create an instance for: 'until x > 4'"

See also the class example.

MetaClass:         Duration class

instance creation

value: aValue
   Answer a new instance of a member of my species.

class constants

color
   Answer the default color to display instances with.

initialize
   Set up the class inst var, a generality table.

initializeGeneralities
   Set up the class inst var, a generality table.

mostGeneral
   Answer the most general-purpose duration--seconds

propertyName
   Answer the receiver class's default property name.

relativeMember
   Answer the receiver class's species member used as a relative magnitude.

species
   Answer Duration.

examples

example
   Print a simple message to the transcript demonstrating the various types.