-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play individual notes #187
Comments
Thanks for the comprehensive question but please try to use the issue template when possible. It gives clearer impression on what you're using and your goals. It is still a bit unclear what you mean with "playing individual notes" l. Do you want to play really each individual note (head) like navigating through them with arrow keys and play them. (new feature) Or do you rather want to define a time range that cam be selected by the user should be played without exceeding the range. (aleady available) |
Hello, Thanks for the reply and my apologies for using the wrong facility to submit was is essentially a feature request. Yes, I would like to be able to click on the Noteheads and use arrow keys. Time ranges of course would be nice, and would be a feature that would probably make this library very popular if it isn't already but I am already intrigued by the whole concept. Cheers and thank you |
This feature will likely need 2 extensions.
|
I added an option today which allows access to the individual note positions. It currently tracks the note heads on the standard notation and the note number on the track. First you need to activate the feature either via data attribute: <div id="alphaTab" data-include-note-bounds="true"></div> or via option: $('#alphaTab').alphaTab({
includeNoteBounds: true
}); With this option active, you can ask for the note at a given position on the bounds: var x,y; // relative to the canvas element.
var beat = boundsLookup.GetBeatAtPos(x,y);
if(beat == null) {
// nothing clicked
}
else {
var note = boundsLookup.GetNoteAtPos(beat, x, y); // start searching relative to beat.
if(note == null) {
// beat clicked but no note
}
else {
// note clicked.
}
} This does not yet directly allow an easy navigation with arrow keys but the neccessary information would be there. |
Feature details: alphaTab should provide a mechanism to play an individual beat of a single track on-demand via an API call. This API call only has an effect if the song is currently not playing. This feature is meant for editors or lesson-applications which want to play some beats on demand. |
New APIs for playing individual beats and notes are available in 1.1.0-alpha.55 https://www.alphatab.net/docs/reference/api/playbeat/ |
AlphaTab looks great but I was wondering if there is a way to select individual notes for playback.
The future feature proposals seem very ambitious but the fact that all the basics are covered in a substantive way is steering me towards this particular library but I'd like people who can't read notation to be able to interact with the score rather than DAW functions.
All the best
The text was updated successfully, but these errors were encountered: