TrackInnerSelectionState

TrackInnerSelectionState

The selection state of the piano roll area.

To access the TrackInnerSelectionState object,

  • use SV.getMainEditor().getSelection() in JavaScript
  • use SV:getMainEditor():getSelection() in Lua

Extends

Methods

clearAll() → {boolean}

Inherited From:

Unselects all object types supported by this selection state. Return true if the selection has changed.

Returns:
Type
boolean

clearGroups() → {boolean}

Inherited From:

Unselect all NoteGroupReference. Return true if the selection has changed.

Returns:
Type
boolean

clearNotes() → {boolean}

Unselect all notes. Return true if the selection has changed.

Returns:
Type
boolean

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

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

getSelectedGroups() → {array}

Inherited From:

Get an array of selected NoteGroupReference following the order of selection.

Returns:

an array of NoteGroupReference

Type
array

getSelectedNotes() → {array}

Get an array of selected Note following the order of selection.

Returns:

An array of Note

Type
array

hasSelectedContent() → {boolean}

Inherited From:

Check if there's anything selected.

Returns:
Type
boolean

hasSelectedGroups() → {boolean}

Inherited From:

Check if there is at least one NoteGroupReference selected.

Returns:
Type
boolean

hasSelectedNotes() → {boolean}

Check if there is at least one Note selected.

Returns:
Type
boolean

hasUnfinishedEdits() → {boolean}

Inherited From:

Check if there's any unfinished edit on the selected objects.

For example, this will return true if the user is dragging around a few notes/control points but has not yet released the mouse.

Returns:
Type
boolean

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

selectGroup(reference)

Inherited From:

Add a NoteGroupReference to the selection.

The argument must be part of the currently open project.

Parameters:
Name Type Description
reference NoteGroupReference

selectNote(note)

Select a Note. The note must be inside the current NoteGroupReference opened in the piano roll (see MainEditorView#getCurrentGroup).

Parameters:
Name Type Description
note Note

unselectGroup(reference) → {boolean}

Inherited From:

Unselect a NoteGroupReference. Return true if the selection has changed.

Parameters:
Name Type Description
reference NoteGroupReference
Returns:
Type
boolean

unselectNote(note) → {boolean}

Unselect a Note. Return true if the selection has changed.

Parameters:
Name Type Description
note Note
Returns:
Type
boolean