Edit
Edit
An edit
object is a high-level instruction to alter a musical property of a
region
as a whole. It can be used in one of two ways: to specify a new version
of some aspect of a region’s music, or to copy, as closely as possible, an
aspect from a different region.
Edits work on the entire region
as a whole and alter all music they contain.
For more precise control, alter specific part(s) of the timeline directly.
Data Item | Type | Required/ Optional | Description |
---|---|---|---|
type |
text | required | The aspect of the music to edit (see below) |
source_id |
integer | optional | The id of a region from which to copy the aspect of music. If omitted, entirely new music will be created for the provided aspect |
Valid values for type
are:
harmony
: alter the harmony of the regionrhythm
: alter the rhythm of the region- a
set_tonic
object: alter the tonic of the key of the region
Example:
Copy the harmony from a region
with id
35 to the active region
.
{
"type": "harmony",
"source_id": 35
}
Composer new rhythms for the active region
.
{
"type": "rhythm"
}
Change the tonic of the key used by the region
to the provided pitch.
{
"type": { "set_tonic": "bes" }
}
See key signature for information on specifying a tonic.