Page 1 of 1

alert click note

Posted: Tue Jul 30, 2019 8:04 am
by gerrix
Can i get an alert with jquery telling me that note i clicked with the mouse? I'm experimenting with the code example https://jazz-soft.net/demo/VirtualPiano.html if you tell me please what should I find instead of "#target". thanks a lot

$( "#target" ).click(function() {
alert( "note click" );
});

Re: alert click note

Posted: Tue Jul 30, 2019 10:00 am
by sema
You can watch the MIDI output from the keyboard.
If there is a "NoteOn" - that means the key was clicked.

Re: alert click note

Posted: Wed Jul 31, 2019 2:15 am
by gerrix
Thanks a lot, now I try if I can get the value in js. I would like to be able to get the values of the notes clicked by the user and then insert them in an array and check if the user has played notes in the correct sequence for musical exercises. Thanks again very much for your availability.

Re: alert click note

Posted: Wed Jul 31, 2019 7:22 am
by sema
Just for case, you'll probably need to use this class:
https://jazz-soft.net/doc/JZZ/midithru.html