Ultimate NORD Stage MIDI Pedal Board
Posted: 03 Nov 2017, 00:28
I finally got my Nord Stage 3 compact 73
By far the best keyboard I ever have!
Finally the time for the ultimate pedal board has come
First of all: It's MIDI based and compatible to any equipment.
Yet, it's optimised for the Stage 3.
(rotor speed control is done by Half Moon Switch)
- - - - - -
I want it to be connected by one single cable only, to reduce the risk of false plugging and to be quickly prepared on stage.
So, there are two initial drawbacks:
- - - - - -
An Arduino (Pro Micro) does the magic thing of translating pedal positions into MIDI messages.
After two days of heavy engineering, I finally found out how to add velocity dependent piano pedal noise
Until now only seen with the original Nord Triple Pedal!
(thanks to DrNeurus and maxpiano for their initial work)
Here's the source code:
- - - - - -
Finally the complete setup
Hope you enjoyed and maybe gained some new information
By far the best keyboard I ever have!
Finally the time for the ultimate pedal board has come
First of all: It's MIDI based and compatible to any equipment.
Yet, it's optimised for the Stage 3.
(rotor speed control is done by Half Moon Switch)
- - - - - -
I want it to be connected by one single cable only, to reduce the risk of false plugging and to be quickly prepared on stage.
So, there are two initial drawbacks:
- The Nord Stage 3 does NOT support the program up/down functionality via MIDI (altough it could be implemented easily). A separate
TRS cable is needed. - The pedal board needs power for the micro-controller.
- - - - - -
An Arduino (Pro Micro) does the magic thing of translating pedal positions into MIDI messages.
After two days of heavy engineering, I finally found out how to add velocity dependent piano pedal noise
Until now only seen with the original Nord Triple Pedal!
(thanks to DrNeurus and maxpiano for their initial work)
Here's the source code:
Code: Select all
// program code for an Arduino Micro to operate the pedal-board
#define MIDI_Channel 0
// PCB pin numbers
#define damper_ A0
#define expression_ A1
#define sostenuto_ 3
#define swell_ A2
//#define up_ 4 // Don't forget to remove comment in 'loop'
//#define down_ 5 // Don't forget to remove comment in 'loop'
// the variables
uint8_t i = 0;
int damper = 1; // Roland DP-10
int damper_last = 1;
int damper_dist[7] = {0, 0, 0, 0, 0, 0, 0}; // may contain negative numbers
int damper_speed = 0;
uint8_t sostenuto = 1; // Yamaha FC-5
uint8_t sostenuto_last = 1;
int expression = 1; // Yamaha FC-7
int expression_last = 1;
uint8_t swell = 1; // Korg EXP-2
uint8_t swell_last = 1;
uint8_t up = 1; // Iron foot button on the right
uint8_t up_last = 1;
uint8_t down = 1; // Iron foot button on the left
uint8_t down_last = 1;
uint8_t cmdByte;
uint8_t Byte1;
uint8_t Byte2;
void send_MIDI_message (byte cmd, byte byte1, byte byte2)
{
Serial1.write(cmd + MIDI_Channel);
Serial1.write(byte1);
Serial1.write(byte2);
}
void setup()
{
pinMode(sostenuto_, INPUT);
pinMode(sostenuto_, INPUT_PULLUP);
/*
pinMode(up_, INPUT);
pinMode(up_, INPUT_PULLUP);
pinMode(down_, INPUT);
pinMode(down_, INPUT_PULLUP);
*/
Serial1.begin(31250); // UART-Serial for MIDI
// Serial.begin(9600); // USB Serial for memory monitoring
}
void loop()
{
// CATCH SYSTEM STATE
// ADCs have 10 Bit (0 ... 1023)
damper = analogRead(damper_); // first readout
sostenuto = digitalRead(sostenuto_);
expression = analogRead(expression_); // ! dead centre: 655 ... 690 !
if (expression < 690) // hyteresis for dead centre
{ expression = constrain (expression, 0, 655); }
else
{ expression = map (expression, 690, 1023, 656, 1023); }
swell = map ( constrain( (analogRead(swell_)) , 48, 1018), 48, 1018, 127, 0 ) ;
// up = digitalRead(up_);
// down = digitalRead(down_);
i++;
if (i >= 7) { i = 0; }
damper_dist[i] = damper - analogRead(damper_); // second readout
damper = map ( damper, 0, 1030, 0, 2 ) ;
// CHECK FOR MOVEMENTS, AND IN CASE: REACT
if (damper != damper_last)
{
damper_speed = 0;
for (uint8_t j = 0; j < 7; j++)
{
damper_speed += damper_dist[j];
}
damper_speed /= 7;
damper_speed = map (constrain (damper_speed, -15, 15), -16, 16, -5, 5 );
if (damper == 1)
{ // pedal noise when pressing the pedal
damper_speed = 27 + (damper_speed*(-3) ); // values: 27 ... 42
send_MIDI_message(0xB0, 64, damper_speed);
send_MIDI_message(0xB0, 64, 127);
} else { // pedal noise when releasing the pedal
damper_speed = 10 + (damper_speed*2) ; // values: 10 ... 18
send_MIDI_message(0xB0, 64, damper_speed);
send_MIDI_message(0xB0, 64, 0);
}
damper_last = damper;
}
if (sostenuto != sostenuto_last)
{
send_MIDI_message(0xB0, 66, (sostenuto * 127));
sostenuto_last = sostenuto;
}
if (expression != expression_last)
{
send_MIDI_message(0xB0, 11, map ( expression, 0, 1023, 0, 127 ) );
expression_last = expression;
}
if (swell != swell_last)
{
send_MIDI_message(0xB0, 4, swell);
swell_last = swell;
}
/*
if (up != up_last)
{
up_last = up;
send_MIDI_message(0xB0, 31, (127 * up));
}
if (down != down_last)
{
down_last = down;
send_MIDI_message(0xB0, 32, (127 * down));
}
*/
}
Finally the complete setup
Hope you enjoyed and maybe gained some new information