MIDI CC value for incremental change?
-
- KVRist
- 219 posts since 3 May, 2016
Hi folks,
I would like to have fine tuned control of the frequency of an oscillator from 20hz to 20khz. I figured out how to map a MIDI CC to the pitch modulation "cents" of the standard oscillator, with the range set to its maximum, 6000. However, because MIDI CC is only 0-127, the pitch jumps and does not sound continuous. How can I use the MIDI CC value to continuously increment the current pitch up or down? When the MIDI CC knob is in the center, the pitch would be constant.
thank you,
-d.vyd
I would like to have fine tuned control of the frequency of an oscillator from 20hz to 20khz. I figured out how to map a MIDI CC to the pitch modulation "cents" of the standard oscillator, with the range set to its maximum, 6000. However, because MIDI CC is only 0-127, the pitch jumps and does not sound continuous. How can I use the MIDI CC value to continuously increment the current pitch up or down? When the MIDI CC knob is in the center, the pitch would be constant.
thank you,
-d.vyd
- KVRAF
- 13863 posts since 24 Jun, 2008 from Europe
- KVRAF
- 24434 posts since 7 Jan, 2009 from Croatia
This is usually done (in General MIDI) via CC 96 (Data Increment) and CC 97 (Data Decrement), but this is used with RPN and NRPN messages...
http://dev.midi.org/techspecs/rp18.php
Not a lot of software supports this way of working.
http://dev.midi.org/techspecs/rp18.php
Not a lot of software supports this way of working.
- KVRAF
- 7412 posts since 8 Feb, 2003 from London, UK
Pitch bend technically supports 128*128 (16384) values -- but a lot of controllers only send the high-order value, so you still end up with only 128 steps. MuLab lets you use Pitch Bend to control whatever you like, not just pitch.
Open Sound Control is the "modern" alternative that attempts to get around this -- but (a) most controllers are not OSC controllers and (b) not that much DAW software supports it.
It's also down to what's being controlled. If it's a VST expecting a MIDI CC message, then it's only ever going to support 128 values, no getting around it. If it's a using parameter automation, then that's even more down to how the VST is written. For MuLab modules, however, incoming values are translated into high precision values, so if you're using modulation automation, you've very fine-grained control - if you can use high precision pitch bend mapped to the modulator, you'll get the full 16384 discrete values (although the modulator offers much finer grained control than that).
Open Sound Control is the "modern" alternative that attempts to get around this -- but (a) most controllers are not OSC controllers and (b) not that much DAW software supports it.
It's also down to what's being controlled. If it's a VST expecting a MIDI CC message, then it's only ever going to support 128 values, no getting around it. If it's a using parameter automation, then that's even more down to how the VST is written. For MuLab modules, however, incoming values are translated into high precision values, so if you're using modulation automation, you've very fine-grained control - if you can use high precision pitch bend mapped to the modulator, you'll get the full 16384 discrete values (although the modulator offers much finer grained control than that).
- KVRAF
- 24434 posts since 7 Jan, 2009 from Croatia
pljones wrote:Pitch bend technically supports 128*128 (16384) values -- but a lot of controllers only send the high-order value, so you still end up with only 128 steps.
Errrr... which ones? Pitch bend is ALWAYS a 14-bit value. I haven't come across any hardware synthesizer or MIDI controller that sent pitch bend only as 7-bit.
- KVRAF
- 7412 posts since 8 Feb, 2003 from London, UK
It's a 14 bit value. The low order bits are often zero, though. I just checked on my Evolution controller keyboard - that's exactly what happens. You're only getting 7 bit resolution.EvilDragon wrote:Errrr... which ones? Pitch bend is ALWAYS a 14-bit value. I haven't come across any hardware synthesizer or MIDI controller that sent pitch bend only as 7-bit.
- KVRAF
- 24434 posts since 7 Jan, 2009 from Croatia
Mine sends full 14-bits (Kurzweil PC3K8), and as mentioned, I really didn't come across a controller that doesn't do full 14-bit pitch bend range. It would be far too crude of a pitch adjustment with just 128 values, you would hear VERY obvious stepping, even with the default 2 semitones pitch bend range...
- KVRAF
- 13863 posts since 24 Jun, 2008 from Europe
Wrt d.vyd's question: I didn't think of pitch bend, that's indeed a good idea IF the MIDI keyboard does send real 14 bit pitch bend values.
I checked the Korg Kontrol 49 here and it does use both MIDI values to form a 14 bit value but practically it's only sending events on a +- 128 values grid, i have the impression that the LSB bits are simply a kind of calculated interpolation. So in reality definitely not a real 14 bit accuracy for extra fine control, rather a 7 bit accuracy. Just to be complete: MuLab does use both 7 bit values to compose the complete 14 bit pitch bend value, which is then translated to a 32 bit float to match all the other internal controller and parameter values. But it depends on the MIDI source of course.
I checked the Korg Kontrol 49 here and it does use both MIDI values to form a 14 bit value but practically it's only sending events on a +- 128 values grid, i have the impression that the LSB bits are simply a kind of calculated interpolation. So in reality definitely not a real 14 bit accuracy for extra fine control, rather a 7 bit accuracy. Just to be complete: MuLab does use both 7 bit values to compose the complete 14 bit pitch bend value, which is then translated to a 32 bit float to match all the other internal controller and parameter values. But it depends on the MIDI source of course.
-
- KVRist
- Topic Starter
- 219 posts since 3 May, 2016
I did not realize that pitch bend had finer resolution than any other MIDI CC. The missing piece may be a MUX or VST module that has two modulation inputs (increment amount and increment rate) and outputs a 14bit pitch bend value. I'm still not sure what this pitch bend value should be routed to--perhaps the pitch modulation "cents" of the standard oscillator?
-d.vyd
-d.vyd
- KVRAF
- 24434 posts since 7 Jan, 2009 from Croatia
Pitch bend is NOT a CC, it's a different type of message. Although, first 32 CCs can be sent in 14-bit mode utilizing two CCs, so they get the same resolution as pitch bend.
- KVRAF
- 7412 posts since 8 Feb, 2003 from London, UK
That's a bit of a condradiction in termsEvilDragon wrote:Although, first 32 CCs can be sent in 14-bit mode utilizing two CCs, so they get the same resolution as pitch bend.
-
- KVRist
- Topic Starter
- 219 posts since 3 May, 2016
I'm still working through this issue slowly. Let's say I could produce a 14 bit value. It could only be sent to MuLab as MIDI pitch bend and I could only have one such assignment per channel, correct? So, producing 14 bit values would not permit a 14 bit workflow.
If I were to use OSC, which does permit higher resolution controls, I could not also work with MuLab because it does not send or receive OSC, correct?
-d. vyd
If I were to use OSC, which does permit higher resolution controls, I could not also work with MuLab because it does not send or receive OSC, correct?
-d. vyd
- KVRAF
- 7412 posts since 8 Feb, 2003 from London, UK
Every targeted module in MuLab can have its own mapping, so no. But you'd need to keep changing target, either through follow-focus targeting or "hard-wired" channel targeting. (Also, if you have two targets one after the other in the event flow, you may not want both being controlled by the same events... so that situation would need thinking about.)d.vyd wrote:Let's say I could produce a 14 bit value. It could only be sent to MuLab as MIDI pitch bend and I could only have one such assignment per channel, correct?
