Event based on a specific midi note?


#1

Hey there,

I wanted to know if its possible for the etc to trigger an event based on a specific midi note ?
From what i’ve seen, there is a function called midi_note_new in the etc. I would then need to get the value of the note being played.

Thanks

Louis


#2

I’d imagine this would be possible - but I’m not sure if there’s an existing mode that works this way. It might need one set up specially in Python.


#3

I’m aware it needs to be set in Python. If you look at the code for different modes, there is a function called ‘midi_note_new’ which belongs to the ETC. It would be nice to have something such as ‘midi_note_G3’. My question is fairly simple and I wonder why nobody has answered it yet.


#4

etc.midi_notes[] is an array of the 128 notes. 0 for off, any other number for on. You can loop over the array to find all the notes that are on. This is what gets used to draw the grid of notes on the on screen display.