Copy Region

Copy Region

The copy_region action copies a region to a specified time within the span.

Data Item Type Required/ Optional Description
copy_region Object required Provides the information needed to create a new region at the specified time that copies most of the musical data from some other region. Specifically, the key, harmony, and rhythm are copied as closely as possible. NOTE: If either the source or the copy are significantly different durations, the longer of the two will likely contain music that the shorter does not
copy_region.source_id Number required The id of the region from which music is copied
copy_region.cut_at number optional If provided, music continues until the end of the region and then abruptly stops. NOTE: Currently, the number itself has no meaning
copy_region.random_instruments boolean optional If true, a random collection of instruments based on the specified descriptor is selected in the style of set_instruments at the start of the region. If omitted, the default is false (the instrumentation remains the same)
copy_region.random_tempo Boolean optional If set to true, a random tempo based on the specified descriptor is selected in the style of set_tempo at the start of the region. If omitted, the default is false (the tempo remains the same)
copy_region.ringout_at number optional If provided, from the time specified until the next silence or the end of the span, the music ends with instruments playing one final note lasting the remainder of the region (a “ringout” )

NOTE: cut_at and ringout_at are mutually exclusive. If both are provided, the Composer randomly picks one. If both are omitted, a ringout_at is automatically provided two seconds before the end of the region.

Example:

{
    "time": 20,
    "copy_region": {
        "source_id": 1337,
        "random_tempo": true,
        "random_instruments": true,
        "ringout_at": 40
    }
}