Subversion Repositories svn.mios

Rev

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

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