noteMouseDown
Description​
This event is fired whenever a the user presses the mouse button on a note.
It is only fired if includeNoteBounds
was set to true because
only then this hit detection can be done. A click on a note is considered if the note head or the note number on tabs are clicked as documented in the boundsLookup
noteMouseDownJavaScript |
alphaTab.noteMouseDownjQuery |
alphaTab.noteMouseDownHTML |
NoteMouseDown.net |
noteMouseDownAndroid |
Types​
function(note)JavaScript |
Action<AlphaTab.Model.Note>.net |
(note: AlphaTab.Model.Note) -> UnitAndroid |
Parameters​
Parameters | Type | Summary |
---|---|---|
noteJavaScript | alphaTab.model.Note | The note which was clicked. |
note.net | AlphaTab.Model.Note | The note which was clicked. |
note.net | alphaTab.model.Note | The note which was clicked. |
Examples​
- JavaScript
- HTML
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.noteMouseDown.on((note) => {
api.playNote(note);
});
document.querySelector('#alphaTab').addEventListener('alphaTab.noteMouseDown', (e) => {
const note = e.detail;
api.playNote(beat);
}, false);
var api = new AlphaTabApi<MyControl>(...);
api.NoteMouseDown.On(note =>
{
api.PlayNote(note);
});
val api = AlphaTabApi<MyControl>(...)
api.noteMouseDown.on { note ->
api.playNote(note)
}