Subversion Repositories svn.mios

Rev

Rev 1070 | Rev 1180 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1061 tk 1
;$Id: setup_seq_dr_default.asm 1176 2014-07-20 18:50:23Z tk $
2
    LIST R=DEC
3
;
4
; Default setup File for MIDIbox SEQ Dr
5
;
6
; Detailed infos for customization can be found at http://www.ucapps.de/midibox_seq_options.html
7
; and http://www.ucapps.de/midibox_seq_dr.html
8
;
9
; define the LCD display width:
10
;    16: for a 2x16 display
11
;    20: for a 2x20 display (no additional information - screen will be centered, thats all)
12
;    80: for two 2x40 displays
13
;    other values not supported!
14
#define DEFAULT_LCD_WIDTH 16
15
;
16
; Following table allows you to define
17
;   - the track names (must consist of exactly 6 characters!)
18
;   - the DOUT shift registers (SR) to which the drum triggers are connected
19
;     (1-16; 0 disables assignment)
20
;   - the DOUT pin to which the drum triggers are connected (0-7)
1064 tk 21
;     Note: since version v1.3 the "real" Dx pin number (D0..D7) has to be specified, in previous releases it was mirrored!
1061 tk 22
;   - the MIDI output port (0=disabled, 1=Default, 2=Internal, 3=IIC1, 4=IIC2, 5=IIC3, 6=IIC4, 7=Trigger Only)
1064 tk 23
;   - the AOUT/CV channel to output velocity (1-16, 0=disabled)
24
;     Note: AOUT module only supports 8 highres channels, but CV outputs can also be realized with DOUTs (see DEFAULT_CV_DOUT* option)
1061 tk 25
DEFAULT_TRKINFO MACRO
26
    ;;       Name     SR  Pin MPort AChn
1064 tk 27
    db  "BD    ",  4,  0,   1,    1 ; Track 1
1070 tk 28
    db  "SD    ",  5,  0,   1,    2 ; Track 2
29
    db  "LT/LC ",  6,  0,   1,    3 ; Track 3
30
    db  "MT/MC ",  7,  0,   1,    4 ; Track 4
31
    db  "HT/HC ",  8,  0,   1,    5 ; Track 5
32
    db  "CP    ",  9,  0,   1,    6 ; Track 6
33
    db  "MA    ", 10,  0,   1,    7 ; Track 7
34
    db  "RS/CL ", 11,  0,   1,    8 ; Track 8
35
    db  "CB    ", 12,  0,   1,    9 ; Track 9
36
    db  "CY    ", 13,  0,   1,   10 ; Track 10
37
    db  "OH    ", 14,  0,   1,   11 ; Track 11
38
    db  "CH    ", 15,  0,   1,   12 ; Track 12
39
    db  "Ext1  ", 16,  0,   1,   13 ; Track 13
40
    db  "Ext2  ",  0,  0,   1,   14 ; Track 14
41
    db  "Ext3  ",  0,  0,   1,   15 ; Track 15
42
    db  "Acc.  ",  0,  0,   7,   16 ; Track 16
1061 tk 43
    ENDM
44
;
45
; define the track which is used for global accent
46
; (0=disabled, 1-16: track number)
47
#define DEFAULT_GLOBAL_ACCENT_TRK 16
48
;
49
;
50
; BankStick Mode & Allocation Map
51
; Each BankStick (CS0..CS7) has an own entry
52
; Set the value to:
53
;     0: ignore BankStick which could be (or is) connected to the CS address
54
;     1: if a 32k BankStick (24LC256) is connected and should be used as Pattern Storage (64 patterns)
55
;     2: if a 64k BankStick (24LC512) is connected and should be used as Pattern Storage (128 patterns)
56
;     3: if a 32k BankStick is connected and should be used as Song Storage
57
;     4: if a 64k BankStick is connected and should be used as Song Storage
58
; NOTE: only one BankStick can be used as Song Storage, only one for Mixer Maps
59
;       If no entry with "mode 3" or "mode 4" is defined, Song mode will be disabled.
60
; If a BankStick is not connected to the MBSEQ, the appr. entry will have no effect
61
; If a "MBSEQ Mixer BankStick" is connected, it will be automatically ignored (and not re-formatted)
62
#define DEFAULT_BANKSTICK_MODE_CS0  2   ; 64k
63
#define DEFAULT_BANKSTICK_MODE_CS1  2   ; 64k
64
#define DEFAULT_BANKSTICK_MODE_CS2  2   ; 64k
65
#define DEFAULT_BANKSTICK_MODE_CS3  4   ; Song mode (using CS3 to ensure compatibility with Atmel EEPROMs which only provide 4 CS addresses)
66
#define DEFAULT_BANKSTICK_MODE_CS4  2   ; 64k
67
#define DEFAULT_BANKSTICK_MODE_CS5  2   ; 64k
68
#define DEFAULT_BANKSTICK_MODE_CS6  2   ; 64k
69
#define DEFAULT_BANKSTICK_MODE_CS7  2   ; 64k
70
;
71
;
72
; Max. length of the DIN/DOUT shift register chain (1-16)
73
#define DEFAULT_NUMBER_SR   16
74
;
75
; debounce counter (see the function description of MIOS_SRIO_DebounceSet)
76
; Use 0 for high-quality buttons, use higher values for low-quality buttons
77
#define DEFAULT_SRIO_DEBOUNCE_CTR 32
78
;
79
; Some menus are provide the possibility to use 16 "general purpose" buttons
80
; Define the two shift registers which are assigned to this function here:
81
; (valid numbers: 1-16)
82
#define DEFAULT_GP_DIN_SR_L 5   ; first GP DIN shift register assigned to SR#3
83
#define DEFAULT_GP_DIN_SR_R 4   ; second GP DIN shift register assigned to SR#4
84
;
85
; DIN pins reversed?
86
#define DEFAULT_GP_DIN_REVERSED 1
87
;
88
; above these buttons LEDs should be mounted to visualize the played MIDI events,
89
; but also the current sequencer position, the selected pattern, the menu, etc.
90
; Define the two shift registers which are assigned to this function here:  
91
; (valid numbers: 1-16)
92
#define DEFAULT_GP_DOUT_SR_L    2   ; first GP DOUT shift register assigned to SR#3
93
#define DEFAULT_GP_DOUT_SR_R    1   ; second GP DOUT shift register assigned to SR#5
94
;
95
;
96
; === Shift Register Matrix ===
97
;
98
; set this value to 1 if each track has its own set of 16 LEDs to display unmuted steps and current sequencer position
99
#define DEFAULT_SRM_ENABLED     0
100
;
101
; define the shift registers to which the anodes of these LEDs are connected
102
; Note: they can be equal to DEFAULT_GP_DOUT_SR_[LH], this saves two shift registers, but doesn't allow a separate view of UI selections
103
#define DEFAULT_SRM_DOUT_L1 6
104
#define DEFAULT_SRM_DOUT_R1 9
105
;
106
; define the shift register to which the cathodes of these LEDs are connected
107
; Note that the whole shift register (8 pins) will be allocated! The 4 select lines are duplicated (4 for LED matrix, 4 for button matrix)
108
; The second DOUT_CATHODES2 selection is optional if LEDs with high power consumption are used - set this to 0 if not used
109
#define DEFAULT_SRM_DOUT_CATHODES1  5
110
#define DEFAULT_SRM_DOUT_CATHODES2  8
111
;
112
; set this to 1, if DUO colour LEDs are connected to the LED matrix
113
#define DEFAULT_SRM_DOUT_DUOCOLOUR  1
114
;
115
; define the shift registers to which the anodes of the "second colour" (red) LEDs are connected
116
#define DEFAULT_SRM_DOUT_L2 7
117
#define DEFAULT_SRM_DOUT_R2 10
118
;
119
; set this to 1 if a button matrix is connected
120
#define DEFAULT_SRM_BUTTONS_ENABLED 0
121
; set this to 1 if these buttons should only control the "step triggers" (gate, and other assigned triggers) - and no UI functions
122
#define DEFAULT_SRM_BUTTONS_NO_UI   1
123
; define the DIN shift registers to which the button matrix is connected
124
#define DEFAULT_SRM_DIN_L   11
125
#define DEFAULT_SRM_DIN_R   12
126
;
127
;
128
; === BPM digits ===
129
;
130
; set to 1 or 2 to enable the 3 optional BPM digits
131
;    0: BPM digits disabled
132
;    1: digits with common cathode
133
;    2: digits with common anode
134
#define DEFAULT_BPM_DIGITS_ENABLED 0
135
;
136
; define the shift register to which the segments are connected (0=disabled)
137
#define DEFAULT_BPM_DIGITS_SEGMENTS 5
138
; define the shift register to which the common pins (cathodes or anodes) are connected (0=disabled)
139
#define DEFAULT_BPM_DIGITS_COMMON   6
140
;
141
;
142
; the speed value for the tempo encoder (#0) which is used when the "FAST" button is activated:
143
#define DEFAULT_ENC_TEMPO_SPEED_VALUE   3
144
;
145
; the speed value for the additional encoders which is used when the "FAST" button is activated:
146
#define DEFAULT_ENC_SPEED_VALUE     3
147
 
148
;; Auto FAST mode: if a layer is assigned to velocity or CC, the fast button will be automatically
149
;; enabled - in other cases (e.g. Note or Length), the fast button will be automatically disabled
150
#define DEFAULT_AUTO_FAST_BUTTON        1
151
 
152
;; Behaviour of FAST button:
153
;; 0: button pressed: fast encoders, button depressed: slow encoders
154
;; 1: fast mode toggled when button pressed
155
#define DEFAULT_BEHAVIOUR_BUTTON_FAST   1
156
;; The same for the "ALL" button (if flag set, all step parameters will be changed with a single encoder)
157
#define DEFAULT_BEHAVIOUR_BUTTON_ALL    1
158
;; the same for the solo button (if flag set, the current selected track will be played solo)
159
#define DEFAULT_BEHAVIOUR_BUTTON_SOLO   1
160
;; the same for the metronome button
161
#define DEFAULT_BEHAVIOUR_BUTTON_METRON 1
162
;; the same for the scrub button
163
#define DEFAULT_BEHAVIOUR_BUTTON_SCRUB  0
164
 
165
; MIDI IN Channel which is used for the transpose/arpeggiator/remote function
166
; Allowed values: 1-16, select 0 to disable
167
#define DEFAULT_SEQUENCER_CHANNEL   10
168
;
169
; The Note number which activates the remote function (examples: 0x24 == C-2, 0x60 == C-7)
170
#define DEFAULT_MIDI_REMOTE_KEY     0x60    ; C-7
171
;
172
; The CC number which activates the remote function (e.g. to conrol it with a footswitch)
173
; allowed numbers: 1-127 for CC#1..CC#127
174
; 0 disables this function (default)
175
#define DEFAULT_MIDI_REMOTE_CC      0
176
;
177
; Optional channels for configuration via CC (1-16, select 0 to disable)
178
#define DEFAULT_MIDI_CHANNEL_CFG    10
179
 
180
;; if enabled (1), patterns can be changed via program change
181
;; if disabled (0), program changes will be ignored
182
#define DEFAULT_MIDI_PATTERN_CHANGE_PC  1
183
 
184
;; if enabled (1-127), song can be changed via given CC#
185
;; if disabled (0), program changes are ignored
186
#define DEFAULT_MIDI_SONG_CHANGE_VIA_CC 1
187
 
188
 
189
;; define the pin which should be used as external 24ppqn clock output here
190
;; DEFAULT_EXT_CLK_LAT can be LATC (Pin 0, 1, 2, 4, 5) or LATD (Pin 4)
191
;; Note that this should be an exclusive pin. E.g., if an AOUT module is
192
;; be connected, LATC.5 and LATD.4 are already allocated.
193
;; if a second LCD is connected, LATC.4 is already allocated
194
;; The external pin is disabled with DEFAULT_EXT_CLK_LAT == 0
195
;; default setting: RC0 (available at J6:RC of the core module)
196
#define DEFAULT_EXT_CLK_LAT LATC
197
#define DEFAULT_EXT_CLK_PIN 0
198
 
199
;; define the pin which should be used as external Start/Stop output here
200
;; default setting: RC1 (available at J6:SC of the core module)
201
#define DEFAULT_EXT_START_LAT   LATC
202
#define DEFAULT_EXT_START_PIN   1
203
 
204
 
205
;; define the pin to which the RI_N line of the IIC1 module is connected
206
;; this connections is required for the second MIDI IN port
207
;; Note: MIDI In is only supported for one MBHP_IIC_MIDI module,
208
;; and it must be the first one (IIC address 10, both jumpers stuffed)
209
;; By default, RC3 is used (available at J6:SI of the core module)
210
;; if RI_N_PORT == 0, the second MIDI Input will be disabled.
211
#define DEFAULT_IIC1_RI_N_PORT  PORTC
212
#define DEFAULT_IIC1_RI_N_TRIS  TRISC
213
#define DEFAULT_IIC1_RI_N_PIN   3
214
 
215
 
216
;; define the AOUT interface which is used here:
217
;;   1: one MBHP_AOUT module
218
;;   2: up to 4 (chained) MBHP_AOUT_LC modules
219
;;   3: one MBHP_AOUT_NG module
220
;; all other values invalid!
221
#define AOUT_INTERFACE_TYPE 1
222
 
223
;; only relevant if one or more AOUT_LC modules are used:
224
;; define the resolution configuration here
225
;;   0: first channel 12bit, second channel 4bit
226
;;   1: first channel 8bit, second channel 8bit
227
;; all other values invalid!
228
#define AOUT_LC_RESOLUTION_OPTION_M1 1
229
#define AOUT_LC_RESOLUTION_OPTION_M2 1
230
#define AOUT_LC_RESOLUTION_OPTION_M3 1
231
#define AOUT_LC_RESOLUTION_OPTION_M4 1
232
 
1064 tk 233
;;
234
;; CV values can also be output via DOUT shift registers
235
;; This option is sufficient to control the "velocity" of drum instruments, and it's cheap as well!
236
;; We expect following connections:
237
;; 
238
;;   DOUT      ca. 160k
239
;;    D7 ---o---/\/\/\---*
240
;;              ca. 80k  |
241
;;    D6 ---o---/\/\/\---*
242
;;              ca. 40k  |
243
;;    D5 ---o---/\/\/\---*
244
;;              ca. 20k  |
245
;;    D4 ---o---/\/\/\---*
246
;;              ca. 10k  |
247
;;    D3 ---o---/\/\/\---*
248
;;              ca. 5k   |
249
;;    D2 ---o---/\/\/\---*----o CV Out
250
;;              220 Ohm
251
;;    D1 ---o---/\/\/\--------o free assignable trigger
252
;;              220 Ohm
253
;;    D0 ---o---/\/\/\--------o another free assignable trigger
254
;; 
255
;; The DOUTx channels are matching with the AOUT channels as specified in the DEFAULT_TRKINFO table above.
256
;; Allowed values: 1-16 (selects DOUT shift register) or 0 to disable
257
;; Ensure that DEFAULT_NUMBER_SR is high enough so that all DOUTs are updated.
258
#define DEFAULT_CV_DOUT_SR1  4
1070 tk 259
#define DEFAULT_CV_DOUT_SR2  5
260
#define DEFAULT_CV_DOUT_SR3  6
261
#define DEFAULT_CV_DOUT_SR4  7
262
#define DEFAULT_CV_DOUT_SR5  8
263
#define DEFAULT_CV_DOUT_SR6  9
264
#define DEFAULT_CV_DOUT_SR7  10
265
#define DEFAULT_CV_DOUT_SR8  11
266
#define DEFAULT_CV_DOUT_SR9  12
267
#define DEFAULT_CV_DOUT_SR10 13
268
#define DEFAULT_CV_DOUT_SR11 14
269
#define DEFAULT_CV_DOUT_SR12 15
270
#define DEFAULT_CV_DOUT_SR13 16
1064 tk 271
#define DEFAULT_CV_DOUT_SR14 0
272
#define DEFAULT_CV_DOUT_SR15 0
273
#define DEFAULT_CV_DOUT_SR16 0
1061 tk 274
 
1064 tk 275
 
1176 tk 276
;; Optional 909-like OH/CH selection pin.
277
;; In order to use this feature, set DEFAULT_909LIKE_HH_CONTROL_ENABLED to 1, and
278
;; select the tracks to which the OH and CH are assigned in DEFAULT_909LIKE_HH_TRACK_OH/CH.
279
;; Change the DEFAULT_TRKINFO table in the header of this file, so that both track triggers share the same pin!
280
;; Then define the DOUT pin which should select OH/CH in DEFAULT_909LIKE_HH_SWITCH_SR/PIN below
281
#define DEFAULT_909LIKE_HH_CONTROL_ENABLED  0  ; 0 to disable, 1 to enable
282
#define DEFAULT_909LIKE_HH_TRACK_OH        11  ; OH track number - this track will set the SWITCH pin to 0
283
#define DEFAULT_909LIKE_HH_TRACK_CH        12  ; CH track number - will set the SWITCH pin to 1
284
#define DEFAULT_909LIKE_HH_SWITCH_SR       15  ; DOUT shift register of the SWITCH (1..16, 0 disables the assignment)
285
#define DEFAULT_909LIKE_HH_SWITCH_PIN       0  ; switch pin (0..7 for D0..D7)
286
 
287
 
1061 tk 288
;; 0: disables swing pot
289
;; 1: enables swing pot, connected to pin J5:A0
290
;;    NOTE: to avoid random swing values, set this #define to 0 when NO pot is connected!
291
;;    alternatively, you can clamp pin J5:A0 to ground
292
#ifndef DEFAULT_SWING_POT_CONNECTED
293
#define DEFAULT_SWING_POT_CONNECTED 0
294
#endif
295
 
296
;; define the page, which should be displayed after poweron, here
297
;; Examples: CS_MENU_PAGE_EDIT for edit page, CS_MENU_PAGE_PATTERN for pattern page
298
#define DEFAULT_STARTUP_PAGE CS_MENU_PAGE_EDIT
299
 
300
 
1176 tk 301
;; define the default Aux layer assignment:
302
;;   0: Accent
303
;;   1: Skip
304
;;   2: Flam1
305
;;   3: Flam2
306
;;   4: Flam3
307
;;   5: Flam4
308
;;   6: Random Gate
309
;;   7: Random Flam
310
;;   8: Delay1
311
;;   9: Delay2
312
;;  10: Delay3
313
;;  11: Delay4
314
;; 
315
;; Note: if BankSticks have already been formated, the previous default assignment will still be active.
316
;; The new default assignment will be taken when a pattern is cleared (Options page, GP button #10)
317
#define DEFAULT_AUX_LAYER_ASSIGN 2
318
 
319
 
1061 tk 320
    org 0x3082      ; never change the origin!
321
; ==========================================================================
322
;  In this table all button functions are mapped to the DIN pins
323
;
324
;  The function name can be found on the left, the shift register and pin
325
;  number on the right side.
326
;
327
;  SR/pin numbers:
328
;     SR =  1 for the first DIN shift register
329
;     SR =  2 for the second DIN shift register
330
;     ...
331
;     SR = 16 for the last DIN shift register
332
;
333
;     Pin = 0 for the D0 input pin of the shift register
334
;     Pin = 1 for the D1 input pin of the shift register
335
;     ...
336
;     Pin = 7 for the last input pin (D7) of the shift register
337
;
338
;  Set the SR and pin number to 0 if a button function should not be used
339
;
340
;  The table must end with DIN_ENTRY_EOT!
341
; ==========================================================================
342
 
343
DIN_ENTRY MACRO function, sr, pin
344
    dw  function, (pin + 8*((sr-1)&0xff))
345
    ENDM
346
 
347
DIN_ENTRY_EOT MACRO
348
    dw  0x0000, 0x0000
349
    ENDM
350
 
351
SEQ_IO_TABLE_DIN
352
    ;;      Function name       SR# Pin#
353
    ;; NOTE: the pins of the 16 general purpose buttons are assigned above, search for DEFAULT_GP_DIN_SR_L (and _R)
354
    DIN_ENTRY   SEQ_BUTTON_Scrub,    0,  0
355
    DIN_ENTRY   SEQ_BUTTON_Metronome,    0,  0
356
 
357
    DIN_ENTRY   SEQ_BUTTON_Stop,     3,  3
358
    DIN_ENTRY   SEQ_BUTTON_Pause,    0,  0
359
    DIN_ENTRY   SEQ_BUTTON_Play,     3,  4
360
    DIN_ENTRY   SEQ_BUTTON_Rew,      3,  1
361
    DIN_ENTRY   SEQ_BUTTON_Fwd,      3,  2
362
    DIN_ENTRY   SEQ_BUTTON_Live,     3,  0
363
 
364
    DIN_ENTRY   SEQ_BUTTON_F1,       0,  0
365
    DIN_ENTRY   SEQ_BUTTON_F2,       0,  0
366
    DIN_ENTRY   SEQ_BUTTON_F3,       0,  0
367
    DIN_ENTRY   SEQ_BUTTON_F4,       0,  0
368
 
369
    DIN_ENTRY   SEQ_BUTTON_Alt,      3,  6
370
    DIN_ENTRY   SEQ_BUTTON_Shift,    3,  5
371
 
372
    DIN_ENTRY   SEQ_BUTTON_SectionA,     2,  4
373
    DIN_ENTRY   SEQ_BUTTON_SectionB,     2,  5
374
    DIN_ENTRY   SEQ_BUTTON_SectionC,     2,  6
375
    DIN_ENTRY   SEQ_BUTTON_SectionD,     2,  7
376
 
377
    DIN_ENTRY   SEQ_BUTTON_LayerGate,    1,  0
378
    DIN_ENTRY   SEQ_BUTTON_LayerAux,     1,  1
379
 
380
    DIN_ENTRY   SEQ_BUTTON_Edit,     2,  3
381
    DIN_ENTRY   SEQ_BUTTON_Mute,     2,  0
382
    DIN_ENTRY   SEQ_BUTTON_Pattern,  2,  1
383
    DIN_ENTRY   SEQ_BUTTON_Song,     2,  2
384
 
385
    DIN_ENTRY   SEQ_BUTTON_Solo,     0,  0
386
    DIN_ENTRY   SEQ_BUTTON_Fast,     0,  0
387
    DIN_ENTRY   SEQ_BUTTON_All,      0,  0
388
 
389
    ;; OPTIONAL! see CHANGELOG.txt
390
    DIN_ENTRY   SEQ_BUTTON_Group1,   0,  0
391
    DIN_ENTRY   SEQ_BUTTON_Group2,   0,  0
392
    DIN_ENTRY   SEQ_BUTTON_Group3,   0,  0
393
    DIN_ENTRY   SEQ_BUTTON_Group4,   0,  0
394
 
395
    DIN_ENTRY_EOT
396
 
397
 
398
; ==========================================================================
399
;  Following statements are used to assign LED functions to DOUT pins
400
;
401
;  To enable a LED function, specify the shift register number SR (1-16),
402
;  and the pin number (0-7).
403
;  Note that Pin 0 is D7 of the DOUT register, Pin 1 is D6, ... Pin 7 is D0
404
;
405
;  With SR value = 0, the LED function will be disabled
406
; ==========================================================================
407
 
408
;;                         SR    ignore    Pin
409
LED_SECTION_A   EQU ((( 3   -1)<<3)+    0)
410
LED_SECTION_B   EQU ((( 3   -1)<<3)+    1)
411
LED_SECTION_C   EQU ((( 3   -1)<<3)+    2)
412
LED_SECTION_D   EQU ((( 3   -1)<<3)+    3)
413
 
414
;;                         SR    ignore    Pin
415
LED_LAYER_GATE  EQU ((( 0   -1)<<3)+    0)
416
LED_LAYER_AUX   EQU ((( 0   -1)<<3)+    0)
417
 
418
;;                         SR    ignore    Pin
419
LED_EDIT    EQU ((( 3   -1)<<3)+    7)
420
LED_MUTE    EQU ((( 3   -1)<<3)+    4)
421
LED_PATTERN EQU ((( 3   -1)<<3)+    5)
422
LED_SONG    EQU ((( 3   -1)<<3)+    6)
423
 
424
;;                         SR    ignore    Pin
425
LED_SOLO    EQU ((( 0   -1)<<3)+    0)
426
LED_FAST    EQU ((( 0   -1)<<3)+    0)
427
LED_ALL     EQU ((( 0   -1)<<3)+    0)
428
 
429
;;                         SR    ignore    Pin
430
LED_GROUP1  EQU ((( 0   -1)<<3)+    0)
431
LED_GROUP2  EQU ((( 0   -1)<<3)+    0)
432
LED_GROUP3  EQU ((( 0   -1)<<3)+    0)
433
LED_GROUP4  EQU ((( 0   -1)<<3)+    0)
434
 
435
;;                         SR    ignore    Pin
436
LED_SHIFT   EQU ((( 0   -1)<<3)+    0)
437
LED_ALT     EQU ((( 0   -1)<<3)+    0)
438
 
439
;;                         SR    ignore    Pin
440
LED_RECORD  EQU ((( 0   -1)<<3)+    0)
441
LED_BEAT    EQU ((( 0   -1)<<3)+    0)
442
 
443
;;                         SR    ignore    Pin
444
LED_PLAY    EQU ((( 0   -1)<<3)+    0)
445
LED_STOP    EQU ((( 0   -1)<<3)+    0)
446
LED_PAUSE   EQU ((( 0   -1)<<3)+    0)
447
LED_FWD     EQU ((( 0   -1)<<3)+    0)
448
LED_REW     EQU ((( 0   -1)<<3)+    0)
449
LED_LIVE    EQU ((( 0   -1)<<3)+    0)
450
 
451
;;                         SR    ignore    Pin
452
LED_MIDI_RX EQU (((0    -1)<<3)+    0) ; OPTIONAL! see CHANGELOG.txt
453
LED_MIDI_TX EQU (((0    -1)<<3)+    0) ; SR=0 -> disabled by default
454
 
455
 
456
;; --------------------------------------------------------------------------
457
;; In this table DIN pins have to be assigned to rotary encoders for the
458
;; MIOS_ENC driver 
459
;; 
460
;; up to 64 entries are provided, for MIDIbox SEQ 17 entries are expected
461
;; 
462
;; The table must be terminated with an ENC_EOT entry. Unused entries should
463
;; be filled with ENC_EOT
464
;; 
465
;; ENC_ENTRY provides following parameters
466
;;    o first parameter: number of shift register - 1, 2, 3, ... 16
467
;;    o second parameter: number of pin; since two pins are necessary
468
;;      for each encoder, an even number is expected: 0, 2, 4 or 6
469
;;    o the third parameter contains the encoder mode:
470
;;      either MIOS_ENC_MODE_NON_DETENTED
471
;;          or MIOS_ENC_MODE_DETENTED1
472
;;          or MIOS_ENC_MODE_DETENTED2 (prefered for Encoders from Voti and SmashTV!)
473
;;          or MIOS_ENC_MODE_DETENTED3
474
;;          or MIOS_ENC_MODE_DETENTED4
475
;;      see also http://www.midibox.org/dokuwiki/doku.php?id=encoder_types
476
;;
477
;; Configuration Examples:
478
;;    ENC_ENTRY  1,  0,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 0 and 1 of SR 1
479
;;    ENC_ENTRY  1,  2,  MIOS_ENC_MODE_DETENTED        ; detented encoder at pin 2 and 3 of SR 1
480
;;    ENC_ENTRY  9,  6,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 6 and 7 of SR 9
481
;; --------------------------------------------------------------------------
482
    org 0x3280      ; never change the origin!
483
    ;; encoder entry structure
484
ENC_ENTRY MACRO sr, din_0, mode
485
    dw  (mode << 8) | (din_0 + 8*(sr-1))
486
    ENDM   
487
ENC_EOT MACRO
488
    dw  0xffff
489
    ENDM
490
 
491
MIOS_ENC_PIN_TABLE
492
    ;;        SR  Pin  Mode
493
    ENC_ENTRY  1,  6,  MIOS_ENC_MODE_DETENTED2  ; Instrument Encoder
494
    ENC_ENTRY  1,  4,  MIOS_ENC_MODE_DETENTED2  ; Tempo Encoder
495
 
496
    ;; don't remove this "end-of-table" entry!
497
    ENC_EOT        
498
 
499
 
500
;; include the rest of the application
501
#include "main.inc"