playNote
Description​
Triggers the play of the given note. This will stop the any other current ongoing playback. This method can be used in applications when individual notes need to be played for lesson or editor style purposes. The player will not report any change in state or playback position during the playback of the requested note. It is a playback of audio separate to the main song playback.
Signatures​
function playNote(note)JavaScript |
alphaTab('playNote', note)jQuery |
void PlayNote(Note note).net |
fun playNote(note: Note): UnitAndroid |
Parameters​
Parameters | Type | Summary |
---|---|---|
beatJavaScript | alphaTab.model.Note | The single note to play. |
beat.net | AlphaTab.Model.Note | The single note to play. |
beatAndroid | alphaTab.model.Note | The single note to play. |
Returns​
Examples​
- JavaScript
- jQuery
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.playNote(api.score.tracks[0].staves[0].bars[0].voices[0].beats[0].notes[0]);
const note = $('#alphaTab').alphaTab('score').tracks[0].staves[0].bars[0].voices[0].beats[0].notes[0];
$('#alphaTab').alphaTab('playNote', beat);
var api = new AlphaTabApi<MyControl>(...);
api.PlayNote(api.Score.Tracks[0].Staves[0].Bars[0].Voices[0].Beats[0].Notes[0]);
val api = AlphaTabApi<MyControl>(...)
api.playNote(api.score.tracks[0].staves[0].bars[0].voices[0].beats[0].notes[0]);