Receive Pitch Bend data (Mackie HUI Protocol)

Status
Not open for further replies.

Lenogi

Active member
Hi,
Sorry for my poor English.
My project works well on several DAWs I've tested, but I get strange data in two of them. Wavefrom 9 (and Tracktion line) and Mixbus 32c.
I'm not sure, but I believe it's related to MSB/LSB.
Here is the data I send and receive:

Waveform

Controller
69
Waveform
69
Waveform
141
Controller
142
Waveform
142
Waveform
215
Controller
216
Waveform
216
Waveform
290



Mixbus 32c

Controller
3276
Mixbus
3278
Mixbus
3480
Mixbus
3479
Mixbus
3229
Controller
3228
Mixbus
3228
Mixbus
3278
Mixbus
3277
Mixbus
3276
Mixbus
3228

I´m using usbMIDI.sendPitchBend and void myPitchChange.

Any ideas?

Thanks
 
Mackie HUI does not use pitchbend to transmit fader position, the protocol you are actually using is Mackie MCU.
If you can change the controller type of the device to MCU in the DAW then the pitchbend signal should behave as expected.
 
Mackie HUI does not use pitchbend to transmit fader position, the protocol you are actually using is Mackie MCU.
If you can change the controller type of the device to MCU in the DAW then the pitchbend signal should behave as expected.

Thank you for reply.
Sorry about the HUI in the title of the topic, my mistake.
I'm not using HUI, just MCU.
Just to clarify better, I'm not doing anything with motorized faders, just need to update on the controller the values of the fader that comes from the DAW.

Mixbus
Mixbus.JPG

Waveform
Waveform.JPG
 
Just a test code for the function


Code:
#include <RotaryEncoder.h>;

int val;
int enc_check;

RotaryEncoder encoder(1, 0, 50, 4, 10000);

void setup() {

  usbMIDI.setHandlePitchChange(OnPitchChange);
}

void loop() {

  usbMIDI.read(); // Read USB MIDI incoming
  int enc = encoder.readEncoder();
  enc_check = enc;

  if (enc != 0) {
    val = val + (enc);
    val = min(val,   8191);
    val = max(val, - 8192);
    usbMIDI.sendPitchBend(val, 1, 0);

  }
}

int midiport = usbMIDI.getCable();
void OnPitchChange(byte channel, int bend) {
  if ((midiport == 0) && (channel == 1) && (enc_check == 0)) {
    val = bend;

  }
}
 
So from what I can tell my guess would be possibly poor integration in their software of the MCU device, as far as I know MCU faders only have an effective resolution of 9bits or 512 values and don’t make use of the full 14bits or 16384 values. So it’s a possibly that the pitchbend value works well enough on a real system. If the code works as expected in other software I would more than likely say it’s no fault of your code as Midi is universal and not DAW specific.
 
It may also be that the DAWs are not updating the pitchbend value correcting if there is no corresponding Fader Touch value being sent along with the pitchbend. The DAWs I’ve tested can be finicky if no touch value is sent and the DAW can’t be configured to work without it.
 
It may also be that the DAWs are not updating the pitchbend value correcting if there is no corresponding Fader Touch value being sent along with the pitchbend. The DAWs I’ve tested can be finicky if no touch value is sent and the DAW can’t be configured to work without it.

I thought of that possibility.
How to include this in the code in the best way?
 
I haven’t found a best way to include it, you may be able to just send it every second or so. You typically have to send it like so:

Touch On
...
...
Pitch Bend
Pitch Bend
Pitch Bend
...
...
Touch Off

I’ve tried sending it along with every Pitch Bend but some DAWs don’t like that. It’s also possible for some encoders to be touch sensitive, you’d have to test the encoders you have by running a wire to the metal housing of the encoder, but this way you have accurate Touch On and Off messages.
 
I haven’t found a best way to include it, you may be able to just send it every second or so. You typically have to send it like so:

Touch On
...
...
Pitch Bend
Pitch Bend
Pitch Bend
...
...
Touch Off

I’ve tried sending it along with every Pitch Bend but some DAWs don’t like that. It’s also possible for some encoders to be touch sensitive, you’d have to test the encoders you have by running a wire to the metal housing of the encoder, but this way you have accurate Touch On and Off messages.

I'll try something in the code that does this without using real touch
Thanks Vjmuzik, you've helped a lot.
 
Status
Not open for further replies.
Back
Top