ui/b/piano-ctrl.js file

Constants

list_actions
List menu actions for PianoRoll.

Functions

ntool (toolmode, drag_event, cursor, predicate)
Add/register piano-roll canvas tool
notes_canvas_drag_select (event, MODE)

Select Tool

Crosshair The Select Tool allows selection of single notes or groups of notes. Modifier keys can be used to modify the selection behavior.

Horizontal Select

notes_canvas_drag_paint (event, MODE)

Paint Tool

Pen With the note Paint Tool, notes can be placed everywhere in the grid by clicking mouse button 1 and possibly keeping it held during drags.
notes_canvas_drag_move (event, MODE)

Move Tool

Pen With the note Move Tool, selected notes can be moved clicking mouse button 1 and keeping it held during drags. A copy will be made instead of moving the selected notes if the ctrl key is pressed during drag.
notes_canvas_drag_resize (event, MODE)

Resizing Notes

H-Resize When the Paint Tool is selected, the right edge of a note can be draged to make notes shorter or longer in duration.
notes_canvas_drag_erase (event, MODE)

Erase Tool

Eraser The Erase Tool allows deletion of all notes selected during a mouse button 1 drag. The deletion can be aborted by the Escape key.
note_hover_body (coords, tick, key, notes)
Detect note if hovering over its body
note_hover_tail (coords, tick, key, notes)
Detect note if hovering over its tail
note_hover_head (coords, tick, key, notes)
Detect note if hovering over its head
notes_canvas_tool_from_hover (piano_roll, pointerevent)
Get drag tool and cursor from hover position
target_coords (event, target)
Translate event offsetX,offsetY into taret element