alert click note

MIDI library for Node.js and HTML
Post Reply
gerrix
Posts: 30
Joined: Mon Jan 28, 2013 4:28 am
Location: Italy
Contact:

alert click note

Post by gerrix » Tue Jul 30, 2019 8:04 am

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" );
});

sema
Site Admin
Posts: 397
Joined: Mon Oct 17, 2011 7:28 pm

Re: alert click note

Post by sema » Tue Jul 30, 2019 10:00 am

You can watch the MIDI output from the keyboard.
If there is a "NoteOn" - that means the key was clicked.

gerrix
Posts: 30
Joined: Mon Jan 28, 2013 4:28 am
Location: Italy
Contact:

Re: alert click note

Post by gerrix » Wed Jul 31, 2019 2:15 am

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.

sema
Site Admin
Posts: 397
Joined: Mon Oct 17, 2011 7:28 pm

Re: alert click note

Post by sema » Wed Jul 31, 2019 7:22 am

Just for case, you'll probably need to use this class:
https://jazz-soft.net/doc/JZZ/midithru.html

Post Reply