Teensy 2 CC controller for Logic Pro X Problem

Status
Not open for further replies.

madpsychot

New member
I'm having a very strange problem that I cannot work out at the moment. I'm using a single potentiometer to control CC values over MIDI. The code I'm using is:

Code:
void setup() {
   
}

void loop() {
   usbMIDI.sendControlChange(1, analogRead(0) / 8, 1);           

}

Basically, as I understand the code (which I got from another source) is that I'm transmitting changes in voltage on channel 1, and dividing the result of the voltage changes by 8, which should give me a minimum value of 0 and a maximum value of 127.

Here's where my problems start. When I hook this setup to Logic Pro X, it's recognised as MIDI device without problem. I then instruct Logic to "learn" the CC change. Up to now everything is working. When I turn the pot, it acts more like an on/off switch. So turning the pot flips the setting to 0, and turning it the other way turns the setting to Max.

I then downloaded Ableton Live, and go through the similar procedure of learning a CC change, and this time it works flawlessly. Turning the pot gives a smooth sweep of the setting.

So now I'm a little stuck. Is there anyone out there who has made a simple (or complex) midi controller using a teensy, and can control CC changes in Logic Pro X?
 
In Arduino, click File > Examples > Teensy > USB_MIDI > AnalogControlChange.

Among the issues...

1: This code will send a flood of redundant MIDI messages, likely overwhelming software on your PC

2: It's not reading and discarding incoming messages, which will cause trouble if any software is configured to send to Teensy

3: Usually controller 11 is for volume, not 1.

Again, start with that known-good example code. This page also has details on how the USB MIDI works.

https://www.pjrc.com/teensy/td_midi.html
 
Thanks for the reply - I should have noted that I picked up my Teensy yesterday and am working with about 1% knowledge of what I'm actually doing!

I will check out the example code. I gather that my code is simply looping CC messages from the Teensy and sending them to my computer, whether I am rotating the potentiometer or not? Yeah, that would be bad. I'll check out the code in the example and report back what I did / did not do.

Thanks again!
 
Status
Not open for further replies.
Back
Top