Changing MIDI Pitch Bend Range.. what am I doing wrong??

gatheround

Well-known member
I've honestly never had a piece of software or hardware respond to this..

Code:
            usbMIDI.sendControlChange(101, 0, midichannel[a]);
            usbMIDI.sendControlChange(100, 0, midichannel[a]);
            usbMIDI.sendControlChange(6, midibendrange, midichannel[a]);
            usbMIDI.sendControlChange(38, 0, midichannel[a]);
         
            MIDI.sendControlChange(101, 0, midichannel[a]);
            MIDI.sendControlChange(100, 0, midichannel[a]);
            MIDI.sendControlChange(6, midibendrange, midichannel[a]);
            MIDI.sendControlChange(38, 0, midichannel[a]);


midichannel[a] is an integer, midibendrange is an integer that's 12 or 24. Maybe most hardware/software isn't listening for this actual change? Just wondering if I'm doing something wrong..
 
From Examples>Teensy>MIDI>TransmitEverything:-
Code:
usbMIDI.sendPitchBend(value, channel, cable);
In the example, value is 911. From memory valid range is 0 - 8191.
 
From Examples>Teensy>MIDI>TransmitEverything:-
Code:
usbMIDI.sendPitchBend(value, channel, cable);
In the example, value is 911. From memory valid range is 0 - 8191.

Hey MatrixRat, I have no problems sending the Pitch Bend with that command. What I'm trying to do is set the listening synth/software's pitch bend range (how many semitones of change the sendPItchBend command will actually cover). Some details here: https://www.midi.org/forum/15364-change-pitchbend-range
 
Thanks, that link explains it. Looks like an RPN message is needed.
a snip from my project:-
Code:
usbMIDI.beginRpn(control14, Channel, Cable);
usbMIDI.sendRpnValue(valueLSB, Channel, Cable);
usbMIDI.endRpn(Channel, Cable);
So control14 is the Rpn# and valueLSB is midibendrange.
 
Hey MatrixRat.. oh wow, OK I've never seen those dedicated RPN commands. Are they doing anything different than the commands I was using? And are they availale for the serial midi library as well?


Thanks, that link explains it. Looks like an RPN message is needed.
a snip from my project:-
Code:
usbMIDI.beginRpn(control14, Channel, Cable);
usbMIDI.sendRpnValue(valueLSB, Channel, Cable);
usbMIDI.endRpn(Channel, Cable);
So control14 is the Rpn# and valueLSB is midibendrange.
 
RPN and NRPN messages are made up of five or six CC# messages and I think that is what your original code was aiming at.

The Midi library takes out the headscratching with the above example and yes, works for Din MIDI, just ditch the usb bit and Cable. :)
 
Back
Top