MIDI CC value for incremental change?

Official support for: mutools.com
RELATED
PRODUCTS

Post

Some applications use a method which is often called "two's complement" (there are other methods as well) to interpret values from 1-63 as incremental values and 63-127 as decremental (is that a word?) values*. Any CC can be used this way, it's up to the software to interpret the data. Many MIDI controllers which have encoders or 360° pots have a Relative mode or an Inc/Dec mode which employ this method, along with an acceleration curve. So, as you turn an encoder clockwise, the increment values are transmitted and as you turn the encoder counter clockwise decrement values are transmitted. The faster you turn the encoder, the closer the values get to 63/64 so that the software can interpret the change in rate as a means to change the target value in greater or lesser amounts.

This is possible with encoders because they work like a series of switches. Each turn = 24-32 switches or steps. I'm not sure how this all works with 360° pots.

14-bit values are nice within a computer ecosystem but when controllers use analog controls (pots, faders), they are often using 8-10bit ADC (which is then muxed, at a slower sample rate) so there isn't much point to transmitting 14-bit values, unless the destination device requires it (as is the case with Pitch Bend data). That isn't always the case, I have seen controllers which have 16-bit ADC for some controls but that's not common. Also remember that MIDI is serial and you are transmitting twice as much data when using 14-bit values.

*Realistically more more like 1-10 and 127-118. Depends on the acceleration curve.

Edit: Sorry, this isn't a very technical description of how all this stuff works. I'm not an engineer, so my words are those of a layman. :)

Post

justin3am, have you implemented "two's complement" or similar approaches in MuLab? What software employs this approach natively?

Post

Hi Folks. I'd like to return to this topic if anyone has more information to share. I found an example of someone using PureData to send 14 bit MIDI CC values to a DAW. The example uses Ableton Live and shows a menu to select how to interpret the incoming MIDI values. "Absolute (14 bit" is one of the options. Is this worth trying in MuLab? Would it increase the resolution of MuLab instrument parameters and also those of VSTs?

Thank you,
d. vyd

Post

I've implemented a MIDI patch in PureData that continuously increments a value when a knob is turned to the right and continuously decrements the value when a knob is turned to the left. The speed and amount of change is dependent on the amount of rotation from center. If I send to MuLab's basic synth's filter "Q" -- what exactly should I select for a 14 bit controller? Right now it is sending to channel 1 on CC#1 & CC#33, which I believe should be paired for 14 bits. But, I'm not seeing the filter control change at all.

-d. vyd

Post

MuLab does not support combining single 7 bit MIDI CC values into a 14 bit value. Whilst you can bind more than one MIDI CC to a controllable parameter, they act independently. MuLab does support binding Pitch Bend (a 14 bit value) to anything, of course. (Both channel and poly aftertouch are 7 bit...)

To do this, either right-click and "Map MIDI Controller" or through the "Edit MIDI Controller Map" feature. Select the control, then send the MIDI event. You should see the MIDI event name appear when you send the MIDI event (assuming you haven't turned off "Listen to MIDI"). When you've got the intended MIDI event selected, click OK.

Post

You could try this -- it's not the answer you are looking for but does give better than 7 bit control by multiplying the values together. (You might be able to come up with something else that works better.)

Set up a MuX with an Event Input and Event Output. Add two Constant Modulator generators. Map your two CC values to control the Constant Modulator values. Make sure their ranges are 0 to 100%. Wire the Event input to them, too.

Next, add a Modulation Mapper, wire the "low order" (or "degree") Constant Modulator output to the "Modulation Input 1" and the "high order" (or "scale") Constant Modulator output to the "Amplitude". Wire the Event input to this, too. (There doesn't appear to be any visual feedback from the modulator inputs, unlike if they were event controlled.)

Now add a MIDI Controller Generator and wire it from the Modulation Mapper output. Set the Controller ID to your desired MIDI event. Wire the Event input to this, too. (There doesn't appear to be any visual feedback from the modulator inputs, unlike if they were event controlled.)

Finally, add an Event Monitor and wire the MIDI Controller Generator to both that and the Event Output. Open up the monitor and watch what happens when you move your MIDI CC controls. Your "high order" control limits the range that the "low order" control generates.

ImageImage

Added to MuLib:
https://drive.google.com/open?id=0B1yJ7 ... 0NYYjFWYWc
Image

Post

pljones, thank you for taking the time to explain this to me and for providing a possible solution!

Post

Thank you for your patch. I assigned the two CC's from my Pure Data patch to the Degree and Scale knobs of your patch. They move correctly (I think). But they do not seem to adjust the output CC knob at all. What am I doing wrong?

Post

Monitor the output value using an Event Monitor (or the "Mon" button). If the MUX is outputting the right values, it's working.

It should really be "128 / (high x 128 + low)" (in float) rather than what I've done which is "128 / (high x low)" (in float) -- gives the same range over all, though...

Post

Hi pljones. The values are definitely being multiplied but there are still some issues.

1) What should the min/max be on Degree and Scale? -100 to +100? 0 to 100? 1 to 100?

2) You've set the final control output to CC# 16. I've placed your patch in the top (first) place in a rack and the basic synth in the second place. I've set the Q of the filter to respond to CC#16. It does not move. Even though the MIDI monitor is showing output. Do I need to separate the EvModModEv and the synth it controls into separate racks?

-d. vyd

Post

You can set the values to whatever you need to get the effect you want. You may also need to edit it to get it to work for your particular situation. It is just a demonstration.

Post

d.vyd wrote:Thank you for your patch. I assigned the two CC's from my Pure Data patch to the Degree and Scale knobs of your patch. They move correctly (I think). But they do not seem to adjust the output CC knob at all. What am I doing wrong?
If you mean just visually, try this
Capture.JPG
You do not have the required permissions to view the files attached to this post.
Beauty is only skin deep,
Ugliness, however, goes right the way through

Post

Thanks pljones & bibz1st. I'm spending so much time on this I'm not making any music. I'll revisit again in a few months. Ideally, I'd like to be able to send 14bit or NRPN or OSC to MuLab somehow. But, even without these technical additions, I enjoy using MuLab to make music.

Post

bibz1st wrote:If you mean just visually, try this
It looks like that drops the resolution back down to integer 0-127, unfortunately. In fact, binding from the event output to a parameter input seemed to have the same effect, so it may be pointless. Of course, it's tricky to tell if this is just visual or not without putting monitors all over the place :)

I've updated the patch so it now does roughly ( ( 128 * HiCC ) + LoCC ). It also now has a Modulation output, which would avoid the loss of resolution. The MuLib file is here.

Post Reply

Return to “MUTOOLS”