lordscruffo
Member
Hi guys,
I'm just getting started with building a midi controller using a teensy 3.1, it will mainly use some rotary encoders. I love the built in MIDI and Encoder coding examples from teensy and teensyduino, but I need some help with applying code to translate the encoder turns inside a daw (logic pro x). Currently i'm just using one of the examples with a basic midi message, and all i get is large knob movement and no consistancy.
code:
If anybody could point me in the right direction I'd really appreciate it.
thanks,
Daniel
I'm just getting started with building a midi controller using a teensy 3.1, it will mainly use some rotary encoders. I love the built in MIDI and Encoder coding examples from teensy and teensyduino, but I need some help with applying code to translate the encoder turns inside a daw (logic pro x). Currently i'm just using one of the examples with a basic midi message, and all i get is large knob movement and no consistancy.
code:
Code:
#define ENCODER_OPTIMIZE_INTERRUPTS
#include <Encoder.h>
Encoder myEnc(0, 1);
void setup() {
Serial.begin(31250);
Serial.println("Basic Encoder Test:");
}
long oldPosition = -999;
void loop() {
long newPosition = myEnc.read();
if (newPosition != oldPosition) {
oldPosition = newPosition;
Serial.println(newPosition);
usbMIDI.sendControlChange(B0, newPosition, 1);
}
}
If anybody could point me in the right direction I'd really appreciate it.
thanks,
Daniel