Fixing NRPNs sent from switches on the Behringer BCR 2000

285 views
Skip to first unread message

Christopher Arndt

unread,
Sep 14, 2010, 11:13:29 AM9/14/10
to midi...@googlegroups.com
Hi all,

I just want to share a recipe for mididings, which I just created to
work around a problem that arose when I tried to program my Behringer
BCR 2000 knobbox to control my new Akai Miniak synthesizer.

The problem:

a) The Miniak's sound parameters can only be controlled via NRPNs not
normal CCs, even switches use NRPNs with low value ranges but they
nevertheless require both MSB and LSB values be sent via CCs 6 (data
entry MSB) and 38 (data entry LSB).

b) The BCR can send NRPN sequences from rotary encoders and from
switches, but for the switches only a value range from 0-127 is
supported and only CC 6 (data entry MSB) is sent with the current value,
CC 38 is missing.

So I had to write a little Python class for the Process() function that
turns CC 6 into CC 38 and adds a CC 6 event with a zero value for
certain NRPNs.

Below is the code. You can pass the NRPNs which should be affected via
the command line:


Cheers, Chris


from mididings import *
import mididings.event as _event

class NRPNFixer(object):
def __init__(self, *nrpns):
self.nrpns = nrpns
self.cur_nrpn = None
self.cur_nrpn_msb = None
self.cur_nrpn_lsb = None

def __call__(self, ev):
if ev.type == CTRL and ev.param in [98, 99]:
if ev.param == 98:
#print "NRPN LSB:", ev.value
self.cur_nrpn_lsb = ev.value
if ev.param == 99:
#print "NRPN MSB:", ev.value
self.cur_nrpn_msb = ev.value
if None not in [self.cur_nrpn_lsb, self.cur_nrpn_msb]:
self.cur_nrpn = self.cur_nrpn_msb * 128 + \
self.cur_nrpn_lsb
#print "NRPN:", self.cur_nrpn
return ev
elif (ev.type == CTRL and ev.param == 6 and
self.cur_nrpn in self.nrpns):
return [
_event.CtrlEvent(ev.port, ev.channel, 6, 0),
_event.CtrlEvent(ev.port, ev.channel, 38, ev.value)
]
else:
return ev

if __name__ == '__main__':
import sys
run(Process(NRPNFixer(*[int(arg) for arg in sys.argv[1:]])))

Dominic Sacré

unread,
Sep 15, 2010, 5:36:29 PM9/15/10
to midi...@googlegroups.com
Hi Chris,

On Tuesday 14 September 2010 17:13:29 Christopher Arndt wrote:
> I just want to share a recipe for mididings, which I just created to
> work around a problem that arose when I tried to program my Behringer
> BCR 2000 knobbox to control my new Akai Miniak synthesizer.
>
> The problem:
>
> a) The Miniak's sound parameters can only be controlled via NRPNs not
> normal CCs, even switches use NRPNs with low value ranges but they
> nevertheless require both MSB and LSB values be sent via CCs 6 (data
> entry MSB) and 38 (data entry LSB).
>
> b) The BCR can send NRPN sequences from rotary encoders and from
> switches, but for the switches only a value range from 0-127 is
> supported and only CC 6 (data entry MSB) is sent with the current
> value, CC 38 is missing.
>
> So I had to write a little Python class for the Process() function
> that turns CC 6 into CC 38 and adds a CC 6 event with a zero value
> for certain NRPNs.

Nice, thanks for sharing! This makes me wonder if it would be a good
idea for mididings to (optionally) support RPNs and NRPNs as separate
event types. Technically they may be just CC messages, but for anything
more complicated than simple routing they're currently impossible to
handle without writing a Python function...


Cheers,

Dominic

Christopher Arndt

unread,
Sep 15, 2010, 8:13:18 PM9/15/10
to midi...@googlegroups.com
Dominic Sacré schrieb:

> This makes me wonder if it would be a good
> idea for mididings to (optionally) support RPNs and NRPNs as separate
> event types. Technically they may be just CC messages, but for anything
> more complicated than simple routing they're currently impossible to
> handle without writing a Python function...

Well, I doubt that (N)RPNs will often be needed in realtime critical
situations, except maybe when you're sequencing with a GM/GS/XG module.
But then you probably wouldn't need mididings, would you?

Chris

Reply all
Reply to author
Forward
0 new messages