NRPN glitches

NRPN glitches
« on: February 24, 2019, 07:17:28 AM »
Anyone come across this before? NRPNs causing glitches... Try this:
set OB6 to use NRPN mode rather than CC
init patch.
engage Hold and press a key then using Globals, set Local Ctrl to off.
Your original note should still be playing but now the control knobs don't do anything. OK so far.
Now use a simple midi cable between midi in and midi out. Now the knobs work as expected because the OB6 is sending NRPNs back to itself and responds to them rather than the front panel directly.
Now turn resonance up (makes changes to frequency more noticeable) and very slowly move the filter frequency knob. Around the centre point there is a quite noticeable glitch. The filter frequency very briefly jumps to max as you sweep through the knob's mid-point and jumps to min as you sweep downwards.

I believe it does this for the following reason: NRPNs for controls using values greater than 127 are split into two bytes (actually just a bit or two in the MSB and 7 bits in the LSB). A complete NRPN sequence is: parameter MSB, parameter LSB, value MSB, value LSB.
If we are changing the value from 127 to 128, ignoring the parameter address Bytes because they doesn't change, we need to send MSB1 = 0, LSB1 = 127, MSB2 = 1, LSB2 = 0.
These are sent in sequence over midi as fast as midi can go, but there's a brief moment after the third message in the sequence when the synth sees a new MSB and links it with the last LSB it saw and makes a value of 255! LSB1 = 127 + MSB2 = 1 = 255. So the synth plays 127, 255, 128. On the way down, it sees 128, 0, 127. It's only a momentary glitch but it's there. This only affects the parameters that use values greater than 127 but include things we'd like to be smooth around the centre like pulse width, X-Mod VCO2 depth, filter freq... I guess it's the same when controlling a second OB6/module in chain mode and it probably affects other synths as well? Maybe it's common knowledge but it was news to me!
I've been experimenting with sending NRPN messages to my OB6 as a prototype for a hardware midi controller for the synth.
One thing I've tried which shows some promise is the increment command. This does indeed smoothly move though the 127/128 switch but as soon as I send an absolute NRPN number with the higher MSB it glitches. This makes no sense to me....surely after a few increments, the OB6 is counting internally with high numbers so shouldn't be surprised by an absolute NRPN with a high number but it still glitches! Huh?  Is this a bug in the OB6?

Re: NRPN glitches
« Reply #1 on: February 24, 2019, 03:37:56 PM »
I get something very similar when I try to automate stuff in Nuendo. I can see where it's going to glitch every time when looking at the controller data. Usually where the values jump to greater than 127, or going the other way, less than 128 . As you said, it depends on the parameter. My work around is to record the notes as midi and then work the knobs in real time while capturing the performance as an audio track.

This has been discussed but it was a long time ago.