Extends
Methods
addNote(note) → {number}
Add a note to this NoteGroup
and return the index
of the added note. The notes are kept sorted by ascending onset
positions.
Parameters:
Name | Type | Description |
---|---|---|
note |
Note |
Returns:
- Type
- number
addPitchControl(pitchControl) → {number}
Add a pitch control object to this NoteGroup
and
return the index of the added object. The pitch control objects are
kept sorted by ascending anchor positions.
(supported since 2.1.0)
Parameters:
Name | Type | Description |
---|---|---|
pitchControl |
PitchControlPoint | PitchControlCurve |
Returns:
- Type
- number
clone() → {NoteGroup}
A deep copy of the current object.
Returns:
- Type
- NoteGroup
getIndexInParent() → {number}
- Inherited From:
Get index of the current object in its parent. In Lua, this index starts from 1. In JavaScript, this index starts from 0.
Returns:
- Type
- number
getName() → {string}
Get the user-specified name of this NoteGroup
.
Returns:
- Type
- string
getNote(index) → {Note}
Get the note at index
. The notes inside a
NoteGroup
are always sorted by onset positions.
Parameters:
Name | Type | Description |
---|---|---|
index |
number |
Returns:
- Type
- Note
getNumNotes() → {number}
Get the number of notes in the NoteGroup
.
Returns:
- Type
- number
getNumPitchControls() → {number}
Get the number of pitch control objects in the
NoteGroup
.
(supported since 2.1.0)
Returns:
- Type
- number
getParameter(type) → {Automation}
Get the Automation
object for parameter type
. It is case-insensitive.
type
should be one of the strings in the
typeName
column in the table shown in Automation#getDefinition
.
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
Returns:
- Type
- Automation
getParent() → {NestedObject|undefined}
- Inherited From:
Get the parent NestedObject
. Return
undefined
if the current object is not attached to a
parent.
Returns:
- Type
- NestedObject | undefined
getPitchControl(index) → {PitchControlPoint|PitchControlCurve}
Get the pitch control object at index
. The pitch
control objects inside a NoteGroup
are kept sorted by
anchor positions.
(supported since 2.1.0)
Parameters:
Name | Type | Description |
---|---|---|
index |
number |
Returns:
getUUID() → {string}
Get the Universally Unique Identifier. Unlike the name, a UUID
is unique across the project and can be used to associate a
NoteGroupReference
with a NoteGroup
.
A UUID looks like this: "ab85d637-d80b-4628-9c27-007ea74029af".
Returns:
- Type
- string
isMemoryManaged() → {boolean}
- Inherited From:
Check whether or not the current object is memory managed (i.e. garbage collected by the script environment).
Returns:
- Type
- boolean
removeNote(index)
Remove the note at index
.
Parameters:
Name | Type | Description |
---|---|---|
index |
number |
removePitchControl(index)
Remove the pitch control object at index
.
(supported since 2.1.0)
Parameters:
Name | Type | Description |
---|---|---|
index |
number |
setName(name)
Set the name of this NoteGroup
.
Parameters:
Name | Type | Description |
---|---|---|
name |
string |