Time

Zylaphon only supports metered time as a compositional construct.  At MIDI play-back, metered time is converted to real time but that is as close to decimal time as Zylaphon gets -- at present.

Durations

Metered time is expressed in Chronons which are defined as follows: 

The whole note contains 417,372,849,653,760 Chronons. 

This value is the least common multiple of all note denominations known to Zylaphon, and using this value allows painless computation of addition, subtraction and division of metered note lengths.  However use of 64 bit integers limits n-tuples (as in triplets) to n <= 29.  Further, Zylaphon defines only two reduction tuplets, 2 and 4.

The Meter class handles durations in metric contexts, for example:

ParseDurationToFitMeter(UInt64 offset, UInt64 duration, EventList list)

An interval of time expressed in Chronons is called a duration and that word  is used to indicate any 64 bit integer value that is convertible to one or more standard levels of mensural division. 

Lengths

Note Denominations are modeled by the NDenom enumeration, as follows 

    public enum NDenom : short 

    {

        N_X = -1, // undefined

        N_M = 0,    // length of measure

        N_1 = 1,

        N_2 = 2,

        N_4 = 4,

        N_8 = 8,

        N_16 = 16,

        N_32 = 32,

        N_64 = 64,

        N_128 = 128,

        N_256 = 256

    } ;

The class, EventLength, models any standard level of mensural division, i.e. half-note,  quarter-rest, one 5-tuple etc., as well as dotted variants of such. This class has the following data members :

public class EventLength

{

    private NDenom      m_nDenom = NDenom.N_X;

    private Tuplet      m_tup = Tuplet.T_0;

    private int         m_dots = 0;

    private UInt64      m_duration = 0;

    public ChannelEvent m_event = null;

.

.

.

}

The class EventLength has a range of static methods for manipulating lengths and durations out side of any metric context; the most often used are :

NDenomToDuration(NDenom nd) and

DurationToNDenom(). 

 which Convert data triples to durations and contrariwise .

The word "length" is used to indicate a span of time that can be expressed as the sum of one or more standard levels of mensural division.   It is encoded in the data triple m_nDenom, m_tup, and m_dots.