Open eigengrau opened 6 years ago
I also notice that the jog wheels send a 14-bit pitch-bend message in addition to MIDI control 6. So we might want to use pitch-bend for higher resolution input. I’m not quite sure how pitch-bend handling is supposed to work, though. In XML, you can just leave out the midino
element, but it looks like the callback is invoked with a weird value
parameter in that case.
Two issues about the jog wheel. First, it looks like mixxx normalizes the 14-bit pitch/bend values by dividing them by 128. In C++, this is done in double format, so we should still have all 14 bits of precision. However, in the call-back, value seems to be provided as an integer. Mixxx bug?
Secondy, the pitch/bend message sent for the jog wheel seems to be centered on 0 (normally, the center should be on 0x2000. This also entails that the pitch-bend message apparently does not signal bend-direction. So my first guess was that one needs to monitor the regular control to keep track of jog direction. However, when I do this, a full revolution of the jog wheel does not quite correspond to a full revolution of the spinner. So I wonder whether the MIDI control value also matters in some way, in addition to indicating direction.
Looking at the jitter of the pitch-bend signal, I wonder whether the control value is actually the coarse value, and pitch-bend a fine value. With a combined resolution larger than 14 bits.
If you add up all the pitch-bend values for one revolution and print that, it looks like they are velocity-dependent. When you turn the jog-wheel once, slowly, you get a value much larger than when you do one rotation at high velocity.
Most of the 14-bit controls don’t seem to really have 14-bits of resolution though. The LSB is either 0 or 64, so we get 8 bits overall.
Had some time to spare, so I thought I might look into the jog wheel issue. I hoped it would make matters more clear if we plot CC6 against the pitch-bend values. But I still fail to make sense of it. Have a look (full SVG here):
For the plot, I started spinning the platter slowly, accelerating slowly, then decelerating again, steadily, after reaching a maximum velocity. CC6 is just the raw value minus 64, so it’s normalized to [-63;64]. Pitch-bend is the value divided by 128, to match the scale of CC6.
I figure this can’t be an LSB-style fine value, since then we’d see no correlation between the two variables.
Here, I was spinning the platter for half a revolution, reversed direction, then spun back, with varying velocities (SVG).
The last one is spinning the platter slowly, then quickly, as uniformly as possible (SVG). Doesn’t look like an accelerometer to me.
This issue is marked as stale because it has been open 90 days with no activity.
Not sure yet how this interacts with #15, but in any case it looks like we’re currently only using the MSB values of 14-bit controls.