Timeline
Timeline
A timeline
represents either a request for music to be created, or an entire
music composition. Timelines
are submitted via the composition endpoints.
Data Item | Type | Required/ Optional | Description |
---|---|---|---|
random_seed |
integer | optional | A seed the Composer uses to generate random information. If a value is not specified, the Composer generates a value automatically |
meta |
object | optional | An object containing user-defined information. The Composer ignores this data, but it is added to the output timeline (if requested) |
spans |
array | optional | An array of span objects. At least one span must be specified to create music |
unmetered_hits |
array | optional | An array of unmetered hit objects |
notifications |
array | optional | An array of any notable modifications the Composer made to the processed timeline. This data is ignored on input. For output, it contains processing notifications. The strings are are prefixed with “WARNING:” for non-fatal errors or “ERROR:” for fatal errors |
info |
array | optional | An object containing one or more supported keys requesting extra information about the timeline. |
Note: The last
span
must be unmetered to represent the end of the music. Also, unmeteredhit
objects can exist after the final unmetered span. The render ends at either the final unmetered span or at the time of the final unmeteredhit
because the Composer has no knowledge of how long the hit sample lasts.
Example:
{
"random_seed": 1337,
"meta": { ... },
"spans": [ ... ],
"unmetered_hits": [ ... ],
"notifications": [ ... ],
"info": { ... }
}
Example — Minimal Input Timeline (30 seconds of “documentary minimal intriguing”):
{
"random_seed": 1337,
"spans": [
{
"id": 111,
"type": "metered",
"time": 0,
"regions": [
{
"id": 222,
"region": "music",
"descriptor": "documentary_minimal_intriguing",
"beat": 0
}
]
},
{
"type": "unmetered",
"time": 30
}
]
}