Subversion Repositories svn.mios

Rev

Rev 1183 | Blame | Compare with Previous | Last modification | View Log | RSS feed

HEADER 3 MIDIbox KB

<H1>MIDIbox KB</H1>
<H2>Keyboard Controller with MIDI, USB-MIDI and Ethernet interface</H1>

<P CLASS=INFO>This page collects some preliminary informations about the MIDIbox KB project.</P>

<P CLASS=INFO>MIDIbox KB utilizes the new <A HREF="mbhp_core_lpc17.html">MBHP_CORE_LPC17</A> and <A HREF="mbhp_dio_matrix.html">MBHP_DIO_MATRIX</A> modules.</P>

<P CLASS=INFO>Currently following features are already implemented:
<UL CLASS=CL>
<LI> up to 2 keyboard matrices can be scanned separately at a very high scan rate (around 200 uS)</A>
<LI> optional support for velocity!</A>
<LI> 8 analog inputs of the core module can be used to connect pitchwheels, modulation wheel, sustain and expression pedal (or aftertouch).<BR>
     Alternatively a <A HREF="mbhp_ainser8.html">MBHP_AINSER8</A> module can be connected for higherer quality signal conversion without jitter.
<LI> analog inputs can be calibrated</A>
<LI> two MIDI IN and two MIDI OUT ports
<LI> USB MIDI port with much higher transfer rate (ca. 100x faster!) than common MIDI
<LI> Ethernet port to send/receive events via <A HREF="midibox_osc.html">OSC</A>
<LI> support for DHCP - connect the module to a wireless router without additional configuration
<LI> different OSC modes are prepared for popular PC/Mac/iPhone/iPad apps, extensions can be added on request
<LI> integrated MIDI router with 16 configurable nodes
<LI> can also be used as USB/MIDI interface, or even as OSC/MIDI interface
<LI> configuration done via the MIOS Terminal of <A HREF="mios_studio.html">MIOS Studio</A>
<LI> configuration is stored in on-board EEPROM of LPCXPRESSO module
</UL>
</P>

<P CLASS=DESC>Please note: the same keyboard driver is also available in <A HREF="midibox_ng.html">MIDIbox NG</A>. If you are searching for more capabilities (e.g. integrated controller with many pots, encoders, buttons, leds), consider to use the MBNG firmware instead of MBKB.</P>

<P CLASS=DESC>The main difference between the two applications is, that MIDIbox KB is optimized for high scan speeds! MIDIbox NG scans the keyboard 10 times slower to give the core more processing time for other tasks. However, with MBNG the latency to scan the whole keyboard is still lower than 3 mS (MBKB: 260 uS)!</P>


<H2> <IMG SRC="images/bullet.gif" ALT=""> Schematics </H2>

<P CLASS=INFO>All schematics are subject to change without notice!</P>

  <TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
    <TR>
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3>Supported Keyboard Types</FONT></TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Schematic</STRONG></FONT></td>
      <TD NOWRAP CLASS=TABCOLOR1><FONT SIZE=2><STRONG>Description</STRONG></FONT></TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="midibox_kb/midibox_kb_scanmatrix_type1.pdf">midibox_kb_scanmatrix_type1.pdf</A></TD>
      <TD CLASS=TABCOLOR2>Type #1 Keyboard without velocity</TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="midibox_kb/midibox_kb_scanmatrix_type2.pdf">midibox_kb_scanmatrix_type2.pdf</A></TD>
      <TD CLASS=TABCOLOR2>Type #2 Keyboard with Velocity (e.g. Fatar DR type)</TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="midibox_kb/midibox_kb_scanmatrix_type3.pdf">midibox_kb_scanmatrix_type3.pdf</A></TD>
      <TD CLASS=TABCOLOR2>Type #3 Keyboard with Velocity (alternating switch)</TD>
    </TR>
    <TR>
      <TD COLSPAN=2 CLASS=TABCOLOR1><FONT SIZE=3>Fatar DR Adapters to <A HREF="mbhp_dio_matrix.html">MBHP_DIO_MATRIX</A> module</FONT></TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="midibox_kb/midibox_kb_fatar_df_61_interconnections.pdf">midibox_kb_fatar_df_61_interconnections.pdf</A></TD>
      <TD CLASS=TABCOLOR2>Fatar DF Type with 61 keys</TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="midibox_kb/midibox_kb_fatar_df_76_interconnections.pdf">midibox_kb_fatar_df_76_interconnections.pdf</A></TD>
      <TD CLASS=TABCOLOR2>Fatar DF Type with 76 keys</TD>
    </TR>
    <TR>
      <TD CLASS=TABCOLOR2><A HREF="midibox_kb/midibox_kb_fatar_df_88_interconnections.pdf">midibox_kb_fatar_df_88_interconnections.pdf</A></TD>
      <TD CLASS=TABCOLOR2>Fatar DF Type with 88 keys</TD>
    </TR>
  </TABLE>


<H2> <IMG SRC="images/bullet.gif" ALT=""> Terminal Commands </H2>

<P CLASS=INFO>MIDIbox KB can be completely configured from the MIOS Terminal of <A HREF="mios_studio.html">MIOS Studio</A>.</P>

<P CLASS=DESC>Enter 'help' to get a list of available commands.<BR>
Here a more detailed description of most commands:</P>

<P CLASS=DESC>
<TABLE CLASS=BOX WIDTH=700 ALIGN=CENTER BORDER CELLSPACING=2 CELLPADDING=3 >
  <TR>
    <TD WIDTH=200> <SPAN CLASS=NORM><I>help</I></TD>
    <TD WIDTH=500> <SPAN CLASS=NORM>Lists all available commands (some of them are maybe not listed here)
    </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>store</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Stores the complete configuration (not only keyboard parameters, but also router, etc...) into the EEPROM of the LPCXPRESSO module, so that they will be restored during startup.<BR>
    Usually a firmware update doesn't overwrite the stored parameters if not noticed in the ChangeLog.<BR>
    Please enter the <I>store</I> command once you've adapted the parameters for your keyboard setup.
    </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>restore</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Restores the complete configuration from EEPROM. This command could become useful if you messed up the configuration, just type <I>restore</I> to undo the changes.
    </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>system</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Prints some system informations, such as the name and version number of the application.
    </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>reset</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Restarts the application remotely. Mainly intended for development.
    </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set srio_num &lt;1..16&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Selects the number of DIN/DOUT shift registers (resp. 74HC165 and 74HC595) which should be scanned.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set srio_num 2</I>: two DIN and two DOUTs should be scanned<BR>
         <I>set srio_num 4</I>: four DIN and four DOUTs should be scanned<BR>
         <I>set srio_num 6</I>: e.g. if six DIN and four DOUTs should be scanned - more DINs than DOUTs, therefore the number of DINs is relevant here!<BR>
      </SPAN>
      <SPAN CLASS=NORM>Than more shift registers are scanned, than higher the latency of your keyboards. Therefore the minimum value is desired.<BR>
      <I>2</I> is typically a good choice if only one keyboard should be scanned, and <I>4</I> if two keyboard should be scanned.
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>kb &lt;1|2&gt;</I><BR><I>keyboard &lt;1|2&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Prints a list of all keyboard parameters. MIDIbox KB can handle up to 2 keyboards in parallel, please specify the keyboard number with:<BR>
      <I>kb 1</I> or <I>kb 2</I>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; debug &lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Enables some useful debugging messages for troubleshooting the hardware. This switch is not stored in EEPROM. Means: on each reset/power-on MIDIbox KB starts with debug mode disabled, and you have to enable it again.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 debug on</I>: print some useful debugging messages for keyboard 1<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; midi_ports &lt;ports&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Each keyboard can send to one or multiple MIDI ports. They are currently (unfortunately) entered via a hexadecimal number, which is a nice short cut for techies, but probably difficult to understand for normal users. A more comfortable solution will be available once I found the time to improve the parser.<BR>
      Coding:</SPAN>
      <UL CLASS=CL>
        <LI><B>Bit 0:</B> USB1</LI>
        <LI><B>Bit 1:</B> USB2</LI>
        <LI><B>Bit 2:</B> USB3</LI>
        <LI><B>Bit 3:</B> USB4</LI>
        <LI><B>Bit 4:</B> MIDI OUT1</LI>
        <LI><B>Bit 5:</B> MIDI OUT2</LI>
        <LI><B>Bit 12:</B> OSC1</LI>
        <LI><B>Bit 13:</B> OSC2</LI>
        <LI><B>Bit 14:</B> OSC3</LI>
        <LI><B>Bit 15:</B> OSC4</LI>
      </UL>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 midi_ports 0x1011</I>: keyboard 1 will send to USB1, OUT1 and OSC1<BR>
         <I>set kb 1 midi_ports 0x0020</I>: keyboard 1 will only send to OUT2<BR>
         <I>set kb 2 midi_ports 0x0030</I>: keyboard 2 will send to OUT1 and OUT2
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; midi_chn &lt;channel&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Each keyboard can send to a dedicated MIDI channel.<BR>
       Select 1..16 for MIDI Channel 1..16. 0 will disable MIDI (no events will be sent to any channel)<BR></SPAN>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 midi_chn 1</I>: keyboard 1 will send MIDI Channel 1<BR>
         <I>set kb 2 midi_chn 5</I>: keyboard 2 will send MIDI Channel 5
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; note_offset &lt;0-127&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Sets the starting note of the leftmost key of your keyboard. The value is entered in decimal format.<BR>
      Most important values:</SPAN>
      <UL CLASS=CL>
        <LI><B>21:</B> a-1 for Fatar DF Type with 88 keys
        <LI><B>28:</B> E-0 for Fatar DF Type with 76 keys
        <LI><B>36:</B> C-1 for Fatar DF Type with 61 and 49 keys
        <LI><B>48:</B> C-2 for Fatar DF Type with 25 keys
      </UL>
      <SPAN CLASS=NORM><B>Example:</B><BR>
         <I>set kb 1 note_offset 36</I>: a Fatar 61 keys will start with C-1<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; rows &lt;0-16&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Specifies how many rows of the keyboard matrix have to be scanned.<BR>
       If rows &lt; 9, and a second DOUT is specified, the selection signal will be available on both DOUTs (perfect for 1:1 connection to a Fatar Keyboard with 61 keys)<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 rows 8</I>: keyboard 1 will scan 8 rows of the matrix -&gt; up to 128 inputs = 64 break/make contacts (keys)<BR>
         <I>set kb 1 rows 16</I>: for a different hardware: keyboard 1 will scan 16 rows of the matrix -&gt; up to 256 inputs = 128 break/make contacts (keys)<BR>
         <I>set kb 2 rows 12</I>: keyboard 2 will scan 12 rows of the matrix -&gt; up to 192 inputs = 96 break/make contacts (keys)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; velocity &lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM><B>off:</B> each row will send a MIDI event with maximum velocity. Has to be used for keyboard with only one contact per key<BR>
      <B>on:</B> one row is connect to "make" contacts, the next row to "break" contacts; period. This allows to measure the delay between contact activation in order to generate a velocity between 1 and 127 (see Fatar keyboard configuration examples below)<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 velocity on</I>: keyboard 1 provides two contacts to measure velocity<BR>
         <I>set kb 1 velocity off</I>: keyboard 1 provides only one contact, resp. a common button matrix is used<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; release_velocity &lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM><B>off:</B> when a key is released, a "Note On" event with velocity 0 will be sent.<BR>
      <B>on:</B> when a key is released, a "Note Off" event with a velocity value which has been determined with the <I>delay_fastest_release</I>, <I>delay_fastest_release_black_keys</I> and <I>delay_slowest_release</I> parameters will be sent.<BR>
      Example configuration:
      <UL CLASS=CL>
       <LI><I>set kb 1 release_velocity on</I>
       <LI><I>set kb 1 delay_fastest_release 100</I>
       <LI><I>set kb 1 delay_fastest_release_black_keys 80</I>
       <LI><I>set kb 1 delay_slowest_release 1000</I>
      </UL>
      </TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; optimized &lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Only valid in velocity mode.<BR>
      <B>off:</B> break and make contacts are always scanned. This is the default configuration and should be used for debugging!<BR>
      -&gt; The resulting scan latency of a complete Fatar 63 keys keyboard is ca. <B>260 uS</B><BR>
      <B>on:</B> make contacts will only be scanned if break contacts are active. This reduces the scan latency in most cases (no or only some keys are played). Won't work with <A HREF="midibox_kb/midibox_kb_scanmatrix_type3.pdf">Keyboard Type #3!</A><BR>
      -&gt; The resulting scan latency of a complete Fatar 63 keys keyboard is ca. <B>130 uS</B><BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 optimized off</I>: keyboard 1 should be debugged because it doesn't send notes (e.g. type <I>set kb 1 debug on</I> thereafter).<BR>
         <I>set kb 1 optimized on</I>: keyboard 1 should run in low-latency mode. Type <I>store</I> thereafter if the keyboard works as expected!<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; dout_sr1 &lt;0-16&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Selects the first DOUT shift register which is used to select the keyboard matrix rows.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 dout_sr1 1</I>: row selection lines 1..8 of keyboard 1 are connected to first DOUT shift register.<BR>
         <I>set kb 2 dout_sr1 3</I>: row selection lines 1..8 of keyboard 2 are connected to third DOUT shift register.<BR>
         <I>set kb 1 dout_sr1 0</I>: disable this function for keyboard 1 (use DOUT for other purposes)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; dout_sr2 &lt;0-16&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Selects the second DOUT shift register which is used to select the keyboard matrix rows.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 dout_sr2 2</I>: row selection lines 9..16 of keyboard 1 are connected to the second DOUT shift register (if rows &lt; 9, this DOUT will output the same pattern as dout_sr1)<BR>
         <I>set kb 2 dout_sr2 4</I>: row selection lines 9..16 of keyboard 2 are connected to the fourth DOUT shift register (if rows &lt; 9, this DOUT will output the same pattern as dout_sr1)<BR>
         <I>set kb 1 dout_sr2 0</I>: disable this function for keyboard 1 (use DOUT for other purposes)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; din_sr1 &lt;0-16&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Selects the first DIN shift register which is used to scan a keyboard matrix row.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 din_sr1 1</I>: left side of keyboard 1 is connected to first DIN shift register.<BR>
         <I>set kb 2 din_sr1 3</I>: left side of keyboard 2 is connected to third DIN shift register.<BR>
         <I>set kb 1 din_sr1 0</I>: disable this function for keyboard 1 (use DIN for other purposes)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; din_sr2 &lt;0-16&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Selects the second DIN shift register which is used to scan a keyboard matrix row.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 din_sr2 2</I>: right side of keyboard 1 is connected to second DIN shift register.<BR>
         <I>set kb 2 din_sr2 4</I>: right side of keyboard 2 is connected to fourthDIN shift register.<BR>
         <I>set kb 1 din_sr1 0</I>: disable this function for keyboard 1 (use DIN for other purposes)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; din_key_offset &lt;0-127&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Selects the offset which is added to the keys of the right half. Typically 32 for velocity keyboards (64 contacts), and 64 for non-velocity keyboards.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 din_key_offset 32</I>: key number starts at 32 for the right side of keyboard 1 (velocity sensitive), e.g. suitable for Fatar 61 and 76 keys<BR>
         <I>set kb 1 din_key_offset 40</I>: key number starts at 40 for the right side of keyboard 1 (velocity sensitive), e.g. suitable for Fatar 88 keys<BR>
         <I>set kb 1 din_key_offset 64</I>: key number starts at 64 for the right side of keyboard 1 (no velocity)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; din_inverted &lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>This option should be enabled if diodes are used with the opposite polarity, and pull-downs are connected to DINs.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 din_inverted off</I>: diodes with "normal" direction and pull-up resistors at 74HC165<BR>
         <I>set kb 1 din_inverted on</I>: diodes with opposite direction and pull-down resistors at 74HC165<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; break_inverted &lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>This option should be enabled for velocity keyboards with single switches (instead of break/make swicthes).<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 break_inverted off</I>: we have a break and make switch per key -&gt; <A HREF="midibox_kb/midibox_kb_scanmatrix_type2.pdf">Type #2</A><BR>
         <I>set kb 1 break_inverted on</I>: we have only a single switch per key -&gt; <A HREF="midibox_kb/midibox_kb_scanmatrix_type3.pdf">Type #3</A><BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; break_is_make &lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>This option allows to trigger a note when the break contact is activated (nice for playing organ style)
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 break_is_make off</I>: normal behaviour: MIDI note will be played when make contact is activated.<BR>
         <I>set kb 1 break_is_make on</I>: MIDI note already send when the break contact is activated.<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; make_debounced &lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>This option has to be enabled for certain keyboard architectures, such as Fatar TP400. Note Off will be played when the Break contact has been released, and not when the Make contact has been released.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 make_debounced off</I>: for usual keyboard architectures<BR>
         <I>set kb 1 make_debounced on</I>: for unusual keyboard architectures such as Fatar TP400<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; delay_fastest &lt;0-65535&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Only relevant for velocity sensitive keyboards: selects the minimum delay value at which the maximum velocity (=127) should be sent. Use <I>debug</I> mode to display the minimum delay when keys are hit strongly!<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 delay_fastest 100</I>: send maximum velocity when delay is &lt;= 100<BR>
         <I>set kb 1 delay_fastest 200</I>: send maximum velocity when delay is &lt;= 200<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; delay_fastest_release &lt;0-65535&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>The same for the <I>release_velocity</I> option.</TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; delay_fastest_black_keys &lt;0-65535&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Optionally it's possible to specify a different delay value for the black keys (if 0: the value of <I>delay_fastest</I> will also be used for black keys - default!).<BR>
    Background: it turned out, that black keys reach the make contact faster than white keys. By specifying a different delay value it's possible to compensate this.</TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; delay_fastest_release_black_keys &lt;0-65535&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>The same for the <I>release_velocity</I> option.</TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; delay_slowest &lt;0-65535&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Only relevant for velocity sensitive keyboards: selects the maximum delay value at which the minimum velocity (=1) should be sent. Use <I>debug</I> mode to display the maximum delay when keys are hit softly!<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 delay_slowest 1000</I>: send maximum velocity when delay is &gt;= 1000<BR>
         <I>set kb 1 delay_slowest 2000</I>: send maximum velocity when delay is &gt;= 2000<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; delay_slowest_release &lt;0-65535&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>The same for the <I>release_velocity</I> option.</TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; ain_pitchwheel &lt;0-7, 128-135 or off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>A number from 0..7 selects the J5.Ax input to which the PitchWheel pot is connected. A number of 128..135 selects the AINSER8 located Ax input. Use <I>off</I> if no PitchWheel is used to avoid that the unconnected analog input will send random MIDI events!<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_pitchwheel 0</I>: PitchWheel of keyboard 1 connected to J5.A0 of the core module<BR>
         <I>set kb 2 ain_pitchwheel 3</I>: PitchWheel of keyboard 2 connected to J5.A3 of the core module<BR>
         <I>set kb 1 ain_pitchwheel 128</I>: PitchWheel of keyboard 1 connected to A0 of an AINSER8 module<BR>
         <I>set kb 2 ain_pitchwheel 131</I>: PitchWheel of keyboard 2 connected to A3 of an AINSER8 module<BR>
         <I>set kb 1 ain_pitchwheel off</I>: no PitchWheel connected<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt;<BR>ain_pitchwheel_inverted<BR>&lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Inverts the output of the PitchWheel.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_pitchwheel_inverted off</I>: (default) PitchWheel outputs -8192..8191<BR>
         <I>set kb 1 ain_pitchwheel_inverted on</I>: PitchWheel outputs 8191..-8192<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; ctrl_pitchwheel &lt;0-129&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>What kind of MIDI events should be sent by the PitchWheel?
      <UL CLASS=CL>
        <LI><B>0..127:</B> CC#0 .. CC#127
        <LI><B>128:</B> PitchBend (default)
        <LI><B>129:</B> Aftertouch
      </UL>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ctrl_pitchwheel 128</I>: the PitchWheel of keyboard 1 sends PitchBend MIDI events<BR>
         <I>set kb 1 ctrl_pitchwheel 129</I>: the PitchWheel of keyboard 2 sends Aftertouch MIDI events<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; ain_modwheel &lt;0-7, 128-135 or off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>A number from 0..7 selects the J5.Ax input to which the ModWheel pot is connected. A number of 128..135 selects the AINSER8 located Ax input. Use <I>off</I> if no ModWheel is used to avoid that the unconnected analog input will send random MIDI events!<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_modwheel 1</I>: ModWheel of keyboard 1 connected to J5.A1 of the core module<BR>
         <I>set kb 2 ain_modwheel 4</I>: ModWheel of keyboard 2 connected to J5.A4 of the core module<BR>
         <I>set kb 1 ain_modwheel 129</I>: ModWheel of keyboard 1 connected to A1 of an AINSER8 module<BR>
         <I>set kb 2 ain_modwheel 132</I>: ModWheel of keyboard 2 connected to A4 of an AINSER8 module<BR>
         <I>set kb 1 ain_modwheel off</I>: no ModWheel connected<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt;<BR>ain_modwheel_inverted<BR>&lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Inverts the output of the ModWheel.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_modwheel_inverted off</I>: (default) ModWheel outputs 0..127<BR>
         <I>set kb 1 ain_modwheel_inverted on</I>: ModWheel outputs 127..0<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; ctrl_modwheel &lt;0-129&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>What kind of MIDI events should be sent by the ModWheel?
      <UL CLASS=CL>
        <LI><B>0..127:</B> CC#0 .. CC#127 (default: CC#1)
        <LI><B>128:</B> PitchBend
        <LI><B>129:</B> Aftertouch
      </UL>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ctrl_modwheel 1</I>: the ModWheel of keyboard 1 sends CC#1 (CC Modulation)<BR>
         <I>set kb 2 ctrl_modwheel 7</I>: the ModWheel of keyboard 2 sends CC#7 (CC Volume)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; ain_sustain &lt;0-7, 128-135 or off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>A number from 0..7 selects the J5.Ax input to which a Sustain Pedal is connected. A number of 128..135 selects the AINSER8 located Ax input. Use <I>off</I> if no Pedal is used to avoid that the unconnected analog input will send random MIDI events!<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_sustain 2</I>: Sustain Pedal of keyboard 1 connected to J5.A2 of the core module<BR>
         <I>set kb 2 ain_sustain 5</I>: Sustain Pedal of keyboard 2 connected to J5.A5 of the core module<BR>
         <I>set kb 1 ain_sustain 130</I>: Sustain Pedal of keyboard 1 connected to A2 of an AINSER8 module<BR>
         <I>set kb 2 ain_sustain 133</I>: Sustain Pedal of keyboard 2 connected to A5 of an AINSER8 module<BR>
         <I>set kb 1 ain_sustain off</I>: no Sustain Pedal connected<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt;<BR>ain_sustain_inverted<BR>&lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Inverts the output of the Sustain Pedal.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_sustain_inverted off</I>: (default) Pedal outputs 0..127<BR>
         <I>set kb 1 ain_sustain_inverted on</I>: Pedal outputs 127..0<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt;<BR>ain_sustain_switch<BR>&lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Changes the Sustain Pedal behaviour:<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_sustain_switch off</I>: (default) the pedal will output continuous controllers like a pot.
         <I>set kb 1 ain_sustain_switch on</I>: the pedal will only send 0 or 127 like a switch.
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; ctrl_sustain &lt;0-129&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>What kind of MIDI events should be sent by the Sustain Pedal?
      <UL CLASS=CL>
        <LI><B>0..127:</B> CC#0 .. CC#127 (default: CC#64)
        <LI><B>128:</B> PitchBend
        <LI><B>129:</B> Aftertouch
      </UL>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ctrl_sustain 64</I>: the Sustain Pedal of keyboard 1 sends CC#64 (CC Sustain)<BR>
         <I>set kb 2 ctrl_sustain 65</I>: the Sustain Pedal of keyboard 2 sends CC#65 (CC Portamento On)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; ain_expression &lt;0-7, 128-135 or off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>A number from 0..7 selects the J5.Ax input to which the Expression pedal is connected. A number of 128..135 selects the AINSER8 located Ax input. Use <I>off</I> if no Expression pedal is used to avoid that the unconnected analog input will send random MIDI events!<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_expression 6</I>: Expression pedal of keyboard 1 connected to J5.A6 of the core module<BR>
         <I>set kb 2 ain_expression 7</I>: Expression pedal of keyboard 2 connected to J5.A7 of the core module<BR>
         <I>set kb 1 ain_expression 134</I>: Expression pedal of keyboard 1 connected to A6 of an AINSER8 module<BR>
         <I>set kb 2 ain_expression 135</I>: Expression pedal of keyboard 2 connected to A7 of an AINSER8 module<BR>
         <I>set kb 1 ain_expression off</I>: no Expression connected<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt;<BR>ain_expression_inverted<BR>&lt;on|off&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Inverts the output of the Expression pedal.<BR>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ain_expression_inverted off</I>: (default) Expression outputs 0..127<BR>
         <I>set kb 1 ain_expression_inverted on</I>: Expression outputs 127..0<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; ctrl_expression &lt;0-129&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>What kind of MIDI events should be sent by the Expression pedal?
      <UL CLASS=CL>
        <LI><B>0..127:</B> CC#0 .. CC#127 (default: CC#1)
        <LI><B>128:</B> PitchBend
        <LI><B>129:</B> Aftertouch
      </UL>
      <SPAN CLASS=NORM><B>Examples:</B><BR>
         <I>set kb 1 ctrl_expression 1</I>: the Expression pedal of keyboard 1 sends CC#1 (CC Modulation)<BR>
         <I>set kb 2 ctrl_expression 7</I>: the Expression pedal of keyboard 2 sends CC#7 (CC Volume)<BR>
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt;<BR>ain_bandwidth_ms &lt;delay&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Allows to reduce the bandwidth for analog events. With 0 the default (very high) bandwidth will be used, which can send multiple MIDI events per milliseconds over USB. If this stresses your DAW too much, use higher values. E.g. with <I>set kb 1 ain_bandwidth_ms 5</I> MIDI events will only be sent each 5 mS (on value changes).
      </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=100> <SPAN CLASS=NORM><I>set kb &lt;1|2&gt; calibration &lt;off|pitchwheel|modwheel|expression|sustain&gt;</I></TD>
    <TD WIDTH=475> <SPAN CLASS=NORM>Starts the calibration of PitchWheel/ModWheel/Expression/Sustain potentiometers (or switches) to determine the minimum/maximum value.<BR>
       After the calibration, just enter 'set kb 1 calibration off' to stop the calibration (and to test the behaviour), thereafter type 'store' to save the new values.
  </TR>

</TABLE>


<H2> <IMG SRC="images/bullet.gif" ALT=""> Recommended Configurations </H2>

<P CLASS=INFO>Configuration examples for various keyboards - this list will be enhanced whenever new configurations have been tested:</P>

<P CLASS=DESC>
<TABLE CLASS=BOX WIDTH=700 ALIGN=CENTER BORDER CELLSPACING=2 CELLPADDING=3 >
  <TR>
    <TD WIDTH=300> <SPAN CLASS=NORM>Fatar DF Type with 61 keys (<A HREF="midibox_kb/midibox_kb_fatar_df_61_interconnections.pdf">schematic</A>)
    <TD WIDTH=400>
      <UL CLASS=CL>
        <LI><I>set kb 1 note_offset 36</I>
        <LI><I>set kb 1 rows 8</I>
        <LI><I>set kb 1 velocity on</I>
        <LI><I>set kb 1 optimized on</I>
        <LI><I>set kb 1 dout_sr1 1</I>
        <LI><I>set kb 1 dout_sr2 2</I>
        <LI><I>set kb 1 din_sr1 1</I>
        <LI><I>set kb 1 din_sr2 2</I>
        <LI><I>set kb 1 din_key_offset 32</I>
        <LI><I>set kb 1 din_inverted off</I>
        <LI><I>set kb 1 break_inverted off</I>
        <LI><I>set kb 1 delay_fastest 50</I>
        <LI><I>set kb 1 delay_slowest 1000</I>
        <LI><I>store</I>
      </UL>
    </SPAN></TD>
  </TR>


  <TR>
    <TD WIDTH=300> <SPAN CLASS=NORM>Fatar DF Type with 76 keys (<A HREF="midibox_kb/midibox_kb_fatar_df_76_interconnections.pdf">schematic</A>)
    <TD WIDTH=400>
      <UL CLASS=CL>
        <LI><I>set kb 1 note_offset 28</I>
        <LI><I>set kb 1 rows 12</I>
        <LI><I>set kb 1 velocity on</I>
        <LI><I>set kb 1 optimized on</I>
        <LI><I>set kb 1 dout_sr1 1</I>
        <LI><I>set kb 1 dout_sr2 2</I>
        <LI><I>set kb 1 din_sr1 1</I>
        <LI><I>set kb 1 din_sr2 2</I>
        <LI><I>set kb 1 din_key_offset 32</I>
        <LI><I>set kb 1 din_inverted off</I>
        <LI><I>set kb 1 break_inverted off</I>
        <LI><I>set kb 1 delay_fastest 50</I>
        <LI><I>set kb 1 delay_slowest 1000</I>
        <LI><I>store</I>
      </UL>
    </SPAN></TD>
  </TR>


  <TR>
    <TD WIDTH=300> <SPAN CLASS=NORM>Fatar DF Type with 88 keys (<A HREF="midibox_kb/midibox_kb_fatar_df_88_interconnections.pdf">schematic</A>)
    <TD WIDTH=400>
      <UL CLASS=CL>
        <LI><I>set kb 1 note_offset 21</I>
        <LI><I>set kb 1 rows 12</I>
        <LI><I>set kb 1 velocity on</I>
        <LI><I>set kb 1 optimized on</I>
        <LI><I>set kb 1 dout_sr1 1</I>
        <LI><I>set kb 1 dout_sr2 2</I>
        <LI><I>set kb 1 din_sr1 1</I>
        <LI><I>set kb 1 din_sr2 2</I>
        <LI><I>set kb 1 din_key_offset 40</I>
        <LI><I>set kb 1 din_inverted off</I>
        <LI><I>set kb 1 break_inverted off</I>
        <LI><I>set kb 1 delay_fastest 50</I>
        <LI><I>set kb 1 delay_slowest 1000</I>
        <LI><I>store</I>
      </UL>
    </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=300> <SPAN CLASS=NORM>Two "Refurbished Organ" keyboards with 63 keys (<A HREF="midibox_kb/midibox_kb_scanmatrix_type3.pdf">schematic</A>)
    <TD WIDTH=400>
      <UL CLASS=CL>
        <LI><I>set srio_num 4</I>
        <LI><I>set kb 1 note_offset 36</I>
        <LI><I>set kb 1 rows 8</I>
        <LI><I>set kb 1 velocity on</I>
        <LI><I>set kb 1 optimized off</I>
        <LI><I>set kb 1 dout_sr1 1</I>
        <LI><I>set kb 1 dout_sr2 2</I>
        <LI><I>set kb 1 din_sr1 1</I>
        <LI><I>set kb 1 din_sr2 2</I>
        <LI><I>set kb 1 din_key_offset 32</I>
        <LI><I>set kb 1 din_inverted off</I>
        <LI><I>set kb 1 break_inverted on</I>
        <LI><I>set kb 1 delay_fastest 50</I>
        <LI><I>set kb 1 delay_slowest 1000</I>
        <LI><I>set kb 2 note_offset 36</I>
        <LI><I>set kb 2 rows 8</I>
        <LI><I>set kb 2 velocity on</I>
        <LI><I>set kb 2 optimized off</I>
        <LI><I>set kb 2 dout_sr1 3</I>
        <LI><I>set kb 2 dout_sr2 4</I>
        <LI><I>set kb 2 din_sr1 3</I>
        <LI><I>set kb 2 din_sr2 4</I>
        <LI><I>set kb 2 din_key_offset 32</I>
        <LI><I>set kb 2 din_inverted off</I>
        <LI><I>set kb 2 break_inverted on</I>
        <LI><I>set kb 2 delay_fastest 50</I>
        <LI><I>set kb 2 delay_slowest 1000</I>
        <LI><I>store</I>
      </UL>
    </SPAN></TD>
  </TR>

  <TR>
    <TD WIDTH=300> <SPAN CLASS=NORM>Adding a Pitch Wheel to J5.A0<BR>and a Modulation Wheel to J5.A1<BR>and a Sustain Pedal to J5.A2<BR>(no schematic yet)
    <TD WIDTH=400>
      <UL CLASS=CL>
        <LI><I>set kb 1 ain_pitchwheel 0</I>
        <LI><I>set kb 1 ctrl_pitchwheel 128</I>
        <LI><I>set kb 1 ain_modwheel 1</I>
        <LI><I>set kb 1 ctrl_modwheel 1</I>
        <LI><I>set kb 1 ain_sustain 2</I>
        <LI><I>set kb 1 ctrl_sustain 64</I>
        <LI><I>set kb 1 ain_expression 6</I>
        <LI><I>set kb 1 ctrl_expression 11</I>
        <LI><I>store</I>
      </UL>
      Use following commands to calibrate the potentiometers (resp. switches):
      <UL CLASS=CL>
        <LI><I>set kb 1 calibration pitchwheel</I><BR>-&gt; move the PitchWheel to min/max position
        <LI><I>set kb 1 calibration modwheel</I><BR>-&gt; move the PitchWheel to min/max position
        <LI><I>set kb 1 calibration expression</I><BR>-&gt; move the Expression Pedal to min/max position
        <LI><I>set kb 1 calibration sustain</I><BR>-&gt; turn on/off the Sustain Pedal
        <LI><I>set kb 1 calibration off</I>
        <LI><I>store</I>
      </UL>
    </SPAN></TD>
  </TR>

</TABLE>


<H2> <IMG SRC="images/bullet.gif" ALT=""> Wishlist </H2>

<P CLASS=INFO><UL CLASS=CL>
<LI>support for triple sensor keyboards (allow to measure the key release velocity) - needs somebody who owns such a keyboard and can help testing</LI>
</UL>

<H2> <IMG SRC="images/bullet.gif" ALT=""> Firmware Download </H2>

<P CLASS=INFO>The precompiled application can be downloaded from the <A HREF="mios32_download.html">MIOS32 Download</A> page.</P>

FOOTER