Merge lp:~d00guan/mixxx/1.9-mappings into lp:~mixxxdevelopers/mixxx/trunk
- 1.9-mappings
- Merge into trunk
Proposed by
Anders Gunnarsson
Status: | Merged |
---|---|
Merged at revision: | 2632 |
Proposed branch: | lp:~d00guan/mixxx/1.9-mappings |
Merge into: | lp:~mixxxdevelopers/mixxx/trunk |
Diff against target: |
3785 lines (+3207/-181) 10 files modified
mixxx/res/midi/American Audio VMS4.midi.xml (+1167/-0) mixxx/res/midi/American-Audio-VMS4-scripts.js (+165/-0) mixxx/res/midi/Hercules DJ Console RMX Advanced.midi.xml (+20/-2) mixxx/res/midi/Hercules DJ Console RMX.midi.xml (+20/-2) mixxx/res/midi/Hercules-DJ-Console-RMX-scripts.js (+107/-176) mixxx/res/midi/Numark NS7.midi.xml (+569/-0) mixxx/res/midi/Numark-NS7-scripts.js (+111/-0) mixxx/res/midi/Vestax Spin.midi.xml (+579/-0) mixxx/res/midi/Vestax-Spin-scripts.js (+384/-0) mixxx/res/midi/midi-mappings-scripts.js (+85/-1) |
To merge this branch: | bzr merge lp:~d00guan/mixxx/1.9-mappings |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
RJ Skerry-Ryan | Approve | ||
Review via email: mp+44182@code.launchpad.net |
Commit message
Hope this can make it into 1.9
Description of the change
New mapping for Vestax Spin, slightly changed version of the Typhoon mapping
Almost fully functional mapping for American Audio VMS4
Preliminay mapping for Numark NS7, works for simple mixing.
Updates for Hercules RMX with 1.9 features
Some controller objects moved to the common script
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'mixxx/res/midi/American Audio VMS4.midi.xml' |
2 | --- mixxx/res/midi/American Audio VMS4.midi.xml 1970-01-01 00:00:00 +0000 |
3 | +++ mixxx/res/midi/American Audio VMS4.midi.xml 2010-12-20 00:27:58 +0000 |
4 | @@ -0,0 +1,1167 @@ |
5 | +<?xml version="1.0" encoding="utf-8"?> |
6 | +<MixxxMIDIPreset vschemaVersion="1" mixxxVersion="1.9.0"> |
7 | + <info> |
8 | + <name>American Audio VMS4</name> |
9 | + <author>Anders Gunnarsson</author> |
10 | + <description>American Audio VMS4 controller mapping, v1.9.0 Requires script v1.9.0</description> |
11 | + </info> |
12 | + <controller id="American Audio VMS4 MIDI"> |
13 | + <scriptfiles> |
14 | + <file filename="American-Audio-VMS4-scripts.js" functionprefix="VMS4"/> |
15 | + </scriptfiles> |
16 | + <controls> |
17 | + <!-- Deck A --> |
18 | + <control> |
19 | + <group>[Channel1]</group> |
20 | + <key>rate</key> |
21 | + <status>0xE0</status> |
22 | + <options> |
23 | + <invert/> |
24 | + </options> |
25 | + </control> |
26 | + <control><!-- on --> |
27 | + <group>[Channel1]</group> |
28 | + <key>rate_temp_down</key> |
29 | + <status>0x90</status> |
30 | + <midino>0x0F</midino> |
31 | + <options> |
32 | + <Button /> |
33 | + </options> |
34 | + </control> |
35 | + <control><!-- off --> |
36 | + <group>[Channel1]</group> |
37 | + <key>rate_temp_down</key> |
38 | + <status>0x80</status> |
39 | + <midino>0x0F</midino> |
40 | + <options> |
41 | + <Spread64 /> |
42 | + </options> |
43 | + </control> |
44 | + <control><!-- on --> |
45 | + <group>[Channel1]</group> |
46 | + <key>rate_temp_up</key> |
47 | + <status>0x90</status> |
48 | + <midino>0x10</midino> |
49 | + <options> |
50 | + <Button /> |
51 | + </options> |
52 | + </control> |
53 | + <control><!-- off --> |
54 | + <group>[Channel1]</group> |
55 | + <key>rate_temp_up</key> |
56 | + <status>0x80</status> |
57 | + <midino>0x10</midino> |
58 | + <options> |
59 | + <Spread64 /> |
60 | + </options> |
61 | + </control> |
62 | + <control><!-- on --> |
63 | + <group>[Channel1]</group> |
64 | + <key>beatsync</key> |
65 | + <status>0x90</status> |
66 | + <midino>0x11</midino> |
67 | + <options> |
68 | + <Button /> |
69 | + </options> |
70 | + </control> |
71 | + <control><!-- off --> |
72 | + <group>[Channel1]</group> |
73 | + <key>beatsync</key> |
74 | + <status>0x80</status> |
75 | + <midino>0x11</midino> |
76 | + <options> |
77 | + <Spread64 /> |
78 | + </options> |
79 | + </control> |
80 | + <control><!-- on --> |
81 | + <group>[Channel1]</group> |
82 | + <key>VMS4.rate_range</key> |
83 | + <status>0x90</status> |
84 | + <midino>0x16</midino> |
85 | + <options> |
86 | + <Button /> |
87 | + </options> |
88 | + </control> |
89 | + <control><!-- off --> |
90 | + <group>[Channel1]</group> |
91 | + <key>VMS4.rate_range</key> |
92 | + <status>0x80</status> |
93 | + <midino>0x16</midino> |
94 | + <options> |
95 | + <Spread64 /> |
96 | + </options> |
97 | + </control> |
98 | + <control><!-- on --> |
99 | + <group>[Channel1]</group> |
100 | + <key>cue_default</key> |
101 | + <status>0x90</status> |
102 | + <midino>0x0C</midino> |
103 | + <options> |
104 | + <Button /> |
105 | + </options> |
106 | + </control> |
107 | + <control><!-- off --> |
108 | + <group>[Channel1]</group> |
109 | + <key>cue_default</key> |
110 | + <status>0x80</status> |
111 | + <midino>0x0C</midino> |
112 | + <options> |
113 | + <Spread64 /> |
114 | + </options> |
115 | + </control> |
116 | + <control><!-- on --> |
117 | + <group>[Channel1]</group> |
118 | + <key>VMS4.play</key> |
119 | + <status>0x90</status> |
120 | + <midino>0x0D</midino> |
121 | + <options> |
122 | + <Script-Binding/> |
123 | + </options> |
124 | + </control> |
125 | + <control><!-- off --> |
126 | + <group>[Channel1]</group> |
127 | + <key>VMS4.play</key> |
128 | + <status>0x80</status> |
129 | + <midino>0x0D</midino> |
130 | + <options> |
131 | + <Script-Binding/> |
132 | + </options> |
133 | + </control> |
134 | + <control><!-- on --> |
135 | + <group>[Channel1]</group> |
136 | + <key>VMS4.pause</key> |
137 | + <status>0x90</status> |
138 | + <midino>0x0D</midino> |
139 | + <options> |
140 | + <Script-Binding/> |
141 | + </options> |
142 | + </control> |
143 | + <control><!-- off --> |
144 | + <group>[Channel1]</group> |
145 | + <key>VMS4.pause</key> |
146 | + <status>0x80</status> |
147 | + <midino>0x0D</midino> |
148 | + <options> |
149 | + <Script-Binding/> |
150 | + </options> |
151 | + </control> |
152 | + <control><!-- on --> |
153 | + <group>[Channel1]</group> |
154 | + <key>hotcue_1_activate</key> |
155 | + <status>0x90</status> |
156 | + <midino>0x12</midino> |
157 | + <options> |
158 | + <Button /> |
159 | + </options> |
160 | + </control> |
161 | + <control><!-- off --> |
162 | + <group>[Channel1]</group> |
163 | + <key>hotcue_1_activate</key> |
164 | + <status>0x80</status> |
165 | + <midino>0x12</midino> |
166 | + <options> |
167 | + <Spread64 /> |
168 | + </options> |
169 | + </control> |
170 | + <control><!-- on --> |
171 | + <group>[Channel1]</group> |
172 | + <key>hotcue_2_activate</key> |
173 | + <status>0x90</status> |
174 | + <midino>0x13</midino> |
175 | + <options> |
176 | + <Button /> |
177 | + </options> |
178 | + </control> |
179 | + <control><!-- off --> |
180 | + <group>[Channel1]</group> |
181 | + <key>hotcue_2_activate</key> |
182 | + <status>0x80</status> |
183 | + <midino>0x13</midino> |
184 | + <options> |
185 | + <Spread64 /> |
186 | + </options> |
187 | + </control> |
188 | + <control><!-- on --> |
189 | + <group>[Channel1]</group> |
190 | + <key>hotcue_3_activate</key> |
191 | + <status>0x90</status> |
192 | + <midino>0x14</midino> |
193 | + <options> |
194 | + <Button /> |
195 | + </options> |
196 | + </control> |
197 | + <control><!-- off --> |
198 | + <group>[Channel1]</group> |
199 | + <key>hotcue_3_activate</key> |
200 | + <status>0x80</status> |
201 | + <midino>0x14</midino> |
202 | + <options> |
203 | + <Spread64 /> |
204 | + </options> |
205 | + </control> |
206 | + <control><!-- on --> |
207 | + <group>[Channel1]</group> |
208 | + <key>hotcue_4_activate</key> |
209 | + <status>0x90</status> |
210 | + <midino>0x15</midino> |
211 | + <options> |
212 | + <Button /> |
213 | + </options> |
214 | + </control> |
215 | + <control><!-- off --> |
216 | + <group>[Channel1]</group> |
217 | + <key>hotcue_4_activate</key> |
218 | + <status>0x80</status> |
219 | + <midino>0x15</midino> |
220 | + <options> |
221 | + <Spread64 /> |
222 | + </options> |
223 | + </control> |
224 | + <control><!-- on --> |
225 | + <group>[Channel1]</group> |
226 | + <key>hotcue_1_clear</key> |
227 | + <status>0x90</status> |
228 | + <midino>0x17</midino> |
229 | + <options> |
230 | + <Button /> |
231 | + </options> |
232 | + </control> |
233 | + <control><!-- off --> |
234 | + <group>[Channel1]</group> |
235 | + <key>hotcue_1_clear</key> |
236 | + <status>0x80</status> |
237 | + <midino>0x17</midino> |
238 | + <options> |
239 | + <Spread64 /> |
240 | + </options> |
241 | + </control> |
242 | + <control><!-- on --> |
243 | + <group>[Channel1]</group> |
244 | + <key>hotcue_2_clear</key> |
245 | + <status>0x90</status> |
246 | + <midino>0x18</midino> |
247 | + <options> |
248 | + <Button /> |
249 | + </options> |
250 | + </control> |
251 | + <control><!-- off --> |
252 | + <group>[Channel1]</group> |
253 | + <key>hotcue_2_clear</key> |
254 | + <status>0x80</status> |
255 | + <midino>0x18</midino> |
256 | + <options> |
257 | + <Spread64 /> |
258 | + </options> |
259 | + </control> |
260 | + <control><!-- on --> |
261 | + <group>[Channel1]</group> |
262 | + <key>hotcue_3_clear</key> |
263 | + <status>0x90</status> |
264 | + <midino>0x19</midino> |
265 | + <options> |
266 | + <Button /> |
267 | + </options> |
268 | + </control> |
269 | + <control><!-- off --> |
270 | + <group>[Channel1]</group> |
271 | + <key>hotcue_3_clear</key> |
272 | + <status>0x80</status> |
273 | + <midino>0x19</midino> |
274 | + <options> |
275 | + <Spread64 /> |
276 | + </options> |
277 | + </control> |
278 | + <control><!-- on --> |
279 | + <group>[Channel1]</group> |
280 | + <key>hotcue_4_clear</key> |
281 | + <status>0x90</status> |
282 | + <midino>0x1A</midino> |
283 | + <options> |
284 | + <Button /> |
285 | + </options> |
286 | + </control> |
287 | + <control><!-- off --> |
288 | + <group>[Channel1]</group> |
289 | + <key>hotcue_4_clear</key> |
290 | + <status>0x80</status> |
291 | + <midino>0x1A</midino> |
292 | + <options> |
293 | + <Spread64 /> |
294 | + </options> |
295 | + </control> |
296 | + <control><!-- on --> |
297 | + <group>[Channel1]</group> |
298 | + <key>loop_in</key> |
299 | + <status>0x90</status> |
300 | + <midino>0x1F</midino> |
301 | + <options> |
302 | + <Button /> |
303 | + </options> |
304 | + </control> |
305 | + <control><!-- off --> |
306 | + <group>[Channel1]</group> |
307 | + <key>loop_in</key> |
308 | + <status>0x80</status> |
309 | + <midino>0x1F</midino> |
310 | + <options> |
311 | + <Spread64 /> |
312 | + </options> |
313 | + </control> |
314 | + <control><!-- on --> |
315 | + <group>[Channel1]</group> |
316 | + <key>loop_out</key> |
317 | + <status>0x90</status> |
318 | + <midino>0x20</midino> |
319 | + <options> |
320 | + <Button /> |
321 | + </options> |
322 | + </control> |
323 | + <control><!-- off --> |
324 | + <group>[Channel1]</group> |
325 | + <key>loop_out</key> |
326 | + <status>0x80</status> |
327 | + <midino>0x20</midino> |
328 | + <options> |
329 | + <Spread64 /> |
330 | + </options> |
331 | + </control> |
332 | + <control><!-- on --> |
333 | + <group>[Channel1]</group> |
334 | + <key>reloop_exit</key> |
335 | + <status>0x90</status> |
336 | + <midino>0x21</midino> |
337 | + <options> |
338 | + <Button /> |
339 | + </options> |
340 | + </control> |
341 | + <control><!-- off --> |
342 | + <group>[Channel1]</group> |
343 | + <key>reloop_exit</key> |
344 | + <status>0x80</status> |
345 | + <midino>0x21</midino> |
346 | + <options> |
347 | + <Spread64 /> |
348 | + </options> |
349 | + </control> |
350 | + <control><!-- on --> |
351 | + <group>[Channel1]</group> |
352 | + <key>VMS4.scratch</key> |
353 | + <status>0x90</status> |
354 | + <midino>0x27</midino> |
355 | + <options> |
356 | + <Script-Binding/> |
357 | + </options> |
358 | + </control> |
359 | + <control><!-- off --> |
360 | + <group>[Channel1]</group> |
361 | + <key>VMS4.scratch</key> |
362 | + <status>0x80</status> |
363 | + <midino>0x27</midino> |
364 | + <options> |
365 | + <Script-Binding/> |
366 | + </options> |
367 | + </control> |
368 | + <control><!-- on --> |
369 | + <group>[Channel1]</group> |
370 | + <key>back</key> |
371 | + <status>0x90</status> |
372 | + <midino>0x28</midino> |
373 | + <options> |
374 | + <Button /> |
375 | + </options> |
376 | + </control> |
377 | + <control><!-- off --> |
378 | + <group>[Channel1]</group> |
379 | + <key>back</key> |
380 | + <status>0x80</status> |
381 | + <midino>0x28</midino> |
382 | + <options> |
383 | + <Spread64 /> |
384 | + </options> |
385 | + </control> |
386 | + <control><!-- on --> |
387 | + <group>[Channel1]</group> |
388 | + <key>fwd</key> |
389 | + <status>0x90</status> |
390 | + <midino>0x29</midino> |
391 | + <options> |
392 | + <Button /> |
393 | + </options> |
394 | + </control> |
395 | + <control><!-- off --> |
396 | + <group>[Channel1]</group> |
397 | + <key>fwd</key> |
398 | + <status>0x80</status> |
399 | + <midino>0x29</midino> |
400 | + <options> |
401 | + <Spread64 /> |
402 | + </options> |
403 | + </control> |
404 | + <control><!-- on --> |
405 | + <group>[Channel1]</group> |
406 | + <key>keylock</key> |
407 | + <status>0x91</status> |
408 | + <midino>0x27</midino> |
409 | + <options> |
410 | + <Button /> |
411 | + </options> |
412 | + </control> |
413 | + <control><!-- off --> |
414 | + <group>[Channel1]</group> |
415 | + <key>keylock</key> |
416 | + <status>0x81</status> |
417 | + <midino>0x27</midino> |
418 | + <options> |
419 | + <Spread64 /> |
420 | + </options> |
421 | + </control> |
422 | + <control><!-- on --> |
423 | + <group>[Channel1]</group> |
424 | + <key>LoadSelectedTrack</key> |
425 | + <status>0x90</status> |
426 | + <midino>0x65</midino> |
427 | + <options> |
428 | + <Button /> |
429 | + </options> |
430 | + </control> |
431 | + <control><!-- off --> |
432 | + <group>[Channel1]</group> |
433 | + <key>LoadSelectedTrack</key> |
434 | + <status>0x80</status> |
435 | + <midino>0x65</midino> |
436 | + <options> |
437 | + <Spread64 /> |
438 | + </options> |
439 | + </control> |
440 | + <control><!-- on --> |
441 | + <group>[Channel1]</group> |
442 | + <key>VMS4.jog_touch</key> |
443 | + <status>0x90</status> |
444 | + <midino>0x4F</midino> |
445 | + <options> |
446 | + <Script-Binding/> |
447 | + </options> |
448 | + </control> |
449 | + <control><!-- off --> |
450 | + <group>[Channel1]</group> |
451 | + <key>VMS4.jog_touch</key> |
452 | + <status>0x80</status> |
453 | + <midino>0x4F</midino> |
454 | + <options> |
455 | + <Script-Binding/> |
456 | + </options> |
457 | + </control> |
458 | + <control> |
459 | + <group>[Channel1]</group> |
460 | + <key>VMS4.jog_move_lsb</key> |
461 | + <status>0xB0</status> |
462 | + <midino>0x30</midino> |
463 | + <options> |
464 | + <Script-Binding/> |
465 | + </options> |
466 | + </control> |
467 | + <control> |
468 | + <group>[Channel1]</group> |
469 | + <key>VMS4.jog_move_msb</key> |
470 | + <status>0xB0</status> |
471 | + <midino>0x31</midino> |
472 | + <options> |
473 | + <Script-Binding/> |
474 | + </options> |
475 | + </control> |
476 | + <control> |
477 | + <group>[Channel1]</group> |
478 | + <key>playposition</key> |
479 | + <status>0xB0</status> |
480 | + <midino>0x28</midino> |
481 | + </control> |
482 | + |
483 | + <!-- Deck B --> |
484 | + <control> |
485 | + <group>[Channel2]</group> |
486 | + <key>rate</key> |
487 | + <status>0xE1</status> |
488 | + <options> |
489 | + <invert/> |
490 | + </options> |
491 | + </control> |
492 | + <control><!-- on --> |
493 | + <group>[Channel2]</group> |
494 | + <key>rate_temp_down</key> |
495 | + <status>0x90</status> |
496 | + <midino>0x31</midino> |
497 | + <options> |
498 | + <Button /> |
499 | + </options> |
500 | + </control> |
501 | + <control><!-- off --> |
502 | + <group>[Channel2]</group> |
503 | + <key>rate_temp_down</key> |
504 | + <status>0x80</status> |
505 | + <midino>0x31</midino> |
506 | + <options> |
507 | + <Spread64 /> |
508 | + </options> |
509 | + </control> |
510 | + <control><!-- on --> |
511 | + <group>[Channel2]</group> |
512 | + <key>rate_temp_up</key> |
513 | + <status>0x90</status> |
514 | + <midino>0x32</midino> |
515 | + <options> |
516 | + <Button /> |
517 | + </options> |
518 | + </control> |
519 | + <control><!-- off --> |
520 | + <group>[Channel2]</group> |
521 | + <key>rate_temp_up</key> |
522 | + <status>0x80</status> |
523 | + <midino>0x32</midino> |
524 | + <options> |
525 | + <Spread64 /> |
526 | + </options> |
527 | + </control> |
528 | + <control><!-- on --> |
529 | + <group>[Channel2]</group> |
530 | + <key>beatsync</key> |
531 | + <status>0x90</status> |
532 | + <midino>0x33</midino> |
533 | + <options> |
534 | + <Button /> |
535 | + </options> |
536 | + </control> |
537 | + <control><!-- off --> |
538 | + <group>[Channel2]</group> |
539 | + <key>beatsync</key> |
540 | + <status>0x80</status> |
541 | + <midino>0x33</midino> |
542 | + <options> |
543 | + <Spread64 /> |
544 | + </options> |
545 | + </control> |
546 | + <control><!-- on --> |
547 | + <group>[Channel2]</group> |
548 | + <key>VMS4.rate_range</key> |
549 | + <status>0x90</status> |
550 | + <midino>0x38</midino> |
551 | + <options> |
552 | + <Button /> |
553 | + </options> |
554 | + </control> |
555 | + <control><!-- off --> |
556 | + <group>[Channel2]</group> |
557 | + <key>VMS4.rate_range</key> |
558 | + <status>0x80</status> |
559 | + <midino>0x38</midino> |
560 | + <options> |
561 | + <Spread64 /> |
562 | + </options> |
563 | + </control> |
564 | + <control><!-- on --> |
565 | + <group>[Channel2]</group> |
566 | + <key>cue_default</key> |
567 | + <status>0x90</status> |
568 | + <midino>0x2E</midino> |
569 | + <options> |
570 | + <Button /> |
571 | + </options> |
572 | + </control> |
573 | + <control><!-- off --> |
574 | + <group>[Channel2]</group> |
575 | + <key>cue_default</key> |
576 | + <status>0x80</status> |
577 | + <midino>0x2E</midino> |
578 | + <options> |
579 | + <Spread64 /> |
580 | + </options> |
581 | + </control> |
582 | + <control><!-- on --> |
583 | + <group>[Channel2]</group> |
584 | + <key>VMS4.play</key> |
585 | + <status>0x90</status> |
586 | + <midino>0x2F</midino> |
587 | + <options> |
588 | + <Script-Binding/> |
589 | + </options> |
590 | + </control> |
591 | + <control><!-- off --> |
592 | + <group>[Channel2]</group> |
593 | + <key>VMS4.play</key> |
594 | + <status>0x80</status> |
595 | + <midino>0x2F</midino> |
596 | + <options> |
597 | + <Script-Binding/> |
598 | + </options> |
599 | + </control> |
600 | + <control><!-- on --> |
601 | + <group>[Channel2]</group> |
602 | + <key>VMS4.pause</key> |
603 | + <status>0x90</status> |
604 | + <midino>0x30</midino> |
605 | + <options> |
606 | + <Script-Binding/> |
607 | + </options> |
608 | + </control> |
609 | + <control><!-- off --> |
610 | + <group>[Channel2]</group> |
611 | + <key>VMS4.pause</key> |
612 | + <status>0x80</status> |
613 | + <midino>0x30</midino> |
614 | + <options> |
615 | + <Script-Binding/> |
616 | + </options> |
617 | + </control> |
618 | + <control><!-- on --> |
619 | + <group>[Channel2]</group> |
620 | + <key>hotcue_1_activate</key> |
621 | + <status>0x90</status> |
622 | + <midino>0x34</midino> |
623 | + <options> |
624 | + <Button /> |
625 | + </options> |
626 | + </control> |
627 | + <control><!-- off --> |
628 | + <group>[Channel2]</group> |
629 | + <key>hotcue_1_activate</key> |
630 | + <status>0x80</status> |
631 | + <midino>0x34</midino> |
632 | + <options> |
633 | + <Spread64 /> |
634 | + </options> |
635 | + </control> |
636 | + <control><!-- on --> |
637 | + <group>[Channel2]</group> |
638 | + <key>hotcue_2_activate</key> |
639 | + <status>0x90</status> |
640 | + <midino>0x35</midino> |
641 | + <options> |
642 | + <Button /> |
643 | + </options> |
644 | + </control> |
645 | + <control><!-- off --> |
646 | + <group>[Channel2]</group> |
647 | + <key>hotcue_2_activate</key> |
648 | + <status>0x80</status> |
649 | + <midino>0x35</midino> |
650 | + <options> |
651 | + <Spread64 /> |
652 | + </options> |
653 | + </control> |
654 | + <control><!-- on --> |
655 | + <group>[Channel2]</group> |
656 | + <key>hotcue_3_activate</key> |
657 | + <status>0x90</status> |
658 | + <midino>0x36</midino> |
659 | + <options> |
660 | + <Button /> |
661 | + </options> |
662 | + </control> |
663 | + <control><!-- off --> |
664 | + <group>[Channel2]</group> |
665 | + <key>hotcue_3_activate</key> |
666 | + <status>0x80</status> |
667 | + <midino>0x36</midino> |
668 | + <options> |
669 | + <Spread64 /> |
670 | + </options> |
671 | + </control> |
672 | + <control><!-- on --> |
673 | + <group>[Channel2]</group> |
674 | + <key>hotcue_4_activate</key> |
675 | + <status>0x90</status> |
676 | + <midino>0x37</midino> |
677 | + <options> |
678 | + <Button /> |
679 | + </options> |
680 | + </control> |
681 | + <control><!-- off --> |
682 | + <group>[Channel2]</group> |
683 | + <key>hotcue_4_activate</key> |
684 | + <status>0x80</status> |
685 | + <midino>0x37</midino> |
686 | + <options> |
687 | + <Spread64 /> |
688 | + </options> |
689 | + </control> |
690 | + <control><!-- on --> |
691 | + <group>[Channel2]</group> |
692 | + <key>hotcue_1_clear</key> |
693 | + <status>0x90</status> |
694 | + <midino>0x39</midino> |
695 | + <options> |
696 | + <Button /> |
697 | + </options> |
698 | + </control> |
699 | + <control><!-- off --> |
700 | + <group>[Channel2]</group> |
701 | + <key>hotcue_1_clear</key> |
702 | + <status>0x80</status> |
703 | + <midino>0x39</midino> |
704 | + <options> |
705 | + <Spread64 /> |
706 | + </options> |
707 | + </control> |
708 | + <control><!-- on --> |
709 | + <group>[Channel2]</group> |
710 | + <key>hotcue_2_clear</key> |
711 | + <status>0x90</status> |
712 | + <midino>0x3A</midino> |
713 | + <options> |
714 | + <Button /> |
715 | + </options> |
716 | + </control> |
717 | + <control><!-- off --> |
718 | + <group>[Channel2]</group> |
719 | + <key>hotcue_2_clear</key> |
720 | + <status>0x80</status> |
721 | + <midino>0x3A</midino> |
722 | + <options> |
723 | + <Spread64 /> |
724 | + </options> |
725 | + </control> |
726 | + <control><!-- on --> |
727 | + <group>[Channel2]</group> |
728 | + <key>hotcue_3_clear</key> |
729 | + <status>0x90</status> |
730 | + <midino>0x3B</midino> |
731 | + <options> |
732 | + <Button /> |
733 | + </options> |
734 | + </control> |
735 | + <control><!-- off --> |
736 | + <group>[Channel2]</group> |
737 | + <key>hotcue_3_clear</key> |
738 | + <status>0x80</status> |
739 | + <midino>0x3B</midino> |
740 | + <options> |
741 | + <Spread64 /> |
742 | + </options> |
743 | + </control> |
744 | + <control><!-- on --> |
745 | + <group>[Channel2]</group> |
746 | + <key>hotcue_4_clear</key> |
747 | + <status>0x90</status> |
748 | + <midino>0x3C</midino> |
749 | + <options> |
750 | + <Button /> |
751 | + </options> |
752 | + </control> |
753 | + <control><!-- off --> |
754 | + <group>[Channel2]</group> |
755 | + <key>hotcue_4_clear</key> |
756 | + <status>0x80</status> |
757 | + <midino>0x3C</midino> |
758 | + <options> |
759 | + <Spread64 /> |
760 | + </options> |
761 | + </control> |
762 | + <control><!-- on --> |
763 | + <group>[Channel2]</group> |
764 | + <key>loop_in</key> |
765 | + <status>0x90</status> |
766 | + <midino>0x41</midino> |
767 | + <options> |
768 | + <Button /> |
769 | + </options> |
770 | + </control> |
771 | + <control><!-- off --> |
772 | + <group>[Channel2]</group> |
773 | + <key>loop_in</key> |
774 | + <status>0x80</status> |
775 | + <midino>0x41</midino> |
776 | + <options> |
777 | + <Spread64 /> |
778 | + </options> |
779 | + </control> |
780 | + <control><!-- on --> |
781 | + <group>[Channel2]</group> |
782 | + <key>loop_out</key> |
783 | + <status>0x90</status> |
784 | + <midino>0x42</midino> |
785 | + <options> |
786 | + <Button /> |
787 | + </options> |
788 | + </control> |
789 | + <control><!-- off --> |
790 | + <group>[Channel2]</group> |
791 | + <key>loop_out</key> |
792 | + <status>0x80</status> |
793 | + <midino>0x42</midino> |
794 | + <options> |
795 | + <Spread64 /> |
796 | + </options> |
797 | + </control> |
798 | + <control><!-- on --> |
799 | + <group>[Channel2]</group> |
800 | + <key>reloop_exit</key> |
801 | + <status>0x90</status> |
802 | + <midino>0x43</midino> |
803 | + <options> |
804 | + <Button /> |
805 | + </options> |
806 | + </control> |
807 | + <control><!-- off --> |
808 | + <group>[Channel2]</group> |
809 | + <key>reloop_exit</key> |
810 | + <status>0x80</status> |
811 | + <midino>0x43</midino> |
812 | + <options> |
813 | + <Spread64 /> |
814 | + </options> |
815 | + </control> |
816 | + <control><!-- on --> |
817 | + <group>[Channel2]</group> |
818 | + <key>VMS4.scratch</key> |
819 | + <status>0x90</status> |
820 | + <midino>0x49</midino> |
821 | + <options> |
822 | + <Script-Binding/> |
823 | + </options> |
824 | + </control> |
825 | + <control><!-- off --> |
826 | + <group>[Channel2]</group> |
827 | + <key>VMS4.scratch</key> |
828 | + <status>0x80</status> |
829 | + <midino>0x49</midino> |
830 | + <options> |
831 | + <Script-Binding/> |
832 | + </options> |
833 | + </control> |
834 | + <control><!-- on --> |
835 | + <group>[Channel2]</group> |
836 | + <key>back</key> |
837 | + <status>0x90</status> |
838 | + <midino>0x4A</midino> |
839 | + <options> |
840 | + <Button /> |
841 | + </options> |
842 | + </control> |
843 | + <control><!-- off --> |
844 | + <group>[Channel2]</group> |
845 | + <key>back</key> |
846 | + <status>0x80</status> |
847 | + <midino>0x4A</midino> |
848 | + <options> |
849 | + <Spread64 /> |
850 | + </options> |
851 | + </control> |
852 | + <control><!-- on --> |
853 | + <group>[Channel2]</group> |
854 | + <key>fwd</key> |
855 | + <status>0x90</status> |
856 | + <midino>0x4B</midino> |
857 | + <options> |
858 | + <Button /> |
859 | + </options> |
860 | + </control> |
861 | + <control><!-- off --> |
862 | + <group>[Channel2]</group> |
863 | + <key>fwd</key> |
864 | + <status>0x80</status> |
865 | + <midino>0x4B</midino> |
866 | + <options> |
867 | + <Spread64 /> |
868 | + </options> |
869 | + </control> |
870 | + <control><!-- on --> |
871 | + <group>[Channel2]</group> |
872 | + <key>keylock</key> |
873 | + <status>0x91</status> |
874 | + <midino>0x49</midino> |
875 | + <options> |
876 | + <Button /> |
877 | + </options> |
878 | + </control> |
879 | + <control><!-- off --> |
880 | + <group>[Channel2]</group> |
881 | + <key>keylock</key> |
882 | + <status>0x81</status> |
883 | + <midino>0x49</midino> |
884 | + <options> |
885 | + <Spread64 /> |
886 | + </options> |
887 | + </control> |
888 | + <control><!-- on --> |
889 | + <group>[Channel2]</group> |
890 | + <key>LoadSelectedTrack</key> |
891 | + <status>0x90</status> |
892 | + <midino>0x66</midino> |
893 | + <options> |
894 | + <Button /> |
895 | + </options> |
896 | + </control> |
897 | + <control><!-- off --> |
898 | + <group>[Channel2]</group> |
899 | + <key>LoadSelectedTrack</key> |
900 | + <status>0x80</status> |
901 | + <midino>0x66</midino> |
902 | + <options> |
903 | + <Spread64 /> |
904 | + </options> |
905 | + </control> |
906 | + <control><!-- on --> |
907 | + <group>[Channel2]</group> |
908 | + <key>VMS4.jog_touch</key> |
909 | + <status>0x90</status> |
910 | + <midino>0x50</midino> |
911 | + <options> |
912 | + <Script-Binding/> |
913 | + </options> |
914 | + </control> |
915 | + <control><!-- off --> |
916 | + <group>[Channel2]</group> |
917 | + <key>VMS4.jog_touch</key> |
918 | + <status>0x80</status> |
919 | + <midino>0x50</midino> |
920 | + <options> |
921 | + <Script-Binding/> |
922 | + </options> |
923 | + </control> |
924 | + <control> |
925 | + <group>[Channel2]</group> |
926 | + <key>VMS4.jog_move_lsb</key> |
927 | + <status>0xB0</status> |
928 | + <midino>0x32</midino> |
929 | + <options> |
930 | + <Script-Binding/> |
931 | + </options> |
932 | + </control> |
933 | + <control> |
934 | + <group>[Channel2]</group> |
935 | + <key>VMS4.jog_move_msb</key> |
936 | + <status>0xB0</status> |
937 | + <midino>0x33</midino> |
938 | + <options> |
939 | + <Script-Binding/> |
940 | + </options> |
941 | + </control> |
942 | + <control> |
943 | + <group>[Channel2]</group> |
944 | + <key>playposition</key> |
945 | + <status>0xB0</status> |
946 | + <midino>0x2D</midino> |
947 | + </control> |
948 | + |
949 | + <!-- Mixer main--> |
950 | + <control> |
951 | + <group>[Master]</group> |
952 | + <key>crossfader</key> |
953 | + <status>0xB0</status> |
954 | + <midino>0x1F</midino> |
955 | + <options> |
956 | + <invert /> |
957 | + </options> |
958 | + </control> |
959 | + <control> |
960 | + <group>[Master]</group> |
961 | + <key>headMix</key> |
962 | + <status>0xB0</status> |
963 | + <midino>0x22</midino> |
964 | + </control> |
965 | + <control> |
966 | + <group>[Master]</group> |
967 | + <key>headVolume</key> |
968 | + <status>0xB0</status> |
969 | + <midino>0x23</midino> |
970 | + </control> |
971 | + <control> |
972 | + <group>[Master]</group> |
973 | + <key>volume</key> |
974 | + <status>0xB0</status> |
975 | + <midino>0x1C</midino> |
976 | + </control> |
977 | + <control> |
978 | + <group>[Master]</group> |
979 | + <key>balance</key> |
980 | + <status>0xB0</status> |
981 | + <midino>0x1D</midino> |
982 | + </control> |
983 | + |
984 | + <!-- Mixer channel 1 --> |
985 | + <control> |
986 | + <group>[Channel1]</group> |
987 | + <key>pregain</key> |
988 | + <status>0xB0</status> |
989 | + <midino>0x05</midino> |
990 | + </control> |
991 | + <control> |
992 | + <group>[Channel1]</group> |
993 | + <key>filterHigh</key> |
994 | + <status>0xB0</status> |
995 | + <midino>0x06</midino> |
996 | + </control> |
997 | + <control> |
998 | + <group>[Channel1]</group> |
999 | + <key>filterMid</key> |
1000 | + <status>0xB0</status> |
1001 | + <midino>0x07</midino> |
1002 | + </control> |
1003 | + <control> |
1004 | + <group>[Channel1]</group> |
1005 | + <key>filterLow</key> |
1006 | + <status>0xB0</status> |
1007 | + <midino>0x08</midino> |
1008 | + </control> |
1009 | + <control> |
1010 | + <group>[Channel1]</group> |
1011 | + <key>volume</key> |
1012 | + <status>0xB0</status> |
1013 | + <midino>0x09</midino> |
1014 | + </control> |
1015 | + <control><!-- on --> |
1016 | + <group>[Channel1]</group> |
1017 | + <key>pfl</key> |
1018 | + <status>0x90</status> |
1019 | + <midino>0x2B</midino> |
1020 | + <options> |
1021 | + <Button /> |
1022 | + </options> |
1023 | + </control> |
1024 | + <control><!-- off --> |
1025 | + <group>[Channel1]</group> |
1026 | + <key>pfl</key> |
1027 | + <status>0x80</status> |
1028 | + <midino>0x2B</midino> |
1029 | + <options> |
1030 | + <Spread64 /> |
1031 | + </options> |
1032 | + </control> |
1033 | + |
1034 | + <!-- Mixer channel 2 --> |
1035 | + <control> |
1036 | + <group>[Channel2]</group> |
1037 | + <key>pregain</key> |
1038 | + <status>0xB0</status> |
1039 | + <midino>0x0A</midino> |
1040 | + </control> |
1041 | + <control> |
1042 | + <group>[Channel2]</group> |
1043 | + <key>filterHigh</key> |
1044 | + <status>0xB0</status> |
1045 | + <midino>0x0B</midino> |
1046 | + </control> |
1047 | + <control> |
1048 | + <group>[Channel2]</group> |
1049 | + <key>filterMid</key> |
1050 | + <status>0xB0</status> |
1051 | + <midino>0x0C</midino> |
1052 | + </control> |
1053 | + <control> |
1054 | + <group>[Channel2]</group> |
1055 | + <key>filterLow</key> |
1056 | + <status>0xB0</status> |
1057 | + <midino>0x0D</midino> |
1058 | + </control> |
1059 | + <control> |
1060 | + <group>[Channel2]</group> |
1061 | + <key>volume</key> |
1062 | + <status>0xB0</status> |
1063 | + <midino>0x0E</midino> |
1064 | + </control> |
1065 | + <control><!-- on --> |
1066 | + <group>[Channel2]</group> |
1067 | + <key>pfl</key> |
1068 | + <status>0x90</status> |
1069 | + <midino>0x2C</midino> |
1070 | + <options> |
1071 | + <Button /> |
1072 | + </options> |
1073 | + </control> |
1074 | + <control><!-- off --> |
1075 | + <group>[Channel2]</group> |
1076 | + <key>pfl</key> |
1077 | + <status>0x80</status> |
1078 | + <midino>0x2C</midino> |
1079 | + <options> |
1080 | + <Spread64 /> |
1081 | + </options> |
1082 | + </control> |
1083 | + </controls> |
1084 | + <outputs> |
1085 | + <output> |
1086 | + <group>[Channel1]</group> |
1087 | + <key>play</key> |
1088 | + <status>0x90</status> |
1089 | + <midino>0x0D</midino> |
1090 | + <minimum>0.5</minimum> |
1091 | + </output> |
1092 | + <output> |
1093 | + <group>[Channel1]</group> |
1094 | + <key>play</key> |
1095 | + <status>0x80</status> |
1096 | + <midino>0x0D</midino> |
1097 | + <minimum>0.5</minimum> |
1098 | + </output> |
1099 | + <output> |
1100 | + <group>[Channel2]</group> |
1101 | + <key>play</key> |
1102 | + <status>0x90</status> |
1103 | + <midino>0x2F</midino> |
1104 | + <minimum>0.5</minimum> |
1105 | + </output> |
1106 | + <output> |
1107 | + <group>[Channel2]</group> |
1108 | + <key>play</key> |
1109 | + <status>0x80</status> |
1110 | + <midino>0x2F</midino> |
1111 | + <minimum>0.5</minimum> |
1112 | + </output> |
1113 | + <output> |
1114 | + <group>[Channel1]</group> |
1115 | + <key>cue_default</key> |
1116 | + <status>0x90</status> |
1117 | + <midino>0x0C</midino> |
1118 | + <minimum>0.5</minimum> |
1119 | + </output> |
1120 | + <output> |
1121 | + <group>[Channel1]</group> |
1122 | + <key>cue_default</key> |
1123 | + <status>0x80</status> |
1124 | + <midino>0x0C</midino> |
1125 | + <minimum>0.5</minimum> |
1126 | + </output> |
1127 | + <output> |
1128 | + <group>[Channel2]</group> |
1129 | + <key>cue_default</key> |
1130 | + <status>0x90</status> |
1131 | + <midino>0x2E</midino> |
1132 | + <minimum>0.5</minimum> |
1133 | + </output> |
1134 | + <output> |
1135 | + <group>[Channel2]</group> |
1136 | + <key>cue_default</key> |
1137 | + <status>0x80</status> |
1138 | + <midino>0x2E</midino> |
1139 | + <minimum>0.5</minimum> |
1140 | + </output> |
1141 | + <output> |
1142 | + <group>[Channel1]</group> |
1143 | + <key>pfl</key> |
1144 | + <status>0x90</status> |
1145 | + <midino>0x2B</midino> |
1146 | + <minimum>0.5</minimum> |
1147 | + </output> |
1148 | + <output> |
1149 | + <group>[Channel1]</group> |
1150 | + <key>pfl</key> |
1151 | + <status>0x80</status> |
1152 | + <midino>0x2B</midino> |
1153 | + <minimum>0.5</minimum> |
1154 | + </output> |
1155 | + <output> |
1156 | + <group>[Channel2]</group> |
1157 | + <key>pfl</key> |
1158 | + <status>0x90</status> |
1159 | + <midino>0x2C</midino> |
1160 | + <minimum>0.5</minimum> |
1161 | + </output> |
1162 | + <output> |
1163 | + <group>[Channel2]</group> |
1164 | + <key>pfl</key> |
1165 | + <status>0x80</status> |
1166 | + <midino>0x2C</midino> |
1167 | + <minimum>0.5</minimum> |
1168 | + </output> |
1169 | + </outputs> |
1170 | + </controller> |
1171 | +</MixxxMIDIPreset> |
1172 | |
1173 | === added file 'mixxx/res/midi/American-Audio-VMS4-scripts.js' |
1174 | --- mixxx/res/midi/American-Audio-VMS4-scripts.js 1970-01-01 00:00:00 +0000 |
1175 | +++ mixxx/res/midi/American-Audio-VMS4-scripts.js 2010-12-20 00:27:58 +0000 |
1176 | @@ -0,0 +1,165 @@ |
1177 | +/** |
1178 | + * American Audio VMS4 controller script v1.9.0 |
1179 | + * Copyright (C) 2010 Anders Gunnarsson |
1180 | + * |
1181 | + * This program is free software; you can redistribute it and/or |
1182 | + * modify it under the terms of the GNU General Public License |
1183 | + * as published by the Free Software Foundation; either version 2 |
1184 | + * of the License, or (at your option) any later version. |
1185 | + * |
1186 | + * This program is distributed in the hope that it will be useful, |
1187 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1188 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1189 | + * GNU General Public License for more details. |
1190 | + * |
1191 | + * You should have received a copy of the GNU General Public License |
1192 | + * along with this program; if not, write to the Free Software |
1193 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
1194 | + **/ |
1195 | +VMS4 = new Controller(); |
1196 | +VMS4.RateRanges = [0.08, 0.10, 0.30, 1.00]; |
1197 | + |
1198 | +VMS4.Button = Button; |
1199 | + |
1200 | +VMS4.Button.prototype.setLed = function(ledState) { |
1201 | + if(ledState == LedState.on) { |
1202 | + midi.sendShortMsg(0x90,this.controlId,LedState.on); |
1203 | + } else { |
1204 | + midi.sendShortMsg(0x80,this.controlId,LedState.off); |
1205 | + } |
1206 | +} |
1207 | + |
1208 | +VMS4.Deck = Deck; |
1209 | +VMS4.Deck.scratchMode = false; |
1210 | +VMS4.Deck.jogMsb = 0x00; |
1211 | +VMS4.Deck.rateRange = VMS4.RateRanges[1]; |
1212 | + |
1213 | +VMS4.Deck.prototype.rateRangeHandler = function(value) { |
1214 | + if(value == ButtonState.pressed) { |
1215 | + var i; |
1216 | + for(i=0; i < VMS4.RateRanges.length; i++) { |
1217 | + if(VMS4.RateRanges[i] == this.rateRange) { |
1218 | + break; |
1219 | + } |
1220 | + } |
1221 | + |
1222 | + //Found correct value increment by one |
1223 | + i++; |
1224 | + |
1225 | + //Wrap if needed |
1226 | + if(i == VMS4.RateRanges.length) { |
1227 | + i = 0; |
1228 | + } |
1229 | + |
1230 | + this.rateRange = VMS4.RateRanges[i]; |
1231 | + } |
1232 | +} |
1233 | + |
1234 | +VMS4.Deck.prototype.playHandler = function(value) { |
1235 | + engine.setValue(this.group, "play", 1); |
1236 | +} |
1237 | + |
1238 | +VMS4.Deck.prototype.pauseHandler = function(value) { |
1239 | + engine.setValue(this.group, "play", 0); |
1240 | +} |
1241 | + |
1242 | +VMS4.Deck.prototype.scratchHandler = function(value) { |
1243 | + if(value == ButtonState.pressed) { |
1244 | + if(this.scratchMode) { |
1245 | + this.scratchMode = false; |
1246 | + this.Buttons.Scratch.setLed(LedState.off); |
1247 | + } else { |
1248 | + this.scratchMode = true; |
1249 | + this.Buttons.Scratch.setLed(LedState.on); |
1250 | + } |
1251 | + } |
1252 | + print("scratchMode: " + this.scratchMode); |
1253 | +} |
1254 | + |
1255 | +VMS4.Deck.prototype.jogTouchHandler = function(value) { |
1256 | + if(value == ButtonState.pressed && this.scratchMode) { |
1257 | + engine.scratchEnable(this.deckNumber, 3000, 45, 1.0/8, (1.0/8)/32); |
1258 | + } else { |
1259 | + engine.scratchDisable(this.deckNumber); |
1260 | + } |
1261 | +} |
1262 | + |
1263 | +VMS4.Deck.prototype.jogMove = function(lsbValue) { |
1264 | + var jogValue = (this.jogMsb << 7) + lsbValue; |
1265 | + |
1266 | + if(!isNaN(this.previousJogValue)) { |
1267 | + var offset = jogValue - this.previousJogValue; |
1268 | + |
1269 | + if(offset > 8192) { |
1270 | + offset = offset - 16384; |
1271 | + } else if(offset < -8192) { |
1272 | + offset = offset + 16384; |
1273 | + } |
1274 | + |
1275 | + if(this.scratchMode) { |
1276 | + engine.scratchTick(this.deckNumber, offset); |
1277 | + } else { |
1278 | + engine.setValue(this.group,"jog", offset / 40.0); |
1279 | + } |
1280 | + } |
1281 | + this.previousJogValue = jogValue; |
1282 | +} |
1283 | + |
1284 | +VMS4.Decks = {"Left":new VMS4.Deck(1,"[Channel1]"), "Right":new VMS4.Deck(2,"[Channel2]")}; |
1285 | +VMS4.GroupToDeck = {"[Channel1]":"Left", "[Channel2]":"Right"}; |
1286 | + |
1287 | +VMS4.GetDeck = function(group) { |
1288 | + try { |
1289 | + return VMS4.Decks[VMS4.GroupToDeck[group]]; |
1290 | + } catch(ex) { |
1291 | + return null; |
1292 | + } |
1293 | +} |
1294 | + |
1295 | +VMS4.Decks.Left.addButton("RateRange", new VMS4.Button(), "rateRangeHandler"); |
1296 | +VMS4.Decks.Left.addButton("Play", new VMS4.Button(), "playHandler"); |
1297 | +VMS4.Decks.Left.addButton("Pause", new VMS4.Button(), "pauseHandler"); |
1298 | +VMS4.Decks.Left.addButton("Scratch", new VMS4.Button(0x27), "scratchHandler"); |
1299 | +VMS4.Decks.Left.addButton("JogTouch", new VMS4.Button(), "jogTouchHandler"); |
1300 | + |
1301 | +VMS4.Decks.Right.addButton("RateRange", new VMS4.Button(), "rateRangeHandler"); |
1302 | +VMS4.Decks.Right.addButton("Play", new VMS4.Button(), "playHandler"); |
1303 | +VMS4.Decks.Right.addButton("Pause", new VMS4.Button(), "pauseHandler"); |
1304 | +VMS4.Decks.Right.addButton("Scratch", new VMS4.Button(0x49), "scratchHandler"); |
1305 | +VMS4.Decks.Right.addButton("JogTouch", new VMS4.Button(), "jogTouchHandler"); |
1306 | + |
1307 | +//Mapping functions |
1308 | +VMS4.rate_range = function(channel, control, value, status, group) { |
1309 | + var deck = VMS4.GetDeck(group); |
1310 | + deck.Buttons.RateRange.handleEvent(value); |
1311 | +} |
1312 | + |
1313 | +VMS4.play = function(channel, control, value, status, group) { |
1314 | + var deck = VMS4.GetDeck(group); |
1315 | + deck.Buttons.Play.handleEvent(value); |
1316 | +} |
1317 | + |
1318 | +VMS4.pause = function(channel, control, value, status, group) { |
1319 | + var deck = VMS4.GetDeck(group); |
1320 | + deck.Buttons.Pause.handleEvent(value); |
1321 | +} |
1322 | + |
1323 | +VMS4.scratch = function(channel, control, value, status, group) { |
1324 | + var deck = VMS4.GetDeck(group); |
1325 | + deck.Buttons.Scratch.handleEvent(value); |
1326 | +} |
1327 | + |
1328 | +VMS4.jog_touch = function(channel, control, value, status, group) { |
1329 | + var deck = VMS4.GetDeck(group); |
1330 | + deck.Buttons.JogTouch.handleEvent(value); |
1331 | +} |
1332 | + |
1333 | +VMS4.jog_move_lsb = function(channel, control, value, status, group) { |
1334 | + var deck = VMS4.GetDeck(group); |
1335 | + deck.jogMove(value); |
1336 | +} |
1337 | + |
1338 | +VMS4.jog_move_msb = function(channel, control, value, status, group) { |
1339 | + var deck = VMS4.GetDeck(group); |
1340 | + deck.jogMsb = value; |
1341 | +} |
1342 | \ No newline at end of file |
1343 | |
1344 | === modified file 'mixxx/res/midi/Hercules DJ Console RMX Advanced.midi.xml' |
1345 | --- mixxx/res/midi/Hercules DJ Console RMX Advanced.midi.xml 2010-09-18 19:01:25 +0000 |
1346 | +++ mixxx/res/midi/Hercules DJ Console RMX Advanced.midi.xml 2010-12-20 00:27:58 +0000 |
1347 | @@ -1,9 +1,9 @@ |
1348 | <?xml version="1.0" encoding="utf-8"?> |
1349 | -<MixxxMIDIPreset vschemaVersion="1" mixxxVersion="1.8.0"> |
1350 | +<MixxxMIDIPreset vschemaVersion="1" mixxxVersion="1.9.0"> |
1351 | <info> |
1352 | <name>Hercules DJ Console RMX Advanced</name> |
1353 | <author>Anders Gunnarsson</author> |
1354 | - <description>Hercules DJ Console RMX controller mapping with hotcues and loops, v1.8.0. Requires script v1.8.1</description> |
1355 | + <description>Hercules DJ Console RMX controller mapping with hotcues and loops, v1.9.0. Requires script v1.9.0</description> |
1356 | </info> |
1357 | <controller id="Hercules DJ Console RMX MIDI"> |
1358 | <scriptfiles> |
1359 | @@ -406,6 +406,24 @@ |
1360 | </options> |
1361 | </control> |
1362 | <control> |
1363 | + <group>[Channel1]</group> |
1364 | + <key>keylock</key> |
1365 | + <status>0xB0</status> |
1366 | + <midino>0x08</midino> |
1367 | + <options> |
1368 | + <Button /> |
1369 | + </options> |
1370 | + </control> |
1371 | + <control> |
1372 | + <group>[Channel2]</group> |
1373 | + <key>keylock</key> |
1374 | + <status>0xB0</status> |
1375 | + <midino>0x15</midino> |
1376 | + <options> |
1377 | + <Button /> |
1378 | + </options> |
1379 | + </control> |
1380 | + <control> |
1381 | <group>[Master]</group> |
1382 | <key>HerculesRMX.scratch</key> |
1383 | <status>0xB0</status> |
1384 | |
1385 | === modified file 'mixxx/res/midi/Hercules DJ Console RMX.midi.xml' |
1386 | --- mixxx/res/midi/Hercules DJ Console RMX.midi.xml 2010-09-20 18:07:40 +0000 |
1387 | +++ mixxx/res/midi/Hercules DJ Console RMX.midi.xml 2010-12-20 00:27:58 +0000 |
1388 | @@ -1,9 +1,9 @@ |
1389 | <?xml version="1.0" encoding="utf-8"?> |
1390 | -<MixxxMIDIPreset vschemaVersion="1" mixxxVersion="1.8.0"> |
1391 | +<MixxxMIDIPreset vschemaVersion="1" mixxxVersion="1.9.0"> |
1392 | <info> |
1393 | <name>Hercules DJ Console RMX</name> |
1394 | <author>Anders Gunnarsson</author> |
1395 | - <description>Hercules DJ Console RMX controller mapping, v1.8.1. Requires script v1.8.1</description> |
1396 | + <description>Hercules DJ Console RMX controller mapping, v1.9.0. Requires script v1.9.0</description> |
1397 | </info> |
1398 | <controller id="Hercules DJ Console RMX MIDI"> |
1399 | <scriptfiles> |
1400 | @@ -428,6 +428,24 @@ |
1401 | </options> |
1402 | </control> |
1403 | <control> |
1404 | + <group>[Channel1]</group> |
1405 | + <key>keylock</key> |
1406 | + <status>0xB0</status> |
1407 | + <midino>0x08</midino> |
1408 | + <options> |
1409 | + <Button /> |
1410 | + </options> |
1411 | + </control> |
1412 | + <control> |
1413 | + <group>[Channel2]</group> |
1414 | + <key>keylock</key> |
1415 | + <status>0xB0</status> |
1416 | + <midino>0x15</midino> |
1417 | + <options> |
1418 | + <Button /> |
1419 | + </options> |
1420 | + </control> |
1421 | + <control> |
1422 | <group>[Master]</group> |
1423 | <key>HerculesRMX.scratch</key> |
1424 | <status>0xB0</status> |
1425 | |
1426 | === modified file 'mixxx/res/midi/Hercules-DJ-Console-RMX-scripts.js' |
1427 | --- mixxx/res/midi/Hercules-DJ-Console-RMX-scripts.js 2010-09-20 18:07:40 +0000 |
1428 | +++ mixxx/res/midi/Hercules-DJ-Console-RMX-scripts.js 2010-12-20 00:27:58 +0000 |
1429 | @@ -1,5 +1,5 @@ |
1430 | /** |
1431 | - * Hercules DJ Console RMX controller script v1.8.1 |
1432 | + * Hercules DJ Console RMX controller script v1.9.0 |
1433 | * Copyright (C) 2010 Anders Gunnarsson |
1434 | * |
1435 | * This program is free software; you can redistribute it and/or |
1436 | @@ -19,100 +19,35 @@ |
1437 | |
1438 | //TODO: Cleanup, create objects from init. |
1439 | //Remove led timers when alsa midi is working properly. |
1440 | -HerculesRMX = new function() { |
1441 | - this.group = "[Master]"; |
1442 | - this.shiftMode = false; |
1443 | - this.scratchMode = false; |
1444 | - this.jogPlaylistScrollMode = false; |
1445 | - this.Controls = []; |
1446 | - this.Buttons = []; |
1447 | -}; |
1448 | - |
1449 | -HerculesRMX.addButton = function(buttonName, button, eventHandler) { |
1450 | - if(eventHandler) { |
1451 | - var executionEnvironment = this; |
1452 | - function handler(value) { |
1453 | - button.state = value; |
1454 | - executionEnvironment[eventHandler](value); |
1455 | - } |
1456 | - button.handler = handler; |
1457 | - } |
1458 | - this.Buttons[buttonName] = button; |
1459 | -}; |
1460 | - |
1461 | -HerculesRMX.setControlValue = function(control, value) { |
1462 | - this.Controls[control].setValue(this.group, value); |
1463 | -}; |
1464 | - |
1465 | - |
1466 | -HerculesRMX.ButtonState = {"released":0x00, "pressed":0x7F}; |
1467 | -HerculesRMX.LedState = {"off": 0x00, "on": 0x7F, "blink": 0xFF}; |
1468 | -HerculesRMX.Button = function (controlId, blinkId) { |
1469 | - this.controlId = controlId; |
1470 | - this.blinkId = blinkId; |
1471 | - this.state = HerculesRMX.ButtonState.released; |
1472 | -}; |
1473 | -HerculesRMX.Button.prototype.setLed = function(lightState) { |
1474 | - if(lightState == HerculesRMX.LedState.on) { |
1475 | - midi.sendShortMsg(0xB0,this.controlId,HerculesRMX.LedState.on); |
1476 | - engine.beginTimer(20, "midi.sendShortMsg(0xB0," + (this.controlId + 0x30) + ", " + HerculesRMX.LedState.off + ")", true); |
1477 | - } else if(lightState == HerculesRMX.LedState.blink) { |
1478 | - midi.sendShortMsg(0xB0,this.controlId,HerculesRMX.LedState.on); |
1479 | - engine.beginTimer(20, "midi.sendShortMsg(0xB0," + (this.controlId + 0x30) + ", " + HerculesRMX.LedState.on + ")", true); |
1480 | - } else { |
1481 | - midi.sendShortMsg(0xB0,this.controlId,HerculesRMX.LedState.off); |
1482 | - engine.beginTimer(20, "midi.sendShortMsg(0xB0," + (this.controlId + 0x30) + ", " + HerculesRMX.LedState.off + ")", true); |
1483 | - } |
1484 | -}; |
1485 | - |
1486 | -HerculesRMX.Button.prototype.handleEvent = function(value) { |
1487 | - this.handler(value); |
1488 | -}; |
1489 | - |
1490 | -HerculesRMX.Control = function(mappedFunction, softMode) { |
1491 | - this.minInput = 0; |
1492 | - this.midInput = 0x3F; |
1493 | - this.maxInput = 0x7F; |
1494 | - this.minOutput = -1.0; |
1495 | - this.midOutput = 0.0; |
1496 | - this.maxOutput = 1.0; |
1497 | - this.mappedFunction = mappedFunction; |
1498 | - this.softMode = softMode; |
1499 | - this.maxJump = 10; |
1500 | -}; |
1501 | - |
1502 | -HerculesRMX.Control.prototype.setValue = function(group, inputValue){ |
1503 | - var outputValue = 0; |
1504 | - if(inputValue <= this.midInput){ |
1505 | - outputValue = this.minOutput + ((inputValue - this.minInput) / (this.midInput - this.minInput)) * (this.midOutput - this.minOutput); |
1506 | - } else { |
1507 | - outputValue = this.midOutput + ((inputValue - this.midInput) / (this.maxInput - this.midInput)) * (this.maxOutput - this.midOutput); |
1508 | - } |
1509 | - if(this.softMode){ |
1510 | - var currentValue = engine.getValue(group, this.mappedFunction); |
1511 | - var currentRelative = 0.0; |
1512 | - if(currentValue <= this.midOutput){ |
1513 | - currentRelative = this.minInput + ((currentValue - this.minOutput) / (this.midOutput - this.minOutput)) * (this.midInput - this.minInput); |
1514 | - } else { |
1515 | - currentRelative = this.midInput + ((currentValue - this.midOutput) / (this.maxOutput - this.midOutput)) * (this.maxInput - this.midInput); |
1516 | - } |
1517 | - if(inputValue > currentRelative - this.maxJump && inputValue < currentRelative + this.maxJump) { |
1518 | - engine.setValue(group, this.mappedFunction, outputValue); |
1519 | - } |
1520 | - } else { |
1521 | - engine.setValue(group, this.mappedFunction, outputValue); |
1522 | +HerculesRMX = new Controller(); |
1523 | +HerculesRMX.shiftMode = false; |
1524 | +HerculesRMX.scratchMode = false; |
1525 | +HerculesRMX.jogPlaylistScrollMode = false; |
1526 | + |
1527 | +HerculesRMX.Button = Button; |
1528 | + |
1529 | +HerculesRMX.Button.prototype.setLed = function(ledState, blink) { |
1530 | + if(ledState == LedState.on) { |
1531 | + midi.sendShortMsg(0xB0,this.controlId,LedState.on); |
1532 | + } else { |
1533 | + midi.sendShortMsg(0xB0,this.controlId,LedState.off); |
1534 | + } |
1535 | + if(blink) { |
1536 | + engine.beginTimer(20, "midi.sendShortMsg(0xB0," + (this.controlId + 0x30) + ", " + LedState.on + ")", true); |
1537 | + } else { |
1538 | + engine.beginTimer(20, "midi.sendShortMsg(0xB0," + (this.controlId + 0x30) + ", " + LedState.off + ")", true); |
1539 | } |
1540 | }; |
1541 | |
1542 | HerculesRMX.shiftHandler = function(value) { |
1543 | - if(value == HerculesRMX.ButtonState.pressed) { |
1544 | + if(value == ButtonState.pressed) { |
1545 | this.shiftMode = true; |
1546 | if(HerculesRMX.scratchMode) { |
1547 | HerculesRMX.scratchMode = false; |
1548 | - HerculesRMX.Buttons.Scratch.setLed(HerculesRMX.LedState.off); |
1549 | + HerculesRMX.Buttons.Scratch.setLed(LedState.off); |
1550 | } else { |
1551 | HerculesRMX.scratchMode = true; |
1552 | - HerculesRMX.Buttons.Scratch.setLed(HerculesRMX.LedState.on); |
1553 | + HerculesRMX.Buttons.Scratch.setLed(LedState.on); |
1554 | } |
1555 | } else { |
1556 | this.shiftMode = false; |
1557 | @@ -121,26 +56,26 @@ |
1558 | |
1559 | HerculesRMX.upHandler = function(value) { |
1560 | this.jogPlaylistScrollMode = this.Buttons.Up.state + this.Buttons.Down.state > 0; |
1561 | - if(value == HerculesRMX.ButtonState.pressed) { |
1562 | + if(value == ButtonState.pressed) { |
1563 | engine.setValue("[Playlist]", "SelectPrevTrack", 1); |
1564 | } |
1565 | }; |
1566 | |
1567 | HerculesRMX.downHandler = function(value) { |
1568 | this.jogPlaylistScrollMode = this.Buttons.Up.state + this.Buttons.Down.state > 0; |
1569 | - if(value == HerculesRMX.ButtonState.pressed) { |
1570 | + if(value == ButtonState.pressed) { |
1571 | engine.setValue("[Playlist]", "SelectNextTrack", 1); |
1572 | } |
1573 | }; |
1574 | |
1575 | HerculesRMX.leftHandler = function(value) { |
1576 | - if(value == HerculesRMX.ButtonState.pressed) { |
1577 | + if(value == ButtonState.pressed) { |
1578 | engine.setValue("[Playlist]", "SelectPrevPlaylist", 1); |
1579 | } |
1580 | }; |
1581 | |
1582 | HerculesRMX.rightHandler = function(value) { |
1583 | - if(value == HerculesRMX.ButtonState.pressed) { |
1584 | + if(value == ButtonState.pressed) { |
1585 | engine.setValue("[Playlist]", "SelectNextPlaylist", 1); |
1586 | } |
1587 | }; |
1588 | @@ -152,13 +87,13 @@ |
1589 | HerculesRMX.addButton("Right", new HerculesRMX.Button(0x2D), "rightHandler"); |
1590 | |
1591 | HerculesRMX.Controls = { |
1592 | - "Balance" : new HerculesRMX.Control("balance", false), |
1593 | - "Volume" : new HerculesRMX.Control("volume", false), |
1594 | - "CrossFader" : new HerculesRMX.Control("crossfader", false), |
1595 | - "HeadPhoneMix" : new HerculesRMX.Control("headMix", false), |
1596 | - "FlangerDepth" : new HerculesRMX.Control("lfoDepth", false), |
1597 | - "FlangerDelay" : new HerculesRMX.Control("lfoDelay", false), |
1598 | - "FlangerPeriod" : new HerculesRMX.Control("lfoPeriod", false) |
1599 | + "Balance" : new Control("balance", false), |
1600 | + "Volume" : new Control("volume", false), |
1601 | + "CrossFader" : new Control("crossfader", false), |
1602 | + "HeadPhoneMix" : new Control("headMix", false), |
1603 | + "FlangerDepth" : new Control("lfoDepth", false), |
1604 | + "FlangerDelay" : new Control("lfoDelay", false), |
1605 | + "FlangerPeriod" : new Control("lfoPeriod", false) |
1606 | }; |
1607 | HerculesRMX.Controls.Volume.minOutput = 0.0; |
1608 | HerculesRMX.Controls.Volume.midOutput = 1.0; |
1609 | @@ -194,16 +129,12 @@ |
1610 | * @param deckNumber |
1611 | * @param group |
1612 | */ |
1613 | -HerculesRMX.Deck = function (deckNumber, group) { |
1614 | - this.deckNumber = deckNumber; |
1615 | - this.group = group; |
1616 | - this.shiftMode = false; |
1617 | - this.scratching = false; |
1618 | - this.scratchTimer = -1; |
1619 | - this.cuePlaying = false; |
1620 | - this.playing = false; |
1621 | - this.Buttons = []; |
1622 | -}; |
1623 | +HerculesRMX.Deck = Deck; |
1624 | +HerculesRMX.shiftMode = false; |
1625 | +HerculesRMX.scratching = false; |
1626 | +HerculesRMX.scratchTimer = -1; |
1627 | +HerculesRMX.cuePlaying = false; |
1628 | +HerculesRMX.playing = false; |
1629 | |
1630 | HerculesRMX.Deck.prototype.jogMove = function(jogValue) { |
1631 | if(HerculesRMX.jogPlaylistScrollMode) { |
1632 | @@ -232,24 +163,26 @@ |
1633 | this.scratchTimer = -1; |
1634 | }; |
1635 | |
1636 | -HerculesRMX.Deck.prototype.setControlValue = HerculesRMX.setControlValue; |
1637 | - |
1638 | HerculesRMX.Deck.prototype.pitchResetHandler = function(value) { |
1639 | - if(value == HerculesRMX.ButtonState.pressed) { |
1640 | + if(value == ButtonState.pressed) { |
1641 | engine.setValue(this.group,"rate",0); |
1642 | - this.Buttons.PitchReset.setLed(HerculesRMX.LedState.on); |
1643 | + this.Buttons.PitchReset.setLed(LedState.on); |
1644 | } |
1645 | }; |
1646 | |
1647 | HerculesRMX.Deck.prototype.syncHandler = function(value) { |
1648 | - if(value == HerculesRMX.ButtonState.pressed) { |
1649 | - engine.setValue(this.group,"beatsync",0); |
1650 | - this.Buttons.Sync.setLed(HerculesRMX.LedState.on); |
1651 | + if(value == ButtonState.pressed) { |
1652 | + if(this.shiftMode) { |
1653 | + engine.setValue(this.group,"bpm_tap",1); |
1654 | + } else { |
1655 | + engine.setValue(this.group,"beatsync",0); |
1656 | + this.Buttons.Sync.setLed(LedState.on); |
1657 | + } |
1658 | } |
1659 | }; |
1660 | |
1661 | HerculesRMX.Deck.prototype.keypad1Handler = function(value) { |
1662 | - if(value == HerculesRMX.ButtonState.pressed) { |
1663 | + if(value == ButtonState.pressed) { |
1664 | if(HerculesRMX.shiftMode) { |
1665 | if(engine.getValue(this.group,"flanger") == 0) { |
1666 | engine.setValue(this.group,"flanger",1); |
1667 | @@ -257,35 +190,35 @@ |
1668 | engine.setValue(this.group,"flanger",0); |
1669 | } |
1670 | } else if(this.shiftMode) { |
1671 | - engine.setValue(this.group,"hotcue_1_set", 1); |
1672 | + engine.setValue(this.group,"hotcue_1_clear", 1); |
1673 | } else { |
1674 | - engine.setValue(this.group,"hotcue_1_goto", 1); |
1675 | + engine.setValue(this.group,"hotcue_1_activate", 1); |
1676 | } |
1677 | } |
1678 | }; |
1679 | |
1680 | HerculesRMX.Deck.prototype.keypad2Handler = function(value) { |
1681 | - if(value == HerculesRMX.ButtonState.pressed) { |
1682 | + if(value == ButtonState.pressed) { |
1683 | if(this.shiftMode) { |
1684 | - engine.setValue(this.group,"hotcue_2_set", 1); |
1685 | + engine.setValue(this.group,"hotcue_2_clear", 1); |
1686 | } else { |
1687 | - engine.setValue(this.group,"hotcue_2_goto", 1); |
1688 | + engine.setValue(this.group,"hotcue_2_activate", 1); |
1689 | } |
1690 | } |
1691 | }; |
1692 | |
1693 | HerculesRMX.Deck.prototype.keypad3Handler = function(value) { |
1694 | - if(value == HerculesRMX.ButtonState.pressed) { |
1695 | + if(value == ButtonState.pressed) { |
1696 | if(this.shiftMode) { |
1697 | - engine.setValue(this.group,"hotcue_3_set", 1); |
1698 | + engine.setValue(this.group,"hotcue_3_clear", 1); |
1699 | } else { |
1700 | - engine.setValue(this.group,"hotcue_3_goto", 1); |
1701 | + engine.setValue(this.group,"hotcue_3_activate", 1); |
1702 | } |
1703 | } |
1704 | }; |
1705 | |
1706 | HerculesRMX.Deck.prototype.keypad4Handler = function(value) { |
1707 | - if(value == HerculesRMX.ButtonState.pressed) { |
1708 | + if(value == ButtonState.pressed) { |
1709 | if(HerculesRMX.shiftMode) { |
1710 | engine.setValue(this.group,"reverse",1); |
1711 | } else if(this.shiftMode) { |
1712 | @@ -298,14 +231,14 @@ |
1713 | |
1714 | HerculesRMX.Deck.prototype.keypad5Handler = function(value) { |
1715 | if(this.shiftMode) { |
1716 | - if(value == HerculesRMX.ButtonState.pressed) { |
1717 | + if(value == ButtonState.pressed) { |
1718 | engine.setValue(this.group,"loop_out",1); |
1719 | } |
1720 | } |
1721 | }; |
1722 | |
1723 | HerculesRMX.Deck.prototype.keypad6Handler = function(value) { |
1724 | - if(value == HerculesRMX.ButtonState.pressed) { |
1725 | + if(value == ButtonState.pressed) { |
1726 | if(this.shiftMode) { |
1727 | var loopIn = engine.getValue(this.group, "loop_start_position"); |
1728 | var loopOut = engine.getValue(this.group, "loop_end_position"); |
1729 | @@ -320,35 +253,35 @@ |
1730 | }; |
1731 | |
1732 | HerculesRMX.Deck.prototype.previousHandler = function(value) { |
1733 | - if(this.Buttons.Keypad1.state == HerculesRMX.ButtonState.pressed) { |
1734 | + if(this.Buttons.Keypad1.state == ButtonState.pressed) { |
1735 | //Move hotcue 1 backwards |
1736 | var hotcue = engine.getValue(this.group, "hotcue_1_position"); |
1737 | var newPosition = hotcue - 400; |
1738 | if(newPosition > 0) { |
1739 | engine.setValue(this.group, "hotcue_1_position", newPosition); |
1740 | } |
1741 | - } else if(this.Buttons.Keypad2.state == HerculesRMX.ButtonState.pressed) { |
1742 | + } else if(this.Buttons.Keypad2.state == ButtonState.pressed) { |
1743 | //Move hotcue 2 backwards |
1744 | var hotcue = engine.getValue(this.group, "hotcue_2_position"); |
1745 | var newPosition = hotcue - 400; |
1746 | if(newPosition > 0) { |
1747 | engine.setValue(this.group, "hotcue_2_position", newPosition); |
1748 | } |
1749 | - } else if(this.Buttons.Keypad3.state == HerculesRMX.ButtonState.pressed) { |
1750 | + } else if(this.Buttons.Keypad3.state == ButtonState.pressed) { |
1751 | //Move hotcue 3 backwards |
1752 | var hotcue = engine.getValue(this.group, "hotcue_3_position"); |
1753 | var newPosition = hotcue - 400; |
1754 | if(newPosition > 0) { |
1755 | engine.setValue(this.group, "hotcue_3_position", newPosition); |
1756 | } |
1757 | - } else if(this.Buttons.Keypad4.state == HerculesRMX.ButtonState.pressed) { |
1758 | + } else if(this.Buttons.Keypad4.state == ButtonState.pressed) { |
1759 | //Move loop-in backwards |
1760 | var loopIn = engine.getValue(this.group, "loop_start_position"); |
1761 | var newPosition = loopIn - 400; |
1762 | if(newPosition > 0) { |
1763 | engine.setValue(this.group, "loop_start_position", newPosition); |
1764 | } |
1765 | - } else if(this.Buttons.Keypad5.state == HerculesRMX.ButtonState.pressed) { |
1766 | + } else if(this.Buttons.Keypad5.state == ButtonState.pressed) { |
1767 | //Move loop-out backwards |
1768 | var loopIn = engine.getValue(this.group, "loop_start_position"); |
1769 | var loopOut = engine.getValue(this.group, "loop_end_position"); |
1770 | @@ -363,28 +296,28 @@ |
1771 | |
1772 | HerculesRMX.Deck.prototype.nextHandler = function(value) { |
1773 | //TODO: Fix movement of hotcues & loops out of track bounds |
1774 | - if(this.Buttons.Keypad1.state == HerculesRMX.ButtonState.pressed) { |
1775 | + if(this.Buttons.Keypad1.state == ButtonState.pressed) { |
1776 | //Move hotcue 1 forwards |
1777 | var hotcue = engine.getValue(this.group, "hotcue_1_position"); |
1778 | var newPosition = hotcue + 400; |
1779 | if(hotcue != -1) { |
1780 | engine.setValue(this.group, "hotcue_1_position", newPosition); |
1781 | } |
1782 | - } else if(this.Buttons.Keypad2.state == HerculesRMX.ButtonState.pressed) { |
1783 | + } else if(this.Buttons.Keypad2.state == ButtonState.pressed) { |
1784 | //Move hotcue 2 forwards |
1785 | var hotcue = engine.getValue(this.group, "hotcue_2_position"); |
1786 | var newPosition = hotcue + 400; |
1787 | if(hotcue != -1) { |
1788 | engine.setValue(this.group, "hotcue_2_position", newPosition); |
1789 | } |
1790 | - } else if(this.Buttons.Keypad3.state == HerculesRMX.ButtonState.pressed) { |
1791 | + } else if(this.Buttons.Keypad3.state == ButtonState.pressed) { |
1792 | //Move hotcue 3 forwards |
1793 | var hotcue = engine.getValue(this.group, "hotcue_3_position"); |
1794 | var newPosition = hotcue + 400; |
1795 | if(hotcue != -1 > 0) { |
1796 | engine.setValue(this.group, "hotcue_3_position", newPosition); |
1797 | } |
1798 | - } else if(this.Buttons.Keypad4.state == HerculesRMX.ButtonState.pressed) { |
1799 | + } else if(this.Buttons.Keypad4.state == ButtonState.pressed) { |
1800 | //Move loop-in forwards |
1801 | var loopIn = engine.getValue(this.group, "loop_start_position"); |
1802 | var loopOut = engine.getValue(this.group, "loop_end_position"); |
1803 | @@ -392,7 +325,7 @@ |
1804 | if(newPosition < loopOut) { |
1805 | engine.setValue(this.group, "loop_start_position", newPosition); |
1806 | } |
1807 | - } else if(this.Buttons.Keypad5.state == HerculesRMX.ButtonState.pressed) { |
1808 | + } else if(this.Buttons.Keypad5.state == ButtonState.pressed) { |
1809 | //Move loop-out forwards |
1810 | var loopOut = engine.getValue(this.group, "loop_end_position"); |
1811 | var newPosition = loopOut + 400; |
1812 | @@ -402,32 +335,32 @@ |
1813 | } |
1814 | }; |
1815 | |
1816 | -HerculesRMX.Deck.prototype.playPauseHandler = function(value) { |
1817 | +/*HerculesRMX.Deck.prototype.playPauseHandler = function(value) { |
1818 | }; |
1819 | |
1820 | HerculesRMX.Deck.prototype.cueHandler = function(value) { |
1821 | - if(value == HerculesRMX.ButtonState.pressed) { |
1822 | + if(value == ButtonState.pressed) { |
1823 | //var position = engine.getValue(this.group,"playposition") * engine.getValue(this.group, "duration") * engine.getValue(this.group, "duration"); |
1824 | //var atCuePoint = engine.getValue(this.group,"cue_point") == position; |
1825 | //print("at cue: " + atCuePoint + ", playposition: " + position); |
1826 | engine.setValue(this.group,"cue_default",1); |
1827 | this.playing = false; |
1828 | - this.Buttons.PlayPause.setLed(HerculesRMX.LedState.off); |
1829 | + this.Buttons.PlayPause.setLed(LedState.off); |
1830 | //if(atCuePoint) { |
1831 | this.cuePlaying = true; |
1832 | - this.Buttons.Cue.setLed(HerculesRMX.LedState.on); |
1833 | + this.Buttons.Cue.setLed(LedState.on); |
1834 | //} |
1835 | } else { |
1836 | engine.setValue(this.group,"cue_default",0); |
1837 | if(this.cuePlaying) { |
1838 | this.cuePlaying = false; |
1839 | } |
1840 | - this.Buttons.Cue.setLed(HerculesRMX.LedState.off); |
1841 | + this.Buttons.Cue.setLed(LedState.off); |
1842 | } |
1843 | -}; |
1844 | +};*/ |
1845 | |
1846 | HerculesRMX.Deck.prototype.killHighHandler = function(value) { |
1847 | - if(value == HerculesRMX.ButtonState.pressed) { |
1848 | + if(value == ButtonState.pressed) { |
1849 | var filterStatus = engine.getValue(this.group, "filterHighKill"); |
1850 | if(filterStatus) { |
1851 | engine.setValue(this.group, "filterHighKill", 0); |
1852 | @@ -438,7 +371,7 @@ |
1853 | }; |
1854 | |
1855 | HerculesRMX.Deck.prototype.killMidHandler = function(value) { |
1856 | - if(value == HerculesRMX.ButtonState.pressed) { |
1857 | + if(value == ButtonState.pressed) { |
1858 | var filterStatus = engine.getValue(this.group, "filterMidKill"); |
1859 | if(filterStatus) { |
1860 | engine.setValue(this.group, "filterMidKill", 0); |
1861 | @@ -449,7 +382,7 @@ |
1862 | }; |
1863 | |
1864 | HerculesRMX.Deck.prototype.killLowHandler = function(value) { |
1865 | - if(value == HerculesRMX.ButtonState.pressed) { |
1866 | + if(value == ButtonState.pressed) { |
1867 | var filterStatus = engine.getValue(this.group, "filterLowKill"); |
1868 | if(filterStatus) { |
1869 | engine.setValue(this.group, "filterLowKill", 0); |
1870 | @@ -460,20 +393,20 @@ |
1871 | }; |
1872 | |
1873 | HerculesRMX.Deck.prototype.loadHandler = function(value) { |
1874 | - if(value == HerculesRMX.ButtonState.pressed) { |
1875 | + if(value == ButtonState.pressed) { |
1876 | engine.setValue(this.group, "LoadSelectedTrack", 1); |
1877 | } |
1878 | }; |
1879 | |
1880 | HerculesRMX.Deck.prototype.cueSelectHandler = function(value) { |
1881 | - if(value == HerculesRMX.ButtonState.pressed) { |
1882 | + if(value == ButtonState.pressed) { |
1883 | var filterStatus = engine.getValue(this.group, "pfl"); |
1884 | if(filterStatus) { |
1885 | engine.setValue(this.group, "pfl", 0); |
1886 | - this.Buttons.CueSelect.setLed(HerculesRMX.LedState.on); |
1887 | + this.Buttons.CueSelect.setLed(LedState.on); |
1888 | } else { |
1889 | engine.setValue(this.group, "pfl", 1); |
1890 | - this.Buttons.CueSelect.setLed(HerculesRMX.LedState.off); |
1891 | + this.Buttons.CueSelect.setLed(LedState.off); |
1892 | } |
1893 | } |
1894 | }; |
1895 | @@ -485,7 +418,7 @@ |
1896 | HerculesRMX.Deck.prototype.trebleHandler = function(value) { |
1897 | if(HerculesRMX.shiftMode) { |
1898 | //Flanger |
1899 | - HerculesRMX.Controls.FlangerDepth.setValue("[Flanger]", value); |
1900 | + Controls.FlangerDepth.setValue("[Flanger]", value); |
1901 | } else if(this.shiftMode) { |
1902 | //Soft set |
1903 | this.Controls.Treble.softMode = true; |
1904 | @@ -499,7 +432,7 @@ |
1905 | HerculesRMX.Deck.prototype.mediumHandler = function(value) { |
1906 | if(HerculesRMX.shiftMode) { |
1907 | //Flanger |
1908 | - HerculesRMX.Controls.FlangerDelay.setValue("[Flanger]", value); |
1909 | + Controls.FlangerDelay.setValue("[Flanger]", value); |
1910 | } else if(this.shiftMode) { |
1911 | //Soft set |
1912 | this.Controls.Medium.softMode = true; |
1913 | @@ -513,7 +446,7 @@ |
1914 | HerculesRMX.Deck.prototype.bassHandler = function(value) { |
1915 | if(HerculesRMX.shiftMode) { |
1916 | //Flanger |
1917 | - HerculesRMX.Controls.FlangerPeriod.setValue("[Flanger]", value); |
1918 | + Controls.FlangerPeriod.setValue("[Flanger]", value); |
1919 | } else if(this.shiftMode) { |
1920 | //Soft set |
1921 | this.Controls.Bass.softMode = true; |
1922 | @@ -533,7 +466,7 @@ |
1923 | }; |
1924 | |
1925 | HerculesRMX.Deck.prototype.shiftHandler = function(value) { |
1926 | - if(value == HerculesRMX.ButtonState.pressed) { |
1927 | + if(value == ButtonState.pressed) { |
1928 | this.shiftMode = true; |
1929 | } else { |
1930 | this.shiftMode = false; |
1931 | @@ -541,15 +474,13 @@ |
1932 | }; |
1933 | |
1934 | HerculesRMX.Deck.prototype.stopHandler = function(value) { |
1935 | - if(value == HerculesRMX.ButtonState.pressed) { |
1936 | + if(value == ButtonState.pressed) { |
1937 | engine.setValue(this.group, "cue_default", 0); |
1938 | engine.setValue(this.group, "play", 0); |
1939 | engine.setValue(this.group, "start", 0); |
1940 | } |
1941 | }; |
1942 | |
1943 | -HerculesRMX.Deck.prototype.addButton = HerculesRMX.addButton; |
1944 | - |
1945 | HerculesRMX.Decks = {"Left":new HerculesRMX.Deck(1,"[Channel1]"), "Right":new HerculesRMX.Deck(2,"[Channel2]")}; |
1946 | HerculesRMX.GroupToDeck = {"[Channel1]":"Left", "[Channel2]":"Right"}; |
1947 | |
1948 | @@ -584,12 +515,12 @@ |
1949 | HerculesRMX.Decks.Left.addButton("Stop", new HerculesRMX.Button(0x0D), "stopHandler"); |
1950 | |
1951 | HerculesRMX.Decks.Left.Controls = { |
1952 | - "Gain" : new HerculesRMX.Control("pregain", false), |
1953 | - "Treble" : new HerculesRMX.Control("filterHigh", false), |
1954 | - "Medium" : new HerculesRMX.Control("filterMid", false), |
1955 | - "Bass" : new HerculesRMX.Control("filterLow", false), |
1956 | - "Vol" : new HerculesRMX.Control("volume", false), |
1957 | - "Pitch" : new HerculesRMX.Control("rate", false) |
1958 | + "Gain" : new Control("pregain", false), |
1959 | + "Treble" : new Control("filterHigh", false), |
1960 | + "Medium" : new Control("filterMid", false), |
1961 | + "Bass" : new Control("filterLow", false), |
1962 | + "Vol" : new Control("volume", false), |
1963 | + "Pitch" : new Control("rate", false) |
1964 | }; |
1965 | HerculesRMX.Decks.Left.Controls.Gain.minOutput = 0.0; |
1966 | HerculesRMX.Decks.Left.Controls.Gain.midOutput = 1.0; |
1967 | @@ -631,12 +562,12 @@ |
1968 | HerculesRMX.Decks.Right.addButton("Stop", new HerculesRMX.Button(0x25), "stopHandler"); |
1969 | |
1970 | HerculesRMX.Decks.Right.Controls = { |
1971 | - "Gain" : new HerculesRMX.Control("pregain", false), |
1972 | - "Treble" : new HerculesRMX.Control("filterHigh", false), |
1973 | - "Medium" : new HerculesRMX.Control("filterMid", false), |
1974 | - "Bass" : new HerculesRMX.Control("filterLow", false), |
1975 | - "Vol" : new HerculesRMX.Control("volume", false), |
1976 | - "Pitch" : new HerculesRMX.Control("rate", false) |
1977 | + "Gain" : new Control("pregain", false), |
1978 | + "Treble" : new Control("filterHigh", false), |
1979 | + "Medium" : new Control("filterMid", false), |
1980 | + "Bass" : new Control("filterLow", false), |
1981 | + "Vol" : new Control("volume", false), |
1982 | + "Pitch" : new Control("rate", false) |
1983 | }; |
1984 | HerculesRMX.Decks.Right.Controls.Gain.minOutput = 0.0; |
1985 | HerculesRMX.Decks.Right.Controls.Gain.midOutput = 1.0; |
1986 | @@ -845,16 +776,16 @@ |
1987 | }; |
1988 | |
1989 | HerculesRMX.killLeds = function() { |
1990 | - HerculesRMX.Buttons.Scratch.setLed(HerculesRMX.LedState.off); |
1991 | + HerculesRMX.Buttons.Scratch.setLed(LedState.off); |
1992 | //TODO: remove timers when alsa midi work properly. |
1993 | var button; |
1994 | var time = 20; |
1995 | for (var key in HerculesRMX.Decks.Left.Buttons) { |
1996 | - engine.beginTimer(time, "HerculesRMX.Decks.Left.Buttons['" + key + "'].setLed(HerculesRMX.LedState.off)", true); |
1997 | + engine.beginTimer(time, "HerculesRMX.Decks.Left.Buttons['" + key + "'].setLed(LedState.off)", true); |
1998 | time = time + 5; |
1999 | } |
2000 | for (var key in HerculesRMX.Decks.Right.Buttons) { |
2001 | - engine.beginTimer(time, "HerculesRMX.Decks.Right.Buttons['" + key + "'].setLed(HerculesRMX.LedState.off)", true); |
2002 | + engine.beginTimer(time, "HerculesRMX.Decks.Right.Buttons['" + key + "'].setLed(LedState.off)", true); |
2003 | time = time + 5; |
2004 | } |
2005 | } |
2006 | @@ -862,15 +793,15 @@ |
2007 | //Rate change event handler to reset sync and reset leds |
2008 | //TODO: Need some way to check sync state here. |
2009 | HerculesRMX.rateChange = function (value, group) { |
2010 | - if (HerculesRMX.Decks.Left.Buttons.Sync.state != HerculesRMX.ButtonState.pressed) { |
2011 | - HerculesRMX.Decks.Left.Buttons.Sync.setLed(HerculesRMX.LedState.off); |
2012 | + if (HerculesRMX.Decks.Left.Buttons.Sync.state != ButtonState.pressed) { |
2013 | + HerculesRMX.Decks.Left.Buttons.Sync.setLed(LedState.off); |
2014 | } |
2015 | - if (HerculesRMX.Decks.Right.Buttons.Sync.state != HerculesRMX.ButtonState.pressed) { |
2016 | - engine.beginTimer(25, "HerculesRMX.Decks.Right.Buttons.Sync.setLed(HerculesRMX.LedState.off)", true); |
2017 | + if (HerculesRMX.Decks.Right.Buttons.Sync.state != ButtonState.pressed) { |
2018 | + engine.beginTimer(25, "HerculesRMX.Decks.Right.Buttons.Sync.setLed(LedState.off)", true); |
2019 | } |
2020 | if (value != 0.0) { |
2021 | var deck = HerculesRMX.GetDeck(group); |
2022 | - engine.beginTimer(30, "HerculesRMX.GetDeck('" + group + "').Buttons.PitchReset.setLed(HerculesRMX.LedState.off)", true); |
2023 | + engine.beginTimer(30, "HerculesRMX.GetDeck('" + group + "').Buttons.PitchReset.setLed(LedState.off)", true); |
2024 | } |
2025 | }; |
2026 | |
2027 | |
2028 | === added file 'mixxx/res/midi/Numark NS7.midi.xml' |
2029 | --- mixxx/res/midi/Numark NS7.midi.xml 1970-01-01 00:00:00 +0000 |
2030 | +++ mixxx/res/midi/Numark NS7.midi.xml 2010-12-20 00:27:58 +0000 |
2031 | @@ -0,0 +1,569 @@ |
2032 | +<?xml version="1.0" encoding="utf-8"?> |
2033 | +<MixxxMIDIPreset vschemaVersion="1" mixxxVersion="1.9.0"> |
2034 | + <info> |
2035 | + <name>Numark NS7</name> |
2036 | + <author>Anders Gunnarsson</author> |
2037 | + <description>Numark NS7 controller preliminary mapping, v1.9.0 Requires script v1.9.0</description> |
2038 | + </info> |
2039 | + <controller id="Numark NS7 MIDI"> |
2040 | + <scriptfiles> |
2041 | + <file filename="Numark-NS7-scripts.js" functionprefix="NumarkNS7"/> |
2042 | + </scriptfiles> |
2043 | + <controls> |
2044 | + <!-- Deck A --> |
2045 | + <control> |
2046 | + <group>[Channel1]</group> |
2047 | + <key>rate</key> |
2048 | + <status>0xB0</status> |
2049 | + <midino>0x04</midino> |
2050 | + </control> |
2051 | + <control> |
2052 | + <group>[Channel1]</group> |
2053 | + <key>rate_temp_down</key> |
2054 | + <status>0x90</status> |
2055 | + <midino>0x18</midino> |
2056 | + <options> |
2057 | + <Button /> |
2058 | + </options> |
2059 | + </control> |
2060 | + <control> |
2061 | + <group>[Channel1]</group> |
2062 | + <key>rate_temp_up</key> |
2063 | + <status>0x90</status> |
2064 | + <midino>0x19</midino> |
2065 | + <options> |
2066 | + <Button /> |
2067 | + </options> |
2068 | + </control> |
2069 | + <control> |
2070 | + <group>[Channel1]</group> |
2071 | + <key>beatsync</key> |
2072 | + <status>0x90</status> |
2073 | + <midino>0x0F</midino> |
2074 | + <options> |
2075 | + <Button /> |
2076 | + </options> |
2077 | + </control> |
2078 | + <control> |
2079 | + <group>[Channel1]</group> |
2080 | + <key>NumarkNS7.rate_range</key> |
2081 | + <status>0x90</status> |
2082 | + <midino>0x1A</midino> |
2083 | + <options> |
2084 | + <Script-Binding /> |
2085 | + </options> |
2086 | + </control> |
2087 | + <control> |
2088 | + <group>[Channel1]</group> |
2089 | + <key>cue_default</key> |
2090 | + <status>0x90</status> |
2091 | + <midino>0x10</midino> |
2092 | + <options> |
2093 | + <Button /> |
2094 | + </options> |
2095 | + </control> |
2096 | + <control> |
2097 | + <group>[Channel1]</group> |
2098 | + <key>play</key> |
2099 | + <status>0x90</status> |
2100 | + <midino>0x11</midino> |
2101 | + <options> |
2102 | + <Button /> |
2103 | + </options> |
2104 | + </control> |
2105 | + <control> |
2106 | + <group>[Channel1]</group> |
2107 | + <key>hotcue_1_activate</key> |
2108 | + <status>0x90</status> |
2109 | + <midino>0x13</midino> |
2110 | + <options> |
2111 | + <Button /> |
2112 | + </options> |
2113 | + </control> |
2114 | + <control> |
2115 | + <group>[Channel1]</group> |
2116 | + <key>hotcue_2_activate</key> |
2117 | + <status>0x90</status> |
2118 | + <midino>0x14</midino> |
2119 | + <options> |
2120 | + <Button /> |
2121 | + </options> |
2122 | + </control> |
2123 | + <control> |
2124 | + <group>[Channel1]</group> |
2125 | + <key>hotcue_3_activate</key> |
2126 | + <status>0x90</status> |
2127 | + <midino>0x15</midino> |
2128 | + <options> |
2129 | + <Button /> |
2130 | + </options> |
2131 | + </control> |
2132 | + <control> |
2133 | + <group>[Channel1]</group> |
2134 | + <key>hotcue_4_activate</key> |
2135 | + <status>0x90</status> |
2136 | + <midino>0x16</midino> |
2137 | + <options> |
2138 | + <Button /> |
2139 | + </options> |
2140 | + </control> |
2141 | + <control> |
2142 | + <group>[Channel1]</group> |
2143 | + <key>hotcue_5_activate</key> |
2144 | + <status>0x90</status> |
2145 | + <midino>0x17</midino> |
2146 | + <options> |
2147 | + <Button /> |
2148 | + </options> |
2149 | + </control> |
2150 | + <control> |
2151 | + <group>[Channel1]</group> |
2152 | + <key>loop_in</key> |
2153 | + <status>0x90</status> |
2154 | + <midino>0x28</midino> |
2155 | + <options> |
2156 | + <Button /> |
2157 | + </options> |
2158 | + </control> |
2159 | + <control> |
2160 | + <group>[Channel1]</group> |
2161 | + <key>loop_out</key> |
2162 | + <status>0x90</status> |
2163 | + <midino>0x29</midino> |
2164 | + <options> |
2165 | + <Button /> |
2166 | + </options> |
2167 | + </control> |
2168 | + <control> |
2169 | + <group>[Channel1]</group> |
2170 | + <key>reloop_exit</key> |
2171 | + <status>0x90</status> |
2172 | + <midino>0x31</midino> |
2173 | + <options> |
2174 | + <Button /> |
2175 | + </options> |
2176 | + </control> |
2177 | + <control> |
2178 | + <group>[Channel1]</group> |
2179 | + <key>NumarkNS7.scratch</key> |
2180 | + <status>0x90</status> |
2181 | + <midino>0x21</midino> |
2182 | + <options> |
2183 | + <Script-Binding/> |
2184 | + </options> |
2185 | + </control> |
2186 | + <control> |
2187 | + <group>[Channel1]</group> |
2188 | + <key>back</key> |
2189 | + <status>0x90</status> |
2190 | + <midino>0x1F</midino> |
2191 | + <options> |
2192 | + <Button /> |
2193 | + </options> |
2194 | + </control> |
2195 | + <control> |
2196 | + <group>[Channel1]</group> |
2197 | + <key>fwd</key> |
2198 | + <status>0x90</status> |
2199 | + <midino>0x20</midino> |
2200 | + <options> |
2201 | + <Button /> |
2202 | + </options> |
2203 | + </control> |
2204 | + <control> |
2205 | + <group>[Channel1]</group> |
2206 | + <key>keylock</key> |
2207 | + <status>0x90</status> |
2208 | + <midino>0x1B</midino> |
2209 | + <options> |
2210 | + <Button /> |
2211 | + </options> |
2212 | + </control> |
2213 | + <control> |
2214 | + <group>[Channel1]</group> |
2215 | + <key>LoadSelectedTrack</key> |
2216 | + <status>0x90</status> |
2217 | + <midino>0x0C</midino> |
2218 | + <options> |
2219 | + <Button /> |
2220 | + </options> |
2221 | + </control> |
2222 | + <control> |
2223 | + <group>[Channel1]</group> |
2224 | + <key>NumarkNS7.jog_move</key> |
2225 | + <status>0xB0</status> |
2226 | + <midino>0x00</midino> |
2227 | + <options> |
2228 | + <Script-Binding/> |
2229 | + </options> |
2230 | + </control> |
2231 | + <control> |
2232 | + <group>[Channel1]</group> |
2233 | + <key>playposition</key> |
2234 | + <status>0xB0</status> |
2235 | + <midino>0x45</midino> |
2236 | + </control> |
2237 | + |
2238 | + <!-- Deck B --> |
2239 | + <control> |
2240 | + <group>[Channel2]</group> |
2241 | + <key>rate</key> |
2242 | + <status>0xB0</status> |
2243 | + <midino>0x05</midino> |
2244 | + </control> |
2245 | + <control> |
2246 | + <group>[Channel2]</group> |
2247 | + <key>rate_temp_down</key> |
2248 | + <status>0x90</status> |
2249 | + <midino>0x39</midino> |
2250 | + <options> |
2251 | + <Button /> |
2252 | + </options> |
2253 | + </control> |
2254 | + <control> |
2255 | + <group>[Channel2]</group> |
2256 | + <key>rate_temp_up</key> |
2257 | + <status>0x90</status> |
2258 | + <midino>0x3A</midino> |
2259 | + <options> |
2260 | + <Button /> |
2261 | + </options> |
2262 | + </control> |
2263 | + <control> |
2264 | + <group>[Channel2]</group> |
2265 | + <key>beatsync</key> |
2266 | + <status>0x90</status> |
2267 | + <midino>0x30</midino> |
2268 | + <options> |
2269 | + <Button /> |
2270 | + </options> |
2271 | + </control> |
2272 | + <control> |
2273 | + <group>[Channel2]</group> |
2274 | + <key>NumarkNS7.rate_range</key> |
2275 | + <status>0x90</status> |
2276 | + <midino>0x3B</midino> |
2277 | + <options> |
2278 | + <Script-Binding /> |
2279 | + </options> |
2280 | + </control> |
2281 | + <control> |
2282 | + <group>[Channel2]</group> |
2283 | + <key>cue_default</key> |
2284 | + <status>0x90</status> |
2285 | + <midino>0x31</midino> |
2286 | + <options> |
2287 | + <Button /> |
2288 | + </options> |
2289 | + </control> |
2290 | + <control> |
2291 | + <group>[Channel2]</group> |
2292 | + <key>play</key> |
2293 | + <status>0x90</status> |
2294 | + <midino>0x32</midino> |
2295 | + <options> |
2296 | + <Button /> |
2297 | + </options> |
2298 | + </control> |
2299 | + <control> |
2300 | + <group>[Channel2]</group> |
2301 | + <key>hotcue_1_activate</key> |
2302 | + <status>0x90</status> |
2303 | + <midino>0x34</midino> |
2304 | + <options> |
2305 | + <Button /> |
2306 | + </options> |
2307 | + </control> |
2308 | + <control> |
2309 | + <group>[Channel2]</group> |
2310 | + <key>hotcue_2_activate</key> |
2311 | + <status>0x90</status> |
2312 | + <midino>0x35</midino> |
2313 | + <options> |
2314 | + <Button /> |
2315 | + </options> |
2316 | + </control> |
2317 | + <control> |
2318 | + <group>[Channel2]</group> |
2319 | + <key>hotcue_3_activate</key> |
2320 | + <status>0x90</status> |
2321 | + <midino>0x36</midino> |
2322 | + <options> |
2323 | + <Button /> |
2324 | + </options> |
2325 | + </control> |
2326 | + <control> |
2327 | + <group>[Channel2]</group> |
2328 | + <key>hotcue_4_activate</key> |
2329 | + <status>0x90</status> |
2330 | + <midino>0x37</midino> |
2331 | + <options> |
2332 | + <Button /> |
2333 | + </options> |
2334 | + </control> |
2335 | + <control> |
2336 | + <group>[Channel2]</group> |
2337 | + <key>hotcue_5_activate</key> |
2338 | + <status>0x90</status> |
2339 | + <midino>0x38</midino> |
2340 | + <options> |
2341 | + <Button /> |
2342 | + </options> |
2343 | + </control> |
2344 | + <control> |
2345 | + <group>[Channel2]</group> |
2346 | + <key>loop_in</key> |
2347 | + <status>0x90</status> |
2348 | + <midino>0x49</midino> |
2349 | + <options> |
2350 | + <Button /> |
2351 | + </options> |
2352 | + </control> |
2353 | + <control> |
2354 | + <group>[Channel2]</group> |
2355 | + <key>loop_out</key> |
2356 | + <status>0x90</status> |
2357 | + <midino>0x50</midino> |
2358 | + <options> |
2359 | + <Button /> |
2360 | + </options> |
2361 | + </control> |
2362 | + <control> |
2363 | + <group>[Channel2]</group> |
2364 | + <key>reloop_exit</key> |
2365 | + <status>0x90</status> |
2366 | + <midino>0x52</midino> |
2367 | + <options> |
2368 | + <Button /> |
2369 | + </options> |
2370 | + </control> |
2371 | + <control> |
2372 | + <group>[Channel2]</group> |
2373 | + <key>NumarkNS7.scratch</key> |
2374 | + <status>0x90</status> |
2375 | + <midino>0x42</midino> |
2376 | + <options> |
2377 | + <Script-Binding/> |
2378 | + </options> |
2379 | + </control> |
2380 | + <control> |
2381 | + <group>[Channel2]</group> |
2382 | + <key>back</key> |
2383 | + <status>0x90</status> |
2384 | + <midino>0x40</midino> |
2385 | + <options> |
2386 | + <Button /> |
2387 | + </options> |
2388 | + </control> |
2389 | + <control> |
2390 | + <group>[Channel2]</group> |
2391 | + <key>fwd</key> |
2392 | + <status>0x90</status> |
2393 | + <midino>0x41</midino> |
2394 | + <options> |
2395 | + <Button /> |
2396 | + </options> |
2397 | + </control> |
2398 | + <control> |
2399 | + <group>[Channel2]</group> |
2400 | + <key>keylock</key> |
2401 | + <status>0x90</status> |
2402 | + <midino>0x3C</midino> |
2403 | + <options> |
2404 | + <Button /> |
2405 | + </options> |
2406 | + </control> |
2407 | + <control> |
2408 | + <group>[Channel2]</group> |
2409 | + <key>LoadSelectedTrack</key> |
2410 | + <status>0x90</status> |
2411 | + <midino>0x0E</midino> |
2412 | + <options> |
2413 | + <Button /> |
2414 | + </options> |
2415 | + </control> |
2416 | + <control> |
2417 | + <group>[Channel2]</group> |
2418 | + <key>NumarkNS7.jog_move</key> |
2419 | + <status>0xB0</status> |
2420 | + <midino>0x02</midino> |
2421 | + <options> |
2422 | + <Script-Binding/> |
2423 | + </options> |
2424 | + </control> |
2425 | + <control> |
2426 | + <group>[Channel2]</group> |
2427 | + <key>playposition</key> |
2428 | + <status>0xB0</status> |
2429 | + <midino>0x4D</midino> |
2430 | + </control> |
2431 | + |
2432 | + <!-- Mixer main--> |
2433 | + <control> |
2434 | + <group>[Master]</group> |
2435 | + <key>crossfader</key> |
2436 | + <status>0xB0</status> |
2437 | + <midino>0x07</midino> |
2438 | + </control> |
2439 | + <!-- <control> |
2440 | + <group>[Master]</group> |
2441 | + <key>NumarkNS7.crossfader_lsb</key> |
2442 | + <status>0xB0</status> |
2443 | + <midino>0x1F</midino> |
2444 | + <options> |
2445 | + <Script-Binding/> |
2446 | + </options> |
2447 | + </control> --> |
2448 | + <control> |
2449 | + <group>[Master]</group> |
2450 | + <key>headMix</key> |
2451 | + <status>0xB0</status> |
2452 | + <midino>0x12</midino> |
2453 | + </control> |
2454 | + <control> |
2455 | + <group>[Master]</group> |
2456 | + <key>headVolume</key> |
2457 | + <status>0xB0</status> |
2458 | + <midino>0x42</midino> |
2459 | + </control> |
2460 | + <control> |
2461 | + <group>[Master]</group> |
2462 | + <key>volume</key> |
2463 | + <status>0xB0</status> |
2464 | + <midino>0x40</midino> |
2465 | + </control> |
2466 | + |
2467 | + <!-- Mixer channel 1 --> |
2468 | + <control> |
2469 | + <group>[Channel1]</group> |
2470 | + <key>pregain</key> |
2471 | + <status>0xB0</status> |
2472 | + <midino>0x0C</midino> |
2473 | + </control> |
2474 | + <control> |
2475 | + <group>[Channel1]</group> |
2476 | + <key>filterHigh</key> |
2477 | + <status>0xB0</status> |
2478 | + <midino>0x0B</midino> |
2479 | + </control> |
2480 | + <control> |
2481 | + <group>[Channel1]</group> |
2482 | + <key>filterMid</key> |
2483 | + <status>0xB0</status> |
2484 | + <midino>0x0A</midino> |
2485 | + </control> |
2486 | + <control> |
2487 | + <group>[Channel1]</group> |
2488 | + <key>filterLow</key> |
2489 | + <status>0xB0</status> |
2490 | + <midino>0x09</midino> |
2491 | + </control> |
2492 | + <control> |
2493 | + <group>[Channel1]</group> |
2494 | + <key>volume</key> |
2495 | + <status>0xB0</status> |
2496 | + <midino>0x08</midino> |
2497 | + </control> |
2498 | + |
2499 | + <!-- Mixer channel 2 --> |
2500 | + <control> |
2501 | + <group>[Channel2]</group> |
2502 | + <key>pregain</key> |
2503 | + <status>0xB0</status> |
2504 | + <midino>0x11</midino> |
2505 | + </control> |
2506 | + <control> |
2507 | + <group>[Channel2]</group> |
2508 | + <key>filterHigh</key> |
2509 | + <status>0xB0</status> |
2510 | + <midino>0x10</midino> |
2511 | + </control> |
2512 | + <control> |
2513 | + <group>[Channel2]</group> |
2514 | + <key>filterMid</key> |
2515 | + <status>0xB0</status> |
2516 | + <midino>0x0F</midino> |
2517 | + </control> |
2518 | + <control> |
2519 | + <group>[Channel2]</group> |
2520 | + <key>filterLow</key> |
2521 | + <status>0xB0</status> |
2522 | + <midino>0x0E</midino> |
2523 | + </control> |
2524 | + <control> |
2525 | + <group>[Channel2]</group> |
2526 | + <key>volume</key> |
2527 | + <status>0xB0</status> |
2528 | + <midino>0x0D</midino> |
2529 | + </control> |
2530 | + </controls> |
2531 | + <outputs> |
2532 | + <output> |
2533 | + <group>[Channel1]</group> |
2534 | + <key>play</key> |
2535 | + <status>0xB0</status> |
2536 | + <midino>0x09</midino> |
2537 | + <minimum>0.5</minimum> |
2538 | + </output> |
2539 | + <output> |
2540 | + <group>[Channel2]</group> |
2541 | + <key>play</key> |
2542 | + <status>0xB0</status> |
2543 | + <midino>0x1F</midino> |
2544 | + <minimum>0.5</minimum> |
2545 | + </output> |
2546 | + <output> |
2547 | + <group>[Channel1]</group> |
2548 | + <key>cue_default</key> |
2549 | + <status>0xB0</status> |
2550 | + <midino>0x08</midino> |
2551 | + <minimum>0.5</minimum> |
2552 | + </output> |
2553 | + <output> |
2554 | + <group>[Channel2]</group> |
2555 | + <key>cue_default</key> |
2556 | + <status>0xB0</status> |
2557 | + <midino>0x1E</midino> |
2558 | + <minimum>0.5</minimum> |
2559 | + </output> |
2560 | + <output> |
2561 | + <group>[Channel1]</group> |
2562 | + <key>playposition</key> |
2563 | + <status>0xB0</status> |
2564 | + <midino>0x3B</midino> |
2565 | + <minimum>0.9</minimum> |
2566 | + <maximum>0.99</maximum> |
2567 | + </output> |
2568 | + <output> |
2569 | + <group>[Channel2]</group> |
2570 | + <key>playposition</key> |
2571 | + <status>0xB0</status> |
2572 | + <midino>0x53</midino> |
2573 | + <minimum>0.9</minimum> |
2574 | + <maximum>0.99</maximum> |
2575 | + </output> |
2576 | + |
2577 | + <!-- Headphone Cue --> |
2578 | + <output> |
2579 | + <group>[Channel1]</group> |
2580 | + <key>pfl</key> |
2581 | + <status>0xB0</status> |
2582 | + <midino>0x14</midino> |
2583 | + <minimum>0.5</minimum> |
2584 | + </output> |
2585 | + <output> |
2586 | + <group>[Channel2]</group> |
2587 | + <key>pfl</key> |
2588 | + <status>0xB0</status> |
2589 | + <midino>0x18</midino> |
2590 | + <minimum>0.5</minimum> |
2591 | + </output> |
2592 | + <output> |
2593 | + <group>[Master]</group> |
2594 | + <key>VuMeter</key> |
2595 | + <status>0xB0</status> |
2596 | + <midino>0x36</midino> |
2597 | + </output> |
2598 | + </outputs> |
2599 | + </controller> |
2600 | +</MixxxMIDIPreset> |
2601 | |
2602 | === added file 'mixxx/res/midi/Numark-NS7-scripts.js' |
2603 | --- mixxx/res/midi/Numark-NS7-scripts.js 1970-01-01 00:00:00 +0000 |
2604 | +++ mixxx/res/midi/Numark-NS7-scripts.js 2010-12-20 00:27:58 +0000 |
2605 | @@ -0,0 +1,111 @@ |
2606 | +/** |
2607 | + * Numark NS7 controller script v1.9.0 |
2608 | + * Copyright (C) 2010 Anders Gunnarsson |
2609 | + * |
2610 | + * This program is free software; you can redistribute it and/or |
2611 | + * modify it under the terms of the GNU General Public License |
2612 | + * as published by the Free Software Foundation; either version 2 |
2613 | + * of the License, or (at your option) any later version. |
2614 | + * |
2615 | + * This program is distributed in the hope that it will be useful, |
2616 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2617 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2618 | + * GNU General Public License for more details. |
2619 | + * |
2620 | + * You should have received a copy of the GNU General Public License |
2621 | + * along with this program; if not, write to the Free Software |
2622 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
2623 | + **/ |
2624 | +NumarkNS7 = new Controller(); |
2625 | +NumarkNS7.RateRanges = [0.08, 0.10, 0.30, 1.00]; |
2626 | + |
2627 | + |
2628 | + |
2629 | +NumarkNS7.Deck = Deck; |
2630 | +NumarkNS7.Deck.scratchMode = false; |
2631 | +NumarkNS7.Deck.rateRange = NumarkNS7.RateRanges[1]; |
2632 | + |
2633 | +NumarkNS7.Deck.prototype.rateRangeHandler = function(value) { |
2634 | + if(value == ButtonState.pressed) { |
2635 | + var i; |
2636 | + for(i=0; i < NumarkNS7.RateRanges.length; i++) { |
2637 | + if(NumarkNS7.RateRanges[i] == this.rateRange) { |
2638 | + break; |
2639 | + } |
2640 | + } |
2641 | + |
2642 | + //Found correct value increment by one |
2643 | + i++; |
2644 | + |
2645 | + //Wrap if needed |
2646 | + if(i == NumarkNS7.RateRanges.length) { |
2647 | + i = 0; |
2648 | + } |
2649 | + |
2650 | + this.rateRange = NumarkNS7.RateRanges[i]; |
2651 | + } |
2652 | +} |
2653 | + |
2654 | +NumarkNS7.Deck.prototype.scratchHandler = function(value) { |
2655 | + if(value == ButtonState.pressed) { |
2656 | + if(this.scratchMode) { |
2657 | + this.scratchMode = false; |
2658 | + this.Buttons.Scratch.setLed(LedState.on); |
2659 | + } else { |
2660 | + this.scratchMode = true; |
2661 | + this.Buttons.Scratch.setLed(LedState.on); |
2662 | + } |
2663 | + } |
2664 | +} |
2665 | + |
2666 | +NumarkNS7.Deck.prototype.jogMove = function(value) { |
2667 | + if(!isNaN(this.previousJogValue)) { |
2668 | + var offset = value - this.previousJogValue; |
2669 | + |
2670 | + if(offset > 63) { |
2671 | + offset = offset - 128; |
2672 | + } else if(offset < -63) { |
2673 | + offset = offset + 128; |
2674 | + } |
2675 | + |
2676 | + if(this.scratchMode) { |
2677 | + engine.scratchTick(this.deckNumber, offset); |
2678 | + } else { |
2679 | + engine.setValue(this.group,"jog", offset); |
2680 | + } |
2681 | + } |
2682 | + this.previousJogValue = value; |
2683 | +} |
2684 | + |
2685 | +NumarkNS7.Decks = {"Left":new NumarkNS7.Deck(1,"[Channel1]"), "Right":new NumarkNS7.Deck(2,"[Channel2]")}; |
2686 | +NumarkNS7.GroupToDeck = {"[Channel1]":"Left", "[Channel2]":"Right"}; |
2687 | + |
2688 | +NumarkNS7.GetDeck = function(group) { |
2689 | + try { |
2690 | + return NumarkNS7.Decks[NumarkNS7.GroupToDeck[group]]; |
2691 | + } catch(ex) { |
2692 | + return null; |
2693 | + } |
2694 | +} |
2695 | + |
2696 | +NumarkNS7.Decks.Left.addButton("RateRange", new Button(), "rateRangeHandler"); |
2697 | +NumarkNS7.Decks.Left.addButton("Scratch", new Button(), "scratchHandler"); |
2698 | + |
2699 | +NumarkNS7.Decks.Right.addButton("RateRange", new Button(), "rateRangeHandler"); |
2700 | +NumarkNS7.Decks.Right.addButton("Scratch", new Button(), "scratchHandler"); |
2701 | + |
2702 | + |
2703 | +NumarkNS7.rate_range = function(channel, control, value, status, group) { |
2704 | + var deck = NumarkNS7.GetDeck(group); |
2705 | + deck.Buttons.RateRange.handleEvent(value); |
2706 | +} |
2707 | + |
2708 | +NumarkNS7.scratch = function(channel, control, value, status, group) { |
2709 | + var deck = NumarkNS7.GetDeck(group); |
2710 | + deck.Buttons.Scratch.handleEvent(value); |
2711 | +} |
2712 | + |
2713 | +NumarkNS7.jog_move = function(channel, control, value, status, group) { |
2714 | + var deck = NumarkNS7.GetDeck(group); |
2715 | + deck.jogMove(value); |
2716 | +} |
2717 | |
2718 | === added file 'mixxx/res/midi/Vestax Spin.midi.xml' |
2719 | --- mixxx/res/midi/Vestax Spin.midi.xml 1970-01-01 00:00:00 +0000 |
2720 | +++ mixxx/res/midi/Vestax Spin.midi.xml 2010-12-20 00:27:58 +0000 |
2721 | @@ -0,0 +1,579 @@ |
2722 | +<?xml version="1.0" encoding="utf-8"?> |
2723 | +<MixxxMIDIPreset schemaVersion="1" mixxxVersion="1.8.0+"> |
2724 | + <info> |
2725 | + <name>VestaxSpin.midi.xml</name> |
2726 | + <author>Bill Good, based on the work of Anders Gunnarsson</author> |
2727 | + <description>Bill's controller mapping for Vestax Spin + script</description> |
2728 | + </info> |
2729 | + <controller id="Vestax Spin"> |
2730 | + <scriptfiles> |
2731 | + <file filename="Vestax-Spin-scripts.js" functionprefix="VestaxSpin"/> |
2732 | + </scriptfiles> |
2733 | + <controls> |
2734 | + <control> |
2735 | + <group>[Channel1]</group> |
2736 | + <key>rate</key> |
2737 | + <status>0xB0</status> |
2738 | + <midino>0x0e</midino> |
2739 | + <options><Invert/></options> |
2740 | + </control> |
2741 | + <control> |
2742 | + <group>[Channel1]</group> |
2743 | + <key>rate_temp_down</key> |
2744 | + <status>0x90</status> |
2745 | + <midino>0x22</midino> |
2746 | + <options/> |
2747 | + </control> |
2748 | + <control> |
2749 | + <!-- sync --> |
2750 | + <group>[Channel1]</group> |
2751 | + <key>VestaxSpin.handleEvent</key> |
2752 | + <status>0x90</status> |
2753 | + <midino>0x46</midino> |
2754 | + <options><Script-Binding/></options> |
2755 | + </control> |
2756 | + <control> |
2757 | + <group>[Channel1]</group> |
2758 | + <key>rate_temp_up</key> |
2759 | + <status>0x90</status> |
2760 | + <midino>0x23</midino> |
2761 | + <options/> |
2762 | + </control> |
2763 | + <control> |
2764 | + <group>[Channel1]</group> |
2765 | + <key>reloop_exit</key> |
2766 | + <status>0x90</status> |
2767 | + <midino>0x20</midino> |
2768 | + <options/> |
2769 | + </control> |
2770 | + <control> |
2771 | + <!-- loop- --> |
2772 | + <group>[Channel1]</group> |
2773 | + <key>VestaxSpin.handleEvent</key> |
2774 | + <status>0x90</status> |
2775 | + <midino>0x21</midino> |
2776 | + <options><Script-Binding/></options> |
2777 | + </control> |
2778 | + <control> |
2779 | + <!-- loop+ --> |
2780 | + <group>[Channel1]</group> |
2781 | + <key>VestaxSpin.handleEvent</key> |
2782 | + <status>0x90</status> |
2783 | + <midino>0x42</midino> |
2784 | + <options><Script-Binding/></options> |
2785 | + </control> |
2786 | + <control> |
2787 | + <group>[Channel1]</group> |
2788 | + <key>filterLow</key> |
2789 | + <status>0xB0</status> |
2790 | + <midino>0x17</midino> |
2791 | + <options/> |
2792 | + </control> |
2793 | + <control> |
2794 | + <group>[Channel1]</group> |
2795 | + <key>filterMid</key> |
2796 | + <status>0xB0</status> |
2797 | + <midino>0x16</midino> |
2798 | + <options/> |
2799 | + </control> |
2800 | + <control> |
2801 | + <group>[Channel1]</group> |
2802 | + <key>filterHigh</key> |
2803 | + <status>0xB0</status> |
2804 | + <midino>0x15</midino> |
2805 | + <options/> |
2806 | + </control> |
2807 | + <control> |
2808 | + <group>[Channel1]</group> |
2809 | + <key>pregain</key> |
2810 | + <status>0xB0</status> |
2811 | + <midino>0x14</midino> |
2812 | + <options/> |
2813 | + </control> |
2814 | + <control> |
2815 | + <!-- filter --> |
2816 | + <group>[Channel1]</group> |
2817 | + <key>VestaxSpin.handleEvent</key> |
2818 | + <status>0x90</status> |
2819 | + <midino>0x24</midino> |
2820 | + <options><Script-Binding/></options> |
2821 | + </control> |
2822 | + <control> |
2823 | + <group>[Channel1]</group> |
2824 | + <key>pfl</key> |
2825 | + <status>0x90</status> |
2826 | + <midino>0x25</midino> |
2827 | + <options/> |
2828 | + </control> |
2829 | + <control> |
2830 | + <group>[Channel1]</group> |
2831 | + <key>volume</key> |
2832 | + <status>0xB0</status> |
2833 | + <midino>0x0c</midino> |
2834 | + <options/> |
2835 | + </control> |
2836 | + <control> |
2837 | + <group>[Channel1]</group> |
2838 | + <key>play</key> |
2839 | + <status>0x90</status> |
2840 | + <midino>0x32</midino> |
2841 | + </control> |
2842 | + <control> |
2843 | + <!-- cue --> |
2844 | + <group>[Channel1]</group> |
2845 | + <key>VestaxSpin.handleEvent</key> |
2846 | + <status>0x90</status> |
2847 | + <midino>0x35</midino> |
2848 | + <options><Script-Binding/></options> |
2849 | + </control> |
2850 | + <control> |
2851 | + <!-- cup --> |
2852 | + <group>[Channel1]</group> |
2853 | + <key>VestaxSpin.handleEvent</key> |
2854 | + <status>0x90</status> |
2855 | + <midino>0x33</midino> |
2856 | + <options><Script-Binding/></options> |
2857 | + </control> |
2858 | + <control> |
2859 | + <!-- back --> |
2860 | + <group>[Channel1]</group> |
2861 | + <key>VestaxSpin.handleEvent</key> |
2862 | + <status>0x90</status> |
2863 | + <midino>0x36</midino> |
2864 | + <options><Script-Binding/></options> |
2865 | + </control> |
2866 | + <control> |
2867 | + <!-- RR --> |
2868 | + <group>[Channel1]</group> |
2869 | + <key>VestaxSpin.handleEvent</key> |
2870 | + <status>0x90</status> |
2871 | + <midino>0x37</midino> |
2872 | + <options><Script-Binding/></options> |
2873 | + </control> |
2874 | + <control> |
2875 | + <!-- FF --> |
2876 | + <group>[Channel1]</group> |
2877 | + <key>VestaxSpin.handleEvent</key> |
2878 | + <status>0x90</status> |
2879 | + <midino>0x38</midino> |
2880 | + <options><Script-Binding/></options> |
2881 | + </control> |
2882 | + <control> |
2883 | + <!-- wheel touch --> |
2884 | + <group>[Channel1]</group> |
2885 | + <key>VestaxSpin.handleEvent</key> |
2886 | + <status>0x90</status> |
2887 | + <midino>0x2e</midino> |
2888 | + <options><Script-Binding/></options> |
2889 | + </control> |
2890 | + <control> |
2891 | + <!-- wheel touch (filter) --> |
2892 | + <group>[Channel1]</group> |
2893 | + <key>VestaxSpin.handleEvent</key> |
2894 | + <status>0x90</status> |
2895 | + <midino>0x2f</midino> |
2896 | + <options><Script-Binding/></options> |
2897 | + </control> |
2898 | + <control> |
2899 | + <!-- wheel jog --> |
2900 | + <group>[Channel1]</group> |
2901 | + <key>VestaxSpin.handleEvent</key> |
2902 | + <status>0xB0</status> |
2903 | + <midino>0x10</midino> |
2904 | + <options><Script-Binding/></options> |
2905 | + </control> |
2906 | + <control> |
2907 | + <!-- wheel scratch --> |
2908 | + <group>[Channel1]</group> |
2909 | + <key>VestaxSpin.handleEvent</key> |
2910 | + <status>0xB0</status> |
2911 | + <midino>0x11</midino> |
2912 | + <options><Script-Binding/></options> |
2913 | + </control> |
2914 | + |
2915 | + |
2916 | + <control> |
2917 | + <group>[Channel2]</group> |
2918 | + <key>rate</key> |
2919 | + <status>0xB1</status> |
2920 | + <midino>0x0e</midino> |
2921 | + <options><Invert/></options> |
2922 | + </control> |
2923 | + <control> |
2924 | + <group>[Channel2]</group> |
2925 | + <key>rate_temp_down</key> |
2926 | + <status>0x91</status> |
2927 | + <midino>0x22</midino> |
2928 | + <options/> |
2929 | + </control> |
2930 | + <control> |
2931 | + <!-- sync --> |
2932 | + <group>[Channel2]</group> |
2933 | + <key>VestaxSpin.handleEvent</key> |
2934 | + <status>0x91</status> |
2935 | + <midino>0x46</midino> |
2936 | + <options><Script-Binding/></options> |
2937 | + </control> |
2938 | + <control> |
2939 | + <group>[Channel2]</group> |
2940 | + <key>rate_temp_up</key> |
2941 | + <status>0x91</status> |
2942 | + <midino>0x23</midino> |
2943 | + <options/> |
2944 | + </control> |
2945 | + <control> |
2946 | + <group>[Channel2]</group> |
2947 | + <key>reloop_exit</key> |
2948 | + <status>0x91</status> |
2949 | + <midino>0x20</midino> |
2950 | + <options/> |
2951 | + </control> |
2952 | + <control> |
2953 | + <!-- loop- --> |
2954 | + <group>[Channel2]</group> |
2955 | + <key>VestaxSpin.handleEvent</key> |
2956 | + <status>0x91</status> |
2957 | + <midino>0x21</midino> |
2958 | + <options><Script-Binding/></options> |
2959 | + </control> |
2960 | + <control> |
2961 | + <!-- loop+ --> |
2962 | + <group>[Channel2]</group> |
2963 | + <key>VestaxSpin.handleEvent</key> |
2964 | + <status>0x91</status> |
2965 | + <midino>0x42</midino> |
2966 | + <options><Script-Binding/></options> |
2967 | + </control> |
2968 | + <control> |
2969 | + <group>[Channel2]</group> |
2970 | + <key>filterLow</key> |
2971 | + <status>0xB1</status> |
2972 | + <midino>0x17</midino> |
2973 | + <options/> |
2974 | + </control> |
2975 | + <control> |
2976 | + <group>[Channel2]</group> |
2977 | + <key>filterMid</key> |
2978 | + <status>0xB1</status> |
2979 | + <midino>0x16</midino> |
2980 | + <options/> |
2981 | + </control> |
2982 | + <control> |
2983 | + <group>[Channel2]</group> |
2984 | + <key>filterHigh</key> |
2985 | + <status>0xB1</status> |
2986 | + <midino>0x15</midino> |
2987 | + <options/> |
2988 | + </control> |
2989 | + <control> |
2990 | + <group>[Channel2]</group> |
2991 | + <key>pregain</key> |
2992 | + <status>0xB1</status> |
2993 | + <midino>0x14</midino> |
2994 | + <options/> |
2995 | + </control> |
2996 | + <control> |
2997 | + <!-- filter --> |
2998 | + <group>[Channel2]</group> |
2999 | + <key>VestaxSpin.handleEvent</key> |
3000 | + <status>0x91</status> |
3001 | + <midino>0x24</midino> |
3002 | + <options><Script-Binding/></options> |
3003 | + </control> |
3004 | + <control> |
3005 | + <group>[Channel2]</group> |
3006 | + <key>pfl</key> |
3007 | + <status>0x91</status> |
3008 | + <midino>0x25</midino> |
3009 | + <options/> |
3010 | + </control> |
3011 | + <control> |
3012 | + <group>[Channel2]</group> |
3013 | + <key>volume</key> |
3014 | + <status>0xB1</status> |
3015 | + <midino>0x0c</midino> |
3016 | + <options/> |
3017 | + </control> |
3018 | + <control> |
3019 | + <group>[Channel2]</group> |
3020 | + <key>play</key> |
3021 | + <status>0x91</status> |
3022 | + <midino>0x32</midino> |
3023 | + </control> |
3024 | + <control> |
3025 | + <!-- cue --> |
3026 | + <group>[Channel2]</group> |
3027 | + <key>VestaxSpin.handleEvent</key> |
3028 | + <status>0x91</status> |
3029 | + <midino>0x35</midino> |
3030 | + <options><Script-Binding/></options> |
3031 | + </control> |
3032 | + <control> |
3033 | + <!-- cup --> |
3034 | + <group>[Channel2]</group> |
3035 | + <key>VestaxSpin.handleEvent</key> |
3036 | + <status>0x91</status> |
3037 | + <midino>0x33</midino> |
3038 | + <options><Script-Binding/></options> |
3039 | + </control> |
3040 | + <control> |
3041 | + <!-- back --> |
3042 | + <group>[Channel2]</group> |
3043 | + <key>VestaxSpin.handleEvent</key> |
3044 | + <status>0x91</status> |
3045 | + <midino>0x36</midino> |
3046 | + <options><Script-Binding/></options> |
3047 | + </control> |
3048 | + <control> |
3049 | + <!-- RR --> |
3050 | + <group>[Channel2]</group> |
3051 | + <key>VestaxSpin.handleEvent</key> |
3052 | + <status>0x91</status> |
3053 | + <midino>0x37</midino> |
3054 | + <options><Script-Binding/></options> |
3055 | + </control> |
3056 | + <control> |
3057 | + <!-- FF --> |
3058 | + <group>[Channel2]</group> |
3059 | + <key>VestaxSpin.handleEvent</key> |
3060 | + <status>0x91</status> |
3061 | + <midino>0x38</midino> |
3062 | + <options><Script-Binding/></options> |
3063 | + </control> |
3064 | + <control> |
3065 | + <!-- wheel touch --> |
3066 | + <group>[Channel2]</group> |
3067 | + <key>VestaxSpin.handleEvent</key> |
3068 | + <status>0x91</status> |
3069 | + <midino>0x2e</midino> |
3070 | + <options><Script-Binding/></options> |
3071 | + </control> |
3072 | + <control> |
3073 | + <!-- wheel touch (filter) --> |
3074 | + <group>[Channel2]</group> |
3075 | + <key>VestaxSpin.handleEvent</key> |
3076 | + <status>0x91</status> |
3077 | + <midino>0x2f</midino> |
3078 | + <options><Script-Binding/></options> |
3079 | + </control> |
3080 | + <control> |
3081 | + <!-- wheel jog --> |
3082 | + <group>[Channel2]</group> |
3083 | + <key>VestaxSpin.handleEvent</key> |
3084 | + <status>0xB1</status> |
3085 | + <midino>0x10</midino> |
3086 | + <options><Script-Binding/></options> |
3087 | + </control> |
3088 | + <control> |
3089 | + <!-- wheel scratch --> |
3090 | + <group>[Channel2]</group> |
3091 | + <key>VestaxSpin.handleEvent</key> |
3092 | + <status>0xB1</status> |
3093 | + <midino>0x11</midino> |
3094 | + <options><Script-Binding/></options> |
3095 | + </control> |
3096 | + |
3097 | + |
3098 | + <!-- channel >1: common controls --> |
3099 | + <control> |
3100 | + <group>[Playlist]</group> |
3101 | + <key>VestaxSpin.handleEvent</key> |
3102 | + <status>0x92</status> |
3103 | + <midino>0x26</midino> |
3104 | + <options><Script-Binding/></options> |
3105 | + </control> |
3106 | + <control> |
3107 | + <group>[Playlist]</group> |
3108 | + <key>SelectPrevTrack</key> |
3109 | + <status>0x92</status> |
3110 | + <midino>0x5c</midino> |
3111 | + </control> |
3112 | + <control> |
3113 | + <group>[Channel1]</group> |
3114 | + <key>LoadSelectedTrack</key> |
3115 | + <status>0x92</status> |
3116 | + <midino>0x60</midino> |
3117 | + </control> |
3118 | + <control> |
3119 | + <group>[Channel2]</group> |
3120 | + <key>LoadSelectedTrack</key> |
3121 | + <status>0x92</status> |
3122 | + <midino>0x61</midino> |
3123 | + </control> |
3124 | + <control> |
3125 | + <group>[Playlist]</group> |
3126 | + <key>SelectNextTrack</key> |
3127 | + <status>0x92</status> |
3128 | + <midino>0x5d</midino> |
3129 | + </control> |
3130 | + |
3131 | + <control> |
3132 | + <group>[Master]</group> |
3133 | + <key>crossfader</key> |
3134 | + <status>0xB2</status> |
3135 | + <midino>0x08</midino> |
3136 | + </control> |
3137 | + |
3138 | + <control> |
3139 | + <group>[Channel1]</group> |
3140 | + <key>flanger</key> |
3141 | + <status>0x92</status> |
3142 | + <midino>0x29</midino> |
3143 | + </control> |
3144 | + <control> |
3145 | + <group>[Channel2]</group> |
3146 | + <key>flanger</key> |
3147 | + <status>0x92</status> |
3148 | + <midino>0x28</midino> |
3149 | + </control> |
3150 | + <control> |
3151 | + <group>[Flanger]</group> |
3152 | + <key>lfoDepth</key> |
3153 | + <status>0xB2</status> |
3154 | + <midino>0x51</midino> |
3155 | + </control> |
3156 | + <control> |
3157 | + <group>[Flanger]</group> |
3158 | + <key>lfoPeriod</key> |
3159 | + <status>0xB2</status> |
3160 | + <midino>0x52</midino> |
3161 | + </control> |
3162 | + |
3163 | + </controls> |
3164 | + |
3165 | + |
3166 | + <!-- LEDs below --> |
3167 | + <outputs> |
3168 | + <output> |
3169 | + <group>[Channel1]</group> |
3170 | + <key>play</key> |
3171 | + <status>0x90</status> |
3172 | + <midino>0x32</midino> |
3173 | + <on>0x7f</on> |
3174 | + <minimum>0.1</minimum> |
3175 | + </output> |
3176 | + <output> |
3177 | + <group>[Channel1]</group> |
3178 | + <key>loop_enabled</key> |
3179 | + <status>0x90</status> |
3180 | + <midino>0x20</midino> |
3181 | + <on>0x7f</on> |
3182 | + <minimum>0.1</minimum> |
3183 | + </output> |
3184 | + <output> |
3185 | + <group>[Channel1]</group> |
3186 | + <key>pfl</key> |
3187 | + <status>0x90</status> |
3188 | + <midino>0x25</midino> |
3189 | + <on>0x7f</on> |
3190 | + <minimum>0.1</minimum> |
3191 | + </output> |
3192 | + <output> |
3193 | + <group>[Channel1]</group> |
3194 | + <key>VuMeter</key> |
3195 | + <status>0x90</status> |
3196 | + <midino>0x29</midino> |
3197 | + <on>0x7f</on> |
3198 | + <minimum>0.2</minimum> |
3199 | + </output> |
3200 | + <output> |
3201 | + <group>[Channel1]</group> |
3202 | + <key>VuMeter</key> |
3203 | + <status>0x90</status> |
3204 | + <midino>0x2a</midino> |
3205 | + <on>0x7f</on> |
3206 | + <minimum>0.4</minimum> |
3207 | + </output> |
3208 | + <output> |
3209 | + <group>[Channel1]</group> |
3210 | + <key>VuMeter</key> |
3211 | + <status>0x90</status> |
3212 | + <midino>0x2b</midino> |
3213 | + <on>0x7f</on> |
3214 | + <minimum>0.6</minimum> |
3215 | + </output> |
3216 | + <output> |
3217 | + <group>[Channel1]</group> |
3218 | + <key>VuMeter</key> |
3219 | + <status>0x90</status> |
3220 | + <midino>0x2c</midino> |
3221 | + <on>0x7f</on> |
3222 | + <minimum>0.8</minimum> |
3223 | + </output> |
3224 | + <output> |
3225 | + <group>[Channel1]</group> |
3226 | + <key>VuMeter</key> |
3227 | + <status>0x90</status> |
3228 | + <midino>0x2d</midino> |
3229 | + <on>0x7f</on> |
3230 | + <minimum>1.0</minimum> |
3231 | + </output> |
3232 | + |
3233 | + <!-- channel 2 --> |
3234 | + <output> |
3235 | + <group>[Channel2]</group> |
3236 | + <key>play</key> |
3237 | + <status>0x91</status> |
3238 | + <midino>0x32</midino> |
3239 | + <on>0x7f</on> |
3240 | + <minimum>0.1</minimum> |
3241 | + </output> |
3242 | + <output> |
3243 | + <group>[Channel2]</group> |
3244 | + <key>loop_enabled</key> |
3245 | + <status>0x91</status> |
3246 | + <midino>0x20</midino> |
3247 | + <on>0x7f</on> |
3248 | + <minimum>0.1</minimum> |
3249 | + </output> |
3250 | + <output> |
3251 | + <group>[Channel2]</group> |
3252 | + <key>pfl</key> |
3253 | + <status>0x91</status> |
3254 | + <midino>0x25</midino> |
3255 | + <on>0x7f</on> |
3256 | + <minimum>0.1</minimum> |
3257 | + </output> |
3258 | + <output> |
3259 | + <group>[Channel2]</group> |
3260 | + <key>VuMeter</key> |
3261 | + <status>0x91</status> |
3262 | + <midino>0x29</midino> |
3263 | + <on>0x7f</on> |
3264 | + <minimum>0.2</minimum> |
3265 | + </output> |
3266 | + <output> |
3267 | + <group>[Channel2]</group> |
3268 | + <key>VuMeter</key> |
3269 | + <status>0x91</status> |
3270 | + <midino>0x2a</midino> |
3271 | + <on>0x7f</on> |
3272 | + <minimum>0.4</minimum> |
3273 | + </output> |
3274 | + <output> |
3275 | + <group>[Channel2]</group> |
3276 | + <key>VuMeter</key> |
3277 | + <status>0x91</status> |
3278 | + <midino>0x2b</midino> |
3279 | + <on>0x7f</on> |
3280 | + <minimum>0.6</minimum> |
3281 | + </output> |
3282 | + <output> |
3283 | + <group>[Channel2]</group> |
3284 | + <key>VuMeter</key> |
3285 | + <status>0x91</status> |
3286 | + <midino>0x2c</midino> |
3287 | + <on>0x7f</on> |
3288 | + <minimum>0.8</minimum> |
3289 | + </output> |
3290 | + <output> |
3291 | + <group>[Channel2]</group> |
3292 | + <key>VuMeter</key> |
3293 | + <status>0x91</status> |
3294 | + <midino>0x2d</midino> |
3295 | + <on>0x7f</on> |
3296 | + <minimum>1.0</minimum> |
3297 | + </output> |
3298 | + </outputs> |
3299 | + </controller> |
3300 | +</MixxxMIDIPreset> |
3301 | |
3302 | === added file 'mixxx/res/midi/Vestax-Spin-scripts.js' |
3303 | --- mixxx/res/midi/Vestax-Spin-scripts.js 1970-01-01 00:00:00 +0000 |
3304 | +++ mixxx/res/midi/Vestax-Spin-scripts.js 2010-12-20 00:27:58 +0000 |
3305 | @@ -0,0 +1,384 @@ |
3306 | +// Script file for Mixxx Vestax Spin mapping |
3307 | +// Bill Good, Oct 31, 2010 |
3308 | +// Parts of addButton and handleEvent are the work of Anders Gunnarsson |
3309 | + |
3310 | +// move vu's to script? or fix bug in midi output saving |
3311 | + |
3312 | +VestaxSpin = new function() { |
3313 | + this.group = "[Master]"; |
3314 | + this.decks = []; |
3315 | + this.buttons = []; |
3316 | + this.controls = []; |
3317 | + this.lights = []; |
3318 | +} |
3319 | + |
3320 | +VestaxSpin.DECK_LIGHTS = [0x32, 0x35, 0x33, 0x24, 0x25, 0x46, 0x42, 0x21, 0x20, 0x29, 0x2a, 0x2b, |
3321 | + 0x2c, 0x2d]; |
3322 | +VestaxSpin.MISC_LIGHTS = [0x26, 0x29, 0x28, 0x2a]; |
3323 | + |
3324 | +VestaxSpin.init = function(id) { |
3325 | + VestaxSpin.decks = { |
3326 | + "L": new VestaxSpin.Deck(1,"[Channel1]"), |
3327 | + "R": new VestaxSpin.Deck(2,"[Channel2]") |
3328 | + }; |
3329 | + |
3330 | + VestaxSpin.addButton("songlist", new VestaxSpin.Button(2, 0x26, true), "handleSongList"); |
3331 | + VestaxSpin.lights["killwheels"] = new VestaxSpin.Light(2, 0x2a); |
3332 | + VestaxSpin.lights["killwheels"].off(); |
3333 | + |
3334 | + // clear everything |
3335 | + for (var light in VestaxSpin.DECK_LIGHTS) { |
3336 | + new VestaxSpin.Light(0, VestaxSpin.DECK_LIGHTS[light]).off(); |
3337 | + new VestaxSpin.Light(1, VestaxSpin.DECK_LIGHTS[light]).off(); |
3338 | + for (var j = 0; j < 10000000; ++j); |
3339 | + } |
3340 | + for (var light in VestaxSpin.MISC_LIGHTS) { |
3341 | + new VestaxSpin.Light(2, VestaxSpin.MISC_LIGHTS[light]).off(); |
3342 | + for (var j = 0; j < 10000000; ++j); |
3343 | + } |
3344 | + // make the eqs do some pretty things |
3345 | +/* var vu = [0x29, 0x2a, 0x2b, 0x2c, 0x2d]; |
3346 | + for (var light in vu) { |
3347 | + new VestaxSpin.Light(0, vu[light]).on(); |
3348 | + new VestaxSpin.Light(1, vu[light]).on(); |
3349 | + for (var j = 0; j < 20000000; ++j); |
3350 | + } |
3351 | + for (var light in vu) { |
3352 | + new VestaxSpin.Light(0, vu[light]).off(); |
3353 | + new VestaxSpin.Light(1, vu[light]).off(); |
3354 | + for (var j = 0; j < 20000000; ++j); |
3355 | + }*/ |
3356 | + |
3357 | +// for (var deck in VestaxSpin.decks) { |
3358 | +// VestaxSpin.decks[deck].updateVuMeter.timer = engine.beginTimer(1.0/30*1000, VestaxSpin.decks[deck].updateVuMeter); |
3359 | +// } |
3360 | +// VestaxSpin.decks["L"].updateVuMeter.timer = engine.beginTimer(1.0/30*1000, "VestaxSpin.updateLVuMeter"); |
3361 | +// VestaxSpin.decks["R"].updateVuMeter.timer = engine.beginTimer(1.0/30*1000, "VestaxSpin.updateRVuMeter"); |
3362 | +} |
3363 | + |
3364 | +VestaxSpin.shutdown = function(id) { |
3365 | + for (var deck in VestaxSpin.decks) { |
3366 | + engine.stopTimer(VestaxSpin.decks[deck].updateVuMeter.timer); |
3367 | + } |
3368 | + // clear everything |
3369 | + for (var light in VestaxSpin.DECK_LIGHTS) { |
3370 | + new VestaxSpin.Light(0, VestaxSpin.DECK_LIGHTS[light]).off(); |
3371 | + new VestaxSpin.Light(1, VestaxSpin.DECK_LIGHTS[light]).off(); |
3372 | + for (var j = 0; j < 10000000; ++j); |
3373 | + } |
3374 | + for (var light in VestaxSpin.MISC_LIGHTS) { |
3375 | + new VestaxSpin.Light(2, VestaxSpin.MISC_LIGHTS[light]).off(); |
3376 | + for (var j = 0; j < 10000000; ++j); |
3377 | + } |
3378 | +} |
3379 | + |
3380 | +VestaxSpin.GetDeck = function(group) { |
3381 | + var groupToDeck = { |
3382 | + "[Channel1]": "L", |
3383 | + "[Channel2]": "R", |
3384 | + }; |
3385 | + try { |
3386 | + return this.decks[groupToDeck[group]]; |
3387 | + } catch (ex) { |
3388 | + return null; |
3389 | + } |
3390 | +} |
3391 | + |
3392 | +VestaxSpin.addButton = function(buttonName, button, eventHandler) { |
3393 | + button.group = this.group; |
3394 | + button.parent = this; |
3395 | + |
3396 | + if (eventHandler) { |
3397 | + var executionEnvironment = button; |
3398 | + function handler(value) { |
3399 | + try { |
3400 | + executionEnvironment[eventHandler](); |
3401 | + } catch (ex) { |
3402 | + print("exception in executing handler for button " + buttonName + ": " + ex); |
3403 | + } |
3404 | + } |
3405 | + button.handler = handler; |
3406 | + } |
3407 | + this.buttons[buttonName] = button; |
3408 | + var control_map = this.controls[button.control]; |
3409 | + if (control_map) { |
3410 | + control_map.push(button); |
3411 | + } else { |
3412 | + this.controls[button.control] = [button]; |
3413 | + } |
3414 | +} |
3415 | + |
3416 | +VestaxSpin.handleEvent = function(channel, control, value, status, group) { |
3417 | + var deck = VestaxSpin.GetDeck(group); |
3418 | + if (deck != null) { |
3419 | + deck.handleEvent(channel, control, value, status, group); |
3420 | + } |
3421 | + try { |
3422 | + var buttons = VestaxSpin.controls[control]; |
3423 | + } catch (ex) { |
3424 | + return; |
3425 | + } |
3426 | + for (var button in buttons) { |
3427 | + buttons[button].handleEvent(value); |
3428 | + } |
3429 | +} |
3430 | + |
3431 | +VestaxSpin.ButtonState = {"released": 0x00, "pressed": 0x7F}; |
3432 | + |
3433 | +VestaxSpin.Button = function(channel, control, makeLight, lightControl) { |
3434 | + this.channel = channel; |
3435 | + this.control = control; |
3436 | + this.group = null; |
3437 | + this.state = VestaxSpin.ButtonState.released; |
3438 | + this.handler = null; |
3439 | + this.parent = null; |
3440 | + if (makeLight) { |
3441 | + if (lightControl) { |
3442 | + this.light = new VestaxSpin.Light(this.channel, lightControl); |
3443 | + } else { |
3444 | + this.light = new VestaxSpin.Light(this.channel, this.control); |
3445 | + } |
3446 | + } else { |
3447 | + this.light = null; |
3448 | + } |
3449 | +} |
3450 | + |
3451 | +VestaxSpin.LightState = {"on": 0x7f, "off": 0x00}; |
3452 | + |
3453 | +VestaxSpin.Light = function(channel, control) { |
3454 | + this.channel = channel; |
3455 | + this.control = control; |
3456 | + this.state = VestaxSpin.LightState.off; |
3457 | + this.on = function() { |
3458 | + midi.sendShortMsg(0x90 + this.channel, this.control, VestaxSpin.LightState.on); |
3459 | + this.state = VestaxSpin.LightState.on; |
3460 | + } |
3461 | + this.off = function() { |
3462 | + midi.sendShortMsg(0x90 + this.channel, this.control, VestaxSpin.LightState.off); |
3463 | + this.state = VestaxSpin.LightState.off; |
3464 | + } |
3465 | +} |
3466 | + |
3467 | +VestaxSpin.Button.prototype.handleEvent = function(value) { |
3468 | + this.state = value; |
3469 | + this.handler(); |
3470 | +} |
3471 | + |
3472 | +VestaxSpin.Deck = function(deckNum, group) { |
3473 | + this.deckNum = deckNum; |
3474 | + this.group = group; |
3475 | + this.vinylMode = false; |
3476 | + this.buttons = []; |
3477 | + this.controls = []; |
3478 | + this.lights = []; |
3479 | + this.addButton("loop_open", new VestaxSpin.Button(deckNum-1, 0x21, true), "handleLoopOpen"); |
3480 | + this.addButton("loop_close", new VestaxSpin.Button(deckNum-1, 0x42, true), "handleLoopClose"); |
3481 | + this.addButton("sync", new VestaxSpin.Button(deckNum-1, 0x46, true), "handleSync"); |
3482 | + this.addButton("cue", new VestaxSpin.Button(deckNum-1, 0x35, true), "handleCue"); |
3483 | + this.addButton("cup", new VestaxSpin.Button(deckNum-1, 0x33, true), "handleCup"); |
3484 | + this.addButton("filter", new VestaxSpin.Button(deckNum-1, 0x24, true), "handleFilter"); |
3485 | + this.addButton("back", new VestaxSpin.Button(deckNum-1, 0x36, true, 0x32), "handleBack"); |
3486 | + this.addButton("rw", new VestaxSpin.Button(deckNum-1, 0x37, true, 0x35), "handleRW"); |
3487 | + this.addButton("ff", new VestaxSpin.Button(deckNum-1, 0x38, true, 0x33), "handleFF"); |
3488 | +// this next one is basically useless since we don't need touch for jog, maybe useful later? |
3489 | + this.addButton("wheeltouch", new VestaxSpin.Button(deckNum-1, 0x2e), "handleWheelTouch"); |
3490 | + this.addButton("wheeltouchfilter", new VestaxSpin.Button(deckNum-1, 0x2f), "handleWheelTouchFilter"); |
3491 | + this.addButton("jog", new VestaxSpin.Button(deckNum-1, 0x10), "handleJog"); |
3492 | + this.addButton("scratch", new VestaxSpin.Button(deckNum-1, 0x11), "handleScratch"); |
3493 | + |
3494 | + this.lights["vu1"] = new VestaxSpin.Light(deckNum-1, 0x29); |
3495 | + this.lights["vu2"] = new VestaxSpin.Light(deckNum-1, 0x2a); |
3496 | + this.lights["vu3"] = new VestaxSpin.Light(deckNum-1, 0x2b); |
3497 | + this.lights["vu4"] = new VestaxSpin.Light(deckNum-1, 0x2c); |
3498 | + this.lights["vu5"] = new VestaxSpin.Light(deckNum-1, 0x2d); |
3499 | +// this.updateVuMeter(); |
3500 | +} |
3501 | + |
3502 | +VestaxSpin.Deck.prototype.addButton = VestaxSpin.addButton; |
3503 | + |
3504 | +VestaxSpin.Deck.prototype.handleEvent = function(channel, control, value, status, group) { |
3505 | + try { |
3506 | + var buttons = this.controls[control]; |
3507 | + } catch (ex) { |
3508 | + return; |
3509 | + } |
3510 | + if (buttons) { |
3511 | + for (var button in buttons) { |
3512 | + buttons[button].handleEvent(value); |
3513 | + } |
3514 | + } |
3515 | +} |
3516 | + |
3517 | +VestaxSpin.Deck.prototype.updateVuMeter = function() { |
3518 | +// print("updating vu"); |
3519 | + var vol = engine.getValue(this.group, "VuMeter"); |
3520 | + if (vol >= 0.2) { |
3521 | + this.lights["vu1"].on(); |
3522 | + } else { |
3523 | + this.lights["vu1"].off(); |
3524 | + } |
3525 | + if (vol >= 0.4) { |
3526 | + this.lights["vu2"].off(); |
3527 | + } else { |
3528 | + this.lights["vu2"].off(); |
3529 | + } |
3530 | + if (vol >= 0.6) { |
3531 | + this.lights["vu3"].off(); |
3532 | + } else { |
3533 | + this.lights["vu3"].off(); |
3534 | + } |
3535 | + if (vol >= 0.8) { |
3536 | + this.lights["vu4"].off(); |
3537 | + } else { |
3538 | + this.lights["vu4"].off(); |
3539 | + } |
3540 | + if (vol >= 1.0) { |
3541 | + this.lights["vu5"].off(); |
3542 | + } else { |
3543 | + this.lights["vu5"].off(); |
3544 | + } |
3545 | +} |
3546 | + |
3547 | +VestaxSpin.Button.prototype.handleSongList = function() { |
3548 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3549 | + engine.setValue("[Playlist]", "SelectNextPlaylist", 1); |
3550 | + this.light.on(); |
3551 | + } else { |
3552 | + engine.setValue("[Playlist]", "SelectNextPlaylist", 0); |
3553 | + this.light.off(); |
3554 | + } |
3555 | +} |
3556 | + |
3557 | +VestaxSpin.Button.prototype.handleLoopOpen = function() { |
3558 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3559 | + engine.setValue(this.group, "loop_in", 1); |
3560 | + this.light.on(); |
3561 | + } else { |
3562 | + engine.setValue(this.group, "loop_in", 0); |
3563 | + this.light.off(); |
3564 | + } |
3565 | +} |
3566 | + |
3567 | +VestaxSpin.Button.prototype.handleLoopClose = function() { |
3568 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3569 | + engine.setValue(this.group, "loop_out", 1); |
3570 | + this.light.on(); |
3571 | + } else { |
3572 | + engine.setValue(this.group, "loop_out", 0); |
3573 | + this.light.off(); |
3574 | + } |
3575 | +} |
3576 | + |
3577 | +VestaxSpin.Button.prototype.handleSync = function() { |
3578 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3579 | + engine.setValue(this.group, "beatsync", 1); |
3580 | + this.light.on(); |
3581 | + } else { |
3582 | + engine.setValue(this.group, "beatsync", 0); |
3583 | + this.light.off(); |
3584 | + } |
3585 | +} |
3586 | + |
3587 | +VestaxSpin.Button.prototype.handleCue = function() { |
3588 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3589 | + engine.setValue(this.group, "cue_default", 1); |
3590 | + this.light.on(); |
3591 | + } else { |
3592 | + engine.setValue(this.group, "cue_default", 0); |
3593 | + // shut off rw so that we don't get stuck in rw if the user lets go |
3594 | + // of shift before letting go of cue/rw |
3595 | + engine.setValue(this.group, "back", 0); |
3596 | + this.light.off(); |
3597 | + } |
3598 | +} |
3599 | + |
3600 | +VestaxSpin.Button.prototype.handleCup = function() { |
3601 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3602 | + engine.setValue(this.group, "cue_goto", 1); |
3603 | + this.light.on(); |
3604 | + } else { |
3605 | + engine.setValue(this.group, "cue_goto", 0); |
3606 | + // shut off ff so that we don't get stuck in ff if the user lets go |
3607 | + // of shift before letting go of cup/ff |
3608 | + engine.setValue(this.group, "fwd", 0); |
3609 | + this.light.off(); |
3610 | + } |
3611 | +} |
3612 | + |
3613 | +VestaxSpin.Button.prototype.handleFilter = function() { |
3614 | + if (this.state == VestaxSpin.ButtonState.released) return; |
3615 | + if (this.parent.vinylMode == false) { |
3616 | + this.parent.vinylMode = true; |
3617 | + this.light.on(); |
3618 | + } else { |
3619 | + this.parent.vinylMode = false; |
3620 | + this.light.off(); |
3621 | + } |
3622 | +} |
3623 | + |
3624 | +VestaxSpin.Button.prototype.handleBack = function() { |
3625 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3626 | + engine.setValue(this.group, "play", 0); |
3627 | + engine.setValue(this.group, "playposition", 0); |
3628 | + this.light.on(); |
3629 | + } else { |
3630 | + this.light.off(); |
3631 | + } |
3632 | +} |
3633 | + |
3634 | +VestaxSpin.Button.prototype.handleRW = function() { |
3635 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3636 | + engine.setValue(this.group, "back", 1); |
3637 | + this.light.on(); |
3638 | + } else { |
3639 | + engine.setValue(this.group, "back", 0); |
3640 | + this.light.off(); |
3641 | + } |
3642 | +} |
3643 | + |
3644 | +VestaxSpin.Button.prototype.handleFF = function() { |
3645 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3646 | + engine.setValue(this.group, "fwd", 1); |
3647 | + this.light.on(); |
3648 | + } else { |
3649 | + engine.setValue(this.group, "fwd", 0); |
3650 | + this.light.off(); |
3651 | + } |
3652 | +} |
3653 | + |
3654 | +VestaxSpin.Button.prototype.handleWheelTouch = function() { |
3655 | + if (this.parent.vinylMode && this.state == VestaxSpin.ButtonState.pressed) { |
3656 | + // disable keylock on scratch |
3657 | + //this.keylock = engine.getValue(this.group, "keylock"); |
3658 | + engine.scratchEnable(this.parent.deckNum, 128*3, 33+(1.0/3), 1.0/8, (1.0/8)/32); |
3659 | + } else { |
3660 | + engine.scratchDisable(this.parent.deckNum); |
3661 | + } |
3662 | +} |
3663 | + |
3664 | +VestaxSpin.Button.prototype.handleWheelTouchFilter = function() { |
3665 | + if (this.state == VestaxSpin.ButtonState.pressed) { |
3666 | + // disable keylock on scratch |
3667 | + //this.keylock = engine.getValue(this.group, "keylock"); |
3668 | + engine.scratchEnable(this.parent.deckNum, 300, 33+(1.0/3), 1.0/8, (1.0/8)/32); |
3669 | + } else { |
3670 | + engine.scratchDisable(this.parent.deckNum); |
3671 | + } |
3672 | +} |
3673 | + |
3674 | +VestaxSpin.Button.prototype.handleJog = function() { |
3675 | + if (engine.getValue(this.group, "scratch2_enable")) { |
3676 | + engine.scratchTick(this.parent.deckNum, this.state - 0x40); |
3677 | + } else { |
3678 | + engine.setValue(this.group, "jog", this.state - 0x40); |
3679 | + } |
3680 | +} |
3681 | + |
3682 | +VestaxSpin.updateLVuMeter = function() { |
3683 | +// VestaxSpin.decks["L"].updateVuMeter(); |
3684 | +} |
3685 | + |
3686 | +VestaxSpin.updateRVuMeter = function() { |
3687 | +// VestaxSpin.decks["R"].updateVuMeter(); |
3688 | +} |
3689 | + |
3690 | |
3691 | === modified file 'mixxx/res/midi/midi-mappings-scripts.js' |
3692 | --- mixxx/res/midi/midi-mappings-scripts.js 2010-12-12 19:37:27 +0000 |
3693 | +++ mixxx/res/midi/midi-mappings-scripts.js 2010-12-20 00:27:58 +0000 |
3694 | @@ -297,4 +297,88 @@ |
3695 | |
3696 | return scratch.variables["scratch"]; |
3697 | } |
3698 | -// ----------------- END Scratching functions --------------------- |
3699 | \ No newline at end of file |
3700 | +// ----------------- END Scratching functions -------------------- |
3701 | + |
3702 | +// ----------------- Object definitions -------------------------- |
3703 | + |
3704 | + |
3705 | +ButtonState = {"released":0x00, "pressed":0x7F}; |
3706 | +LedState = {"off": 0x00, "on": 0x7F}; |
3707 | + |
3708 | +//Controller |
3709 | +function Controller () { |
3710 | + this.group = "[Master]"; |
3711 | + this.Controls = []; |
3712 | + this.Buttons = []; |
3713 | +}; |
3714 | + |
3715 | +Controller.prototype.addButton = function(buttonName, button, eventHandler) { |
3716 | + if(eventHandler) { |
3717 | + var executionEnvironment = this; |
3718 | + function handler(value) { |
3719 | + button.state = value; |
3720 | + executionEnvironment[eventHandler](value); |
3721 | + } |
3722 | + button.handler = handler; |
3723 | + } |
3724 | + this.Buttons[buttonName] = button; |
3725 | +} |
3726 | + |
3727 | +Controller.prototype.setControlValue = function(control, value) { |
3728 | + this.Controls[control].setValue(this.group, value); |
3729 | +} |
3730 | + |
3731 | +//Button |
3732 | +function Button(controlId) { |
3733 | + this.controlId = controlId; |
3734 | + this.state = ButtonState.released; |
3735 | +} |
3736 | +Button.prototype.handleEvent = function(value) { |
3737 | + this.handler(value); |
3738 | +}; |
3739 | + |
3740 | +//Control |
3741 | +function Control(mappedFunction, softMode) { |
3742 | + this.minInput = 0; |
3743 | + this.midInput = 0x3F; |
3744 | + this.maxInput = 0x7F; |
3745 | + this.minOutput = -1.0; |
3746 | + this.midOutput = 0.0; |
3747 | + this.maxOutput = 1.0; |
3748 | + this.mappedFunction = mappedFunction; |
3749 | + this.softMode = softMode; |
3750 | + this.maxJump = 10; |
3751 | +} |
3752 | +Control.prototype.setValue = function(group, inputValue){ |
3753 | + var outputValue = 0; |
3754 | + if(inputValue <= this.midInput){ |
3755 | + outputValue = this.minOutput + ((inputValue - this.minInput) / (this.midInput - this.minInput)) * (this.midOutput - this.minOutput); |
3756 | + } else { |
3757 | + outputValue = this.midOutput + ((inputValue - this.midInput) / (this.maxInput - this.midInput)) * (this.maxOutput - this.midOutput); |
3758 | + } |
3759 | + if(this.softMode){ |
3760 | + var currentValue = engine.getValue(group, this.mappedFunction); |
3761 | + var currentRelative = 0.0; |
3762 | + if(currentValue <= this.midOutput){ |
3763 | + currentRelative = this.minInput + ((currentValue - this.minOutput) / (this.midOutput - this.minOutput)) * (this.midInput - this.minInput); |
3764 | + } else { |
3765 | + currentRelative = this.midInput + ((currentValue - this.midOutput) / (this.maxOutput - this.midOutput)) * (this.maxInput - this.midInput); |
3766 | + } |
3767 | + if(inputValue > currentRelative - this.maxJump && inputValue < currentRelative + this.maxJump) { |
3768 | + engine.setValue(group, this.mappedFunction, outputValue); |
3769 | + } |
3770 | + } else { |
3771 | + engine.setValue(group, this.mappedFunction, outputValue); |
3772 | + } |
3773 | +} |
3774 | + |
3775 | +//Deck |
3776 | +Deck = function (deckNumber, group) { |
3777 | + this.deckNumber = deckNumber; |
3778 | + this.group = group; |
3779 | + this.Buttons = []; |
3780 | +} |
3781 | +Deck.prototype.setControlValue = Controller.prototype.setControlValue; |
3782 | +Deck.prototype.addButton = Controller.prototype.addButton; |
3783 | + |
3784 | +// ----------------- END Object definitions ---------------------- |
3785 | \ No newline at end of file |
This looks great. Thanks Anders!