for the Kemper, just send four CC messages in your arduino (often easier than attempting to implement NRPN which i dont see much of in the arduino midi-libraries. You can find the values in the Kemper midi-spec without having to calculate the actual NRPN, (which if i recall from memory is MSB*128 + LSB.
I have an "older" list that covers most NRPN values, here https://greendog.co.uk/kemper/kemper-midi-data.pdf You can get the MSB and the LSB. Just need to work out the parameter value (which i cant comment on) other than the range is from 0-8256 steps?? (i might be wrong, dont quote me)
Apologies if i'm telling you stuff you already know!
little example of NRPN conttrol
Set rig-volume to +3dB
CC 99 = 4, CC 98 = 1, CC 6 = 80, CC 38 = 0
This equates as-
NRPN Parameter address: MSB = 4, LSB = 1 (the Rig volume parameter)
NRPN Parameter value: MSB = 80, LSB = 0 (a value of +3dB) this could also be a different value between -6dB to +6dB (or whatever the full-range of this parameter is
additionally, you may want this midi data too:
Reset rig-volume to +0dB
CC 99 = 4, CC 98 = 1, CC 6 = 64, CC 38 = 0
Display More
I think i'm starting to get closer (even tho i don't fully understand the way to get the values, like how do you know that MSB=80 is going to be +3dB? )
I managed to send nrpn to the pc and apparently it's recognising them properly (this one turns on/off the amp).
Is there a way to switch between rigs in performance mode via nrpn? i can't find it in the nprn values...
But as soon as i connect it to the front USB of the kemper it does nothing but making the kemper freeze, so i have to turn it off and on again no idea why.
#include <USB-MIDI.h>
USBMIDI_CREATE_DEFAULT_INSTANCE();
const int buttonPin = {0};
const int buttonPin2 = {13};
int buttonState = 0;
int lastButtonState = 0;
int toggleState = 0;
int buttonState2 = 0;
int lastButtonState2 = 0;
int toggleState2 = 0;
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void setup()
{
// Listen for MIDI messages on channel 1
MIDI.begin(1);
pinMode(buttonPin, INPUT_PULLUP);
pinMode(buttonPin2, INPUT_PULLUP);
Serial.begin(31250);
}
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void loop() {
buttonState = digitalRead(buttonPin);
if(buttonState != lastButtonState && buttonState == 1 && toggleState == 0) {
MIDI.sendControlChange(99, 10, 1);
MIDI.sendControlChange(98, 2, 1);
MIDI.sendControlChange(6, 1, 1);
MIDI.sendControlChange(38, 1, 1);
toggleState = 1;
delay(300);
}
else if(buttonState != lastButtonState && buttonState == 1 && toggleState == 1) {
MIDI.sendControlChange(99, 10, 1);
MIDI.sendControlChange(98, 2, 1);
MIDI.sendControlChange(6, 0, 1);
MIDI.sendControlChange(38, 0, 1);
toggleState = 0;
delay(300);
}
lastButtonState = buttonState;
}
Display More
This is the code i'm using for testing (as i said i barely have programming knowledge, so i'm figuring out stuff by myself).
I also tried 115200 as baud rate.
Also, i tried that nrpn via midi cable (using my old code) and it turns the amp on and off without problem, i tried the volume one and it also works via midi and via usb the pc is recognising it.
It just when i connect it to the frontal USB of the kemper it does nothing but freezing the kemper...
EDIT: I just noticed the kemper freezes as soon as i plug the arduino in the front USB