Build your own MIDI projects
FAQ
Frequently Asked Questions.
Details
 
MIDI & Music
MIDI and Music Information
Details
 
MIDI 128 Note Keyswitch Encoder with LCD Menu
 

 

MIDI 128 Note Encoder with LCD Menu

 

This MIDI 128 Note Keyswitch Encoder is capable of encoding any number of momentary action, push to make, single pole single throw (SPST), switches from 0 to 127 to produce the equivalent MIDI note-on/note-off data commands on any MIDI Channel (1 to 16). The encoded switches are wired via IN4148 diodes. There are also inputs for various foot-switches and foot-pedal inputs available.

  

The unit can work with any size keyboard. Any unrequired/unused keyswitches can be left unconnected.  Note if less than 128 switches are required, then ONLY the switches required need to be wired.

 

This unit can be connected to newkeyboards or it can be used with an older non-MIDI keyboard by using magnetic/reed switches to isolate the old and new scanning circuits. 

  

This unit provides a MIDI output to a standard MIDI DIN socket. This unit can work in standard MIDI mode, at a MIDI Baud rate of 31250. 


 

  

16x8keys_LCD.JPG (43949 bytes)

 

MIDI 128 Note Encoder with LCD Menu and MIDI OUT

ITEM#: MIDI128KEYLCDOUT

PRICE:  €75.00


 

 *Click to Enlarge*
 

 

 


 

 

MIDI 128 Note Encoder with LCD Menu and MIDI IN/OUT

ITEM#: MIDI128KEYLCDINOUT

PRICE:  €90.00


 

*Click to Enlarge*

 

 
 

 

 

 

The MIDI 128 Note Encoder with LCD Menu with MIDI OUT Unit consists of:

  • The MIDI channel, Program Change, Velocity and Transpose are selected via the switches on the LCD menu,
  • An assembled Arduino MEGA board,
  • A 2.1mm power socket, and associated LED, 
  • USB power or external power choice,
  • A MIDI 5-pin DIN output socket,

 

The MIDI 128 Note Encoder with LCD Menu with MIDI IN/OUT Unit consists of:

  • The MIDI channel, Program Change, Velocity and Transpose are selected via the switches on the LCD menu,
  • An assembled Arduino MEGA board,
  • A 2.1mm power socket, and associated LED, 
  • USB power or external power choice,
  • A MIDI 5-pin DIN output socket,
  • A wired MIDI IN/OUT board and MIDI IN and MIDI OUT sockets.

 

 

The MIDI 128 Note Encoder with LCD Menu unit requires:

  • a 9v battery or equivalent DC power source or USB connection,
  • Suitable key-switches or magnetic reed switches and associated IN4148 diodes
  • Suitable switches/foot-switches (5 off)
  • Suitable potentiometers/foot-pedals (6 off)

 

Circuit Schematics:

 

  

  

  

 

Menu Selection & Specification: :

The Menu Selection button cycles through the Menus:

  • MIDI Channel: 1 to 16
  • Program Change: 0 to 127
  • Velocity: max 127
  • Transpose: +/- 2 Octaves in semitone steps

 For each Selection the Value up/down buttons can set the MIDI Channel, Program Change, Velocity and Transpose values. Also the MIDI Channel, Program Change and Velocity values are stored in EEPROM so they are remembered each time the unit is powered up or reset.

 


 

 

MIDI OUT Wiring:

 midi_out_LCD.JPG (56402 bytes)

     *Click to Enlarge*

The MIDI OUT connector uses  5-Pin 180 degree DIN socket. Note that the MIDI OUT wiring is polarised and the correct pins should be used.

 


 

 

MIDI 128 Note MIDI Encoder Wiring:

The switches are organized in a 16 x 8 matrix (up to 128 switches) arrangement.  Note if less than 128 switches are required, then ONLY the switches required need to be wired. 


The lowest note  is switch SW0 wired via diode D0 between Pins 22 and 23 of the Arduino MEGA.

The next note  is switch SW1 wired via diode D1 between Pins 24 and 23 of the Arduino MEGA.

The next note  is switch SW2 wired via diode D2 between Pins 26 and 23 of the Arduino MEGA.

The next note  is switch SW3 wired via diode D3 between Pins 28 and 23 of the Arduino MEGA.

The next note  is switch SW4 wired via diode D4 between Pins 30 and 23 of the Arduino MEGA.

The next note  is switch SW5 wired via diode D5 between Pins 32 and 23 of the Arduino MEGA.

The next note  is switch SW6 wired via diode D6 between Pins 34 and 23 of the Arduino MEGA.

The next note  is switch SW7 wired via diode D7 between Pins 36 and 23 of the Arduino MEGA

 

Pin 22 is also looped to the Anodes of 15 other Diodes D8, D16, D24, D32, D40, D48, D56, D64, D72, D80, D88, D96. D104, S112,  and D120.

 

Pin 24 is also looped to the Anodes of Diodes D10, D19, D28, D37, D46, D55, D64, D73, D82, D91 and D100.

 

The other 7 pins 24,  26, 28, 30, 32, 34 and 36 are wired in a similar manner to the other Diodes.

 

Pin 23 is connected to switches SW0 to SW7,

Pin 25 is connected to switches SW8 to SW15,

Pin 27 is connected to switches SW16 to SW23,

Pin 29 is connected to switches SW24 to SW31,

Pin 31 is connected to switches SW32 to SW39,

Pin 33 is connected to switches SW40 to SW47,

Pin 35 is connected to switches SW48 to SW55,

Pin 37 is connected to switches SW56 to SW63,

Pin 39 is connected to switches SW64 to SW71,

Pin 41 is connected to switches SW72 to SW87,

Pin 43 is connected to switches SW88 to SW95,

Pin 45 is connected to switches SW96 to SW103,

Pin 47 is connected to switches SW104 to SW111,

Pin 51 is connected to switches SW112 to SW119,

Pin 53 is connected to switches SW120 to SW127.

 

Each of the other side of these group of 8 switches (eg SW0 to SW7 etc.) is wired to a diode on the Cathode (K) side (end of diode with stripe).

The other side of each of these diodes is looped to  other diodes. 

 

 


 

Jack Socket Wiring:

Switch foot pedals usually use a MONO jack socket. Variable potentiometer pedals can use a  MONO or STEREO jack socket.

 

So either a standard 6.3mm (¼in) style switched 2-pole MONO jack socket with 2-poles switched upon insertion of the jack plug, with switched normally closed contacts available in 2-pole or  a standard 6.3mm (¼in) style switched 3-pole STEREO jack socket with 3-poles switched upon insertion of the jack plug are required.

 


 

MIDI Pedal Switch Functions:

Digital Input Pin  

MIDI Pedal Functions

D14  Sustain
D15  Sostenuto
D16  Soft Pedal
D17  Legato

Table 1

 

Sustain Pedal: 

The sustain pedal is also known as the Damper Pedal. When operated it sends out a controller value of CC64. When the pedal is pressed ON the unit outputs a value of 127, when released OFF the unit outputs a value of 0. Tone-generators without the 'half-damper' implemented will interpret a value between 0 and 63 as OFF and a value of 64 to 127 as ON.

   

Sostenuto Pedal: 

The sostenuto pedal is a type of selective sustain pedal found on acoustic grand-pianos. Pressing down the pedal, sending controller value CC66 with a value of 127, while holding notes on the keyboard will cause these notes to be sustained after you release them. Any notes played after pressing the pedal will not sustain. When the pedal is released it sends out controller value CC66 with a value of 0.

  

Soft Pedal:

The soft pedal works in two simultaneous ways. When the pedal is pressed, sending out controller value CC67 with a value of 127, the sound should be slightly softened in terms of volume and there should be a noticeable difference in the tone-colour of the sound. When the pedal is released it sends out controller value CC67 with a value of 0.

  

Legato Pedal:

When the legato pedal is pressed, sending out controller value CC68 with a value of 127, playing a different note changes the pitch of the current note without re-triggering the attack phase of the envelope of the sound. When the pedal is released it sends out controller value CC68 with a value of 0.

 

 


 

MIDI Pedal Controller Functions:

Analog Input Pin  

MIDI Pedal Functions

A8  Volume
A9  Modulation
A10  Portamento Time
A11  Balance
A12  Pan
A13  Pitch

Table 2

   

NOTE: It is important to connect any unused Analog Input Pins to prevent spurious noise producing a MIDI Output. (MIDI volume is at a maximum if +5 Volt is applied to the Volume input pin and a Minimum if 0 Volt is applied to Volume input pin. Whereas Modulation and Portamento Time should be at a Minimum if unused so the pins should be set to 0 Volt. Balance, Pan and Pitch Bend should be set to 2.5 Volt if unused. As this is their central position. However if you just connect each of the input pins to their own potentiometer they all will work correctly).

 

MIDI Volume:

MIDI Volume is used to control the volume level for one MIDI channel. Uses MIDI Control Change numbers CC7 (coarse) and CC39 (fine). Most devices ignore the Fine adjust (CC39) for Volume, and just implement Coarse adjust (CC7) because 14-bit resolution isn't needed for this. In this case, maximum is 127 and off is 0. If using a MultiTimbral device, then each Part can have its own volume.

 

MIDI Modulation:

MIDI Modulation uses MIDI Control Change numbers CC1 (coarse) and CC33 (fine). Most devices ignore the Fine adjust (CC33) for Volume, and just implement Coarse adjust (CC1) because 14-bit resolution isn't needed for this. In this case, maximum is 127 and off is 0. Modulation usually controls vibrato in a synthesiser module.

 

Portamento Time:

MIDI Portamento Controller uses MIDI Control Change numbers CC5 to control portamento rate to slide between 2 notes played subsequently. This can produce a musical glissando effect. 

  

MIDI Balance:

MIDI Balance uses MIDI Control Change numbers CC8 (coarse) and CC40 (fine). Most devices ignore the Fine adjust (CC40) for Volume, and just implement Coarse adjust (CC8) because 14-bit resolution isn't needed for this. In this case, maximum is 127 and off is 0.  MIDI balance controls the stereo balance (assuming that the device has stereo audio outputs). If a MultiTimbral device, then each Part usually has its own Balance. 

  

MIDI Pan:

MIDI Pan uses MIDI Control Change numbers CC10 (coarse) and CC42 (fine). Most devices ignore the Fine adjust (CC42) for Volume, and just implement Coarse adjust (CC10) because 14-bit resolution isn't needed for this. In this case, maximum is 127 and off is 0. Used to control the stereo field Left and Right of the MIDI device's sound. If a MultiTimbral device, then each Part usually has its own pan position. This is generally when Pan becomes useful, because then you can use Pan, Volume, and Balance controllers to internally mix all of the Parts to the device's stereo outputs. Pan should effect all notes on the channel, including notes that were triggered prior to the pan message being received, and are still sustaining.

 

MIDI Pitch Bend:

The Pitch Bend Change message is normally sent from a keyboard instrument in response to changes in position of the pitch bend wheel. The pitch bend information is used to modify the pitch of sounds being played on a given Channel. The Pitch Bend message includes two data bytes to specify the pitch bend value. Two bytes are required to allow fine enough resolution to make pitch changes resulting from movement of the pitch bend wheel seem to occur in a continuous manner rather than in steps.

  


 

  

Power Supply:

The  Arduino MEGA can be powered via the USB connection or with an external power supply. The power source is selected automatically. 

 

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector. A low dropout regulator provides improved energy efficiency.

 

The board can operate on an external supply of 7 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.