File: Readme.exmixer

package info (click to toggle)
dbmix 0.9.8-6.3
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 2,896 kB
  • sloc: ansic: 12,309; sh: 11,418; makefile: 153
file content (599 lines) | stat: -rw-r--r-- 23,888 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
 
 
           Construction guide of external mixer to work with DBMix 
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
 
Simon M. Werner (c) 2000  <rgbe@yahoo.com> 
 
 
  Contents 
  ~~~~~~~~ 
 
  0. Disclaimer 
  ~~~~~~~~~~~~~ 
 
  1. Introduction and reasons 
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
  2. System Requirements 
  ~~~~~~~~~~~~~~~~~~~~~~ 
    2.1 Before you start 
 
  3. Construction of the exmixer 
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    3.1 How does it work? 
    3.2 Another word of warning 
    3.3 What you need for construction 
      3.3.1 Tools and equipment required 
      3.3.2 Parts list 
    3.4 Construction 
 
  4. Configuring DBMix with the exmixer 
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    4.1 Calibrating the joystick 
    4.2 The exmixer Preferences Dialog 
 
  5. Additional stuff 
  ~~~~~~~~~~~~~~~~~~~ 
 
 
 
 
 
 
0. Disclaimer 
~~~~~~~~~~~~~ 
 
**************************************************************************** 
 
  I TAKE *NO* RESPONSIBILITY ON THE CORRECTNESS OF THIS DOCUMENTATION, IF 
YOU FRY ANY OF YOUR COMPONENTS, DON'T BLAME ME. SOME OF THE CONSTRUCTION 
DESCRIBED IN THIS DOCUMENT SHOULD ONLY BE DONE BY PEOPLE WHO KNOW WHAT THEY 
ARE DOING. 
 
**************************************************************************** 
 
 
  This program is free software; you can redistribute it and/or modify 
it under the terms of the GNU General Public License as published by the Free 
Software Foundation; either version 2 of the License, or (at your option) 
any later version. 
 
  This program is distributed in the hope that it will be useful, but 
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
more details. 
 
  You should have received a copy of the GNU General Public License along 
with this program; if not, write to the Free Software Foundation, Inc., 59 
Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 
  Should you need to contact me, the author, you can do so either by e-mail 
- mail your message to <wersi796@student.otago.ac.nz> 
 
  For your convenience, the GNU General Public License version 2 is included 
in the package: See the file COPYING. 
 
 
1. Introduction and reasons 
~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
  So you want to be a DJ? 
 
  This readme explains how to construct an external mixer (exmixer) that can be 
integrated with DBMix. This allows your PC to become a DJ mixing station, no 
mouse reqiured. DBMix can read more than one games (joystick) port, this 
enables you to easily create a device with variable resistors that can control 
any of the DBMix adjustments for any channel, such as pitch, volume, main 
volume etc. DBMix is also capable of using buttons to play, pause, mute etc. 
 
  If you find any errors in this document please tell me and I will fix them. 
Should you have any problems or additional requests related to the exmixer 
device you can contact me at: 
 
    rgbe@yahoo.com 
 
  I only created the exmixer and it's interface with DBMix, I did not write 
DBMix, that was done by Robert Dean, see README for details. Any DBMix related 
questions should go to him. 
 
  The reason I have created the exmixer was that I have a friend who wanted an 
external mixing device where he can mix music together, like a normal DJ with 
two turntables. But he wanted to mix mp3 on his PC. So I found DBMix which 
does most of job. I designed and constructed a device that connects to the 
games port, I also added code to DBMix to interface with the exmixer and volia. 
We have an exmixer that works very well. 
 
  You can use DBMixer with an ordinary joystick, but I don't see the point of 
this as the joystick will always spring back to the middle. You could remove 
the springs in the joystick but then it will just limp to one side. 
 
  If you wish, I can construct an exmixer for you but for a price. My guess is 
that it would cost you around $US200 for me to build it for you. Build it 
yourself and it will cost you around $US20. 
 
 
 
 
2. System Requirements 
~~~~~~~~~~~~~~~~~~~~~~ 
 
  - Joystick/games port (preferably more than 1), most standard sound cards 
    come with one. 
  - Linux kernel 2.4 or greater with joystick support. I have only tried kernel 
    2.2 without any success, but this does not mean it won't work. Kernel 2.4 
    users a later joystick driver than kernel 2.2 . 
  - A joystick or exmixer device (more details below). 
  - A reasonable computer, must be able to at least two samples at once 
    without any problems. 
  - A bit of free time. 
 
 
 
 
2.1 Before you start 
~~~~~~~~~~~~~~~~~~~~ 
 
  Before you start the construction of the exmixer read the disclaimer at the 
top of this page, as I said I take *no* responsibility what so ever for your 
actions. There is a chance that if you do wire up the exmixer incorrectly that 
you will fry at least your joystick port, maybe even your main board. 
 
  Read this documentation *before* continuing any further: 
 
    http://www.hut.fi/Misc/Electronics/docs/joystick/pc_circuits.html 
 
      It has some extra safety tips and it is where I sourced all the 
    information I needed about the PC joystick port. 
 
  Before you start construction of the exmixer make sure DBMix works with just 
a joystick alone. I don't want you building an exmixer and then find out that 
it doesn't work on your system. Read the instructions at the end of this 
document "Configuring DBMix with the exmixer". 
 
 
 
 
 
3. Construction of the exmixer 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
  These intructions are more of a breif guide than a step-by-step process on 
how to build an exmixer. I assume you have the intellegence to be able to 
safely use all the tools nessecary. Basically, if you have read through the 
documentation below and don't understand it, this construction project is not 
for you. 
 
 
 
3.1 How does it work? 
~~~~~~~~~~~~~~~~~~~~~ 
 
  The exmixer will be connected to one or more games port of a PC (I don't know 
if this applies to other systems, please tell me if it does). The games port 
works by sending a current through the resistor and then measuring the 
resistance. The variable resistor allows the position of the slider to be 
detected. The games port is a wonderfully simple port, but not the most 
accurate, especially with an analog system. The buttons used are just simple 
on/off switches. 
 
 
 
3.2 Another word of warning 
~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
  The device I created works fine on my hardware, I cannot garuantee it will 
be the same for yours. I am using a SBLive and a Vibra 16 for my games port. 
 
  It is a good idea to know what you are doing when building this device, if 
you have not done any electrical work or have not done anything of this sort 
before. I suggest you search the net or visit your local library to find 
information on assembly with electricity and electronics, and *BE CAREFUL*. 
 
Guides to soldering can be found here: 
 
    http://www.epemag.wimborne.co.uk/solderfaq.htm 
    http://media.butler.edu/chad/ha/solder.html 
    http://www.mtechnologies.com/building/atoz.htm 
 
  Before you start you need to *plan* what you want to do. Below are the 
general instructions on how to create an exmixer with 6 buttons and 6 sliders, 
you may want more or less sliders. Every slider can be assigned to any 
adjustment bar you see on DBMix. 
 
  Because a standard games port only allows for only four sliders/axis per 
port we will need to use two games ports, hence two cables comming from the 
exmixer. If you only have one games port you will have to go out and find 
yourself a second games port if you want more than 4 slider controls. The same 
applies for buttons, there are a maximum of 4 buttons available per port. 
This construction guide will assume you have two games ports. 
 
The finished exmixer will look like this: 
 
 
    Figure-1: A typical DJ mixer. 
 ############################################################################ 
 #                                                                          # 
 #          CHANNEL 0                   CHANNEL 1                           # 
 #                                                                          # 
 # Buttons:                                                                 # 
 #    |----| |----| |----|        |----| |----| |----|                      # 
 #    |Prev| |Play| |Next|        |Prev| |Play| |Next|                      # 
 #    |----| |----| |----|        |----| |----| |----|                      # 
 #                                                            Main Volume   # 
 #           Volume                     Volume                              # 
 #                                                              0 - |       # 
 #          0 - |                      0 - |                   10 - |       # 
 #              |                          |                   20 - |       # 
 #              |                          |                   30 -###      # 
 #              |                         ###                  40 - |       # 
 #         50 - |                     50 - |                   50 - |       # 
 #             ###                         |                   60 - |       # 
 #              |                          |                   70 - |       # 
 #              |                          |                   80 - |       # 
 #        100 - |                    100 - |                   90 - |       # 
 #                                                            100 - |       # 
 # Pitch:  -----##-----               ---##-------                          # 
 #                                                                          # 
 #                     0     100    200                                     # 
 # Cross fader:        ------------##-                                      # 
 #                                                                          # 
 ############################################################################ 
 
 
This is what the finished product will look like, only a little more real I 
hope :-). It will also have that "home made" look and feel to it. 
 
  Costs: I source parts from a shop called "Surplustronics", it's basically a 
shop which takes in old equipment and sells it dirt cheap. They also sell all 
sorts of electronic/eletrical equipment. I recommend you start at a shop like 
this first, they are usually dirt cheap. My exmixer cost around $NZ40 (~$US20). 
 
     
 
3.3 What you need for construction 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
 
3.3.1 Tools and equipment required 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
  - Solder iron, a cheap one will do. 
  - Solder wire, small handy packs can be cheaply purchased. 
  - Wire cutter/stripper. 
  - An electric drill with a 2-4mm drill piece. 
  - A multimeter, this is essential to make sure your wiring is correct. 
  - A saw, to cut slots for the sliders. 
  - A file. 
  - A philips screw driver. 
 
  (I used my Leatherman Super Tool, it does wonders.) 
 
 
 
3.3.2 Parts list 
~~~~~~~~~~~~~~~~ 
 
  1    box/container to put everything in. I bought an old modem or something 
       which was in a rather large case. I ripped the guts out, cleaned the 
       case and I had a cool recycled case. 
 
  6    100 kOhm linear variable resistors (the sliders). You can use up to 
       250 kOhm resistors. Make sure they are *not* logarithmic. I used 
       shorter sliders for the pitch and longer sliders for the volume, to be 
       neat and save space. 
 
  6    20 kOhm resistors, 0.5 Watt will do, one for each slider. 
 
 12    Screws, to hold the sliders in place. 
 
  6    knobs for the sliders. 
 
  6    Buttons that don't go click. 
 
  4m   10 to 13 core cable (a cable with 10 to 13 wires inside it). 2m for 
       each games port. 
 
  2    15 pin male plugs to fit games port. 
 
  2    Plug houses to enclose the plugs. (if sold seperately from the plug) 
 
0.5m   Insulated wire. 
 
 
 
3.4 Construction 
~~~~~~~~~~~~~~~~ 
 
  As I said earlier planning is important. If you want a good quality product 
in the end, you must plan every step before you go. This will save you time 
in the long run and things will be neater. 
 
 
  1. Layout: 
 
       Once you have purchaced your parts or know the size of the sliders, it 
     is good to draw on a piece of paper the layout of the exmixer. Something 
     simple like the design in Figure-1 above will be sufficient. Remember you 
     don't want everything crammed in together so try and make use of all the 
     space available. An accurate scale diagram would be best. 
 
       If you are going to add buttons remember to allocate them enough space 
     as well. Once you have decided on your layout pencil in all the holes 
     that need to be drilled, and the slider slots. I like to draw everything 
     to scale on a piece of paper, I can then stick the paper onto the back 
     face of the mixer using sticky tape. 
 
 
  2. Preparing the case: 
 
       If you bought an old case like I did, make sure you remove all the 
     unecessary things before you begin drilling. Remember: Once you have 
     drilled a hole you cannot undrill it, so be careful. <CTRL-Z> doesn't 
     apply here :-). 
 
       Cutting the slots for the sliders is the hardest part of the project. 
     You will have to drill a few holes in a row so that you can fit a saw 
     into the gap. I used the wood saw which comes on my Leatherman, but any 
     jig saw will do fine. Use a file to make the sides of the slot smooth. 
 
       Now screw all the sliders into place and same with the buttons. Making 
     sure you place all the sliders the same way up. 
 
 
  3. Joystick plug: 
 
       Now we have to create the joystick plugs. If you haven't already done 
     so read the page at: 
 
       http://www.hut.fi/Misc/Electronics/docs/joystick/pc_circuits.html 
 
     it has all you need to know about the games port plug. If the page is no 
     longer there, email me at: 
 
       rgbe@yahoo.com 
 
     Basically, the joystick contains 15 pins, see Figure-2 below, we are 
     going to use all the pins except for pins 12 and 15, just to play safe. 
     Some soundcards use these two pins for the MIDI device. 
 
 
             Figure-2: Looking face on at the male plug. 
    
   1   2   3   4   5   6   7   8 
|---------------------------------| 
|  o   o   o   o   o   o   o   o  | 
 \                               / 
  \  o   o   o   o   o   o   o  / 
   \___________________________/ 
        
     9   10  11  12  13  14  15 
 
 
         Pin assignments: 
         ---------------- 
          1 : +5vDC 
          2 : Button 0 
          3 : Slider 0 
          4 : GND (ground) 
          5 : GND (ground) 
          6 : Slider 1 
          7 : Button 1 
          8 : +5vDC 
          9 : +5vDC 
         10 : Button 2 
         11 : Slider 2 
         12 : GND (ground) or MIDI 
         13 : Slider 3 
         14 : Button 3 
         15 : +5vDC or MIDI 
 
 
       As you can see by looking at the table the plug is symetrical. Pins 
     1 and 8 do the same job, as do pins 2 and 7, and so on. 
 
       Cut the 13 core cable in two, we need one for each games port. So we 
     now have two cables of 2m length. Now solder each of the wires in the 
     cable to the the plug, make sure not to use pins 12 and 15. Also try and 
     keep a track of the colours of the wires you are soldering so we know 
     which wire goes to which pin. 
 
       Once this is complete double check your wiring with a multimeter, make 
     sure you don't have any shorts anywhere. 
 
 
  4. Soldering the sliders and buttons: 
 
       Alright what we want to do now is remove about 20cm (9") of the outer 
     sheath of the cable. Now all the coloured wires are exposed. Study the 
     circuit diagram below and connect up the corresponding wires. 
 
 
       Figure-3: Circuit layout of games port 
     ============================================== 
 
 
          pin 1, 8, or 9     +5vDC ___________________ 
                                                      | 
                                                      | 
                                     20K              | 
          pin 3      Slider0 ______/\/\/\____         | 
                                             | 100K   | 
                                          _/\/\/\_____| 
                                                      | 
                                                      | 
                                     20K              | 
          pin 6      Slider1 ______/\/\/\____         | 
                                             | 100K   | 
                                          _/\/\/\_____| 
                                                      | 
                                                      | 
                                     20K              | 
          pin 11     Slider2 ______/\/\/\____         | 
                                             | 100K   | 
                                          _/\/\/\_____| 
                                                      | 
                                                      | 
                                     20K              | 
          pin 13     Slider3 ______/\/\/\____         | 
                                             | 100K   | 
                                          _/\/\/\_____| 
                                                      | 
 
 
 
                                   ___ 
          pin 2      button1 ______o o_______ 
                                             | 
                                   ___       | 
          pin 7      button2 ______o o_______| 
                                             | 
                                   ___       | 
          pin 10     button3 ______o o_______| 
                                             | 
                                   ___       | 
          pin 14     button4 ______o o_______| 
                                             | 
                                             | 
          pin 4 or 5      GND  ______________| 
                                             | 
 
 
     ============================================== 
 
 
       For example, if you want to connect Slider0, take the wire that is 
     comming from pin 3, solder it to a 20 kOhm resistor, then connect the 
     other of the resistor to a terminal on the slider. Take a wire that is 
     going to a +5vDC pin, you can use pins 1, 8 or 9 for this. Connect this 
     wire to the other terminal of the slider. Don't use pins 12 or 15. 
 
       The 20 kOhm resistor is to avoid incorrect detection of the sliders. 
     Some games ports such as the one on my SBLive will report a stationary 
     slider as moving when all the sliders are near the zero resistance end. 
     Adding a 20 kOhm resistor here should eliminate this problem. If this 
     still occurs, using a larger resistor may help, such as a 30 or 40 kOhm 
     resistor. 
 
       For the buttons you connect one end to a button pin (2, 7, 10, or 
     14) and the other end to a ground pin (4 or 5). 
 
       If you are making a mixer with more than four sliders or buttons, you 
     will have to use a second cable and a second port. The instructions are 
     the same as above. 
 
            ********************************************************* 
            **** TEST IT WITH A MULTIMETER BEFORE YOU PLUG IT IN **** 
            ********************************************************* 
 
       This is where things tend to burn when you do things wrong. Make sure 
     you test the device before pluging it in. There should be between 0 Ohms 
     and 100 kOhms resistance in the circuit. With the multimeter test each 
     slider with the slider at both its limits. Test each button as well. 
 
       Once you have tested the slider you can plug it in and configure it. 
     See the next section on configuring the exmixer. Now all you have to do is 
     secure the wires using cable ties and close the box. Make sure you also 
     secure the main cables as well. 
 
 
 
4. Configuring DBMix with the exmixer 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
  The following instructions will guide you through the configuration of the 
exmixer. It is a real simple process, first we will calibrate the exmixer, then 
create the exmixer preferences to set up the sliders. 
 
 
4.1 Calibrating the joystick 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
  First we need package jscal or xjscal these can be found at: 
 
    http://www.suse.cz/development/joystick/ 
 
  More information on calibrating the joystick can be found here: 
 
    file:///usr/src/linux/Documention/joystick.txt 
    http://www.suse.cz/development/input/ 
 
    xjscal is an easy to use calibration program that runs under X11. I 
  recommend it for the exmixer. If you find that once you have started DBMix 
  and the slider does things the wrong way round you can use the flip axis 
  switch in xjscal. Be sure to return the slider to the center before 
  calibration is complete. The calibration programs will create a ~/.joystick 
  file, this will be used by DBMix. 
 
    You must also set the nullzone to zero, otherwise there will be a part 
  where the slider will be unresponsive. 
 
 
 
4.2 The exmixer Preferences Dialog 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
    Once you have created the exmixer, configuring the device to work with 
  DBMix is straight forward. You must have "Enable external mixer" checked in 
  the DBMix preferences dialog. Then click "Config exmixer ..." to configure 
  the exmixer. 
 
    The dialog that appears is straight forward to use. If you require more 
  than 2 devices, follow the instructions in section 5. The "Enabled" check 
  button will enable the device given in the "Device" box. 
 
    The "Assignment" column allows you to assign a given slider or button to 
  a particular function. The "Channel" column combo boxes (if available) will 
  assign the slider to a given channel. 
 
    Assignment labels, a brief description: 
 
      Pitch: Adjusts the pitch of a channel. 
      Volume: Adjusts the volume of a channel. 
      Main Volume: Adjusts the master volume control. 
      Cue Volume: Adjusts the cue volume. 
      Cross Fade: Adjusts the cross fader. 
      Fade Speed: Adjusts the fade speed. 
      Balance: Adjusts the master left/right balance. 
 
    The button assignment labels are straight forward. If you don't know 
  which button is which, you can press the button when the exmixer Settings 
  window is open, this will switch the focus to the specified button. 
 
 
5. Additional stuff 
~~~~~~~~~~~~~~~~~~~ 
 
    Thats it! Happy mixing. And *please* tell me if you ever create your own 
  exmixer, I would like to hear from you to see how it went. And just some 
  recognition that someone has made use of this document. If you happen to 
  create any cool new tunes you can send a link for me to download them. 
 
    If you have any requests for additional functionality, tell me and I will 
  see what I can do. 
 
  To enable more than two games ports you will need to re-compile the code, 
  this can be done by setting: 
 
       #define MAX_DEV 2 
 
    to 
 
       #define MAX_DEV 3 
 
  in "/DBMix/dbmixer/exmixer.h". Then type "make clean" in the DBMix root, 
  then "make" followed by "make install". The same can be done if you happen 
  to build a mixer with more than four axes or buttons (don't ask me how), 
  just change the following to however many axes/buttons you require: 
 
       #define MAX_AXES 4 
       #define MAX_BUT 4 
 
  These can also be found in the exmixer.h file. 
 
 
  Ciao, 
 
  Simon 
  <rgbe@yahoo.com>