Is it possible to use SPST switches to control the Kemper looper via Regular Midi CC commands??
I know i can use NRPN commands, but i have no idea how those work, i made my own midi controller via Midi CC, which is working good, but i have no idea how to make it use NRPN commands.
I know i can also use the SPST with a stereo cable to the pedal input, but i'd like to implement that in my DIY controller.
Thanks in advance!
DIY MIDI LOOPER
-
Erikcb -
November 23, 2021 at 5:02 PM -
Thread is marked as Resolved.
-
-
NRPN is nothing else but 4 MIDI CC messages in a row. Two first CC choose parameter, two latter value. Two messages are used to jump from 7-bit values to 14-bit values. In both cases first message sends most significant bits, second message sends least significant bits. When you already built your own MIDI controller which can send MIDI CC all you need to do now is to send 4 MIDI CC messages on a single key-press with correct values. Values for CC and parameters are described in document: "PROFILER MIDI Parameter Documentation", which can be fetched from Downloads page, User Manual section. Good luck!
-
So, can i just add the NRPN command after the MIDI.sendControlChange??
Or do i have to re do my entire code?
As i said i have no idea how it works hahaha -
Instead of sending one MIDI.sendControlChange you'll have to send 4 CC messages, one after another. Each of those 4 messages will contain a quarter of information needed to form NRPN message. Paste some code - will be easier to help.
-
Sure, this is the code i'm using right now for one button, i made it this way cause i didn't found any other way to make it enable/disable stomps and effects. (this is just 1 button, i have 11 on my controller).
Code
Display Morevoid setup() { MIDI.begin(1); pinMode(buttonPin, INPUT_PULLUP); Serial.begin(31250); } void loop() { buttonState = digitalRead(buttonPin); if(buttonState != lastButtonState && buttonState == 1 && toggleState == 0) { MIDI.sendControlChange(22, 127, 1); toggleState = 1; delay(200); } else if(buttonState != lastButtonState && buttonState == 1 && toggleState == 1) { MIDI.sendControlChange(22, 0, 1); toggleState = 0; delay(200); } // lastButtonState = buttonState;
There are obviously more things in the code (constants, libraries and so), but i guess this is what you need. Ty!
-
If you replace line 13 with something like:
MIDI.sendControlChange(99, X, 1); // this will set MBS of parameter (on Kemper it is address page)
MIDI.sendControlChange(98, Y, 1); // this will set LBS of parameter (on Kemper it is address number)
MIDI.sendControlChange(6, V1, 1); // this will set MBS of parameter value (first 7 bits of 14-bit value)
MIDI.sendControlChange(32, V2, 1); // this will set LBS of parameter value (last 7 bits of 14-bit value)
This will effectively be an NRPN message.
You have to look up X and Z in Kemper's MIDI manual (look at Downloads section) and also read in manual how V1 and V2 values are interpreted by KPA.
-
Awesome, i'll give it a try whenever i'm home, thank you so much!
-
Seems like i can't make it work i tried switching those values to: Rec/Play/Overdub: CC#99 V125, CC#98 V88, CC#06 V0, CC#38 V1 (on press), V0 (on release) like this:
Code
Display Morevoid loop() { buttonState = digitalRead(buttonPin); if(buttonState != lastButtonState && buttonState == 1 && toggleState == 0) { MIDI.sendControlChange(99, 125, 1); // this will set MBS of parameter (on Kemper it is address page) MIDI.sendControlChange(98, 88, 1); // this will set LBS of parameter (on Kemper it is address number) MIDI.sendControlChange(6, 0, 1); // this will set MBS of parameter value (first 7 bits of 14-bit value) MIDI.sendControlChange(38, 1, 1); // this will set LBS of parameter value (last 7 bits of 14-bit value) toggleState = 1; delay(200); } else if(buttonState != lastButtonState && buttonState == 1 && toggleState == 1) { MIDI.sendControlChange(22, 0, 1); toggleState = 0; delay(200); } // lastButtonState = buttonState;
But i must be doing something wrong, idk
-
I was out of town for a few days - checked today and this sequence of CC works for me (I'm sending them from Logic to KPA). You might have a bug somewhere else in your code.
-
Don't worry, it's not like i'm in a hurry really.
For some reason iIt doesn't work for me at all, do i need to declare something somewhere or smth?
I'll post my full code (but simplified with only one button).C
Display More#include <MIDI.h> #include <midi_Defs.h> #include <midi_Message.h> #include <midi_Namespace.h> #include <midi_Settings.h> MIDI_CREATE_DEFAULT_INSTANCE(); float pressLength_milliSeconds = 0; int optionOne_milliSeconds = 100; int optionTwo_milliSeconds = 2000; const int buttonPin = {2}; int buttonState = 0; int lastButtonState = 0; int toggleState = 0; void setup() { MIDI.begin(1); pinMode(buttonPin, INPUT_PULLUP); Serial.begin(31250); } void loop() { buttonState = digitalRead(buttonPin); if(buttonState != lastButtonState && buttonState == 1 && toggleState == 0) { MIDI.sendControlChange(99, 125, 1); // this will set MBS of parameter (on Kemper it is address page) MIDI.sendControlChange(98, 88, 1); // this will set LBS of parameter (on Kemper it is address number) MIDI.sendControlChange(6, 0, 1); // this will set MBS of parameter value (first 7 bits of 14-bit value) MIDI.sendControlChange(38, 1, 1); // this will set LBS of parameter value (last 7 bits of 14-bit value) toggleState = 1; delay(200); } else if(buttonState != lastButtonState && buttonState == 1 && toggleState == 1) { MIDI.sendControlChange(22, 0, 1); toggleState = 0; delay(200); } // lastButtonState = buttonState; }
This should be working, am i right?
Thanks!
-
I'm not really good at debugging via forum, but at first glance you're using INPUT_PULLUP, which I think makes your button normally HIGH and LOW when pressed. Your code appears to assume your button is normally LOW. Check your output using serial monitor or oscilloscope to make sure that correct values are sent.
-
I managed to make it work by changing the "INPUT_PULLUP" for "HIGH"
But only for recording, not for stopping
CodeMIDI.sendControlChange(99, 125, 0); // this will set MBS of parameter (on Kemper it is address page) MIDI.sendControlChange(98, 89, 0); // this will set LBS of parameter (on Kemper it is address number) MIDI.sendControlChange(6, 0, 1); // this will set MBS of parameter value (first 7 bits of 14-bit value) MIDI.sendControlChange(38, 1, 0); // this will set LBS of parameter value (last 7 bits of 14-bit value)
This should make it stop, right?
-
-
Nah, i can't make it work, and seems like the looper was looping every input, no matter if i was pressing the button or not.