tttapa / Control-Surface

Arduino library for creating MIDI controllers and other MIDI devices.
GNU General Public License v3.0
1.25k stars 140 forks source link

Rotary Encoder Left Right Direction for different Midi Note or Midi CC #146

Open nickho74 opened 4 years ago

nickho74 commented 4 years ago

Hi Pieter,

I have crossed over from 'MIDI-Controller' sketch to 'Control-Surface' sketch and found many useful functions. Thanks for the code !

I would like to test a function for a Single Rotary Encoder,

  1. When turning Encoder to the Left, send a Note On Channel 1, Note Number, Full Velocity.
    • (eg, Note On Ch 1, Note 1, 127).
  1. When turning Encoder to the Right, send a different Note On Channel 1, Note Number, Full Velocity.
    • (eg, Note On Ch 1, Note 2, 127).

Please advise where to modify the code or recommend a example sketch.

Thank you.

tttapa commented 4 years ago

I think the easiest approach would be to add your own custom MIDI Output Element.

You can have a look at the MIDIRotaryEncoder class for inspiration, and feel free to post your code if you get stuck.