how can I receive 14 bit resolution CC messages in Max 7?

Lee Todd Lacks's icon

Hello everyone,

I am currently running Max 7.3.2 on a desktop computer with a Windows 7 32 bit OS (Yes, my system is a bit antiquated :-) For the past year, I've been using a Faderfox PC4 universal miidi controller to send all sorts of CC messages to the software synthesizer which'I've been developing in Max. For the most part, I've been very pleased with the PC4, but there have been times when its 7 bit resolution of its encoders hasn't seemed precise enough for certain parameters. So, I just recently purchased a Faderfox EC4. Unfortunately, I can't seem to figure out how to get my EC4 to work in 14 bit resolution mode. I had had naively hoped that each knob of the EC4 would be capable of transmitting 14 bit CC messages, simply by switching from 7 to 14 bit mode. I'm beginning to realize that this might not be possible. At the moment, almost all of the parameters of my synth respond to MIDI CC messages. I would greatly appreciate it if someone could share a patcher that demonstrates how a parameter can be configured to respond to 14 bit messages via [ctlin] objects. Also, I would appreciate knowing if and how I need to configure my "setup" options on the EC4, so that the unit transmits properly.

Thanks in advance!
Lee Todd Lacks

Roman Thilenius's icon

if your controller can be set up to produce pitch bend on 16 channels, there is [xbendin] for a very quick and math-free solution of something very similar.

Francois Weber's icon

Hi,
You need to use 2 controllers.
Here's a very simple example :

Max Patch
Copy patch and select New From Clipboard in Max.


Source Audio's icon

read user manual for that device.
once you understand how to set encoders to send 14 bit range,
either MSB/LSB, NRPN etc, it will be easy to encode received values in max.
page 9:

If you have no idea what MSB/LSB or NRPN means, google will tell you in few words in your language.

some midi devices send MSB before LSB, some the other way arround.
you need to know what your device does.

Andy Maskell's icon

I've never been aware that MIDI has been able to send 14-bit CC values. I've always thought that it had to be done with two linked CC controlers with the first sending the "coarse" (MSB) value and the second sending the "fine" (LSB) value. This is usually configured by linking two CC controlers 32 steps apart, eg CC 32 and CC64. Even then, you'd have to read both CC messages and then add them to get the 14-bit value (LSB + (MSB * 128)). There is an extension that allows pitchbend to be sent as either 7 or 14 bit values and that is enabled in Max by using the [midiselect @bend @hires n] and [xbend] types of object.

Bruce Alexander's icon

"I've never been aware that MIDI has been able to send 14-bit CC values."
Some devices can. Most synths send and receive 14 bit pitchbend values.
For the devices which can send and receive 14 bit you have to find the CC numbers, the manual should have them listed. I have used ctlin and a capture object to collect the cc numbers then make a pair of ctlin objects with those numbers and watch what happens.

Peter Ostry's icon

"I've never been aware that MIDI has been able to send 14-bit CC values."
"Some devices can."
Mmmh ... No ... Yes ... No ...
In MIDI 1.0 there is no 14-bit CC (= Control Change). Only Pitchbend.
14-bit CC must be described with more than one number.
MIDI 2.0 allows higher resolution.

Roman Thilenius's icon

lots of confusion.... on all sides....

i am not an expert either... but 14 bit controllers were introduced in 1990 or 1991 with MIDI and are present in jupiter 8, DX-7 and some other classics.

most e-mu synths can do it and i think they introduced that long before it became part of the official specs.

it starts withthe famous bank select btw., which only works in that mode.

from my understanding it is more or less all only a matter of interpretation anway. if you build your own controller you can also hook up 4 controllers for even higher resolution if you wish.

and inside your custom app you do you need to do expr LSB+(MSB<<7), you can also do expr finetuning+(100*coarsetuning) if you wish.
since MIDI is serial it will always be received in the right order, and when the interpreation matches your purpose, all is good.

gawd, i hate this nonlinear hex crap. some day i´ll do MIDI 4.0 and show the world how it should have been made from day 1 on.

Lee Todd Lacks's icon

Hey there, everyone.

Thank you all for responding to my query in such a thoughtful way! I have spent the past several days working with various methods for generating 14 bit messages in Max. Thus far, I have been able to send managed to send 14 bit messages with 2 CC's as well as with the xbendin object. When I use the Faderfox PC4 for this purpose, I have to assign 2 separate encoders to transmit a single 14 bit messages, because the PC4 encoders only transmit 7 bit. However, Max doesn't seem to care which CC numbers I assign to each knob, as long as they're linked properly with the math that Francois and Roman have referred. Source Audio, I managed to set up the Faderfox EC4, and was able to transmit 14 bit messages with this unit, as well. The EC4 only requires me to assign one knob to each 14 bit message, but I need to ensure that my MSB is > 31 and that my LSB = MSB + 32. While having to assign two separate knobs on the PC4 to handle one parameter initially seemed like a waste of controllers, I have since come to realize that dialing through the range of a 14 bit message with 2 knobs on the PC4 is significantly preferable to doing so with one knob on the EC4, as the latter requires me to turn the knob round round 10 or 12 times, at least, in order go from the minimum to the maximum values. And this is true even when I have the highest acceleration factor set for the rotation of the knob. At this point, I'm planning to return the EC4, as I just can't deal with spending close to a full minute trying to dial in the setting on my cutoff frequency, oscillator fine tuning, etc.

Lee Todd Lacks's icon

Roman, I look forward to your iteration of MIDI. :-)

Jean-Francois Charles's icon

As many have said, double resolution is standard because it's just two CC messages sent at the same time by your midi controller.
To check what the midi controller is sending, of course, you just need to print what's coming out of ctlin. Or you could use some external software like MIDI Monitor on Mac.
Did you try Roman's suggestion? (LSB + (MSB << 7))
Note that Andy's suggestion (LSB + (MSB * 128)) is the same, just less idiomatic for hi-res MIDI users and less efficient.

Jean-Francois Charles's icon

Lee Todd, note that you are doing something wrong if you are using two encoders to send 14 bits: 14-bit resolution means that a single encoder sends data for 2 CC values. You have to check the manual to set your hardware to do this (Faderfox EC4 seems to have this possibility), then check that you receive the data on 2 cc numbers (MSB/LSB). Then you can move to decoding that in Max following the advice on this page.

Lee Todd Lacks's icon

Hello Jean-Francois,

Yes, I have tried Roman's suggestion (LSB + (MSB << 7)) and it works nicely. I also ultimately managed to figure out how to configure the EC4, so that I am able to transmit a 14-bit CC message with a single encoder. However, I have determined that in order to go from the minimum to the maximum scaled values for any particular parameter of my software synth, I am required to turned the encoder 20-25 times, even with the highest acceleration set for that encoder's rotation. This simply isn't practicual, and thus, I am jplanning to teturn my EC4 to the vendor and keep my Faderfox PC4. The PC4 only sends 7-bit messages, so in order to achieve 14-bit resolution, am I correct in presuming that each of the 2 CC's involved would need to have its own encoder assigned to it, so that they could then be linked in Max using the LSB + (MSB << 7)) method?

I am attaching the patcher that I use for 14-bit resolution, for the forum's consideratoin.

Thanks for reaching out!

14-bitreswith2CC.maxpat
text/plain 4.55 KB

Roman Thilenius's icon

if you have a "normal" 14 bit midi controller you can still play the custom math game in addition, and for example limit the overall range to 15% - or why not to 10 bit? (which would be a typical resolution for some physical fader and eventually also digital encoders/per 360°)

talking about resolutions, you might also want to check with the help of max which of all possible numbers that controller actually produces.

faders and keyboard controllers (velocity, pressure) tend to produce data in a much lower resolution than the midi resolution suggests.

Lee Todd Lacks's icon

Thank you for offering these thoughtful suggestions, Roman. While I appreciate the extent to which limiting the range of the encoder for any given parameter might prevent me from having to rotate the knob in in ordinate number of times, I now realize that this isn't the only issue that makes the EC4 impractical for my purposes. You see, I am legally blind, and thus, I often rely upon the physical position of an encoders when determining how high or low I have it set. Since the EC4 has encoders that can be rotated ad infinitum, I'm not able to determine the value to which a particular parameter is set by tactile recognition. On the other hand, the PC4 has "radio dial" stype knobs with hard start and stop points. While some folks might regard this as being a limitation, I actually appreciate (need) these hard stops in order to know where I have the dial set. I think of dial positions in terms of a analog clock. I should have realized that this was going to be an issue prior to purchasing the EC4, but sometimes you don't know what you don't know.



Roman Thilenius's icon

and the next thing you will notice will be that it would be great to have birectional communication available, so that you can implement total recall in your soft.

there is probably no physical dial availabe which can output 16,000 values with only 1 or 2 rotations, so the whole thing will always require a compromise at either end.

(though there are also analog voltage encoders, but they are even more expensive.)

if they finally make it happen one day, the next encoders with LED feedback will be the upcoming behringer BCR mark II.

srs's icon

Have you tried the [xctlin] object?

Lee Todd Lacks's icon

I am familiar with the xctlin, but I am currently running Max 7, and thus, this object is not accessible to me.

srs's icon

Here's what I used to recieve 14-bit MIDI without the [xctlin] object. It's also useful if using devices in Live 10 which can't record hi-res MIDI.