Hi,
I need to create an script in order to translate velocities to certain values.
So I'm getting started with the advanced syntax, and as I'm not the King of Javascript, I have a question.
I'm able to retrieve the velocity of all the incoming MIDI Note Messages by
OSC{ /note }
That will output the velocity of the incoming message for any note value
But I wanted to narrow down this listening process to a certain Note , and knowing that the syntax is as follows.
OSC{address, default, usePreArgs}
and the incoming messages I get are of the form
(DEBUG, OSC) In: { address: `/note/', args: [ 1 , 2 , 4 ] } From: midi:somedevice
I want to be able to filter by the note number so the Second value in the array of args , in the previous example was 2 , but it can be any value . And return the third value of the array of args.
Any suggestions on how to do this?
Thank you!