Info

Info

An info object contains one or more supported keys which request various information about the provided timeline. Received data is write-only as it corresponds to the state of the timeline at the point when the Composer processed it.

To request information, one or more of the following keys must be added to the info object with a value of null. Any other values, including data output output by the Composer itself, will result in no information being returned. The intent is that null be the only way to represent a request for information.

Data Item Type Required/ Optional Description
rulers null optional An array of ruler objects (see below).

Example requesting ruler output:

{
    "rulers": null
}

Ruler

A ruler provides information associating beats with seconds, based on the tempo information within a span, as well as the “strength” of each beat. Since tempo/beat information only exists within metered spans, each ruler is associated with the corresponding span via its ID.

Example result of requesting ruler output:

{
    "rulers": [
        {
            "span": 1,
            "ticks": [
                {
                    "beat": 0,
                    "second": 0,
                    "type": "r"
                },
                ...
            ]
        }
    ]
}

Values for type are:

Type Description
“r” The start of a music region.
“s” The start of a new musical section.
“p” The start of a new musical phrase.
“m” The down beat of a measure.
“t” A strong beat (based on the current meter).
“w” A weak beat (anything other than the above).