Subversion Repositories svn.mios

Rev

Rev 1228 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1095 tk 1
HEADER 3 MIDIbox NG User Manual --- .NGC Configuration File
2
 
3
<P CLASS=INFO><B><A HREF="midibox_ng_manual.html">Back to main page...</A></B></P>
4
 
5
<H1>MIDIbox NG</H1>
6
<H1>User Manual --- .NGC Configuration File</H1>
7
 
8
<P CLASS=INFO>This chapter lists all configuration commands and parameters of the .NGC file. If this format is new to you, please read the <A HREF="midibox_ng_manual_fs.html">First Steps chapter</A> first to get a basic understanding.</P>
9
 
10
<H2> <IMG SRC="images/bullet.gif" ALT=""> Syntax </H2>
11
 
12
<P CLASS=DESC>The syntax of the .NGC file is tailored around the need to express the processing of MIDI events in an extendable format, so that simple operations can be defined with a small number of parameters, and complex configurations are (hopefully) still human readable. Each parameter has a name which will cause a bit more writing effort, on the other hand this will allow to provide extensions in future firmware versions without compatibility issues.</P>
13
 
14
<P CLASS=DESC>Each configuration entry begins with a keyword, and is followed by parameters which have to be defined in a single command line. In order to keep the oversight (not everybody is working on a big widescreen display), it's possible to split the command line over multiple lines in the .NGC file by appending them with the \ (Backslash) character at the end of a line:
1113 tk 15
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 16
COMMAND  parameter1=ABC  parameter2=XxXxX  parameter3=qwertz \
17
         parameter4=Foo  parameter5=Bar \
18
         parameter6=42
19
</PRE></TT>
20
 
21
<P CLASS=DESC>The complete command line can consist of up to 1000 characters! <!-- for techs who read the .html source: up to 1023 chars ;-) -->
22
 
23
<P CLASS=DESC>It's allowed to add space characters before and after the = (equal) sign, which helps to improve the readability:
1113 tk 24
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 25
EVENT_BUTTON id=  1  type=NoteOn chn= 1 key= 36
26
EVENT_BUTTON id=  2  type=NoteOn chn=16 key= 37
27
EVENT_BUTTON id=  3  type=CC     chn= 1 cc = 16
28
</PRE></TT>
29
 
30
<P CLASS=DESC>Values can be defined in decimal or hexadecimal format. Hexadecimal numbers begin with 0x (C-Style):
1113 tk 31
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 32
EVENT_BUTTON id=  1  type=CC  chn= 1 cc=0x10
33
</PRE></TT>
34
 
35
<P CLASS=DESC>Strings could contain intended spaces, therefore they have to be wrapped around single (') or double (") quotation marks. It's allowed to use single quotes inside double quotes and vice versa:
1113 tk 36
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 37
EVENT_BUTTON id=  1  type=CC  chn= 1 cc= 16  label="This is a Test!"
38
EVENT_BUTTON id=  2  type=CC  chn= 1 cc= 17  label='This is a Test!'
39
EVENT_BUTTON id=  3  type=CC  chn= 1 cc= 18  label="This is a 'Test'!"
40
EVENT_BUTTON id=  4  type=CC  chn= 1 cc= 19  label='This is a "Test"!'
1113 tk 41
EVENT_BUTTON id=  5  type=SysEx  stream="0xf0 0x11 0x22 0x33 0xf7"
1095 tk 42
</PRE></TT>
43
 
44
<P CLASS=DESC>Certain parameters expect ranges or multiple values. These values are concatenated with colons (:)<BR>
45
<B>Spaces before/after colons are not allowed!</B>
1113 tk 46
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 47
EVENT_BUTTON id=  1  type=CC  chn= 1 cc= 16  range=  0:127
48
EVENT_BUTTON id=  2  type=CC  chn= 1 cc= 17  range=  0:10
49
EVENT_BUTTON id=  3  type=CC  chn= 1 cc= 18  range=100:127
50
EVENT_BUTTON id=  4  type=CC  chn= 1 cc= 19  range=  0:127  lcd_pos= 1:1:1 label="First LCD, First Line"
51
</PRE></TT>
52
 
53
<P CLASS=DESC>The parser doesn't disallow to specify a parameter multiple times, but in most cases only the last assignment will be taken:
1113 tk 54
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 55
EVENT_BUTTON id=1  id=2  id=3 type=CC  chn= 1 cc= 16  range=  0:127
56
# this button will have  ^^^^ ID 3
57
</PRE></TT>
58
 
59
<P CLASS=DESC>Exceptions are mentioned in the tables below. E.g. it's possible to specify multiple meta events:
1113 tk 60
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 61
EVENT_BUTTON id=  1     type=Meta   meta=SetBank      meta=DoAnythingElse:42
62
#                                   ^^^^ first event  ^^^^ second event
63
</PRE></TT>
64
 
65
<P CLASS=DESC>Last but not least: comments can be added to the .NGC file by starting with a hash (#):
1113 tk 66
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 67
# My first .NGC file
68
</PRE></TT>
69
 
1113 tk 70
<H2> <IMG SRC="images/bullet.gif" ALT=""> IDs and Banks </H2>
1095 tk 71
 
1113 tk 72
<P CLASS=INFO>Several ID values are used to address hardware and software functions.</P>
1095 tk 73
 
1113 tk 74
<P CLASS=DESC>We mainly differ between the <I>id</I> of an EVENT (see next chapter), which can range from 1..4095 for each control element, and the <I>hw_id</I> which addresses the actual hardware controller.
1095 tk 75
 
76
<P CLASS=DESC>Available controllers are:
77
<UL CLASS=CL>
1101 tk 78
  <LI><I>BUTTON</I>: the first button (1) is connected to the first DIN shift register, pin D0, the second button (2) to the first DIN shift register, pin D1, ... the 9th button to the second DIN shift register, pin D0, etc...<BR>
1113 tk 79
Up to 256 buttons can be connected to up to 32 DIN shift registers.<BR>
80
   The <I>hw_id</I> ranges from 1..256
1101 tk 81
  <LI><I>LED</I>: the first LED (1) is connected to the first DOUT shift register, pin D7 (!), the second LED (2) to the first DOUT shift register, pin D6, ... the 9th LED to the second DOUT shift register, pin D7, etc...<BR>
1119 tk 82
Up to 256 LEDs can be connected to up to 32 DOUT shift registers.<BR>
1113 tk 83
   The <I>hw_id</I> ranges from 1..256
1200 tk 84
  <LI><I>RGBLED</I>: WS2812 based LED strips are currently only supported for the MBHP_CORE_STM32F4 module. The data input has to be connected to J4B.SC, ground to J4B.VS and +5V to an external PSU (required, since each RGB LED can consume up to 20 mA!)<BR>
85
Up to 64 RGB LEDs can be driven by the core. More could be enabled if desired by increasing the number with '#define WS2812_NUM_LEDS &lt;number&gt;' in the mios32_config.h file, but note that each LED will consume 48 bytes and therefore the RAM limit of the STM32F4 could be reached quickly! However, 128 LEDs are working ok so far, but this could change than more firmware features are added in future.
1101 tk 86
  <LI><I>ENC</I>: rotary encoders allocate two DIN pins, which have to be assigned with the ENC command which is described later in this chapter.<BR>
1113 tk 87
Up to 128 rotary encoders are currently supported.
88
   The <I>hw_id</I> ranges from 1..128
89
  <LI><I>AIN</I>: 6 AIN (analog input) pins are directly available on the <A HREF="mbhp_core_stm32.html">MBHP_CORE_STM32</A> and <A HREF="mbhp_core_lpc17.html">MBHP_CORE_LPC17</A> module at J5A.A0 .. J5B.A5 - conversion values are working at 7bit resolution only due to the reduced voltage range of 0..3.3V. For higher resolutions or more inputs please use the AINSER option!<BR>
90
   The <I>hw_id</I> ranges from 1..6
1130 tk 91
  <LI><I>AINSER</I>: the usage of the <A HREF="mbhp_ainser64.html">MBHP_AINSER64</A> or <A HREF="mbhp_ainser8.html">MBHP_AINSER8</A> module is the recommended solution for pots and faders. The resultion is up to 11bit without jittering values. Up to 2 MBHP_AINSER* modules can be handled by the firmware, accordingly up to 128 AINSER based controllers are available with AINSER64, resp. 16 with two AINSER8.<BR>
1113 tk 92
The inputs of the first AINSER module are available as AINSER controller 1-64, the inputs of the second module as AINSER controller 65-128.<BR>
93
   The <I>hw_id</I> ranges from 1..128
1101 tk 94
  <LI><I>MF</I>: up to 4 <A HREF="mbhp_mf_ng.html">MBHP_MF_NG</A> modules can be connected, which means that up to 32 motorfaders can be used as controllers. The modules are configured with the MF command which is described later in this chapter.<BR>
1113 tk 95
The faders of the first MBHP_MF_NG module are available as MF controller 1-8, the faders of the second module as MF controller 9-16, etc.<BR>
96
   The <I>hw_id</I> ranges from 1..32
1101 tk 97
  <LI><I>CV</I>: up to 4 <A HREF="mbhp_aout.html">MBHP_AOUT</A> or 4 <A HREF="mbhp_aout_lc.html">MBHP_AOUT_LC</A> or 4 <A HREF="http://www.midibox.org/dokuwiki/aout_ng" TARGET="_blank">MBHP_AOUT_NG</A> modules can be connected, which means that up to 32 CV channels can be controlled. The modules are configured with the AOUT command which is described later in this chapter.<BR>
1113 tk 98
   The <I>hw_id</I> ranges from 1..32
1117 tk 99
  <LI><I>KB</I>: up to 2 <A HREF="midibox_kb.html">MIDI Keyboards with (or without) velocity</A> can be scanned. The same driver as for MIDIbox KB is used.<BR>
1113 tk 100
   The <I>hw_id</I> ranges from 1..2
1095 tk 101
</UL>
102
 
1117 tk 103
<P CLASS=DESC>The separation of these ids is important for banking (new: and for conditional events). By default, the <I>hw_id</I> will be identical to the <I>id</I> if not further specified, but by changing the <I>hw_id</I> in an EVENT definition it's possible to assign the same hardware to multiple software functions, and to select the function with the <I>bank</I> parameter.
1095 tk 104
 
1113 tk 105
<P CLASS=DESC>The bank can then be switched with control elements which are assigned to the <I>SetBank</I>, <I>IncBank</I>, <I>DecBank</I> or <I>CycleBank</I> meta event. Either dedicated buttons could be used for such a purpose, or a rotary encoder, or MIDI events sent from external. Alternatively it will be possible to select a bank from the SCS.
106
 
107
<P CLASS=DESC>Configuration Example:
108
<TT><PRE style="margin-left:50px; font-size:8pt">
109
# decrement/increment bank
110
EVENT_BUTTON id=2001  type=Meta  meta=DecBank  button_mode=OnOnly  lcd_pos=1:17:1 label="Bnk%q"
111
EVENT_BUTTON id=2002  type=Meta  meta=IncBank  button_mode=OnOnly  lcd_pos=1:17:1 label="Bnk%q"
1095 tk 112
</PRE></TT>
113
 
1113 tk 114
<P CLASS=DESC>With the <I>SetBankOfHwId</I>, <I>IncBankOfHwId</I>, <I>DecBankOfHwId</I> or <I>CycleBankOfHwId</I> events it's even possible to select only the EVENT definition for a specific (or multiple) hardware controllers, selected with their <I>hw_id</I>, e.g.:
115
<TT><PRE style="margin-left:50px; font-size:8pt">
116
# the two leftmost encoders (hw_id=1 and 2) select the bank for the remaining upper/lower encoders
117
EVENT_ENC    id=101  hw_id =  1  fwd_id=LED_MATRIX:1  fwd_to_lcd=1  type=Meta  range=  1:4 \
118
             meta=SetBankOfHwId:3 \
119
             meta=SetBankOfHwId:5 \
120
             meta=SetBankOfHwId:7 \
121
             meta=SetBankOfHwId:9 \
122
             meta=SetBankOfHwId:11 \
123
             meta=SetBankOfHwId:13 \
124
             meta=SetBankOfHwId:15 \
125
             lcd_pos=1:17:1 label="Bnk%d"
1095 tk 126
 
1113 tk 127
EVENT_ENC    id=102  hw_id =  2  fwd_id=LED_MATRIX:2  fwd_to_lcd=1  type=Meta  range=  1:4 \
128
             meta=SetBankOfHwId:4 \
129
             meta=SetBankOfHwId:6 \
130
             meta=SetBankOfHwId:8 \
131
             meta=SetBankOfHwId:10 \
132
             meta=SetBankOfHwId:12 \
133
             meta=SetBankOfHwId:14 \
134
             meta=SetBankOfHwId:16 \
135
             lcd_pos=1:17:2 label="Bnk%d"
136
</PRE></TT>
1095 tk 137
 
1113 tk 138
<P CLASS=DESC>Following examples are worth to gather more informations about this topic:
139
  <UL CLASS=CL>
140
    <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fencbanks.ngc" TARGET="_blank">encbanks.ngc</A>.
141
    <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fbnk_2sel.ngc" TARGET="_blank">bnk_2sel.ngc</A>.
142
    <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fbnk_8sel.ngc" TARGET="_blank">bnk_8sel.ngc</A>.
143
  </UL>
144
 
145
<P CLASS=DESC>Please note that it's also possible to assign only a subset of controllers to banks, and to use the remaining hardware elements for dedicated functions outside the bank: <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Febnkpart.ngc" TARGET="_blank">Link to a configuration example</A>.
146
 
147
<P CLASS=DESC>Buttons and LEDs which are connected to a DIN/DOUT matrix can be used in banks by emulating BUTTON/LED controllers, see the <I>button_emu_id_offset</I> and <I>led_emu_id_offset</I> of the <I>DIN_MATRIX</I> and <I>DOUT_MATRIX</I> configuration command.
148
 
149
 
1117 tk 150
<H2> <IMG SRC="images/bullet.gif" ALT=""> IDs and Conditional Events </H2>
151
 
152
<P CLASS=DESC>Whenever a control element (e.g. a button, or an encoder) is moved, the EVENT with a matching <I>hw_id</I> (resp. <I>id</I> if no <I>hw_id</I> specified) and <I>bank</I> will be triggered.</P>
153
 
154
<P CLASS=DESC>It's also possible to trigger multiple events in the same <I>bank</I> from the same control element if they are all assigned to the same <I>hw_id</I>.<BR>
155
Example:
156
<TT><PRE style="margin-left:50px; font-size:8pt">
157
# the first encoder should send CC#16 over channel 1
158
EVENT_ENC  id=1    hw_id=1  type=CC cc=16 chn=1
159
# and CC#32 over channel 2
160
EVENT_ENC  id=101  hw_id=1  type=CC cc=32 chn=2
161
</PRE></TT>
162
 
163
<P CLASS=DESC>Maybe you would like to switch between the two events with a button independent from the bank selection? Here conditions come into the game: a condition allows to enable the event depending on the event value, or the value of another event!</P>
164
 
165
<P CLASS=DESC>Example where the condition depends on the "own" event value:
166
<TT><PRE style="margin-left:50px; font-size:8pt">
167
# the first encoder should send CC#16 over channel 1 if the value is <64
168
EVENT_ENC  id=1    hw_id=1  if_less_stop_on_match=64  type=CC cc=16 chn=1
169
# and CC#32 over channel 2 if the previous condition didn't stop the processing
170
EVENT_ENC  id=101  hw_id=1                            type=CC cc=32 chn=2
171
</PRE></TT>
172
 
173
 
174
<P CLASS=DESC>Example where the condition depends on the value of another event:
175
<TT><PRE style="margin-left:50px; font-size:8pt">
176
# this toggle button switches between two CC modes
177
EVENT_BUTTON  id=1  type=meta  meta=UpdateLcd  range=0:1  button_mode=Toggle
178
 
179
# the first encoder should send CC#16 over channel 1 if the toggle button is deactivated
180
EVENT_ENC  id=1    hw_id=1  if_equal=Button:1:0  type=CC cc=16 chn=1
181
# and CC#32 over channel 2 if the toggle button is activated
182
EVENT_ENC  id=101  hw_id=1  if_equal=Button:1:1  type=CC cc=32 chn=2
183
</PRE></TT>
184
 
185
<P CLASS=DESC>Here are some more examples from the repository:
186
  <UL CLASS=CL>
187
    <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fconev_1.ngc" TARGET="_blank">conev_1.ngc</A>.
188
    <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fconev_2.ngc" TARGET="_blank">conev_2.ngc</A>.
189
    <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fconev_3.ngc" TARGET="_blank">conev_3.ngc</A>.
190
    <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fconev_4.ngc" TARGET="_blank">conev_4.ngc</A>.
191
    <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fconev_5.ngc" TARGET="_blank">conev_5.ngc</A>.
192
  </UL>
193
 
194
<P CLASS=DESC>All available conditions and options are described in the <I>if_*</I> description of the next chapter.</P>
195
 
196
 
1095 tk 197
<H2> <IMG SRC="images/bullet.gif" ALT=""> EVENT_* </H2>
198
 
199
<P CLASS=DESC>The EVENT_* commands confgure "virtual control elements" which will act as a MIDI event source and/or destination:
200
 
201
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
202
  <TR>
203
    <TH WIDTH=150>EVENT Command</TD>
204
    <TH>Description</TD>
205
  </TR>
206
  <TR>
207
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_BUTTON</I></TD>
208
    <TD CLASS=TABCOLOR2>A button can send a MIDI event whenever it's pressed or depressed. If pressed, the maximum value of the specified range will be sent (typically 127), if depressed the minimum value (typically 0). In toggle mode, the on/off state will be updated when it receives the same event.
209
  </TR>
210
  <TR>
211
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_LED</I></TD>
212
    <TD CLASS=TABCOLOR2>A LED can receive a MIDI event. It's turned on if the received value is >= the mid value of the specified range, otherwise it's turned off.
213
    </TD>
214
  </TR>
215
 
216
  <TR>
1200 tk 217
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_RGBLED</I></TD>
218
    <TD CLASS=TABCOLOR2>A WS2812 based RGB LED can receive a MIDI event. By default the received velocity controls the brightness of a pre-configured colour, but it's also possible to control the colour instead. Configuration examples can be found in <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Frgbled_1.ngc" TARGET="_blank">rgbled_1.ngc</A>
219
    </TD>
220
  </TR>
221
 
222
  <TR>
1095 tk 223
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_BUTTON_MATRIX</I></TD>
1119 tk 224
    <TD CLASS=TABCOLOR2>A button matrix is a hardware option where one or more DIN/DOUT shift registers scan a network of buttons. The corresponding EVENT_BUTTON_MATRIX command sends a value from the specified key or CC number upwards. Toggle mode is not supported! If this is desired, or if individual MIDI events should be sent from the matrix, the events have to be configured with <I>BUTTON_MATRIX button_emu_id_offset=&lt;offset&gt;</I> instead. In this case, the button matrix won't react on EVENT_BUTTON_MATRIX anymore, but on EVENT_BUTTON instead!<BR>
225
      In order to avoid conflicts with buttons which are directly connected to DIN pins (and which are accessed with BUTTON:1 .. BUTTON:256), it's recommended specify emulated ids outside this range, e.g. <I>button_emu_id_offset=1001</I>.
1095 tk 226
    </TD>
227
  </TR>
228
 
229
  <TR>
230
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_LED_MATRIX</I></TD>
231
    <TD CLASS=TABCOLOR2>A LED matrix is a hardware option where multiple DOUT shift registers scan a network of LEDs. The corresponding EVENT_LED_MATRIX command allows to assign a MIDI event to control individual LEDs of the matrix, or to set a row in the LED matrix to a specified pattern:
232
      <UL CLASS=CL>
233
        <LI>MIDI events from <I>key/cc=&lt;value&gt;</I> upwards will turn on/off the LEDs of the matrix
234
        <LI>if <I>led_matrix_pattern</I> is specified, MIDI events will set a whole LED row of a matrix with the incoming MIDI event value (for LED Rings, Meters, etc...)
235
      </UL>
1119 tk 236
      This works as long as the <I>LED_MATRIX</I> hardware has been configured with <I>led_emu_id_offset=0</I> (default). With <I>led_emu_id_offset=1 (or greater)</I> the LED matrix will react on individual MIDI events instead, specified with <I>EVENT_LED</I> events.<BR>
237
      In order to avoid conflicts with LEDs which are directly connected to DOUT pins (and which are accessed with LED:1 .. LED:256), it's recommended specify emulated ids outside this range, e.g. <I>led_emu_id_offset=1001</I>.
1095 tk 238
    </TD>
239
  </TR>
240
 
241
  <TR>
242
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_ENC</I></TD>
243
    <TD CLASS=TABCOLOR2>An encoder can send and receive MIDI events. In "absolute mode" it will handle a value internally, in incremental modes it will just send an inc/dec event and expects the handling of the resulting value at the host site. In conjunction with a LED Ring (specified via DOUT_MATRIX) it can display the handled value. It's possible to specify individual <I>led_matrix_pattern</I> for each encoder event.
244
    </TD>
245
  </TR>
246
 
247
  <TR>
248
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_AIN</I></TD>
249
    <TD CLASS=TABCOLOR2>An AIN (core baed analog input) can send and receive MIDI events. Various modes are available, such as "Snap" and "Parallax" to avoid jumping values if a host has notified a value change.
250
    </TD>
251
  </TR>
252
 
253
  <TR>
254
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_AINSER</I></TD>
255
    <TD CLASS=TABCOLOR2>Similar to EVENT_AIN, the AINSER event can send and receive MIDI events. Various modes are available, such as "Snap" and "Parallax" to avoid jumping values if a host has notified a value change.
256
    </TD>
257
  </TR>
258
 
259
  <TR>
260
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_MF</I></TD>
261
    <TD CLASS=TABCOLOR2>A MF (motorfader) event can send and receive MIDI events, and forward them to a <A HREF="mbhp_mf_ng.html">MBHP_MF_NG</A> module via MIDI.
262
    </TD>
263
  </TR>
264
 
265
  <TR>
266
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_CV</I></TD>
1101 tk 267
    <TD CLASS=TABCOLOR2>A CV channel can receive a MIDI event and forward the value to the <A HREF="mbhp_aout.html">MBHP_AOUT</A>, <A HREF="mbhp_aout_lc.html">MBHP_AOUT_LC</A> or <A HREF="http://www.midibox.org/dokuwiki/aout_ng">MBHP_AOUT_NG</A> module(s). Up to 4 modules are supported, which means that up to 32 channels are available!<BR><B>Note:</B> it isn't possible to mix the module types - so, either 4 MBHP_AOUT, or 4 MBHP_AOUT_LC, or 4 MBHP_AOUT_NG modules can be used!<BR>There is a special handling for note events: they are processed through note stacks (each channel has its own) so that MBNG can also be used to play synths from a MIDI keyboard.
1095 tk 268
    </TD>
269
  </TR>
270
 
271
  <TR>
272
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_RECEIVER</I></TD>
273
    <TD CLASS=TABCOLOR2>A receiver is a generic destination which can receive MIDI events and process them according to the specified parameters. It's especially useful as a "forwarding device" to pass received MIDI event values to any other component.<BR>
274
    A receiver won't send MIDI events.
275
    </TD>
276
  </TR>
277
 
278
  <TR>
279
    <TD CLASS=TABCOLOR2 WIDTH=150><I>EVENT_SENDER</I></TD>
280
    <TD CLASS=TABCOLOR2>A sender is a generic source which can send MIDI events when it gets a forwarded event from any other device. This one is especially useful in conjunction with <I>EVENT_RECEIVER</I> for converting or just 1:1 forwarding incoming MIDI event values.<BR>
281
    A sender won't react on incoming MIDI events.
282
    </TD>
283
  </TR>
284
</TABLE>
285
 
286
<P CLASS=DESC>Each EVENT_*:
287
  <UL CLASS=CL>
288
    <LI>has an individual ID from id=1 .. id=4095
289
    <LI>can be assigned to a MIDI event such as Note (7bit), CC (7bit), Aftertouch, PitchBend (14bit), NRPN (14bit), SysEx with the <I>type</I> parameter
290
    <LI>can forward the received value to another EVENT_* definition with the <I>fwd</I> parameter
291
    <LI>can listen/send to specified MIDI ports with the <I>ports</I> parameter
292
    <LI>can convert the value to a specified range with the <I>range</I> parameter
293
    <LI>can display a value on the LCD with the <I>lcd_pos</I> and <I>label</I> parameter
294
    <LI>etc... etc...
295
  </UL>
296
<P CLASS=DESC>List of parameters:
297
 
298
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
299
  <TR>
300
    <TH WIDTH=150>EVENT_* Parameter</TD>
301
    <TH>Description</TD>
302
  </TR>
303
  <TR>
304
    <TD CLASS=TABCOLOR2 WIDTH=150><I>id=&lt;1..4095&gt;</I></TD>
305
    <TD CLASS=TABCOLOR2>Specifies the ID of the event which can range from 1..4095.<BR>
306
       Each EVENT_* element requires a unique ID in the configuration file!<BR>
1113 tk 307
       The EVENT_&lt;type&gt; is part of the ID, which means that BUTTON, LED, ENC, AINSER can have the same id number.
1095 tk 308
    </TD>
309
  </TR>
310
 
311
  <TR>
1113 tk 312
    <TD CLASS=TABCOLOR2 WIDTH=150><I>hw_id=&lt;1..4095&gt;</I></TD>
1117 tk 313
    <TD CLASS=TABCOLOR2>Optionally specifies the <I>hw_id</I> (hardware controller) to which the EVENT definition is assigned.<BR>
314
       If not specified, the <I>hw_id</I> will match with the <I>id</I><BR>
315
       It's possible to trigger multiple events from the same control element (e.g. button or encoder) by assigning them to the same <I>hw_id</I>. The <I>bank</I> and <I>if_*</I> conditions allow to filter the processing.
1113 tk 316
    </TD>
317
  </TR>
318
 
319
  <TR>
320
    <TD CLASS=TABCOLOR2 WIDTH=150><I>bank=&lt;0..255&gt;</I></TD>
321
    <TD CLASS=TABCOLOR2>Specifies the bank to which the <I>hw_id</I> is assigned. See also the detailed description in the previous chapter.<BR>
322
       With <I>bank=0</I> the controller won't be assigned to any bank, with <I>bank=1..255</I> it will be assigned, so that the EVENT definition is only active if the selected bank matches with the given number.
323
    </TD>
324
  </TR>
325
 
326
  <TR>
1117 tk 327
    <TD CLASS=TABCOLOR2 WIDTH=150><I>if_*=&lt;value&gt;</I><BR>
328
                                  <I>if_*=&lt;element&gt;:&lt;hw_id&gt;:&lt;value&gt;</I></TD>
329
    <TD CLASS=TABCOLOR2>Specifies a conditional event which either compares the "own" event value, or the event value of another event, with a constant.<BR>
330
      Following conditional checks are available:
331
      <UL CLASS=CL>
332
         <LI><I>if_equal</I>: event will be processed if the specified constant is matching
333
         <LI><I>if_unequal</I>: event will be processed if the specified constant is not matching
334
         <LI><I>if_less</I>: event will be processed if the specified constant less than the event value
335
         <LI><I>if_lessequal</I>: event will be processed if the specified constant less or equal the event value
336
      </UL>
337
 
338
      Usage examples:
339
      <UL CLASS=CL>
340
         <LI><I>if_equal=64</I>: event will only be processed if the event value is 64
341
         <LI><I>if_less=64</I>: event will be processed if the event value is &lt;64
342
         <LI><I>if_less=Enc:1:64</I>: event will be processed if the value of Enc:1 (the first encoder) is &lt;64
343
      </UL>
344
 
345
      The conditions will be checked for all events assigned to the same <I>hw_id</I>.<BR>
346
      In some usecases it's required to stop the search for events when a condition matched.<BR>
347
      Just add the <I>_stop_on_match</I> flag in such cases:
348
<TT><PRE style="margin-left:50px; font-size:8pt">
349
# the first encoder should send CC#16 over channel 1 if the value is <64
350
EVENT_ENC  id=1    hw_id=1  if_less_stop_on_match=64  type=CC cc=16 chn=1
351
# and CC#32 over channel 2 if the previous condition didn't stop the processing
352
EVENT_ENC  id=101  hw_id=1                            type=CC cc=32 chn=2
353
</PRE></TT>
354
 
355
      Complete list:
356
      <UL CLASS=CL>
357
         <LI><I>if_equal_stop_on_match</I>
358
         <LI><I>if_unequal_stop_on_match</I>
359
         <LI><I>if_less_stop_on_match</I>
360
         <LI><I>if_lessequal_stop_on_match</I>
361
      </UL>
362
    </TD>
363
  </TR>
364
 
365
  <TR>
1148 tk 366
    <TD CLASS=TABCOLOR2 WIDTH=150><I>fwd_id=&lt;target:id&gt;</I><BR><I>fwd_id=&lt;target:id:value&gt;</I></TD>
1117 tk 367
    <TD CLASS=TABCOLOR2>Whenever an matching MIDI event has been received, the value can be forwarded to another EVENT element with a specific <I>hw_id</I>:
1095 tk 368
      <UL CLASS=CL>
369
        <LI><I>BUTTON:&lt;1..4095&gt;</I>
370
        <LI><I>LED:&lt;1..4095&gt;</I>
371
        <LI><I>BUTTON_MATRIX:&lt;1..4095&gt;</I>
372
        <LI><I>LED_MATRIX:&lt;1..4095&gt;</I>
373
        <LI><I>ENC:&lt;1..4095&gt;</I>
374
        <LI><I>AIN:&lt;1..4095&gt;</I>
375
        <LI><I>AINSER:&lt;1..4095&gt;</I>
376
        <LI><I>CV:&lt;1..4095&gt;</I>
377
        <LI><I>RECEIVER:&lt;1..4095&gt;</I>
378
        <LI><I>SENDER:&lt;1..4095&gt;</I>
379
      </UL>
380
      There are many usecases for this function. E.g. it allows to pass the received value of a button to the corresponding LED, or the value of an encoder to a LED_MATRIX based LED Ring.<BR>
381
      In conjunction with EVENT_RECEIVER and EVENT_SENDER it's also possible to convert MIDI events, even from "simple" to SysEx and vice versa. Some examples can be found in the <A HREF="midibox_ng_manual_fs.html">First Steps</A> chapter.<BR>
382
      Multiple events can be chained this way, but the maximum chain length is limited to 4!<BR>
383
      If a value is passed to an unspecified EVENT id (because you want to avoid unnecessary writing effort), it's assumed that it will have the same parameters like the EVENT which forwards the value. E.g.:
1113 tk 384
<TT><PRE style="margin-left:50px; font-size:8pt">EVENT_ENC id=1 fwd_id=LED_MATRIX:1 led_matrix_pattern=1</PRE></TT>
1148 tk 385
      will forward the received value to an EVENT_LED_MATRIX entry with id=1. If this entry hasn't been specified, then it will inherit the parameters of the ENC element. Since the ENC element specified led_matrix_pattern=1, the LED Ring will display the value with pattern #1<BR>
386
      Alternatively, it's also possible to forward a constant value. A typical usecase for this option: multiple EVENTs forward to a single, central event to send a specific MIDI command.<BR>
387
      Example:
388
<TT><PRE style="margin-left:20px; font-size:8pt">
389
# whenever CC#16, CC#17 or CC#18 is received, we want to send CC#1 with value 100, 101 or 102 via SENDER:1
390
EVENT_RECEIVER id=1  fwd_id=SENDER:1:101  type=CC chn= 1  cc= 16
391
EVENT_RECEIVER id=2  fwd_id=SENDER:1:102  type=CC chn= 1  cc= 17
392
EVENT_RECEIVER id=3  fwd_id=SENDER:1:103  type=CC chn= 1  cc= 18
393
 
394
EVENT_SENDER   id=1                       type=CC chn= 1  cc=  1
395
</PRE></TT>
396
 
1095 tk 397
    </TD>
398
  </TR>
399
 
400
  <TR>
1097 tk 401
    <TD CLASS=TABCOLOR2 WIDTH=150><I>fwd_to_lcd=&lt;1|0&gt;</I></TD>
1113 tk 402
    <TD CLASS=TABCOLOR2>Whenever an matching MIDI event has been received, and a label is assigned to the EVENT, and the EVENT is not part of a bank, or the bank is selected, the label will be print on screen.<BR>Use this option to display value changes from external on the LCD.
1097 tk 403
    </TD>
404
  </TR>
405
 
406
  <TR>
1095 tk 407
    <TD CLASS=TABCOLOR2 WIDTH=150><I>type=&lt;event-type&gt;</I></TD>
408
    <TD CLASS=TABCOLOR2>Specifies the MIDI event type which should be sent and/or received.<BR>
409
       <UL CLASS=CL>
410
         <LI><I>NoteOff</I>: will send/receive a Note Off event with the specified key value
411
         <LI><I>NoteOn</I>: will send/receive a Note On event with the specified key value. Please consider that the MIDI protocol handles a NoteOn with value 0 like a Note Off event, therefore <I>type=NoteOff</I> is actually redundant.
1200 tk 412
         <LI><I>NoteOnOff</I>: will send a NoteOn, and immediately a NoteOff event.
1095 tk 413
         <LI><I>PolyPressure</I>: will send/receive a Poly Pressure event with the specified key value
414
         <LI><I>CC</I>: will send/receive a CC event with the specified cc value
415
         <LI><I>ProgramChange</I>: will send/recieve a Program Change event
416
         <LI><I>Aftertouch</I>: will send/recieve an Aftertouch event with the specified key value
417
         <LI><I>PitchBend</I>: will send/recieve a Pitch Bender event with the specified 14bit (!) value
418
         <LI><I>SysEx</I>: will send/recieve SysEx values with the specified stream
1231 tk 419
         <LI><I>Clock</I>: will send a MIDI clock event (0xf8)
420
         <LI><I>Start</I>: will send a MIDI start event (0xfa)
421
         <LI><I>Stop</I>: will send a MIDI stop event (0xfb)
422
         <LI><I>Cont</I>: will send a MIDI cont event (0xfc)
1095 tk 423
         <LI><I>NRPN</I>: will send/recieve NRPN values with the specified nrpn number and format
424
         <LI><I>Meta</I>: will perform the specified Meta command with the specified meta event
425
       </UL>
426
    </TD>
427
  </TR>
428
 
429
  <TR>
430
    <TD CLASS=TABCOLOR2 WIDTH=150><I>chn=&lt;1..16&gt;</I></TD>
431
    <TD CLASS=TABCOLOR2>Specifies the MIDI channel number (1..16) for <I>NoteOff, NoteOn, PolyPressure, CC, ProgramChange, Aftertouch, PitchBend and NRPN</I> events
432
    </TD>
433
  </TR>
434
 
435
  <TR>
1101 tk 436
    <TD CLASS=TABCOLOR2 WIDTH=150><I>key=&lt;0..127&gt;</I><BR><I>key=any</I></TD>
437
    <TD CLASS=TABCOLOR2>Specifies the key number (0..127) for <I>type=NoteOff, NoteOn, PolyPressure and Aftertouch</I> events.<BR>
438
    With <I>key=any</I> the event will take any key number. In combination with the <I>use_key_number</I> flag it's possible to process the received key number instead of the velocity value.
1095 tk 439
    </TD>
440
  </TR>
441
 
442
  <TR>
1117 tk 443
    <TD CLASS=TABCOLOR2 WIDTH=150><I>kb_transpose=&lt;-128..127&gt;</TD>
444
    <TD CLASS=TABCOLOR2>Only valid for <I>EVENT_KB</I>: specifies the transpose value for the played key from -128..127
445
    </TD>
446
  </TR>
447
 
448
  <TR>
449
    <TD CLASS=TABCOLOR2 WIDTH=150><I>kb_velocity_map=map&lt;1..255&gt;</TD>
450
    <TD CLASS=TABCOLOR2>Allows to convert the velocity of a <I>EVENT_KB</I> with a map which consists of 128 values.<BR>
451
    A usage example can be found in <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_2.ngc" TARGET="_blank">cfg/tests/kb_2.ngc</A>.
452
    </TD>
453
  </TR>
454
 
455
  <TR>
1101 tk 456
    <TD CLASS=TABCOLOR2 WIDTH=150><I>cc=&lt;0..127&gt;</I><BR><I>cc=any</I></TD>
457
    <TD CLASS=TABCOLOR2>Specifies the CC number (0..127) for <I>type=CC</I> events.<BR>
458
    With <I>cc=any</I> the event will take any CC number. In combination with the <I>use_cc_number</I> flag it's possible to process the received CC number instead of the CC value.
1095 tk 459
    </TD>
460
  </TR>
461
 
462
  <TR>
1101 tk 463
    <TD CLASS=TABCOLOR2 WIDTH=150><I>use_key_number=&lt;0|1&gt;</I><BR><I>use_cc_number=&lt;0|1&gt;</I></TD>
464
    <TD CLASS=TABCOLOR2>By default, a Note or CC event will process the velocity or CC value.<BR>
465
    With <I>use_key_number=1</I> or <I>use_cc_number=1</I> the key/CC number will be processed instead.<BR>
466
    This is especially useful for EVENT_CV to handle the note stack:
1113 tk 467
<TT><PRE style="margin-left:50px; font-size:8pt">
1101 tk 468
# these two events listen to any key on channel 1
469
# the first event uses the "key" as value, sets CV Channel #1 and the CV Gate #1 (at J5A.A0)
470
# the second event uses velocity as value (default) and sets CV Channel #2
471
EVENT_CV  id= 1  type=NoteOn  chn= 1 key=any use_key_number=1  fwd_gate_to_dout_pin=1.D7
472
EVENT_CV  id= 2  type=NoteOn  chn= 1 key=any use_key_number=0
473
</PRE></TT>
474
    </TD>
475
  </TR>
476
 
477
  <TR>
478
    <TD CLASS=TABCOLOR2 WIDTH=150><I>fwd_gate_to_dout_pin=&lt;1..32&gt;.D&lt;7..0&gt;</I></TD>
479
    <TD CLASS=TABCOLOR2>Only supported by EVENT_CV: sets the given DOUT pin on Note events.<BR>
480
      The first number specifies the DOUT shift register (1..32), and the second number the data pin (D7..D0).<BR>
481
      Example: <I>fwd_gate_to_dout_pin=2.D4</I> will forward the gate to the D4 pin of the second shift register.
482
    </TD>
483
  </TR>
484
 
485
  <TR>
1095 tk 486
    <TD CLASS=TABCOLOR2 WIDTH=150><I>nrpn=&lt;0..16383&gt;</I></TD>
487
    <TD CLASS=TABCOLOR2>Specifies the NRPN number (0..16383) for <I>type=NRPN</I> events
488
    </TD>
489
  </TR>
490
 
491
  <TR>
492
    <TD CLASS=TABCOLOR2 WIDTH=150><I>nrpn_format=&lt;Unsigned|Signed&gt;</I></TD>
1130 tk 493
    <TD CLASS=TABCOLOR2>Specifies the NRPN format for a <I>type=NRPN</I> event: <I>Unsigned</I>, <I>Signed</I> or <I>MsbOnly</I>.
1095 tk 494
    </TD>
495
  </TR>
496
 
497
  <TR>
498
    <TD CLASS=TABCOLOR2 WIDTH=150><I>stream=&lt;...&gt;</I></TD>
499
    <TD CLASS=TABCOLOR2>Specifies the SysEx stream of a <I>type=SysEx</I> event. The stream is specified as a string with decimal and/or hexadecimal numbers. It can also contain variables which are identified with a Caret (^):<BR>
1113 tk 500
<TT><PRE style="margin-left:50px; font-size:8pt">stream="0xf0 0x11 0x22 0x33 ^dev 0x00 ^val 0xf7"</PRE></TT>
1095 tk 501
        This example sends and receives a SysEx string starting with "0xf0 0x11 0x22 0x33", then we send/expect the device number, 0x00, the value (which will be passed or send to/from the control element) and 0xf7.<BR>
502
        Following SysEx variables are available:
503
        <UL CLASS=CL>
504
          <LI><I>^dev</I>: the device number which can be specified with <I>SysExDev</I> or from the Control Surface (SCS)
505
          <LI><I>^pat</I>: the patch number which can be specified with <I>SysExPat</I> or from the Control Surface (SCS)
506
          <LI><I>^bnk</I>: the bank number which can be specified with <I>SysExBnk</I> or from the Control Surface (SCS)
507
          <LI><I>^ins</I>: the instrument number which can be specified with <I>SysExIns</I> or from the Control Surface (SCS)
508
          <LI><I>^chn</I>: the channel number which can be specified with <I>SysExChn</I> or from the Control Surface (SCS)
509
          <LI><I>^chk_start</I>: starts the calculation of a checksum (this is a control word, it doesn't send/receive a byte)
510
          <LI><I>^chk</I>: sends the checksum over all bytes between the last ^chk_start and ^chk
511
          <LI><I>^chk_inv</I>: sends the inverted checksum over all bytes between the last ^chk_start and ^chk_inv
512
          <LI><I>^val</I>: sends the lower 7bit of the EVENT value
513
          <LI><I>^val_h</I>: sends bit 13..7 of the EVENT value
514
          <LI><I>^val_n1</I>: sends the first nibble of the EVENT value (bit 0..3)
515
          <LI><I>^val_n2</I>: sends the second nibble of the EVENT value (bit 4..7)
516
          <LI><I>^val_n3</I>: sends the third nibble of the EVENT value (bit 8..11)
517
          <LI><I>^val_n4</I>: sends the fourth nibble of the EVENT value (bit 12..15)
518
          <LI><I>^ignore</I>: ignores an incoming byte, doesn't send a byte
519
          <LI><I>^dump</I>: starts the SysEx dump mapping: EVENTs with <I>syxdump_pos</I> will get the received values at the specified positions.
1130 tk 520
          <LI><I>^cursor</I>: allows to directly set the LCD cursor from a SysEx dump. This is used when text messages should be received via SysEx.<BR>Value 0..63 will set the cursor at the first line, value 64..127 at the second line.<BR> If the text is longer than 40 characters, and a second 2x40 LCD is connected, it will be automatically continued there.<BR>
521
          Normaly ^cursor should always be part of the SysEx stream. If it's omitted, ^txt and ^txt56 will start at the position specified with <I>lcd_pos=&lt;device&gt;:&lt;x&gt;:&lt;y&gt;</I>
1113 tk 522
          <LI><I>^txt</I>: outputs the received text to the LCD until F7 is received
523
          <LI><I>^txt56</I>: outputs the received text to the LCD until F7 is received. Automatically jumps to the next line if the cursor has exceeded the 56th column.<BR>
524
          ^txt and ^txt56 also allow to map incoming characters to different cursor positions. An example can be found in the <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftemplates%2Flogictrl.ngc" TARGET="_blank">logictrl.ngc template</A>.<BR>
525
          Independent from this map feature, ^txt and ^txt56 now also take lcd_pos=... and label=... into account to set the initial LCD and cursor position, at which the message will start. The label can be used to change the GLCD font before the characters will be print. An example can be found in the <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftemplates%2Flogictrl.ngc" TARGET="_blank">logictrl.ngc template</A> as well.
1119 tk 526
          <LI><I>^label</I>: inserts the ASCII code of a label string into a SysEx stream. An example can be found in the <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fsyxlabel.ngc" TARGET="_blank">syxlabel.ngc file</A>.
1095 tk 527
        </UL>
528
    </TD>
529
  </TR>
530
 
531
  <TR>
532
    <TD CLASS=TABCOLOR2 WIDTH=150><I>meta=&lt;...&gt;</I></TD>
533
    <TD CLASS=TABCOLOR2>Specifies an operation for <I>type=Meta</I> event:
534
      <UL CLASS=CL>
535
        <LI><I>SetBank</I>: sets the bank according to the EVENT value (1..16). If buttons are used to select the bank, please specify <I>meta=SetBank range=1:1 button_mode=OnOnly</I> to select the first bank. If an encoder, pot, etc... is used, please specify <I>meta=SetBank range=1:16</I>.
536
        <LI><I>IncBank</I>: increments the bank number
537
        <LI><I>DecBank</I>: decrements the bank number
1113 tk 538
        <LI><I>CycleBank</I>: increments the bank number, resets to 1 if last bank reached
539
        <LI><I>SetBankOfHwId:&lt;hw_id&gt;</I>: sets the bank number only for the EVENTs which are matching with the given <I>hw_id</I>
540
        <LI><I>IncBankOfHwId:&lt;hw_id&gt;</I>: increments the bank number number only for the EVENTs which are matching with the given <I>hw_id</I>
541
        <LI><I>DecBankOfHwId:&lt;hw_id&gt;</I>: decrements the bank number number only for the EVENTs which are matching with the given <I>hw_id</I>
542
        <LI><I>CycleBankOfHwId:&lt;hw_id&gt;</I>: increments the bank number, resets to 1 if last bank reached for the EVENTs which are matching with the given <I>hw_id</I>
1117 tk 543
 
544
        <LI><I>SetSnapshot</I>: sets the snapshot number according to the EVENT value (0..127). If buttons are used to select the snapshot, please specify <I>meta=SetSnapshot range=0:0 button_mode=OnOnly</I> to select the first snapshot, <I>meta=SetSnapshot range=1:1 button_mode=OnOnly</I> for the second snapshot, etc.<BR>
545
If an encoder, pot, etc... is used, please specify <I>meta=SetSnapshot range=0:127</I>.<BR>
546
<B>Note that snapshots can also be accessed from the <A HREF="midibox_ng_manual_scs.html">SCS menu</A>.</B>
547
        <LI><I>IncSnapshot</I>: increments the snapshot number
548
        <LI><I>DecSnapshot</I>: decrements the snapshot number
549
        <LI><I>CycleSnapshot</I>: increments the snapshot number, resets to 0 if last snapshot reached
550
        <LI><I>LoadSnapshot</I>: loads a snapshot with the currently selected number from the .NGS file
551
        <LI><I>SaveSnapshot</I>: stores a snapshot with the currently selected number into the .NGS file
1200 tk 552
        <LI><I>SaveDelayedSnapshot:&lt;seconds&gt;</I>: this command will request to store the currently selected snapshot after at least the given seconds.<BR>Usage should be prefered over SaveSnapshot whenever multiple EVENTs could trigger the store operation to avoid unwanted delays.
1117 tk 553
        <LI><I>DumpSnapshot</I>: dumps the values of all control elements which haven't specified no_dump=1.<BR>
554
        Note that multiple meta commands can be assigned to an event, e.g. to set, auto-load and dump a snapshot from an encoder write:
555
 
556
<TT><PRE style="margin-left:20px; font-size:8pt">
557
EVENT_ENC ... type=Meta meta=SetSnapshot meta=LoadSnapshot meta=DumpSnapshot
558
</PRE></TT>
559
 
560
        It's also possible to use DumpSnapshot independent from the values stored in a .NGS file:
561
<TT><PRE style="margin-left:20px; font-size:8pt">
562
EVENT_BUTTON ... type=Meta meta=DumpSnapshot
563
</PRE></TT>
564
        will just dump the current values without a load operation.
565
 
1120 tk 566
        <LI><I>RetrieveAinValues</I>: the values of AIN EVENTs will be updated according to the current analog values (pot positions)
567
        <LI><I>RetrieveAinserValues</I>: the values of AINSER EVENTs will be updated according to the current analog values (pot positions)
568
 
1228 tk 569
        <LI><I>EncFast</I>: speeds up encoder movements according to the EVENT value. E.g. if <I>meta=EncFast:1 range=0:5</I> is assigned to a BUTTON_EVENT, encoder #1 will increment 5 times faster if the button is pressed.
1117 tk 570
 
1113 tk 571
        <LI><I>MidiLearn</I>: can be used to enable MIDI Learn mode from a dedicated button (instead of the <A HREF="midibox_ng_manual_scs.html">SCS</A>).<BR>
572
        E.g. if <I>meta=MidiLearn range=0:1</I> is assigned to a BUTTON_EVENT, Learn Mode will be enabled when the button is pressed, and disabled once it has been released.<BR>
573
        With <I>meta=MidiLearn range=0:2</I> NRPNs can be learned as well - in the case, CC#6/38/98/99 will be transformed into a NRPN event.
1117 tk 574
        <LI><I>UpdateLcd</I>: allows to force a refresh of the complete LCD content.<BR>
575
        This is especially useful in conjunction with conditional events: whenever a source value has been changed (e.g. a button state), all events which have this value in their condition will print out the label if the specified condition matches.
576
 
577
        <LI><I>SwapValues</I>: swaps the primary and secondary value of an event.<BR>
578
           E.g. on a note event, velocity can be swapped with the key value.<BR>
579
           A usage example can be found in <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_4.ngc" TARGET="_blank">cfg/tests/kb_4.ngc</A>, where the key and velocity value should be output by separate CV channels.
580
 
1119 tk 581
        <LI><I>RunSection:&lt;section&gt;</I>: executes the <A HREF="midibox_ng_manual_ngr.html">.NGR script</A> with ^section set to the specified value.
1120 tk 582
        <LI><I>RunStop</I>: stops the execution of a currently running <A HREF="midibox_ng_manual_ngr.html">.NGR script</A>.
1119 tk 583
 
1162 tk 584
        <LI><I>MClkPlay</I>: starts the internal MIDI Clock Generator
585
        <LI><I>MClkStop</I>: stops the internal MIDI Clock Generator
586
        <LI><I>MClkPause</I>: pauses the internal MIDI Clock Generator
587
        <LI><I>MClkPlayStop</I>: toggles between Play and Stop
588
        <LI><I>MClkDecTempo</I>: decrements the current tempo by 1 BPM
589
        <LI><I>MClkIncTempo</I>: increments the current tempo by 1 BPM
590
        <LI><I>MClkSetTempo</I>: sets the BPM value of the current tempo
1231 tk 591
        <LI><I>MClkDecDivider</I>: decrements the MIDI clock divider
592
        <LI><I>MClkIncDivider</I>: increments the MIDI clock divider
593
        <LI><I>MClkSetDivider</I>: sets the MIDI clock divider (6 by default)
1162 tk 594
 
1172 tk 595
        <LI><I>CvPitchBend14Bit:&lt;cv-channel&gt;</I>: sets the pitch (within the given pitchrange) of a CV channel in 14bit resolution, e.g. forwarded from a PitchBend event. See <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fcvtransp.ngc" TARGET="_blank">cvtransp.ngc example</A>.
596
        <LI><I>CvPitchBend7Bit:&lt;cv-channel&gt;</I>: sets the pitch (within the given pitchrange) of a CV channel in 7bit resolution, e.g. forwarded from a CC event. See <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fcvtransp.ngc" TARGET="_blank">cvtransp.ngc example</A>.
597
        <LI><I>CvPitchRange:&lt;cv-channel&gt;</I>: sets the pitch range. Example: <I>CvPitchRange:1</I> will set the pitch range of CV channel #1 to +/- 2 semitones.
598
        <LI><I>CvTransposeOctave:&lt;cv-channel&gt;</I>: transposes the given CV channel octave-wise. See <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fcvtransp.ngc" TARGET="_blank">cvtransp.ngc example</A>.
599
        <LI><I>CvTransposeSemitones:&lt;cv-channel&gt;</I>: transposes the given CV channel semitone-wise. See <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fcvtransp.ngc" TARGET="_blank">cvtransp.ngc example</A>.
600
 
1186 tk 601
        <LI><I>KbBreakIsMake:&lt;keyboard-number&gt;</I>: this command changes the behaviour of a keyboard (EVENT_KB): with value > 0 the keyboard will already trigger a note event when the break contact is activated (nice for playing organ style).<BR>
602
      Trigger it from a toggle button function as shown in <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_5.ngc" TARGET="_blank">kb_5.ngc</A><BR>
603
      Can be optionally set from the terminal as well with following
604
      command: <I>set kb &lt;keyboard-number&gt; break_is_make &lt;on|off&gt;</I> (e.g. <I>set kb 1 break_is_make on</I>).
605
 
1200 tk 606
        <LI><I>SendEvent&lt;controller&gt;:&lt;id&gt;:&lt;min&gt;:&lt;max&gt;</I>: allows to remote control one or more events from a single event within a given value range and direction.<BR>
607
           Usage Examples:
608
           <TT><PRE style="margin-left:20px; font-size:8pt">
609
# MetaA sends EVENT_ENC id=3, 4, 5, 6 in different ranges
610
EVENT_ENC    id=  1  hw_id =  1          fwd_id=LED_MATRIX:1    fwd_to_lcd=1  \
611
             type=Meta \
612
             meta=SendEvent:ENC:3:64:127 \
613
             meta=SendEvent:ENC:4:127:64 \
614
             meta=SendEvent:ENC:5:10:117 \
615
             meta=SendEvent:ENC:6:117:10 \
616
             range=  0:127 offset=  0  lcd_pos=1:1:1  label="ENC MetaA   %3d@(1:1:2)%B"
617
 
618
# MetaB sends EVENT_ENC id=7, 8, 9, 10 in different ranges
619
EVENT_ENC    id=  2  hw_id =  2          fwd_id=LED_MATRIX:2    fwd_to_lcd=1  \
620
             type=Meta \
621
             meta=SendEvent:ENC:7:64:127  \
622
             meta=SendEvent:ENC:8:127:64  \
623
             meta=SendEvent:ENC:9:10:117  \
624
             meta=SendEvent:ENC:10:117:10 \
625
             range=  0:127 offset=  0  lcd_pos=1:1:1  label="ENC MetaB   %3d@(1:2:2)%B"
626
           </PRE></TT>
627
       See also <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fmetalrn.ngc" TARGET="_blank">metalrn.ngc</A> for further information</LI>
628
 
629
        <LI><I>LearnEvent&lt;controller&gt;:&lt;id&gt;</I>: allows to learn SendEvent based controller assignments during runtime.<BR>
630
       See also <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fmetalrn.ngc" TARGET="_blank">metalrn.ngc</A> for further information</LI>
631
 
632
 
633
        <LI><I>RgbLedClearAll</I>: (clears all LEDs)
634
        <LI><I>RgbLedSetRgb:&lt;led&gt;:&lt;r&gt;:&lt;g&gt;:&lt;b&gt;</I>: (led=1..64, r/g/b=0..255)
635
        <LI><I>RgbLedSetHsv:&lt;led&gt;:&lt;h&gt;:&lt;s&gt;:&lt;v&gt;</I>: (led=1..64, h=0..359, s=0..100, v=0..100)
636
        <LI><I>RgbLedRainbow:&lt;speed&gt;:&lt;brightness&gt;</I>: (speed=1..255, brightness=0..100)<BR>
637
           Most simple way to test a LED strip: enter following command in MIOS Terminal:
638
           <TT><PRE style="margin-left:20px; font-size:8pt">
639
              ngr exec_meta RgbLedRainbow:9:100
640
           </PRE></TT>
641
           (don't forget to wear sunglasses, or start with brightness 20!!! ;-)</LI>
642
 
1096 tk 643
        <LI><I>ScsEnc</I>: emulates a SCS encoder movement. This Meta event can either be issued from EVENT_ENC or EVENT_BUTTON events. A usage example is given below.
644
        <LI><I>ScsSoft1</I>: emulates the SOFT1 button of the SCS
645
        <LI><I>ScsSoft2</I>: emulates the SOFT2 button of the SCS
646
        <LI><I>ScsSoft3</I>: emulates the SOFT3 button of the SCS
647
        <LI><I>ScsSoft4</I>: emulates the SOFT4 button of the SCS
1117 tk 648
        <LI><I>ScsSoft5</I>: emulates the SOFT5 button of the SCS (only relevant for 2x25 screen size)
649
        <LI><I>ScsSoft6</I>: emulates the SOFT6 button of the SCS (only relevant for 2x30 screen size)
650
        <LI><I>ScsSoft7</I>: emulates the SOFT7 button of the SCS (only relevant for 2x35 screen size)
651
        <LI><I>ScsSoft8</I>: emulates the SOFT8 button of the SCS (only relevant for 2x40 screen size)
1096 tk 652
        <LI><I>ScsShift</I>: emulates the SHIFT button of the SCS
653
        <LI><I>ScsMenu</I>: emulates the MENU button of the SCS<BR>
654
           Here a complete configuration example for 8 emulated SCS buttons:
1113 tk 655
<TT><PRE style="margin-left:20px; font-size:8pt">
1096 tk 656
EVENT_BUTTON id=  1  type=Meta   meta=ScsSoft1 range=0:1
657
EVENT_BUTTON id=  2  type=Meta   meta=ScsSoft2 range=0:1
658
EVENT_BUTTON id=  3  type=Meta   meta=ScsSoft3 range=0:1
659
EVENT_BUTTON id=  4  type=Meta   meta=ScsSoft4 range=0:1
660
EVENT_BUTTON id=  5  type=Meta   meta=ScsShift range=0:1
661
EVENT_BUTTON id=  6  type=Meta   meta=ScsMenu  range=0:1
662
# if dec/inc buttons should be used:
663
# DEC:
664
EVENT_BUTTON id=  7  type=Meta   meta=ScsEnc   range=63:63 button_mode=OnOnly
665
# INC:
666
EVENT_BUTTON id=  8  type=Meta   meta=ScsEnc   range=65:65 button_mode=OnOnly
667
</PRE></TT>
668
 
669
           Here a complete configuration example for 6 emulated SCS buttons + 1 SCS encoder:
1113 tk 670
<TT><PRE style="margin-left:20px; font-size:8pt">
1096 tk 671
EVENT_BUTTON id=  1  type=Meta   meta=ScsSoft1 range=0:1
672
EVENT_BUTTON id=  2  type=Meta   meta=ScsSoft2 range=0:1
673
EVENT_BUTTON id=  3  type=Meta   meta=ScsSoft3 range=0:1
674
EVENT_BUTTON id=  4  type=Meta   meta=ScsSoft4 range=0:1
675
EVENT_BUTTON id=  5  type=Meta   meta=ScsShift range=0:1
676
EVENT_BUTTON id=  6  type=Meta   meta=ScsMenu  range=0:1
677
# if a rotary encoder should be used:
678
ENC n=  1   sr= 15 pins=0:1   type=detented3
679
EVENT_ENC    id=  1  type=Meta   meta=ScsEnc   range=0:127 enc_mode=40Speed
680
</PRE></TT>
1095 tk 681
      </UL>
682
      It's allowed to specify multiple <I>meta=&lt;...&gt;</I> parameters for a single EVENT element, e.g.:
1113 tk 683
<TT><PRE style="margin-left:50px; font-size:8pt">meta=SetBank  meta=DoAnythingElse:42</PRE></TT>
1095 tk 684
      This is just a starting point, much more meta events will be available in future!<BR>
685
    </TD>
686
  </TR>
687
 
688
  <TR>
1101 tk 689
    <TD CLASS=TABCOLOR2 WIDTH=150><I>range=&lt;min-value&gt;:&lt;max-value&gt;</I><BR><I>range=map&lt;1..255&gt;</I></TD>
1095 tk 690
    <TD CLASS=TABCOLOR2>The received/sent value will be scaled to the specified, colon separated, range.<BR>
691
      For 7bit types such as <I>NoteOn, CC, ...</I> it typically ranges from 0..127<BR>
692
      For 14bit types such as <I>PitchBend, NRPN but also SysEx</I> it can also range between -16384..16383 -&gt; try it out! ;-)<BR>
1101 tk 693
      It's also allowed to specify an ranges such as <I>range=127:0</I> to invert values.<BR>
694
      In addition, it's possible to use a MAP for the range (<I>range=map1 .. map255</I>). This powerful feature is described
695
      in a separate chapter (search for the MAP command)
1095 tk 696
    </TD>
697
  </TR>
698
 
699
  <TR>
1101 tk 700
    <TD CLASS=TABCOLOR2 WIDTH=150><I>value=&lt;0..16383&gt;</I></TD>
701
    <TD CLASS=TABCOLOR2>Specifies the initial value of the event.</TD>
702
  </TR>
703
 
704
  <TR>
1117 tk 705
    <TD CLASS=TABCOLOR2 WIDTH=150><I>no_dump=&lt;0 or 1&gt;</I></TD>
706
    <TD CLASS=TABCOLOR2>Specifies if the current value of the control element should be sent during DumpSnapshot.<BR>
707
     <I>no_dump=1</I> is set automatically for EVENT_RECEIVER and EVENT_KB and events which are using type=Meta by default. If such events should be part of the dump, set <I>no_dump=0</I>.<BR>
708
     For all other events/types <I>no_dump=0</I> is set by default, set <I>no_dump=1</I> if they shouldn't send MIDI events on a snapshot dump.
709
     </TD>
710
  </TR>
711
 
712
  <TR>
1095 tk 713
    <TD CLASS=TABCOLOR2 WIDTH=150><I>offset=&lt;-16384..16383&gt;</I></TD>
714
    <TD CLASS=TABCOLOR2>Specifies the value offset at which the received value will be displayed in the range of -16384..16383<BR>
715
       Only relevant in conjunction with LCD <I>label</I>.<BR>
716
       Usage example: the received CC value ranges from 0:127, but it should be displayed from -64..63: in this case specify <I>offset=-64</I>
717
    </TD>
718
  </TR>
719
 
720
  <TR>
721
    <TD CLASS=TABCOLOR2 WIDTH=150><I>syxdump_pos</I></TD>
722
    <TD CLASS=TABCOLOR2><I>type=SysEx</I> events are able to start a ^dump for starting the collection of incoming values. The syxdump_pos parameter selects the value position within the ^dump.<BR>
723
       Syntax: <I>syxdump_pos=&lt;receiver-id&gt;:&lt;syxdump-pos&gt;</I>. A usage example can be found under <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftemplates%2Fblofeld.ngc" TARGET="_blank">cfg/templates/blofeld.ngc</A>.
724
    </TD>
725
  </TR>
726
 
727
  <TR>
728
    <TD CLASS=TABCOLOR2 WIDTH=150><I>button_mode=&lt;mode&gt;</I></TD>
1097 tk 729
    <TD CLASS=TABCOLOR2>Following button modes are supported for EVENT_BUTTON:
1095 tk 730
      <UL CLASS=CL>
731
        <LI><I>OnOff</I> (default): the button will send the maximum value of the specified <I>range</I> when pressed, and the mimimum value when depressed
732
        <LI><I>OnOnly</I>: the button will only send the maximum value of the specified <I>range</I> when pressed, it won't send a value when depressed
733
        <LI><I>Toggle</I>: toggles between on/off state whenever the button is pressed. The maximum/minimum value of the <I>range</I> will be sent according to the on/off state.
734
      </UL>
735
    </TD>
736
  </TR>
737
 
738
  <TR>
1097 tk 739
    <TD CLASS=TABCOLOR2 WIDTH=150><I>radio_group=&lt;0..63&gt;</I></TD>
1113 tk 740
    <TD CLASS=TABCOLOR2><I>EVENT_BUTTON</I>, <I>EVENT_LED</I>, <I>EVENT_SENDER</I> and <I>EVENT_RECEIVER</I> elements can be assigned to groups, which handle the same value over multiple elements.<BR>
1097 tk 741
      E.g. let's say, that 8 buttons should send different CC#16 values, and the related LEDs should display the button state. Only one LED should turn on depending on the value which has been sent:
1113 tk 742
<PRE style="margin-left:10px; font-size:8pt; font-size:8pt">
743
EVENT_BUTTON id=1  fwd_id=LED:1  type=CC chn=1 cc=16  button_mode=OnOnly range= 0:0 radio_group=1
744
EVENT_BUTTON id=2  fwd_id=LED:2  type=CC chn=1 cc=16  button_mode=OnOnly range= 1:1 radio_group=1
745
EVENT_BUTTON id=3  fwd_id=LED:3  type=CC chn=1 cc=16  button_mode=OnOnly range= 2:2 radio_group=1
746
EVENT_BUTTON id=4  fwd_id=LED:4  type=CC chn=1 cc=16  button_mode=OnOnly range= 3:3 radio_group=1
747
EVENT_BUTTON id=5  fwd_id=LED:5  type=CC chn=1 cc=16  button_mode=OnOnly range= 4:4 radio_group=1
748
EVENT_BUTTON id=6  fwd_id=LED:6  type=CC chn=1 cc=16  button_mode=OnOnly range= 5:5 radio_group=1
749
EVENT_BUTTON id=7  fwd_id=LED:7  type=CC chn=1 cc=16  button_mode=OnOnly range= 6:6 radio_group=1
750
EVENT_BUTTON id=8  fwd_id=LED:8  type=CC chn=1 cc=16  button_mode=OnOnly range= 7:7 radio_group=1
1097 tk 751
</PRE></TT>
752
 
753
      This also works if only LEDs are used, and it's allowed to use larger ranges:
1113 tk 754
<PRE style="margin-left:50px; font-size:8pt">
1097 tk 755
EVENT_LED    id=  9                type=CC chn=1 cc= 1  range= 0:9  radio_group=2
756
EVENT_LED    id= 10                type=CC chn=1 cc= 1  range=10:19 radio_group=2
757
EVENT_LED    id= 11                type=CC chn=1 cc= 1  range=20:29 radio_group=2
758
EVENT_LED    id= 12                type=CC chn=1 cc= 1  range=30:39 radio_group=2
759
EVENT_LED    id= 13                type=CC chn=1 cc= 1  range=40:49 radio_group=2
760
EVENT_LED    id= 14                type=CC chn=1 cc= 1  range=50:59 radio_group=2
761
EVENT_LED    id= 15                type=CC chn=1 cc= 1  range=60:69 radio_group=2
762
EVENT_LED    id= 16                type=CC chn=1 cc= 1  range=70:79 radio_group=2
763
</PRE></TT>
1113 tk 764
 
765
  <P CLASS=DESC>More usage examples:
766
    <UL CLASS=CL>
767
      <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fradiogrp.ngc" TARGET="_blank">radiogrp.ngc</A>: demonstrates the usage of radio groups as shown above
768
      <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fbnkled.ngc" TARGET="_blank">bnkled.ngc</A>: using a radio group to display the selected bank with LEDs
769
      <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fbnkledcc.ngc" TARGET="_blank">bnkledcc.ngc</A>: same as above, but in additional a MIDI event is sent with EVENT_SENDER assigned to the same radio group
770
    </UL>
1097 tk 771
    </TD>
772
  </TR>
773
 
774
  <TR>
775
    <TD CLASS=TABCOLOR2 WIDTH=150><I>ain_mode=&lt;mode&gt;</I></TD>
776
    <TD CLASS=TABCOLOR2>Following ain modes are supported for EVENT_AIN and EVENT_AINSER:
777
      <UL CLASS=CL>
778
        <LI><I>Direct</I>: the output value jumps directly to the new conversion value whenever the pot/fader is moved
1162 tk 779
        <LI><I>Switch</I>: Can be used if buttons are connected to analog inputs. The event will send the min value if a 30% threshold is reached, and the max value if a 70% threshold is reached (hysteresis behaviour).
780
           <TT><PRE style="margin-left:50px; font-size:8pt">Schematic:  Ground |----o Button o-----> analog input + 10k Pull-Up resistor to 3.3V (AIN) resp. 5V (AINSER)</PRE></TT>
1186 tk 781
        <LI><I>Toggle</I>: Similar to Switch it can be used if buttons are connected to analog inputs. The event will toggle between the min and max value.
1097 tk 782
        <LI><I>Snap</I>: (in literature also called "Soft-Takeover") whenever a new value is received from external, pot/fader movements won't generate MIDI events until it passed beyond the new position.
783
        <LI><I>Relative</I>: whenever a new value is received from external, pot/fader movements will increment the received value instead of setting it to the absolute position
784
        <LI><I>Parallax</I>: this name is cool, isn't it? ;-) A description can be found in <A HREF="http://www.ucapps.de/midibox/midibox_plus_parallax.gif">this history document from the year 1999</A>.
785
      </UL>
786
    </TD>
787
  </TR>
788
 
789
  <TR>
1130 tk 790
    <TD CLASS=TABCOLOR2 WIDTH=150><I>ain_sensor_mode=&lt;mode&gt;</I></TD>
791
    <TD CLASS=TABCOLOR2>Following sensor modes are supported for EVENT_AIN and EVENT_AINSER:
792
      <UL CLASS=CL>
793
        <LI><I>None</I>: (default if no sensor mode specified): Note events will be generated as continuous stream like CCs
794
        <LI><I>NoteOnOff</I>: AIN and AINSER events, which are assigned to Note events, send velocity 0 before a new Note is sent with velocity > 0 to avoid hanging notes.
795
      </UL>
796
    </TD>
797
  </TR>
798
 
799
  <TR>
800
    <TD CLASS=TABCOLOR2 WIDTH=150><I>ain_filter_delay_ms=&lt;delay&gt;</I></TD>
801
    <TD CLASS=TABCOLOR2>Experimental option for sensors. See also <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fain_fsr.ngc" TARGET="_blank">ain_fsr.ngc</A>
802
    </TD>
803
  </TR>
804
 
805
  <TR>
1095 tk 806
    <TD CLASS=TABCOLOR2 WIDTH=150><I>enc_mode=&lt;mode&gt;</I></TD>
1097 tk 807
    <TD CLASS=TABCOLOR2>Following encoder modes are supported for EVENT_ENC:
1095 tk 808
      <UL CLASS=CL>
809
        <LI><I>Absolute</I>: the encoder will send/receive an absolute value in the specified <I>range</I>
810
        <LI><I>40Speed</I>: the encoder will send 0x40+&lt;speed&gt; when moved clockwise, and 0x40-&lt;speed&gt; when moved counter-clockwise
811
        <LI><I>00Speed</I>: the encoder will send 0x00+&lt;speed&gt; when moved clockwise, and 0x7f-&lt;speed&gt; when moved counter-clockwise
812
        <LI><I>Inc00Speed_Dec40Speed</I>: the encoder will send 0x00+&lt;speed&gt; when moved clockwise, and 0x40+&lt;speed&gt; when moved counter-clockwise
813
        <LI><I>Inc41_Dec3F</I>: the encoder will send 0x41 when moved clockwise, and 0x3f when moved counter-clockwise
814
        <LI><I>Inc01_Dec7F</I>: the encoder will send 0x01 when moved clockwise, and 0x7f when moved counter-clockwise
815
        <LI><I>Inc01_Dec41</I>: the encoder will send 0x01 when moved clockwise, and 0x41 when moved counter-clockwise
816
      </UL>
817
    </TD>
818
  </TR>
819
 
820
  <TR>
1101 tk 821
    <TD CLASS=TABCOLOR2 WIDTH=150><I>enc_speed_mode=&lt;mode:par&gt;</I></TD>
822
    <TD CLASS=TABCOLOR2>The encoder speed mode allows to modify the speed response of an EVENT_ENC:
823
      <UL CLASS=CL>
824
        <LI><I>Auto</I>: speed automatically adapted according to the value <I>range</I>. It isn't required to specify a value after Auto
825
        <LI><I>Slow:0 .. Slow:7</I>: divides the increments
826
        <LI><I>Normal</I>: no special measure, increments will be passed 1:1
827
        <LI><I>Fast:0 .. Fast:7</I>: accelerates the increments
828
      </UL>
829
      <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fencspeed.ngc" TARGET="_blank">Link to test application for all modes</A>
830
    </TD>
831
  </TR>
832
 
833
  <TR>
1120 tk 834
    <TD CLASS=TABCOLOR2 WIDTH=150><I>emu_enc_mode=&lt;mode&gt;</I></TD>
835
    <TD CLASS=TABCOLOR2>Encoder events can also be emulated from external via MIDI by using an EVENT_RECEIVER, and setting the <I>emu_enc_mode</I> and <I>emu_enc_hw_id</I>. See also following configuration example: <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Femu_enc.ngc" TARGET="_blank">emu_enc.ngc</A>.<BR>
836
      Following encoder modes can be emulated by a EVENT_RECEIVER:
837
      <UL CLASS=CL>
838
        <LI><I>Absolute</I>: just forwards the received value to the EVENT_ENC
839
        <LI><I>40Speed</I>: increments the target EVENT_ENC value when 0x40+&lt;speed&gt; is received, decrements with 0x40-&lt;speed&gt;
840
        <LI><I>00Speed</I>: increments the target EVENT_ENC value when 0x00+&lt;speed&gt; is received, decrements with 0x7f-&lt;speed&gt;
841
        <LI><I>Inc00Speed_Dec40Speed</I>: increments the target EVENT_ENC value when 0x00+&lt;speed&gt; is received, decrements with 0x40+&lt;speed&gt;
842
        <LI><I>Inc41_Dec3F</I>: increments the target ENC value when 0x41 (or higher) is received, decrements with 0x3f (or lower)
843
        <LI><I>Inc01_Dec7F</I>: increments the target ENC value when 0x01..0x3f is received, decrements with 0x40..0x7f. Ignores 0x00
844
        <LI><I>Inc01_Dec41</I>: increments the target ENC value when 0x01..0x3f is received, decrements with 0x41..0x7f. Ignores 0x00 and 0x40
845
      </UL>
846
    </TD>
847
  </TR>
848
 
849
  <TR>
850
    <TD CLASS=TABCOLOR2 WIDTH=150><I>emu_enc_hw_id=&lt;1..128&gt;</I></TD>
851
    <TD CLASS=TABCOLOR2>Specifies the encoder hw_id which should be incremented by a EVENT_RECEIVER. See also <I>emu_enc_mode</I>.
852
    </TD>
853
  </TR>
854
 
855
  <TR>
1095 tk 856
    <TD CLASS=TABCOLOR2 WIDTH=150><I>led_matrix_pattern=&lt;pattern-number&gt;</I></TD>
1097 tk 857
    <TD CLASS=TABCOLOR2>LED patterns can be specified if an event should forward its value to a LED_MATRIX element:
1095 tk 858
      <UL CLASS=CL>
859
        <LI><I>1</I>: the first LED pattern specified with <I>LED_MATRIX_PATTERN n=1</I> commands
860
        <LI><I>2</I>: the second LED pattern specified with <I>LED_MATRIX_PATTERN n=2</I> commands
861
        <LI><I>3</I>: the third LED pattern specified with <I>LED_MATRIX_PATTERN n=3</I> commands
862
        <LI><I>4</I>: the fourth LED pattern specified with <I>LED_MATRIX_PATTERN n=4</I> commands
1120 tk 863
        <LI><I>Digit1</I>: outputs the first (rightmost) BCD digit of the value. See also <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fleddig1.ngc" TARGET="_blank">cfg/test/leddig1.ngc</A>
864
        <LI><I>Digit2</I>: outputs the second BCD digit of the value: (value / 10) % 10
865
        <LI><I>Digit3</I>: outputs the third BCD digit of the value: (value / 100) % 10
866
        <LI><I>Digit4</I>: outputs the fourth BCD digit of the value: (value / 1000) % 10
867
        <LI><I>Digit5</I>: outputs the fith BCD digit of the value: (value / 10000) % 10
868
        <LI><I>LcDigit</I>: converts the value directly into a BCD digit as used for the Logic Control protocol. See also <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fleddig2.ngc" TARGET="_blank">cfg/test/leddig2.ngc</A>
869
        <LI><I>LcAuto</I>: to handle the Logic Control protocol correctly, this pattern type will set the pattern number (1..4) according bit 5..4 of the received MIDI event value. Bit 3..0 will select the pattern position, and the 6th bit will set the "Center LED". See also <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftemplates%2Flogictrl.ngc" TARGET="_blank">cfg/test/logictrl.ngc</A> for the usage
1095 tk 870
    </TD>
871
  </TR>
872
 
873
  <TR>
1117 tk 874
    <TD CLASS=TABCOLOR2 WIDTH=150><I>colour=&lt;0..2&gt;</I></TD>
875
    <TD CLASS=TABCOLOR2>Specifies the color layer of the LED_MATRIX:
876
      <UL CLASS=CL>
877
        <LI><I>colour=0</I>: (default) the first "red" layer
878
        <LI><I>colour=1</I>: (default) the second "green" layer
879
        <LI><I>colour=2</I>: (default) the third "blue" layer
880
      </UL>
881
 
882
      A typical usage example can be found in <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fblm16x4.ngc" TARGET="_blank">cfg/test/blm16x4.ngc</A>.
883
    </TD>
884
  </TR>
885
 
886
  <TR>
887
    <TD CLASS=TABCOLOR2 WIDTH=150><I>dimmed=&lt;0 or 1&gt;</I></TD>
888
    <TD CLASS=TABCOLOR2>LEDs can now be dimmed with 16 brightness levels over the value range. This feature has to be enabled with <I>dimmed=1</I> in the EVENT_* definition.<BR>
889
     Configuration example: <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fdimled.ngc" TARGET="_blank">cfg/test/dimled.ngc</A>.<BR>
890
 
891
     LEDs in a matrix configuration can be dimmed as well. The dim range is the same (0..15), but the effective dim level is limited by the number of scanned rows:
892
     <UL CLASS=CL>
893
       <LI><B>4  rows:</B> only 8 levels (0..1, 2..3, 4..5, 6..7, 8..9, 10..11, 12..13, 14..15)
894
       <LI><B>8  rows:</B> only 4 levels (0..3, 4..7, 8..11, 12..15)
895
       <LI><B>16 rows:</B> only 2 levels (0..7, 8..15)
896
     </UL>
897
     Configuration example: <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fdimled_m.ngc" TARGET="_blank">cfg/test/dimled_m.ngc</A>.<BR>
898
    </TD>
899
  </TR>
900
 
901
  <TR>
902
    <TD CLASS=TABCOLOR2 WIDTH=150><I>rgb=&lt;red&gt;:&lt;green&gt;&lt;blue&gt;</I></TD>
903
    <TD CLASS=TABCOLOR2>In distance to the <I>dimmed</I> option, the <I>rgb</I> parameter allows to set preconfigured brightness levels for the three LED layers of a LED matrix.<BR>
904
    All three values range from 0..15.<BR>
905
     Configuration Examples:
906
     <UL CLASS=CL>
907
       <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Frgb_1.ngc" TARGET="_blank">rgb_1.ngc</A>: individual brightness levels for RGB LEDs
908
       <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Frgb_2.ngc" TARGET="_blank">rgb_2.ngc</A>: individual brightness levels for RGB LEDs forwarded from EVENT_BUTTON
909
       <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Frgb_3.ngc" TARGET="_blank">rgb_3.ngc</A>: different RGB brightness levels are used in different banks
910
     </UL>
1200 tk 911
     <B>Note:</B> <I>rgb</I> also works with "normal" LEDs directly connected to DOUT pins. In this case the <I>&lt;red&gt;</I> value will statically set the brightness level of the single-colour LED. The remaining <I>&lt;green&gt;</I> and <I>&lt;blue&gt;</I> levels have no effect in this case.<BR>
912
     <B>Note2:</B> <I>rgb</I> will also work for WS2812 based RGBLEDs, but due to the higher resolution the hsv parameter described below is prefered.
1117 tk 913
    </TD>
914
  </TR>
915
 
916
  <TR>
1200 tk 917
    <TD CLASS=TABCOLOR2 WIDTH=150><I>hsv=&lt;hue&gt;:&lt;saturation&gt;&lt;brightness&gt;</I></TD>
918
    <TD CLASS=TABCOLOR2>This command will only work for WS2812 based RGBLEDs!<BR>
919
                        Sets the hue/saturation/value colour code of a WS2812 based RGBLED. H ranges from 0..359 (grad); saturation and value (brightness) range from 0..100 (percentage)<BR>
920
     Configuration Example:
921
     <UL CLASS=CL>
922
       <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Frgbled_1.ngc" TARGET="_blank">rgbled_1.ngc</A>: various usage examples for WS2812 based RGBLEDs
923
     </UL>
924
    </TD>
925
  </TR>
926
 
927
  <TR>
928
    <TD CLASS=TABCOLOR2 WIDTH=150><I>inverted=&lt;0|1&gt;</I></TD>
929
    <TD CLASS=TABCOLOR2>Only relevant for EVENT_BUTTON and EVENT_LED: with <I>inverted=1</I> the DIN input resp. DOUT output will be inverted.</TD>
930
  </TR>
931
 
932
  <TR>
1101 tk 933
    <TD CLASS=TABCOLOR2 WIDTH=150><I>cv_inverted=&lt;0|1&gt;</I></TD>
934
    <TD CLASS=TABCOLOR2>Only relevant for EVENT_CV: with <I>cv_inverted=1</I> the CV output will be inverted.</TD>
935
  </TR>
936
 
937
  <TR>
938
    <TD CLASS=TABCOLOR2 WIDTH=150><I>cv_hz_v=&lt;0|1&gt;</I></TD>
939
    <TD CLASS=TABCOLOR2>Only relevant for EVENT_CV:
940
    <UL CLASS=CL>
941
      <LI><I>cv_hz_v=0</I>: (default) the CV output will change with 1V per octave (if correctly calibrated)
942
      <LI><I>cv_hz_v=1</I>: The V/Hz scaling is suitable for synths like the Korg MS-20.
943
    </UL>
944
    </TD>
945
  </TR>
946
 
947
  <TR>
948
    <TD CLASS=TABCOLOR2 WIDTH=150><I>cv_gate_inverted=&lt;0|1&gt;</I></TD>
949
    <TD CLASS=TABCOLOR2>Only relevant for EVENT_CV: with <I>cv_gate_inverted=1</I> the CV gate output (specified with <I>fwd_gate_to_dout_pin</I> will be inverted.</TD>
950
  </TR>
951
 
952
  <TR>
1095 tk 953
    <TD CLASS=TABCOLOR2 WIDTH=150><I>ports=&lt;port-selections&gt;</I></TD>
954
    <TD CLASS=TABCOLOR2>Expects a 16bit binary value (0|1) to select the MIDI ports over which the event should send and receive:
955
       <UL CLASS=CL>
956
          <LI>the first 4 digits enable/disable USB1..USB4
957
          <LI>the next 4 digits enable/disable MIDI1..MIDI4
958
          <LI>the next 4 digits are reserved, don't use!
1228 tk 959
          <LI>the next 4 digits enable/disable OSC1..OSC4
960
          <LI>the last 4 digits enable/disable SPI1..SPI4 (requires that the spi_midi flag has been enabled in the <A HREF="mios32_bootstrap_newbies.html">MIOS32 Bootloader configuration</A>.
1095 tk 961
       </UL>
962
       Example: following binary value (which is the default value)
1228 tk 963
<TT><PRE style="margin-left:50px; font-size:8pt">ports=10001000000010000000</PRE></TT>
1095 tk 964
       will enable USB1, MIDI1 (IN1 and OUT1) and OSC1, and following binary:
1228 tk 965
<TT><PRE style="margin-left:50px; font-size:8pt">ports=00001100000000000000</PRE></TT>
1095 tk 966
       will only enable MIDI1 and MIDI2
1228 tk 967
<TT><PRE style="margin-left:50px; font-size:8pt">ports=00000000000000001000</PRE></TT>
968
       will enable SPI1
1095 tk 969
    </TD>
970
  </TR>
971
 
972
  <TR>
973
    <TD CLASS=TABCOLOR2 WIDTH=150><I>lcd_pos=&lt;lcd&gt;:&lt;X&gt;:&lt;Y&gt;</I></TD>
974
    <TD CLASS=TABCOLOR2>Each event can output a label whenever a value has been received via MIDI, or the control element has been moved (e.g. button has been pushed, encoder/motorfader/pot has been moved).<BR>
975
      <I>lcd</I> specifies the LCD number which should be used to output the label, <I>X</I> the column and <I>Y</I> the line. E.g.:
1113 tk 976
<TT><PRE style="margin-left:50px; font-size:8pt">lcd_pos=1:1:1</PRE></TT>
1095 tk 977
        will output the label on the first LCD, first character in the first line. And:
1113 tk 978
<TT><PRE style="margin-left:50px; font-size:8pt">lcd_pos=1:1:2</PRE></TT>
1095 tk 979
        will output the label on the first LCD, first character in the second line.
980
    </TD>
981
  </TR>
982
 
983
  <TR>
984
    <TD CLASS=TABCOLOR2 WIDTH=150><I>label=&lt;string&gt;</I></TD>
985
    <TD CLASS=TABCOLOR2>Specifies the label (string) which should be output at the specified <I>lcd_pos</I>. The string can contain printf-linke control characters to output formatted values or strings, and it can contain references to globally defined labels of the <A HREF="midibox_ng_manual_ngl.html">.NGL file</A>.
986
      <UL CLASS=CL>
987
        <LI><I>%d</I>: will output the value (minus specified <I>offset</I>) in decimal format
988
        <LI><I>%u</I>: same like %d, but value always in unsigned format
989
        <LI><I>%x</I>: will output the value (minus specified <I>offset</I>) in hexadecimal format
990
        <LI><I>%X</I>: same like %x, but with capital letters
991
        <LI><I>%c</I>: will output the value as character
992
        <LI><I>%s</I>: will output an empty string. In conjunction with padding values it could save some memory, e.g. "%20s" will output 20 spaces
993
        <LI><I>%i</I>: the ID of the EVENT
1096 tk 994
        <LI><I>%p</I>: for EVENT_BUTTON_MATRIX only: the pin number of the matrix
1095 tk 995
        <LI><I>%e</I>: the MIDI event of the EVENT (up to 3 hexadecimal values, always 6 characters)
1231 tk 996
        <LI><I>%L</I>: displays logic control digits (MTC and status digits). See <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftemplates%2Flogictrl.ngc" TARGET="_blank">cfg/templates/logictrl.ngc</A>for an example</I>
1095 tk 997
        <LI><I>%m</I>: the minimum value of the EVENT which has been specified with <I>range</I>
998
        <LI><I>%M</I>: the maximum value of the EVENT which has been specified with <I>range</I>
1117 tk 999
        <LI><I>%n</I>: print note name (C-1, C#1, D-1, D#1, ...) based on the EVENT value
1000
        <LI><I>%N</I>: print note name (C-1, C#1, D-1, D#1, ...) based on the MIDI event which is sent
1095 tk 1001
        <LI><I>%b</I>: a binary digit: * if value >= (range/2), o if value < (range/2)
1002
        <LI><I>%B</I>: a vertical bar which works like a meter.<BR>In conjunction with various fonts (selected with <I>&amp;&lt;font&gt;</I>) alternative icons will be output instead.
1003
        <LI><I>%q</I>: current selected bank (q is a rotated b - do you see it? ;-)
1117 tk 1004
        <LI><I>%S</I>: current snapshot number (0..127)
1162 tk 1005
        <LI><I>%t</I>: displays MIDI clock state ("Play" or "Stop")
1006
        <LI><I>%T</I>: displays the current tempo in BPM (recommended usage: %3T to display tempos from 0..999 BPM)
1095 tk 1007
        <LI><I>%C</I>: clear all LCDs
1008
        <LI><I>%%</I>: outputs the % character
1009
        <LI><I>^^</I>: outputs the ^ character
1010
        <LI><I>^&lt;label&gt;</I>: outputs a globally defined, conditional or unconditional label. See the <A HREF="midibox_ng_manual_ngl.html">.NGL chapter</A> for details.
1113 tk 1011
        <LI><I>^#</I>: is doing nothing - this "terminator" is used if text should follow a label, e.g. label="^clr^#MyText" will print the ^clr label, and thereafter "MyText".
1095 tk 1012
      </UL>
1013
      It's possible to format the output by adding following specifiers after the percent (%) character. In following example the %d (decimal value) is used, but this works with any format type:
1014
      <UL CLASS=CL>
1015
        <LI><I>%3d</I>: the value will be padded with spaces to 3 characters, and it will be output right-aligned, e.g. "  1", " 10", "100"
1016
        <LI><I>%-3d</I>: the value will be padded with spaces to 3 characters, and it will be output left-aligned, e.g. "1  ", "10 ", "100"
1017
        <LI><I>%03d</I>: the value will be padded with zeroes to 3 characters, and it will be output right-aligned, e.g. "001", "010", "100"
1018
      </UL>
1019
      Examples:
1113 tk 1020
<TT><PRE style="margin-left:50px; font-size:8pt">lcd_pos=1:1:1  label="ENC #%3i    %3d%B"</PRE></TT>
1095 tk 1021
      will output at the first LCD, first column, first line a string with 20 characters. It starts with "ENC #", followed by the ID of the EVENT_ENC (3 digits), some spaces, the EVENT value (3 digits right-aligned) and a vertical bar.
1113 tk 1022
<TT><PRE style="margin-left:50px; font-size:8pt">lcd_pos=1:1:1  label="FIL1 Type ^fil_type"</PRE></TT>
1095 tk 1023
      will output "FIL1 Type " and then a conditional label called ^fil_type which has been specified in the <A HREF="midibox_ng_manual_ngl.html">.NGL file</A>.<BR>
1024
      GLCDs can output different fonts which are selected with the ampersant (&amp;) character:
1025
      <UL CLASS=CL>
1026
        <LI><I>&amp;&amp;</I>: outputs the &amp; character
1027
        <LI><I>&amp;&lt;font&gt;</I>: selects a font for graphical LCDs:
1028
          <UL CLASS=CL>
1029
            <LI><I>&amp;n</I>: selects the "normal" 6x8 font
1148 tk 1030
            <LI><I>&amp;i</I>: selects the inverted 6x8 font
1095 tk 1031
            <LI><I>&amp;s</I>: selects the "small" 4x8 font
1148 tk 1032
            <LI><I>&amp;t</I>: selects the "tiny" 4x8 font
1095 tk 1033
            <LI><I>&amp;b</I>: selects the "big" 24x16 font
1034
            <LI><I>&amp;k</I>: selects "knob icons", a 24x32 font. Values can be output with %B
1035
            <LI><I>&amp;h</I>: selects a meter with horizontal orientation, a 32x8 font. Values can be output with %B
1036
            <LI><I>&amp;v</I>: selects a meter with vertical orientation, a 8x32 font. Values can be output with %B
1037
          </UL>
1038
      </UL>
1039
      And finally it's also possible to change the output LCD and position within a label:
1040
      <UL CLASS=CL>
1041
        <LI><I>@(&lt;lcd&gt;:&lt;X&gt;:&lt;Y&gt;)</I>: changes to the given lcd, X and Y position.
1042
      </UL>
1043
      Example:
1113 tk 1044
<TT><PRE style="margin-left:50px; font-size:8pt">lcd_pos=1:1:1  label="Enc%3i&amp;k@(1:1:2)%B&amp;n@(1:18:1)%3d"</PRE></TT>
1095 tk 1045
      No, this is not an encrypted message, because the processing rules are well documented! ;-) - it will output "ENC" + the ID number. Then it will select the "knob" icon, jump to position X=1 Y=2 and output the knob icon based on the EVENT value. Thereafter it will select the normal font, jump to position X=18 Y=1 and output the MIDI value in decimal format.
1046
    </TD>
1047
  </TR>
1048
</TABLE>
1049
 
1050
 
1101 tk 1051
<H2> <IMG SRC="images/bullet.gif" ALT=""> MAP&lt;n&gt; </H2>
1052
 
1053
<P CLASS=DESC>This command creates a map of values which can be used by EVENTs for alternative value ranges without continuous values.
1054
 
1055
<P CLASS=DESC>E.g., consider that an encoder should only send following values:
1113 tk 1056
<TT><PRE style="margin-left:50px; font-size:8pt">
1101 tk 1057
MAP1   1 2 4 8 16 32 64
1058
</PRE></TT>
1059
 
1060
<P CLASS=DESC>Then select this map with:
1113 tk 1061
<TT><PRE style="margin-left:50px; font-size:8pt; font-size:8pt">
1062
EVENT_ENC    id=  1  fwd_id=LED_MATRIX:1  fwd_to_lcd=1 \
1063
                     type=CC chn= 1 cc= 16  range=map1  lcd_pos=1:1:1  label="^std_enc"
1101 tk 1064
</PRE></TT>
1065
 
1228 tk 1066
<P CLASS=DESC>Up to 255 maps can be defined (<I>MAP1</I> .. <I>MAP255</I>).
1101 tk 1067
 
1228 tk 1068
Four different types are available:
1069
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1070
  <TR>
1071
    <TH WIDTH=150>MAP</TD>
1072
    <TH>Description</TD>
1073
  </TR>
1074
  <TR>
1075
    <TD CLASS=TABCOLOR2 WIDTH=150><I>MAP&lt;n&gt; or MAP&lt;n&gt;/BYTE</I></TD>
1076
    <TD CLASS=TABCOLOR2>Up to 128 values can be specified, the value range is 0..255 (8bit)<BR>
1077
Example:
1078
<TT><PRE style="margin-left:50px; font-size:8pt">
1079
MAP1/BYTE 1 2 4 8 32 64
1080
</PRE></TT>
1081
</TD>
1082
  </TR>
1083
  <TR>
1084
    <TD CLASS=TABCOLOR2 WIDTH=150><I>MAP&lt;n&gt;/HWORD</I></TD>
1085
    <TD CLASS=TABCOLOR2>Up to 64 values can be specified, the value range is 0..16383 (16bit)<BR>
1086
Example:
1087
<TT><PRE style="margin-left:50px; font-size:8pt">
1088
MAP1/HWORD 1 2 4 8 32 64 128 256 512 1024 4096 8192
1089
</PRE></TT>
1090
</TD>
1091
  </TR>
1092
  <TR>
1093
    <TD CLASS=TABCOLOR2 WIDTH=150><I>MAP&lt;n&gt;/BYTEI</I></TD>
1094
    <TD CLASS=TABCOLOR2>Applies linear interpolation between data points. This allows to quickly define curves without the need to enter the values for the complete range. E.g. with MAP/BYTE it is required to enter 128 values to create a curve for a CC controller, with MAP/BYTEI it's mostly sufficient to define the same with 3..4 data points. MBNG will interpolate the values between these points. Up to 64 datapoints can be specified, the value range is 0..255 (8bit).<BR>
1095
Example:
1096
<TT><PRE style="margin-left:50px; font-size:8pt">
1097
# using an interpolation map to define the velocity curve
1098
MAP1/BYTEI  0:0  64:30  96:80  127:127
1099
</PRE></TT>
1100
</TD>
1101
  </TR>
1102
  <TR>
1103
    <TD CLASS=TABCOLOR2 WIDTH=150><I>MAP&lt;n&gt;/HWORDI</I></TD>
1104
    <TD CLASS=TABCOLOR2>Applies linear interpolation between data points. Up to 32 datapoints can be specified, the value range is 0..65535 (16bit).<BR>
1105
Example:
1106
<TT><PRE style="margin-left:50px; font-size:8pt">
1107
# pot is working at 12bit resolution (0..4095)
1108
# 0..2048 should send CC value 127..0 downwards,
1109
# and 2049..4095 (the second half) should send 0..127 upwards.
1110
MAP1/HWORDI 0:127  2048:0    4095:127
1111
</PRE></TT>
1112
</TD>
1113
  </TR>
1114
</TABLE>
1115
 
1116
 
1101 tk 1117
<P CLASS=DESC>The various control elements use maps the following way:
1118
<UL CLASS=CL>
1119
  <LI><I>EVENT_ENC</I>: send a mapped value with <I>enc_mode=Absolute</I> - <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fmapenc.ngc" TARGET="_blank">configuration example</A>
1120
  <LI><I>EVENT_AIN</I> and <I>EVENT_AINSER</I>: send a mapped value - <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fmapain.ngc" TARGET="_blank">configuration example</A>
1121
  <LI><I>EVENT_MF</I>: send a mapped value - <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fmapmf.ngc" TARGET="_blank">configuration example</A>
1122
  <LI><I>EVENT_BUTTON</I>: with <I>button_mode=Toggle</I> a single button can cycle between the map values - <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fmapbtn.ngc" TARGET="_blank">configuration example</A>
1123
  <LI><I>EVENT_SENDER</I> and <I>EVENT_RECEIVER</I>: the sent/received value will be mapped - <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fmapmidi.ngc" TARGET="_blank">configuration example</A>
1124
</UL>
1125
 
1126
 
1096 tk 1127
<H2> <IMG SRC="images/bullet.gif" ALT=""> SYSEX_VAR </H2>
1128
 
1129
<P CLASS=DESC>This command specifies the default values of various SysEx variables, which are available for <I>EVENT_* stream="..."</I>:
1130
 
1131
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1132
  <TR>
1133
    <TH WIDTH=150>SYSEX_VAR Parameter</TD>
1134
    <TH>Description</TD>
1135
  </TR>
1136
  <TR>
1137
    <TD CLASS=TABCOLOR2 WIDTH=150><I>dev=&lt;0..127&gt;</I></TD>
1138
    <TD CLASS=TABCOLOR2>the Device ID (<I>^dev</I>)</TD>
1139
  </TR>
1140
  <TR>
1141
    <TD CLASS=TABCOLOR2 WIDTH=150><I>pat=&lt;0..127&gt;</I></TD>
1142
    <TD CLASS=TABCOLOR2>the Patch number (<I>^pat</I>)</TD>
1143
  </TR>
1144
  <TR>
1145
    <TD CLASS=TABCOLOR2 WIDTH=150><I>bnk=&lt;0..127&gt;</I></TD>
1146
    <TD CLASS=TABCOLOR2>the Bank number (<I>^bnk</I>)</TD>
1147
  </TR>
1148
  <TR>
1149
    <TD CLASS=TABCOLOR2 WIDTH=150><I>ins=&lt;0..127&gt;</I></TD>
1150
    <TD CLASS=TABCOLOR2>the Instrument number (<I>^ins</I>)</TD>
1151
  </TR>
1152
  <TR>
1153
    <TD CLASS=TABCOLOR2 WIDTH=150><I>chn=&lt;0..127&gt;</I></TD>
1154
    <TD CLASS=TABCOLOR2>the Channel number (<I>^chn</I>)</TD>
1155
  </TR>
1156
</TABLE>
1157
 
1158
<P CLASS=DESC>The variables could also be used for other purposes of course, they are only placeholders for typical usecases.
1159
 
1160
 
1095 tk 1161
<H2> <IMG SRC="images/bullet.gif" ALT=""> ENC </H2>
1162
 
1163
<P CLASS=DESC>The ENC command configures rotary encoders which are connected to a <A HREF="mbhp_din.html">MBHP_DIN</A> module:
1164
 
1165
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1166
  <TR>
1167
    <TH WIDTH=150>ENC Parameter</TD>
1168
    <TH>Description</TD>
1169
  </TR>
1170
  <TR>
1171
    <TD CLASS=TABCOLOR2 WIDTH=150><I>n=&lt;1..128&gt;</I></TD>
1172
    <TD CLASS=TABCOLOR2>Specifies the encoder number which should be configured; it can range from 1..128</TD>
1173
  </TR>
1174
  <TR>
1175
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr=&lt;1..16&gt;</I></TD>
1176
    <TD CLASS=TABCOLOR2>Sets the DIN shift register to which the encoder is connected. 1 stands for the first DIN in the chain, 2 for the second, etc...</TD>
1177
  </TR>
1178
  <TR>
1179
    <TD CLASS=TABCOLOR2 WIDTH=150><I>pins=&lt;pin-a&gt;:&lt;pin-b&gt;</I></TD>
1180
    <TD CLASS=TABCOLOR2>Sets the pair of digital input pins of the DIN shift register to which the encoder is connected. The allowed pinning is restricted to following combinations:
1181
      <UL CLASS=CL>
1182
        <LI><I>0:1</I> encoder connected to input pin D0 and D1
1183
        <LI><I>2:3</I> encoder connected to input pin D2 and D3
1184
        <LI><I>4:5</I> encoder connected to input pin D4 and D5
1185
        <LI><I>6:7</I> encoder connected to input pin D6 and D7
1186
      </UL>
1187
      If you notice that the encoder increments in the wrong direction, the pins have to be swapped at the hardware side!
1188
    </TD>
1189
  </TR>
1190
  <TR>
1191
    <TD CLASS=TABCOLOR2 WIDTH=150><I>type=&lt;name&gt;</I></TD>
1192
    <TD CLASS=TABCOLOR2>Sets the encoder type: <I>non_detented</I>, <I>detented1</I>, <I>detented2</I> or <I>detented3</I>.<BR>
1097 tk 1193
      A documentation about these types can be found in <A HREF="http://www.midibox.org/dokuwiki/doku.php?id=encoders" TARGET="_blank">this Wiki article</A>.
1095 tk 1194
    </TD>
1195
  </TR>
1196
</TABLE>
1197
 
1198
 
1199
<H2> <IMG SRC="images/bullet.gif" ALT=""> DIN_MATRIX </H2>
1200
 
1201
<P CLASS=DESC>The DIN_MATRIX command configures button matrices which are connected between DIN/DOUT shift registers. Please note that all assigned shift registers can't be used for common button or LED functions anymore:
1202
 
1203
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1204
  <TR>
1205
    <TH WIDTH=150>DIN_MATRIX Parameter</TD>
1206
    <TH>Description</TD>
1207
  </TR>
1208
  <TR>
1209
    <TD CLASS=TABCOLOR2 WIDTH=150><I>n=&lt;1..8&gt;</I></TD>
1210
    <TD CLASS=TABCOLOR2>Specifies the matrix number which should be configured; it can range from 1..8</TD>
1211
  </TR>
1212
  <TR>
1213
    <TD CLASS=TABCOLOR2 WIDTH=150><I>rows=&lt;4|8|16&gt;</I></TD>
1214
    <TD CLASS=TABCOLOR2>Sets the number of rows which should be scanned:
1215
      <UL CLASS=CL>
1216
        <LI><I>rows=4</I>: 4 selection pulses are output by the DOUT register specified with <I>sr_dout_sel1</I>. The pulses are available twice: at D7:D4 and D3:D0.<BR>This configuration allows to scan up to 4x8 buttons with a single DIN, or 4x16 buttons with two DINs.
1217
        <LI><I>rows=8</I>: 8 selection pulses are output by the DOUT register specified with <I>sr_dout_sel1</I>. The pulses are available at D7:D0<BR>This configuration allows to scan up to 8x8 buttons with a single DIN, or 8x16 buttons with two DINs.
1218
        <LI><I>rows=16</I>: 16 selection pulses are output by the DOUT registers specified with <I>sr_dout_sel1</I> and <I>sr_dout_sel2</I>. The pulses are available at D7:D0 of each register.<BR>This configuration allows to scan up to 16x8 buttons with a single DIN, or 16x16 buttons with two DINs.
1219
      </UL>
1220
  </TR>
1221
  <TR>
1113 tk 1222
    <TD CLASS=TABCOLOR2 WIDTH=150><I>inverted=&lt;1|0&gt;<BR>inverted_sel=&lt;1|0&gt;</I></TD>
1223
    <TD CLASS=TABCOLOR2>DOUT selection lines will be inverted with <I>inverted=1</I> or <I>inverted_sel=1</I>. This is required if the diodes of the button matrix have been connected in the opposite order:
1095 tk 1224
       <UL CLASS=CL>
1225
          <LI><I>inverted=0</I>: Cathodes are connected to the DOUT selection lines, see also <A HREF="midio128/midio128_v3_scanmatrix.pdf" TARGET="_blank">this schematic</A>.
1113 tk 1226
          <LI><I>inverted=1</I>: Inverting sink drivers have been added to the DOUT register.
1227
          <LI><I>inverted_sel=1 and inverted_row=1</I>: Anodes are connected to the DOUT selection lines (not standard, but sometimes required if already existing hardware should be re-used).
1095 tk 1228
       </UL>
1229
    </TD>
1230
  </TR>
1231
  <TR>
1113 tk 1232
    <TD CLASS=TABCOLOR2 WIDTH=150><I>inverted_row=&lt;1|0&gt;</I></TD>
1233
    <TD CLASS=TABCOLOR2>DIN row patterns can be inverted with <I>inverted_row=1</I>
1234
  </TR>
1235
  <TR>
1095 tk 1236
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_dout_sel1=&lt;0..16&gt;</I></TD>
1237
    <TD CLASS=TABCOLOR2>Sets the first DOUT shift register which should output the row selection signals.</TD>
1238
  </TR>
1239
  <TR>
1240
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_dout_sel2=&lt;0..16&gt;</I></TD>
1241
    <TD CLASS=TABCOLOR2>Sets the second DOUT shift register which should output the row selection signals in a <I>row=16</I> setup.<BR>Set this parameter to 0 if a second DOUT is not required.</TD>
1242
  </TR>
1243
  <TR>
1244
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_din1=&lt;0..16&gt;</I></TD>
1245
    <TD CLASS=TABCOLOR2>Sets the first DIN shift register of the button matrix.</TD>
1246
  </TR>
1247
  <TR>
1248
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_din2=&lt;0..16&gt;</I></TD>
1249
    <TD CLASS=TABCOLOR2>Sets the (optional) second DIN shift register of the button matrix.</TD>
1250
  </TR>
1251
  <TR>
1120 tk 1252
    <TD CLASS=TABCOLOR2 WIDTH=150><I>mirrored_row=&lt;1|0&gt;</I></TD>
1253
    <TD CLASS=TABCOLOR2>The pins of a DIN row can be mirrored. This happens only for the shift register value itself. Means: if two DIN shift registers are assigned to the row, they won't be swapped. If this is desired, just change the <I>sr_din1</I>/<I>sr_din2</I> assignments.
1254
  </TR>
1255
  <TR>
1095 tk 1256
    <TD CLASS=TABCOLOR2 WIDTH=150><I>button_emu_id_offset=&lt;1..4095&gt;</I></TD>
1119 tk 1257
    <TD CLASS=TABCOLOR2>With a value &gt;0, the button matrix will trigger EVENT_BUTTON events instead of EVENT_BUTTON_MATRIX, starting with the specified ID. A matrix of 8x8 buttons can emulate 64 buttons with individual event assignments this way.<BR>
1258
      In order to avoid conflicts with buttons which are directly connected to DIN pins (and which are accessed with BUTTON:1 .. BUTTON:256), it's recommended specify emulated ids outside this range, e.g. <I>button_emu_id_offset=1001</I>.
1095 tk 1259
  </TR>
1260
</TABLE>
1261
 
1262
 
1263
<H2> <IMG SRC="images/bullet.gif" ALT=""> DOUT_MATRIX </H2>
1264
 
1120 tk 1265
<P CLASS=DESC>The DOUT_MATRIX command configures LED matrices which are connected between multiple DOUT shift registers.</P>
1095 tk 1266
 
1120 tk 1267
<P CLASS=DESC>Usecases:
1268
<UL CLASS=CL>
1269
  <LI>Already with 2 DOUT shift registers it's possible to control 64 LEDs. One DOUT is used to select the column, the second DOUT to set the row pattern. By using the <I>led_emu_id_offset</I> parameter they behave like common EVENT_LED elements and can be controlled individually. This saves some hardware! (only 2 DOUT shift registers instead of 8 to drive 64 LEDs).<BR>
1270
      Other useful hardware configurations: with 1 DOUT assigned to the column, and two assigned to the row, up to 128 LEDs can be controlled from 3 DOUT shift registers. With two DOUTs assigned to the column, and two assigned to the row, up to 256 LEDs can be controlled from 4 DOUT shift registers.
1271
  <LI>Actually each matrix provides three separate "row layers", called r, g, b (red, green, blue). You get the message: this allows you to control multicolour LEDs!
1148 tk 1272
  <LI>LED Rings and Meters - see also the LED_MATRIX_PATTERN configuration below. The <I>led_matrix_pattern</I> can be passed from a control element (e.g. EVENT_ENC) to the LED matrix in order to output a pattern based on the event value.
1120 tk 1273
  <LI>LED Digits (7-segment displays) are controlled from a DOUT_MATRIX as well. Here are some interconnection diagrams with the appr. .NGC configuration examples:
1274
  <UL CLASS=CL>
1275
    <LI><A HREF="midibox_ng/mbng_led_digits_5x7bit.pdf">Interconnections for 5 7bit displays</A> (<A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fleddig1.ngc" TARGET="_blank">cfg/test/leddig1.ngc</A>)
1276
    <LI><A HREF="midibox_ng/mbng_led_digits_mtc.pdf">Interconnections for MTC and Status LED Digits of a Logic Control Emulation</A> (<A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fleddig2.ngc" TARGET="_blank">cfg/test/leddig2.ngc</A>)
1277
  </UL>
1278
</UL>
1279
 
1280
<P CLASS=DESC>Available configuration parameters:
1095 tk 1281
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1282
  <TR>
1283
    <TH WIDTH=150>DOUT_MATRIX Parameter</TD>
1284
    <TH>Description</TD>
1285
  </TR>
1286
  <TR>
1287
    <TD CLASS=TABCOLOR2 WIDTH=150><I>n=&lt;1..8&gt;</I></TD>
1288
    <TD CLASS=TABCOLOR2>Specifies the matrix number which should be configured; it can range from 1..8</TD>
1289
  </TR>
1290
  <TR>
1291
    <TD CLASS=TABCOLOR2 WIDTH=150><I>rows=&lt;4|8|16&gt;</I></TD>
1292
    <TD CLASS=TABCOLOR2>Sets the number of rows which should be scanned:
1293
      <UL CLASS=CL>
1294
        <LI><I>rows=4</I>: 4 selection pulses are output by the DOUT register specified with <I>sr_dout_sel1</I>. The pulses are available twice: at D7:D4 and D3:D0.<BR>This configuration allows to scan up to 4x8 LEDs with two DOUTs, or 4x16 LEDs with three DOUTs.
1295
        <LI><I>rows=8</I>: 8 selection pulses are output by the DOUT register specified with <I>sr_dout_sel1</I>. The pulses are available at D7:D0<BR>This configuration allows to scan up to 8x8 LED with two DOUTs, or 8x16 LEDs with three DOUTs.
1296
        <LI><I>rows=16</I>: 16 selection pulses are output by the DOUT registers specified with <I>sr_dout_sel1</I> and <I>sr_dout_sel2</I>. The pulses are available at D7:D0 of each register.<BR>This configuration allows to scan up to 16x8 LEDs with three DOUTs, or 16x16 LEDs with four DOUTs.
1297
      </UL>
1298
  </TR>
1299
  <TR>
1300
    <TD CLASS=TABCOLOR2 WIDTH=150><I>inverted=&lt;1|0&gt;</I></TD>
1301
    <TD CLASS=TABCOLOR2>DOUT selection lines will be inverted with <I>inverted=1</I>. This is required if the LEDs of the matrix have been connected in the opposite order:
1302
       <UL CLASS=CL>
1303
          <LI><I>inverted=0</I>: Cathodes are connected to the DOUT selection lines, see also <A HREF="mbhp/mbhp_blm_map.pdf" TARGET="_blank">this schematic</A>.
1113 tk 1304
          <LI><I>inverted=1</I>: Inverting sink drivers have been added to the DOUT register.
1305
          <LI><I>inverted_sel=1 and inverted_row=1</I>: Anodes are connected to the DOUT selection lines (swapped polarity)
1095 tk 1306
       </UL>
1307
    </TD>
1308
  </TR>
1309
  <TR>
1113 tk 1310
    <TD CLASS=TABCOLOR2 WIDTH=150><I>inverted_row=&lt;1|0&gt;</I></TD>
1311
    <TD CLASS=TABCOLOR2>DOUT row patterns can be inverted with <I>inverted_row=1</I>
1312
  </TR>
1313
  <TR>
1095 tk 1314
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_dout_sel1=&lt;0..16&gt;</I></TD>
1315
    <TD CLASS=TABCOLOR2>Sets the first DOUT shift register which should output the row selection signals.</TD>
1316
  </TR>
1317
  <TR>
1318
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_dout_sel2=&lt;0..16&gt;</I></TD>
1319
    <TD CLASS=TABCOLOR2>Sets the second DOUT shift register which should output the row selection signals in a <I>row=16</I> setup.<BR>Set this parameter to 0 if a second DOUT is not required.</TD>
1320
  </TR>
1321
  <TR>
1322
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_dout_r1=&lt;0..16&gt;</I></TD>
1323
    <TD CLASS=TABCOLOR2>Sets the first DOUT shift register of the LED matrix row.</TD>
1324
  </TR>
1325
  <TR>
1326
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_dout_r2=&lt;0..16&gt;</I></TD>
1327
    <TD CLASS=TABCOLOR2>Sets the (optional) second DOUT shift register of the LED matrix row.</TD>
1328
  </TR>
1329
  <TR>
1330
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_dout_g1=&lt;0..16&gt;</I><BR><I>sr_dout_g2=&lt;0..16&gt;</I></TD>
1331
    <TD CLASS=TABCOLOR2>These parameters allow to drive duo-colour or RGB LEDs by using a second set of DOUTs connected to the green LEDs.</TD>
1332
  </TR>
1333
  <TR>
1334
    <TD CLASS=TABCOLOR2 WIDTH=150><I>sr_dout_b1=&lt;0..16&gt;</I><BR><I>sr_dout_b2=&lt;0..16&gt;</I></TD>
1335
    <TD CLASS=TABCOLOR2>These parameters allow to drive RGB LEDs by using a third set of DOUTs connected to the blue LEDs.</TD>
1336
  </TR>
1337
  <TR>
1120 tk 1338
    <TD CLASS=TABCOLOR2 WIDTH=150><I>mirrored_row=&lt;1|0&gt;</I></TD>
1339
    <TD CLASS=TABCOLOR2>The pins of the DOUT rows can be mirrored. This happens only for the shift register value itself. Means: if two DOUT shift registers are assigned to the row, they won't be swapped. If this is desired, just change the <I>sr_dout_r1</I>/<I>sr_dout_r2</I> assignments.
1340
  </TR>
1341
  <TR>
1095 tk 1342
    <TD CLASS=TABCOLOR2 WIDTH=150><I>led_emu_id_offset=&lt;1..4095&gt;</I></TD>
1119 tk 1343
    <TD CLASS=TABCOLOR2>With a value &gt;0, the LED matrix will listen on EVENT_LED events instead of EVENT_LED_MATRIX, starting with the specified ID. A matrix of 8x8 LED can emulate 64 LEDs with individual event assignments this way.<BR>
1344
      In order to avoid conflicts with LEDs which are directly connected to DOUT pins (and which are accessed with LED:1 .. LED:256), it's recommended specify emulated ids outside this range, e.g. <I>led_emu_id_offset=1001</I>.
1095 tk 1345
  </TR>
1148 tk 1346
  <TR>
1347
    <TD CLASS=TABCOLOR2 WIDTH=150><I>lc_meter_port=&lt;USB1..USB4|IN1..IN4&gt;</I></TD>
1348
    <TD CLASS=TABCOLOR2>Special option for the Logic/Mackie Control emulation. It allows to transfer incoming Poly Preasure events (which are used by the protocol to trigger the meters) to LED bars. An usage example can be found in following template (search for "meter"):  <A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftemplates%2Flogictrl.ngc" TARGET="_blank">logictrl.ngc</A>
1349
  </TR>
1095 tk 1350
</TABLE>
1351
 
1120 tk 1352
<P CLASS=DESC>Please note that all assigned shift registers can't be used for other purposes anymore! E.g. if only 4 rows are scanned, and accordingly only 4 pins are used to select the columns, the remaining 4 pins of the shift register can't be used to control 4 LEDs directly!</P>
1095 tk 1353
 
1354
 
1355
<H2> <IMG SRC="images/bullet.gif" ALT=""> LED_MATRIX_PATTERN </H2>
1356
 
1120 tk 1357
<P CLASS=DESC>The LED_MATRIX_PATTERN command is used in conjunction with LED Rings to configure the output based on an incoming value for EVENT_MATRIX_DOUT elements with the <I>led_matrix_pattern</I> parameter. Optionally the pattern can also be selected by a EVENT_ENC element if no EVENT_MATRIX_DOUT event has been defined.
1095 tk 1358
 
1359
<P CLASS=DESC>Each pattern-set consists of 17 entries. 16 entries are scaled over the specified min/max range of incoming value. The 17th entry is called 'M' and is used when the middle of the value range has been reached.
1360
 
1361
Examples for a typical patterns for a LED Ring with 11 LEDs, and a 12th "center" LED (see also <A HREF="http://www.ucapps.de/mbhp/mbhp_doutx4_ledrings.pdf" TARGET="_blank">this schematic</A>):
1113 tk 1362
<TT><PRE style="margin-left:50px; font-size:8pt">
1097 tk 1363
# LED_MATRIX_PATTERNs
1364
LED_MATRIX_PATTERN n= 1  pos= 0  pattern=1000000000000000
1365
LED_MATRIX_PATTERN n= 1  pos= 1  pattern=1100000000000000
1366
LED_MATRIX_PATTERN n= 1  pos= 2  pattern=1100000000000000
1367
LED_MATRIX_PATTERN n= 1  pos= 3  pattern=1110000000000000
1368
LED_MATRIX_PATTERN n= 1  pos= 4  pattern=1110000000000000
1369
LED_MATRIX_PATTERN n= 1  pos= 5  pattern=1111000000000000
1370
LED_MATRIX_PATTERN n= 1  pos= 6  pattern=1111000000000000
1371
LED_MATRIX_PATTERN n= 1  pos= 7  pattern=1111100000000000
1372
LED_MATRIX_PATTERN n= 1  pos= M  pattern=1111110000010000
1373
LED_MATRIX_PATTERN n= 1  pos= 8  pattern=1111111000000000
1374
LED_MATRIX_PATTERN n= 1  pos= 9  pattern=1111111100000000
1375
LED_MATRIX_PATTERN n= 1  pos=10  pattern=1111111100000000
1376
LED_MATRIX_PATTERN n= 1  pos=11  pattern=1111111110000000
1377
LED_MATRIX_PATTERN n= 1  pos=12  pattern=1111111110000000
1378
LED_MATRIX_PATTERN n= 1  pos=13  pattern=1111111111000000
1379
LED_MATRIX_PATTERN n= 1  pos=14  pattern=1111111111000000
1380
LED_MATRIX_PATTERN n= 1  pos=15  pattern=1111111111100000
1095 tk 1381
 
1097 tk 1382
LED_MATRIX_PATTERN n= 2  pos= 0  pattern=1111110000000000
1383
LED_MATRIX_PATTERN n= 2  pos= 1  pattern=0111110000000000
1384
LED_MATRIX_PATTERN n= 2  pos= 2  pattern=0111110000000000
1385
LED_MATRIX_PATTERN n= 2  pos= 3  pattern=0011110000000000
1386
LED_MATRIX_PATTERN n= 2  pos= 4  pattern=0001110000000000
1387
LED_MATRIX_PATTERN n= 2  pos= 5  pattern=0001110000000000
1388
LED_MATRIX_PATTERN n= 2  pos= 6  pattern=0000110000000000
1389
LED_MATRIX_PATTERN n= 2  pos= 7  pattern=0000010000000000
1390
LED_MATRIX_PATTERN n= 2  pos= M  pattern=0000111000010000
1391
LED_MATRIX_PATTERN n= 2  pos= 8  pattern=0000010000000000
1392
LED_MATRIX_PATTERN n= 2  pos= 9  pattern=0000011000000000
1393
LED_MATRIX_PATTERN n= 2  pos=10  pattern=0000011000000000
1394
LED_MATRIX_PATTERN n= 2  pos=11  pattern=0000011100000000
1395
LED_MATRIX_PATTERN n= 2  pos=12  pattern=0000011110000000
1396
LED_MATRIX_PATTERN n= 2  pos=13  pattern=0000011110000000
1397
LED_MATRIX_PATTERN n= 2  pos=14  pattern=0000011111000000
1095 tk 1398
LED_MATRIX_PATTERN n= 2  pos=15  pattern=0000011111100000
1399
 
1097 tk 1400
LED_MATRIX_PATTERN n= 3  pos= 0  pattern=1000000000000000
1401
LED_MATRIX_PATTERN n= 3  pos= 1  pattern=0100000000000000
1402
LED_MATRIX_PATTERN n= 3  pos= 2  pattern=0100000000000000
1403
LED_MATRIX_PATTERN n= 3  pos= 3  pattern=0010000000000000
1404
LED_MATRIX_PATTERN n= 3  pos= 4  pattern=0010000000000000
1405
LED_MATRIX_PATTERN n= 3  pos= 5  pattern=0001000000000000
1406
LED_MATRIX_PATTERN n= 3  pos= 6  pattern=0000100000000000
1407
LED_MATRIX_PATTERN n= 3  pos= 7  pattern=0000010000000000
1408
LED_MATRIX_PATTERN n= 3  pos= M  pattern=0000111000010000
1409
LED_MATRIX_PATTERN n= 3  pos= 8  pattern=0000010000000000
1410
LED_MATRIX_PATTERN n= 3  pos= 9  pattern=0000001000000000
1411
LED_MATRIX_PATTERN n= 3  pos=10  pattern=0000000100000000
1412
LED_MATRIX_PATTERN n= 3  pos=11  pattern=0000000100000000
1413
LED_MATRIX_PATTERN n= 3  pos=12  pattern=0000000010000000
1414
LED_MATRIX_PATTERN n= 3  pos=13  pattern=0000000001000000
1415
LED_MATRIX_PATTERN n= 3  pos=14  pattern=0000000001000000
1416
LED_MATRIX_PATTERN n= 3  pos=15  pattern=0000000000100000
1095 tk 1417
</PRE></TT>
1418
 
1419
 
1420
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1421
  <TR>
1422
    <TH WIDTH=150>LED_MATRIX_PATTERN Parameter</TD>
1423
    <TH>Description</TD>
1424
  </TR>
1425
  <TR>
1426
    <TD CLASS=TABCOLOR2 WIDTH=150><I>n=&lt;1..4&gt;</I></TD>
1200 tk 1427
    <TD CLASS=TABCOLOR2>Specifies the pattern-set number; it can range from 1..4</TD>
1095 tk 1428
  </TR>
1429
  <TR>
1430
    <TD CLASS=TABCOLOR2 WIDTH=150><I>pos=&lt;0..15|M&gt;</I></TD>
1431
    <TD CLASS=TABCOLOR2>Specifies the position for the following pattern (0..15, or M for middle position)
1432
  <TR>
1433
  <TR>
1434
    <TD CLASS=TABCOLOR2 WIDTH=150><I>pattern=&lt;16-bit-binary&gt;</I></TD>
1435
    <TD CLASS=TABCOLOR2>Sets the pattern for the given position. It consists of 16 binary digits (0 or 1 for LED off/on)
1436
  <TR>
1437
</TABLE>
1438
 
1439
 
1200 tk 1440
<H2> <IMG SRC="images/bullet.gif" ALT=""> SRIO </H2>
1441
 
1442
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1443
  <TR>
1444
    <TH WIDTH=150>SRIO Command</TD>
1445
    <TH>Description</TD>
1446
  </TR>
1447
  <TR>
1448
    <TD CLASS=TABCOLOR2 WIDTH=150><I>num_sr=&lt;1..32&gt;</I></TD>
1449
    <TD CLASS=TABCOLOR2>By default 32 DIN and DOUT shift registers are scanned, which result into an update rate of ca. 420 uS on a STM32F4 based core.<BR>
1450
    With (for example) <I>SRIO sr_num=8</I> only up to 8 DIN and 8 DOUT SRs will be scanned anymore, but the update rate is reduced to ca. 110..120 uS (a little bit more than a quarter due to SR handling overhead).</TD>
1451
  </TR>
1452
  <TR>
1228 tk 1453
    <TD CLASS=TABCOLOR2 WIDTH=150><I>debounce_cycles=&lt;0..65535&gt;</I></TD>
1200 tk 1454
    <TD CLASS=TABCOLOR2>This command allows to enable a debouncing mechanism for digital inputs (buttons). The number specifies the dead time in SRIO cycles at which button events will be rejected.<BR>
1455
The time of a SRIO cycle depends on the num_sr configuration, typically it's around 420 uS for 32 SRs, which means that with debounce_cycles=20 the debouncing dead time is 8.4 mS.</TD>
1456
  </TR>
1457
</TABLE>
1458
 
1459
 
1181 tk 1460
<H2> <IMG SRC="images/bullet.gif" ALT=""> DIO </H2>
1461
 
1462
<P CLASS=DESC>The DIO command has been added for <A HREF="mbhp_core_stm32f4.html">MBHP_CORE_STM32F4</A> users who want to start with a very simple MIDIbox NG setup and only need a small number of digital inputs and outputs (e.g. for buttons, encoders and/or LEDs), and don't want to connect serial shift registers (MBHP_DINX4, MBHP_DOUTX4, MBHP_DIO_MATRIX). In this case, J10A and J10B can be used for up to 16 digital pins. Each J10 port can overrule a DIN or DOUT shift register.
1463
 
1464
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1465
  <TR>
1466
    <TH WIDTH=150>DIO Parameter</TD>
1467
    <TH>Description</TD>
1468
  </TR>
1469
  <TR>
1470
    <TD CLASS=TABCOLOR2 WIDTH=150><I>port=&lt;port-name&gt;</I></TD>
1471
    <TD CLASS=TABCOLOR2>Specifies the IO port which should be configured:
1472
<UL CLASS=CL>
1473
  <LI><B>STM32F4:</B> <I>port=&lt;J10A or J10B&gt;</I><BR>
1474
  <LI><B>LPC17:</B> <I>port=&lt;J10 or J28&gt;
1475
</UL></TD>
1476
  </TR>
1477
  <TR>
1478
    <TD CLASS=TABCOLOR2 WIDTH=150><I>emu_din_sr=&lt;1..32&gt;</I></TD>
1479
    <TD CLASS=TABCOLOR2>The selected port will overrule a DIN shift register position, so that 8 inputs are available. Note that internal pull-up devices will be enabled, which means that buttons could be connected directly between J10 pins and ground.<BR>
1480
Note that you can't specify emu_dout_sr in addition for the same port. The entire port is either configured for inputs our outputs!</TD>
1481
  </TR>
1482
  <TR>
1483
    <TD CLASS=TABCOLOR2 WIDTH=150><I>emu_dout_sr=&lt;1..32&gt;</I></TD>
1484
    <TD CLASS=TABCOLOR2>The selected port will overrule a DOUT shift register position, so that 8 outputs at 3.3V are available.<BR>
1485
Note that you can't specify emu_din_sr in addition for the same port. The entire port is either configured for inputs our outputs!</TD>
1486
  </TR>
1487
</TABLE>
1488
 
1489
Configuration examples:
1490
<UL CLASS=CL>
1491
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fdiocfg_1.ngc" TARGET="_blank">diocfg_1.ngc</A>: use J10A and J10B for up to 16 buttons
1492
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fdiocfg_2.ngc" TARGET="_blank">diocfg_2.ngc</A>: use J10A for 8 buttons, and J10B for 8 LEDs
1493
</UL>
1494
 
1113 tk 1495
<H2> <IMG SRC="images/bullet.gif" ALT=""> KEYBOARD </H2>
1496
 
1497
<P CLASS=DESC>The KEYBOARD command configures (hardware) keyboards. The same driver like for <A HREF="midibox_kb.html">MIDIbox KB</A> is used, but the scan frequency is slower (10 times!). Each row is scanned in 320 uS (instead of 32 uS). This has to be considered in the velocity delay configuration: delay_slowest should be 100 (instead of 1000), and delay_fastest should be 5 (instead of 50)</P>
1498
 
1499
<P CLASS=DESC>Here a typical keyboard configuration for a Fatar DF type with 61 keys:
1500
<TT><PRE style="margin-left:10px; font-size:8pt; font-size:8pt">
1501
KEYBOARD n=1   rows=8  dout_sr1=1  dout_sr2=2  din_sr1=1  din_sr2=2 \
1502
               din_inverted=0  break_inverted=0  din_key_offset=32 \
1162 tk 1503
               make_debounced=0 \
1113 tk 1504
               scan_velocity=1  scan_optimized=0  note_offset=28 \
1117 tk 1505
               delay_fastest=5  delay_fastest_black_keys=0  delay_slowest=100
1506
 
1507
EVENT_KB id=1  type=NoteOn chn=1 key=any use_key_number=1 range=0:127  lcd_pos=1:1:1 label="Note %n"
1113 tk 1508
</PRE></TT>
1509
 
1117 tk 1510
Configuration examples:
1511
<UL CLASS=CL>
1512
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_1.ngc" TARGET="_blank">kb_1.ngc</A>: simple configuration
1513
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_2.ngc" TARGET="_blank">kb_2.ngc</A>: usage of a velocity map
1514
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_3.ngc" TARGET="_blank">kb_3.ngc</A>: splitting keyboard into two zones
1515
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_4.ngc" TARGET="_blank">kb_4.ngc</A>: forwarding to CV outputs
1186 tk 1516
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_5.ngc" TARGET="_blank">kb_5.ngc</A>: using the KbBreakIsMake option
1231 tk 1517
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_6.ngc" TARGET="_blank">kb_6.ngc</A>/<A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fkb_6.ngr" TARGET="_blank">kb_6.ngr</A>: selectable transpose and velocity map
1117 tk 1518
</UL>
1113 tk 1519
 
1117 tk 1520
 
1113 tk 1521
<P CLASS=DESC>Please note, that the configuration commands are identical "set kb..." as documented at the <A HREF="http://www.ucapps.de/midibox_kb.html">MIDIbox KB page</A>. This means, that the keyboard parameters can also be changed during runtime to determine the best matching values, before they are written into the .NGC file.</P>
1522
 
1200 tk 1523
<P CLASS=DESC>Optionally the delay_slowest values can be calibrated for each individual key of the keyboard. The values are stored in the .NGK file, and can be edited with the MIOS Filebrowser.
1524
 
1095 tk 1525
<H2> <IMG SRC="images/bullet.gif" ALT=""> AIN </H2>
1526
 
1527
<P CLASS=DESC>The AIN command allows to enable/disable core based analog inputs with the <I>enable_mask</I> parameter. It consists of 6 binary digits which stand for J5A.A0..J5B.A5
1528
 
1529
<P CLASS=DESC>Example:
1113 tk 1530
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 1531
# AIN hardware
1532
AIN enable_mask=110000
1533
</PRE></TT>
1534
will enable the J5A.A0 and J5A.A1 inputs.
1535
 
1117 tk 1536
<P CLASS=DESC>In addition, it's possible to specify the physical min/max limits for each individual input pin with this command, example:
1537
<TT><PRE style="margin-left:50px; font-size:8pt">
1538
AIN pinrange=1:18:4065
1539
AIN pinrange=2:18:4065
1540
</PRE></TT>
1541
 
1542
Syntax: <I>pinrange=&lt;pin&gt;:&lt;min&gt;:&lt;max&gt;[&lt;:spread_center&gt;]</I><BR>
1543
 
1544
<P CLASS=DESC>Purpose: under certain circumstances, a connected potentiometer doesn't output 0V on the min position, and/or 3.3V on the max position due to physical limitations. The <I>pinrange</I> parameter allows to overcome this by scaling the received conversion values to the full 0..4095 range.<BR>
1545
In order to find out the value range of a pot, please activate the debug mode by entering <B>set debug on</B> in the MIOS Terminal. This mode will output the original conversion values whenever the pot is moved. The minimum/maximum displayed values are the ones which have to be specified with the <I>pinrange</I> parameter.
1546
 
1547
<P CLASS=DESC>If a Pitchwheel (a pot which snaps to the center position) is connected, you may notice that the middle value won't always be reached due to mechanical reasons.<BR>
1548
In order to solve this issue, the <I>:spread_center</I> option can be used:
1549
<TT><PRE style="margin-left:50px; font-size:8pt">
1550
AIN pinrange=1:18:4065:spread_center
1551
</PRE></TT>
1552
It spreads the deadband around the center position by +/- 40 (in 12bit resolution) to ensure a reliable middle value when the Pitchwheel snaps back.</P>
1553
 
1095 tk 1554
<P CLASS=DESC><B>Please note:</B> unconnected analog inputs which haven't been disabled will generate random MIDI event values! It's strongly recommended to disable unused pins in the <I>enable_mask</I>, or to connect these pins to ground!
1555
 
1556
 
1557
<H2> <IMG SRC="images/bullet.gif" ALT=""> AINSER </H2>
1558
 
1130 tk 1559
<P CLASS=DESC>The AINSER command configures the <A HREF="mbhp_ainser64.html">MBHP_AINSER64</A> resp. <A HREF="mbhp_ainser64.html">MBHP_AINSER8</A> module:
1095 tk 1560
 
1561
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1562
  <TR>
1563
    <TH WIDTH=150>AINSER Parameter</TD>
1564
    <TH>Description</TD>
1565
  </TR>
1566
  <TR>
1567
    <TD CLASS=TABCOLOR2 WIDTH=150><I>n=&lt;1..2&gt;</I></TD>
1568
    <TD CLASS=TABCOLOR2>Specifies the AINSER module which should be configured (1 or 2)</TD>
1569
  </TR>
1570
  <TR>
1571
    <TD CLASS=TABCOLOR2 WIDTH=150><I>enabled=&lt;0|1&gt;</I></TD>
1572
    <TD CLASS=TABCOLOR2>Enables the module with 1, disables the module with 0 so that it doesn't generate EVENT_AINSER events.</TD>
1573
  </TR>
1574
  <TR>
1130 tk 1575
    <TD CLASS=TABCOLOR2 WIDTH=150><I>muxed=&lt;0|1&gt;</I></TD>
1576
    <TD CLASS=TABCOLOR2>Enables the multiplexers of a AINSER64 module with muxed=1 (default).<BR>
1577
                        Use muxed=0 for the AINSER8 module.<BR>
1578
                        Please note that regardless of the muxed setting, the pin number (and accordingly hw_id) of the second module always starts at offset 65.</TD>
1579
  </TR>
1580
  <TR>
1095 tk 1581
    <TD CLASS=TABCOLOR2 WIDTH=150><I>cs=&lt;0|1&gt;</I></TD>
1101 tk 1582
    <TD CLASS=TABCOLOR2>Specifies the "chip select" line which is jumpered with J4 of the module. Each module has to be configured for a dedicated chip select line!<BR><I>cs=0</I> selects CS1, <I>cs=1</I> selects CS2 (sorry for the confusion...)</TD>
1095 tk 1583
  </TR>
1101 tk 1584
  <TR>
1585
    <TD CLASS=TABCOLOR2 WIDTH=150><I>resolution=&lt;4..12bit&gt;</I></TD>
1586
    <TD CLASS=TABCOLOR2>Specifies the resolution at which the analog inputs should be scanned.<BR>
1587
    By default the pins are scanned at 7bit resolution. Up to 12bit is supported, but in this case there won't be any (deadband based) jitter rejection.<BR>
1588
    So, the recommended values are:
1589
      <UL CLASS=CL>
1590
        <LI><I>7bit</I> for sending common MIDI events
1591
        <LI><I>11bit</I> for sending high-resolution MIDI events
1592
      </UL>
1593
      The 11bit setting requires a clean pot wiring! Ground and +5V should be wired star-like, and the middle pins of the pots should be wired with shielded cables.<BR>
1594
      If you should still notice jittering values with this resolution, try lower options such as 10bit or 9bit first - maybe this already satisies your needs before you've to spend a lot of effort into hardware improvements.<BR>
1595
      Please note that the resolution setting is independent from the resolution sent by a MIDI event. This one will be scaled automatically to the target resolution depending on the specified range!
1596
  </TR>
1597
  <TR>
1598
    <TD CLASS=TABCOLOR2 WIDTH=150><I>num_pins=&lt;1..64&gt;</I></TD>
1599
    <TD CLASS=TABCOLOR2>Specifies the number of scanned analog input pins.<BR>
1600
      By default all 64 pins of the MBHP_AINSER module will be scanned. It makes sense to specify a lower number of the upper analog inputs are not connected (even not to ground) to avoid the generation of random values due to the floating inputs.</TD>
1601
  </TR>
1117 tk 1602
  <TR>
1603
    <TD CLASS=TABCOLOR2 WIDTH=150><I>pinrange=&lt;pin&gt;:&lt;min&gt;:&lt;max&gt;[&lt;:spread_center&gt;]</I></TD>
1604
    <TD CLASS=TABCOLOR2>Specifies the physical min/max limits for each individual input pin with this command, example:
1605
<TT><PRE style="margin-left:50px; font-size:8pt">
1606
AINSER pinrange=1:18:4065
1607
AINSER pinrange=2:18:4065
1608
</PRE></TT>
1609
    Purpose: under certain circumstances, a connected potentiometer doesn't output 0V on the min position, and/or 3.3V on the max position due to physical limitations. The <I>pinrange</I> parameter allows to overcome this by scaling the received conversion values to the full 0..4095 range.<BR>
1610
In order to find out the value range of a pot, please activate the debug mode by entering <B>set debug on</B> in the MIOS Terminal. This mode will output the original conversion values whenever the pot is moved. The minimum/maximum displayed values are the ones which have to be specified with the <I>pinrange</I> parameter.<BR>
1611
 
1612
If a Pitchwheel (a pot which snaps to the center position) is connected, you may notice that the middle value won't always be reached due to mechanical reasons.<BR>
1613
In order to solve this issue, the <I>:spread_center</I> option can be used:
1614
<TT><PRE style="margin-left:50px; font-size:8pt">
1615
AINSER pinrange=1:18:4065:spread_center
1616
</PRE></TT>
1617
It spreads the deadband around the center position by +/- 40 (in 12bit resolution) to ensure a reliable middle value when the Pitchwheel snaps back.
1618
  </TR>
1095 tk 1619
</TABLE>
1620
 
1621
 
1622
 
1623
<H2> <IMG SRC="images/bullet.gif" ALT=""> MF </H2>
1624
 
1625
<P CLASS=DESC>The MF command configures the <A HREF="mbhp_mf_ng.html">MBHP_MF_NG</A> module. The module has to be configured for "Motormix" emulation, because this protocol allows to send and receive fader movements over dedicated MIDI channels with 14bit resolution. It's allowed to connect multiple modules in a MIDI chain, in such a case the MIDI merger has to be configured as "MIDIbox Link Endpoint" for the last module, and as "MIDIbox Link Forwarding Point" for the remaining modules in the MBHP_MF_NG configuration tool which is part of <A HREF="mios_studio.html">MIOS Studio</A>:
1626
<CENTER><IMG SRC="mios_studio/mios_studio_mbhp_mf_ng_tool.png" width=702 height=680></CENTER></P>
1627
 
1628
<P CLASS=DESC>List of parameters:
1629
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1630
  <TR>
1631
    <TH WIDTH=150>MF Parameter</TD>
1632
    <TH>Description</TD>
1633
  </TR>
1634
  <TR>
1635
    <TD CLASS=TABCOLOR2 WIDTH=150><I>n=&lt;1..4&gt;</I></TD>
1636
    <TD CLASS=TABCOLOR2>Specifies the MF module which should be configured (1..4)</TD>
1637
  </TR>
1638
  <TR>
1639
    <TD CLASS=TABCOLOR2 WIDTH=150><I>enabled=&lt;0|1&gt;</I></TD>
1640
    <TD CLASS=TABCOLOR2>Enables the module with 1, disables the module with 0 so that it doesn't generate EVENT_MF events.</TD>
1641
  </TR>
1642
  <TR>
1643
    <TD CLASS=TABCOLOR2 WIDTH=150><I>midi_in_port=&lt;IN1..IN4&gt;</I></TD>
1644
    <TD CLASS=TABCOLOR2>Sets the MIDI IN port to which the module is connected (IN1..IN4)<BR>Please ensure that this port is not used by the <I>MIDI_ROUTER</LI>.</TD>
1645
  </TR>
1646
  <TR>
1647
    <TD CLASS=TABCOLOR2 WIDTH=150><I>midi_out_port=&lt;OUT1..OUT4&gt;</I></TD>
1648
    <TD CLASS=TABCOLOR2>Sets the MIDI OUT port to which the module is connected (OUT1..OUT4)<BR>Please ensure that this port is not used by the <I>MIDI_ROUTER</LI>.</TD>
1649
  </TR>
1650
  <TR>
1651
    <TD CLASS=TABCOLOR2 WIDTH=150><I>config_port=&lt;USB1..USB4&gt;</I></TD>
1652
    <TD CLASS=TABCOLOR2>Sets the USB port over which the MBHP_MF_NG module should be configured (with the MIOS Studio based tool described above). It's recommended not to use USB1 for SysEx accesses (including firmware updates), since MIOS32 listens to the same port for firmware updates if it's assigned to the same SysEx Device ID. Any other USB port (USB2..USB4) will work without such potential collisions.</TD>
1653
  </TR>
1654
  <TR>
1655
    <TD CLASS=TABCOLOR2 WIDTH=150><I>chn=&lt;1..16&gt;</I></TD>
1656
    <TD CLASS=TABCOLOR2>Sets the MIDI channel over which the MBHP_MF_NG module will send and receive fader movements</TD>
1657
  </TR>
1658
  <TR>
1659
    <TD CLASS=TABCOLOR2 WIDTH=150><I>ts_first_button_id=&lt;0..4095&gt;</I></TD>
1660
    <TD CLASS=TABCOLOR2>With a value &gt;0, touch sensor events generated by the MBHP_MF_NG module will trigger EVENT_BUTTON elements with the specified ID upwards. This allows to convert these events into any over MIDI output (and/or to display them on the LCD)</TD>
1661
  </TR>
1662
</TABLE>
1663
 
1101 tk 1664
<H2> <IMG SRC="images/bullet.gif" ALT=""> AOUT </H2>
1665
 
1666
<P CLASS=DESC>This command configures the AOUT module:
1667
 
1668
<P CLASS=DESC>List of parameters:
1669
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1670
  <TR>
1671
    <TH WIDTH=150>AOUT Parameter</TD>
1672
    <TH>Description</TD>
1673
  </TR>
1674
  <TR>
1675
    <TD CLASS=TABCOLOR2 WIDTH=150><I>type=&lt;aout-type&gt;</I></TD>
1676
    <TD CLASS=TABCOLOR2>Specifies the AOUT module which is connected to port J19 of the <A HREF="mbhp_core_lpc17.html">MBHP_CORE_LPC17</A> module:
1677
      <UL CLASS=CL>
1678
        <LI><I>type=none</I>: disables the AOUT modules -&gt; no CV channels available!
1679
        <LI><I>type=AOUT</I>: selects the <A HREF="mbhp_aout.html">MBHP_AOUT</A> module
1680
        <LI><I>type=AOUT_LC</I>: selects the <A HREF="mbhp_aout_lc.html">MBHP_AOUT_LC</A> module
1681
        <LI><I>type=AOUT_NG</I>: selects the <A HREF="http://www.midibox.org/dokuwiki/aout_ng" TARGET="_blank">MBHP_AOUT_NG</A> module
1682
      </UL>
1683
  </TR>
1684
  <TR>
1685
    <TD CLASS=TABCOLOR2 WIDTH=150><I>cs=&lt;0|1&gt;</I></TD>
1686
    <TD CLASS=TABCOLOR2>Specifies the "chip select" line which to which the AOUT module is connected:
1687
      <UL CLASS=CL>
1688
        <LI><I>cs=0</I>: CS line connected to J19.RC1
1689
        <LI><I>cs=1</I>: CS line connected to J19.RC2
1690
      </UL>
1691
      Please take care that the CS line doesn't conflict with the AINSER configuration, which uses the same serial port!
1692
  </TR>
1693
  <TR>
1694
    <TD CLASS=TABCOLOR2 WIDTH=150><I>num_channels=&lt;1..32&gt;</I></TD>
1695
    <TD CLASS=TABCOLOR2>Specifies the number of channels which should be controlled via EVENT_CV events. The channel number corresponds with the EVENT id
1696
  </TR>
1697
</TABLE>
1698
 
1699
<P CLASS=INFO>Configuration example:
1113 tk 1700
<TT><PRE style="margin-left:50px; font-size:8pt">
1101 tk 1701
# initialize the AOUT module
1702
AOUT  type=AOUT_NG  cs=0  num_channels=8
1703
</PRE></TT>
1704
 
1705
<P CLASS=INFO>Complete examples:
1706
<UL CLASS=CL>
1707
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fcv.ngc" TARGET="_blank">Simple configuration</A>
1708
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fcvhires.ngc" TARGET="_blank">High-Res configuration</A>
1709
  <LI><A HREF="http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Ftests%2Fcvnotes.ngc" TARGET="_blank">Handling Note, Gate and Velocity</A>
1710
</UL>
1711
 
1712
 
1107 tk 1713
<H2> <IMG SRC="images/bullet.gif" ALT=""> SCS </H2>
1714
 
1715
<P CLASS=DESC>SCS stands for "Standard Control Surface" which is explained in the <A HREF="midibox_ng_manual_scs.html">SCS chapter</A>.
1716
 
1717
<P CLASS=DESC>The SCS command allows to define the emulated button and encoder IDs which are used when the SCS is in the main page.
1718
 
1719
<P CLASS=DESC>List of parameters:
1720
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1721
  <TR>
1722
    <TH WIDTH=200>AOUT Parameter</TD>
1723
    <TH>Description</TD>
1724
  </TR>
1725
  <TR>
1726
    <TD CLASS=TABCOLOR2 WIDTH=150><I>soft1_button_emu_id=&lt;0..4095&gt;</I><BR>
1727
                                  <I>soft2_button_emu_id=&lt;0..4095&gt;</I><BR>
1728
                                  <I>soft3_button_emu_id=&lt;0..4095&gt;</I><BR>
1729
                                  <I>soft4_button_emu_id=&lt;0..4095&gt;</I><BR>
1117 tk 1730
                                  <I>soft5_button_emu_id=&lt;0..4095&gt;</I><BR>
1731
                                  <I>soft6_button_emu_id=&lt;0..4095&gt;</I><BR>
1732
                                  <I>soft7_button_emu_id=&lt;0..4095&gt;</I><BR>
1733
                                  <I>soft8_button_emu_id=&lt;0..4095&gt;</I><BR>
1107 tk 1734
                                  <I>shift_button_emu_id=&lt;0..4095&gt;</I></TD>
1735
    <TD CLASS=TABCOLOR2>A SCS button will emulate the specified BUTTON ID if the SCS is in the main page.<BR>If the id is set to 0, the button function won't have any effect!</TD>
1736
  </TR>
1737
  <TR>
1117 tk 1738
    <TD CLASS=TABCOLOR2 WIDTH=150><I>enc_emu_id=&lt;0..4095&gt;</I></TD>
1107 tk 1739
    <TD CLASS=TABCOLOR2>A SCS encoder will emulate the specified ENC ID if the SCS is in the main page.<BR>If the id is set to 0, the encoder function won't have any effect!</TD>
1740
  </TR>
1117 tk 1741
  <TR>
1742
    <TD CLASS=TABCOLOR2 WIDTH=150><I>lcd_pos=&lt;lcd&gt;:&lt;X&gt;:&lt;Y&gt;</I></TD>
1743
    <TD CLASS=TABCOLOR2>Specifies the LCD position at which the SCS menu page will be print when the MENU button is pressed.
1744
                        The SCS allocates two lines on the LCD.<BR>
1745
                        The width of the SCS page depends on the number of items: each item consumes 5 characters.<BR>
1746
                        With the default value num_items=4 the page spans over a 2x20 screen.</TD>
1747
  </TR>
1748
  <TR>
1749
    <TD CLASS=TABCOLOR2 WIDTH=150><I>num_items=&lt;1..8&gt;</I></TD>
1750
    <TD CLASS=TABCOLOR2>Specifies the number of items which are handled in a SCS page. This also defines the screen size which is alloctated by the SCS when the menu system is active (MENU button pressed).<BR>
1751
                        Meaningful values:
1752
                        <UL CLASS=CL>
1753
                          <LI><I>num_items=3</I>: for a 2x16 LCD (15 characters allocated)
1754
                          <LI><I>num_items=4</I>: for a 2x20 LCD (default and recommended)
1755
                          <LI><I>num_items=8</I>: for a 2x40 LCD.<BR>Potential problem with this configuration: only 4 soft buttons can be connected to J10 of the core module. The 4 remaining soft buttons (to select and change item 5..8) have to be connected to a MBHP_DIN module, and have to generate following meta events:
1756
<TT><PRE style="margin-left:20px; font-size:8pt">
1757
# define 4 addtional SCS soft buttons which can't be connected to J10:
1758
EVENT_BUTTON id=  5  type=Meta   meta=ScsSoft5 range=0:1
1759
EVENT_BUTTON id=  6  type=Meta   meta=ScsSoft6 range=0:1
1760
EVENT_BUTTON id=  7  type=Meta   meta=ScsSoft7 range=0:1
1761
EVENT_BUTTON id=  8  type=Meta   meta=ScsSoft8 range=0:1
1762
</PRE></TT>
1763
                        </UL>
1764
    </TD>
1765
  </TR>
1107 tk 1766
</TABLE>
1767
 
1768
<P CLASS=INFO>Configuration example:
1113 tk 1769
<TT><PRE style="margin-left:50px; font-size:8pt; font-size:8pt">
1107 tk 1770
# the SCS should emulate button/enc functions in main page
1771
SCS soft1_button_emu_id=2000 \
1772
    soft2_button_emu_id=2001 \
1773
    soft3_button_emu_id=2002 \
1774
    soft4_button_emu_id=2003 \
1775
    shift_button_emu_id=2004 \
1776
    enc_emu_id=2000
1777
 
1778
 
1779
# Controlled from SCS buttons at J10 in main page
1780
EVENT_BUTTON id=2000  type=Meta   meta=SetBank   button_mode=OnOnly range=1:1  lcd_pos=1:17:1 label="Bnk%q"
1781
EVENT_BUTTON id=2001  type=Meta   meta=SetBank   button_mode=OnOnly range=2:2  lcd_pos=1:17:1 label="Bnk%q"
1782
EVENT_BUTTON id=2002  type=Meta   meta=SetBank   button_mode=OnOnly range=3:3  lcd_pos=1:17:1 label="Bnk%q"
1783
EVENT_BUTTON id=2003  type=Meta   meta=SetBank   button_mode=OnOnly range=4:4  lcd_pos=1:17:1 label="Bnk%q"
1784
EVENT_BUTTON id=2004  type=Meta   meta=EncFast:4 button_mode=OnOff  range=0:2
1785
 
1786
# the SCS encoder at J10 just increments/decrements the bank
1787
# redundant function - could be changed in future
1788
EVENT_ENC    id=2000  type=Meta   meta=SetBank   range=1:4
1789
</PRE></TT>
1790
 
1791
 
1095 tk 1792
<H2> <IMG SRC="images/bullet.gif" ALT=""> ROUTER </H2>
1793
 
1794
<P CLASS=DESC>The integrated MIDI router consists of 16 "nodes". Each node can be connected to an individual source and destination port. A node is activated by selecting a source MIDI channel != "--", e.g. 1..16 or All (for all channels). The node will forward a MIDI event to the destination port. Either to the original channel ("All"), or to a changed channel (1..16).
1795
 
1796
<P CLASS=DESC>List of parameters:
1797
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1798
  <TR>
1799
    <TH WIDTH=150>ROUTER Parameter</TD>
1800
    <TH>Description</TD>
1801
  </TR>
1802
  <TR>
1803
    <TD CLASS=TABCOLOR2 WIDTH=150><I>n=&lt;1..16&gt;</I></TD>
1804
    <TD CLASS=TABCOLOR2>Specifies the ROUTER node which should be configured (1..16)</TD>
1805
  </TR>
1806
  <TR>
1807
    <TD CLASS=TABCOLOR2 WIDTH=150><I>src_port=&lt;port&gt;</I></TD>
1808
    <TD CLASS=TABCOLOR2>Specifies the source port from which MIDI events should be forwarded:
1809
      <UL CLASS=CL>
1810
        <LI><I>USB1..USB4</I>: for USB ports
1811
        <LI><I>IN1..IN4</I>: for MIDI ports
1812
        <LI><I>OSC1..OSC4</I>: for Ethernet based OSC ports
1813
      </UL>
1814
    </TD>
1815
  </TR>
1816
  <TR>
1817
    <TD CLASS=TABCOLOR2 WIDTH=150><I>src_chn=&lt;0..17&gt;</I></TD>
1818
    <TD CLASS=TABCOLOR2>Allows to select a dedicated channel which should be forwarded:
1819
      <UL CLASS=CL>
1820
        <LI><I>0 or Off</I>: no channel will be forwarded (node disabled)
1821
        <LI><I>1..16</I>: only the specified MIDI channel will be forwarded, all others will be filtered
1822
        <LI><I>17 or All</I>: all MIDI channels will be forwarded
1823
      </UL>
1824
    </TD>
1825
  </TR>
1826
  <TR>
1827
    <TD CLASS=TABCOLOR2 WIDTH=150><I>dst_port=&lt;port&gt;</I></TD>
1828
    <TD CLASS=TABCOLOR2>Specifies the destination port to which MIDI events should be forwarded:
1829
      <UL CLASS=CL>
1830
        <LI><I>USB1..USB4</I>: for USB ports
1831
        <LI><I>OUT1..OUT4</I>: for MIDI ports
1832
        <LI><I>OSC1..OSC4</I>: for Ethernet based OSC ports
1833
      </UL>
1834
    </TD>
1835
  </TR>
1836
  <TR>
1837
    <TD CLASS=TABCOLOR2 WIDTH=150><I>dst_chn=&lt;0..17&gt;</I></TD>
1838
    <TD CLASS=TABCOLOR2>Allows to convert the incoming MIDI channel:
1839
      <UL CLASS=CL>
1840
        <LI><I>0 or Off</I>: no channel will be forwarded (node disabled)
1841
        <LI><I>1..16</I>: the incoming MIDI channel(s) will be changed to the specified channel
1842
        <LI><I>17 or All</I>: no conversion will take place
1843
      </UL>
1844
    </TD>
1845
  </TR>
1846
</TABLE>
1847
 
1097 tk 1848
<P CLASS=DESC><B>Please note:</B> the MIDI router can also be configured during runtime in the MIOS Terminal with the "set router" command. "router" will output an oversight over the complete configuration.
1095 tk 1849
 
1850
 
1851
<H2> <IMG SRC="images/bullet.gif" ALT=""> ETH </H2>
1852
 
1853
<P CLASS=DESC>The ETH command allows to configure the ethernet interface of the MBHP_CORE_LPC17 module:
1854
 
1855
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1856
  <TR>
1857
    <TH WIDTH=150>ETH Command</TD>
1858
    <TH>Description</TD>
1859
  </TR>
1860
  <TR>
1861
    <TD CLASS=TABCOLOR2 WIDTH=150><I>dhcp=&lt;0|1&gt;</I></TD>
1862
    <TD CLASS=TABCOLOR2>if enabled (default), the Host IP, Network Mask and Gateway address will be requested from a DHCP Daemon (e.g. your wireless router) automatically whenever the ethernet cable is connected. The configuration could take some seconds depending on the responsiveness of your router.</TD>
1863
  </TR>
1864
  <TR>
1865
    <TD CLASS=TABCOLOR2 WIDTH=150><I>local_ip=&lt;ip&gt;</I></TD>
1866
    <TD CLASS=TABCOLOR2>Sets the IP address of your MIDIbox NG directly if <I>dhcp=0</I></TD>
1867
  </TR>
1868
  <TR>
1869
    <TD CLASS=TABCOLOR2 WIDTH=150><I>netmask=&lt;mask&gt;</I></TD>
1870
    <TD CLASS=TABCOLOR2>Sets the netmask of your MIDIbox NG directly if <I>dhcp=0</I></TD>
1871
  </TR>
1872
  <TR>
1873
    <TD CLASS=TABCOLOR2 WIDTH=150><I>gateway=&lt;ip&gt;</I></TD>
1874
    <TD CLASS=TABCOLOR2>Sets the IP address of the gateway (typically your router) directly if <I>dhcp=0</I></TD>
1875
  </TR>
1876
</TABLE>
1877
 
1878
 
1879
<H2> <IMG SRC="images/bullet.gif" ALT=""> OSC </H2>
1880
 
1881
<P CLASS=DESC>The OSC command configures the OSC ports. More details about the MIOS32 based OSC implementation can be found <A HREF="midibox_osc.html">at this page</A>.<BR>
1882
 
1883
List of parameters:
1884
 
1885
Each OSC port has an individual remote IP, a remote port (to which OSC packets will be sent) and a local port (from which OSC packets will be received):
1886
 
1887
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=5 CELLPADDING=0>
1888
  <TR>
1889
    <TH WIDTH=150>OSC Command</TD>
1890
    <TH>Description</TD>
1891
  </TR>
1892
  <TR>
1893
    <TD CLASS=TABCOLOR2 WIDTH=150><I>n=&lt;1..4&gt;</I></TD>
1894
    <TD CLASS=TABCOLOR2>Specifies the OSC port which should be configured (1..4)</TD>
1895
  </TR>
1896
  <TR>
1897
    <TD CLASS=TABCOLOR2 WIDTH=150><I>remote_ip=&lt;ip&gt;</I></TD>
1898
    <TD CLASS=TABCOLOR2>Sets the remote IP assigned to the OSC port (e.g. the IP of your iPad)</TD>
1899
  </TR>
1900
  <TR>
1901
    <TD CLASS=TABCOLOR2 WIDTH=150><I>remote_port=&lt;ip&gt;</I></TD>
1902
    <TD CLASS=TABCOLOR2>Sets the remote port to which OSC packets will be sent</TD>
1903
  </TR>
1904
  <TR>
1905
    <TD CLASS=TABCOLOR2 WIDTH=150><I>local_port=&lt;ip&gt;</I></TD>
1906
    <TD CLASS=TABCOLOR2>Sets the local port from which OSC packets will be received</TD>
1907
  </TR>
1908
  <TR>
1096 tk 1909
    <TD CLASS=TABCOLOR2 WIDTH=150><I>transfer_mode=&lt;format&gt;</I></TD>
1095 tk 1910
    <TD CLASS=TABCOLOR2>Following transfer formats are currently supported:
1911
      <UL CLASS=CL>
1912
        <LI><I>MIDI</I>: MIDI events are bundled into MIDI elements
1913
        <LI><I>Int</I>: uses human readable pathes, values are in integer format
1914
        <LI><I>Flt</I>: uses human readable pathes, values are in float format
1915
        <LI><I>MPP</I>: selects format which is used by <A HREF="http://moocowmusic.com/PianistPro/index.html" TARGET="_blank">Pianist Pro</A>
1916
        <LI><I>TOSC</I>: selects format which is used by <A HREF="http://hexler.net/software/touchosc" TARGET="_blank">TouchOSC</A>
1917
      </UL>
1918
      Additional modes can be added in future on request:
1919
      </TD>
1920
  </TR>
1921
</TABLE>
1922
 
1923
 
1231 tk 1924
<H2> <IMG SRC="images/bullet.gif" ALT=""> MidiClkOutPorts and MidiClkInPorts </H2>
1925
 
1926
<P CLASS=DESC><I>MidiClkOutPorts &lt;ports&gt;</I>: sets the MIDI clock output ports</P>
1927
<P CLASS=DESC><I>MidiClkInPorts &lt;ports&gt;</I>: sets the MIDI clock input ports</P>
1928
 
1095 tk 1929
<H2> <IMG SRC="images/bullet.gif" ALT=""> GlobalChannel </H2>
1930
 
1931
<P CLASS=DESC><I>GlobalChannel &lt;0..16&gt;</I>: if set to a value &gt;0, all MIDI events generated with EVENT_* commands will be forced to the given MIDI channel. <B>not implemented yet!</B>
1932
 
1933
<H2> <IMG SRC="images/bullet.gif" ALT=""> AllNotesOffChannel </H2>
1934
 
1935
<P CLASS=DESC><I>AllNotesOffChannel &lt;0..16&gt;</I>: if set to a value &gt;0, the CC#123 event will turn off all LEDs when received over the specified channel
1936
 
1937
<H2> <IMG SRC="images/bullet.gif" ALT=""> ConvertNoteOffToOn0 </H2>
1938
 
1939
<P CLASS=DESC><I>ConvertNoteOffToOn0 &lt;0|1&gt;</I>: if set to 1, incoming NoteOff events will be converted to NoteOn with velocity 0. This option is enabled by default to simplify the configuration of receivers (e.g. LEDs) which should be turned off on any NoteOff event, including NoteOn with velocity 0 which has the same purpose (according to the MIDI spec).
1940
 
1941
<P CLASS=DESC>If set to 0, this simplification doesn't take place, so that NoteOn and NoteOff events can be handled separately.
1942
 
1943
<H2> <IMG SRC="images/bullet.gif" ALT=""> RESET_HW </H2>
1944
 
1945
<P CLASS=INFO>The <I>RESET_HW</I> command can be set at the top of a .NGC file to reset the complete configuration. This is especially useful if your file only specifies a small number of settings, so that the remaining hardware is in a "known state".
1946
 
1947
<P CLASS=INFO>This command shouldn't be specified in files which contain partial setups, e.g. an alternative <I>EVENT_*</I> configuration for your hardware, or different <I>ROUTER</I> and <I>OSC</I> settings which you could load during runtime without overwriting the actual controller setup.
1948
 
1949
 
1950
<H2> <IMG SRC="images/bullet.gif" ALT=""> LCD </H2>
1951
 
1952
<P CLASS=INFO>The <I>LCD</I> command prints an immediate message on screen while it's executed.
1953
 
1954
<P CLASS=INFO>It can be used to initialize the LCDs with static text, or just to display the purpose of your file before an EVENT_* based label overwrites the message.
1955
 
1956
<P CLASS=INFO>All string control formats and directives are supported (see description of <I>EVENT_* label</I> parameter), which especially means that it's possible to clear the screen, and to jump to different cursor positions at different displays.
1957
 
1958
Example:
1113 tk 1959
<TT><PRE style="margin-left:50px; font-size:8pt">
1095 tk 1960
LCD "%C@(1:1:1)Hello World!"
1961
</PRE></TT>
1962
 
1963
FOOTER