Page 1 of 3

Ultimate NORD Stage MIDI Pedal Board

Posted: 03 Nov 2017, 00:28
by guentergunter
I finally got my Nord Stage 3 (compact 73) :keyboard2:

:arrow: So, it's time for another ultimate MIDI pedal board :thumbup:
The board - ready to use
The board - ready to use
board.jpg (529.96 KiB) Viewed 111 times
MIDI based, it's compatible to any equipment - although of course adapted to the Stage 3.
It's connected by (almost) one single cable only, instead of 4. :wtf:

The velocity dependent piano pedal is a Nord Stage 3 special feature - until now only possible with the original Nord Triple Pedal) :o
But the original Nord Triple Pedal is simply too big, too heavy and too expensive to consider buying :lol:
Finally, after two days of heavy experimental engineering, I found out how to reproduce the effect with MIDI-CC.
Thanks to DrNeurus and maxpiano for their initial work!


What the board actually does:
  1. Velocity- and half-press-dependent Damper control
  2. Leslie rotor changer (slow / fast)
  3. Expression
  4. Swell
Two initial drawbacks:
  1. The Nord Stage 3 does NOT support the program up/down functionality via MIDI. A separate (TRS) cable is needed.
    -> can only be solved by Clavia (come on guys!)
  2. The pedal board needs power for the micro-controller to operate.
    -> I took the power from the Nord's internal power supply through the MIDI-cable
I know solution 2 is not defined in the MIDI specs and the Nord's varanty is void.
But I think it's technically safe and I the board is always powered alongside with the Keyboard without another cable, battery or power plug.

- - - - - -

:arrow: An Arduino Micro (Pro Micro) translates pedal positions into MIDI messages.

Here's the source code:

Code: Select all

// Arduino Micro program code to operate the pedal-board


#define MIDI_Channel 0


// PCB pin numbers

#define damper_           A0
#define rotary_           3
#define expression_       A1
#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   rotary = 1;                 // Yamaha FC-5
uint8_t   rotary_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(rotary_, INPUT);
  pinMode(rotary_, 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
  
  rotary = digitalRead(rotary_);
  
  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 (rotary != rotary_last)
  {
    send_MIDI_message(0xB0, 108, (127 - (rotary * 84)));  // 0=stop , 43=slow , 127=fast
    rotary_last = rotary;
  }

  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)
  {
    send_MIDI_message(0xB0, 31, (127 * up));

    up_last = up;
  }

  if (down != down_last)
  {
    send_MIDI_message(0xB0, 32, (127 * down));

    down_last = down;
  }
*/

}
And here's the
hardware wiring diagram.pdf
(67.11 KiB) Downloaded 6 times
wiring.jpg
wiring.jpg (575.17 KiB) Viewed 110 times
- - - - - -

Ready to rock :keyboard:
Connected to the Stage
Connected to the Stage
WITH THE NORD.jpg (480.06 KiB) Viewed 6626 times
Hope you enjoy and maybe discover some new information :thanx:
:keyboard:

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 00:49
by Mr_-G-
Thank you. Very nice project.
One observation: you have only 1 switch in the diagram, but the photos show 2.

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 11:26
by guentergunter
Mr_-G- wrote:Thank you. Very nice project.
One observation: you have only 1 switch in the diagram, but the photos show 2.
There are actually even 3 switches ;)
  • 1x Rotor control (Yamaha FC 5)
  • 2x metal foot button
Since there's no possibility to do the program up/down via midi (yet), I only connected the FC5 to the Arduino - and the foot buttons directly to a TRS-Plug.

The good thing: If ever Clavia decides to implement program up/down via MIDI, it’s easy to solder the foot buttons to the Arduino instead and update the Arduino program (10 mins work).


I updated the wiring diagram in the first post for clarity :thumbup:

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 11:47
by Quai34
Does the TRS program up and down works when two programs are consecutive? If program 1 is verse and program two chorus, you use it back and forth to switch from verse to chorus right? This is the goal....?

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 11:54
by Quai34
Also, where did you find your carbon plate?

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 13:41
by infi99
Very cool Arduino project!
If i had unlimited money I would buy Clavia ;)

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 17:17
by guentergunter
Quai34 wrote:Does the TRS program up and down works when two programs are consecutive? If program 1 is verse and program two chorus, you use it back and forth to switch from verse to chorus right? This is the goal....?
Honestly I don’t know.

But that should be found in the Nord’s manual.
My board delivers the pure function of a connected dual foot pedal board like the BOSS FS-6.

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 17:48
by Quai34
Ok, yes, that was my question, the bossFS-6 is the one I think I would buy when I will have my Stage 3.
Also, did you see my question about where you bought your carbon plate to put all the pedals on it?

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 17:55
by guentergunter
Quai34 wrote:Also, where did you find your carbon plate?
:arrow: eBay (Carbon plate)

Re: Custom, comprehensive "Nord Stage Pedal Board"

Posted: 03 Nov 2017, 17:58
by guentergunter
infi99 wrote:Very cool Arduino project!
If i had unlimited money I would buy Clavia ;)
I suppose the development to be much more expensive :D