On Mon, Dec 03, 2007 at 05:18:58PM +0100, Jan Jockusch wrote:
> I've just received my Mixman DM2 (a lowcost USB controller which has a 
> MIDI based driver for Windows and almost nothing for Linux) and am in 
> the process of writing a Linux kernel driver for it, because there are 
> several shortcomings in the existing drivers.
> 
> My main criticism is that MIDI based drivers obviously cannot make full 
> use of the two wheel controls (which are more like mouse axes), for 
> instance to scroll through the title list, to roll through the songs and 
> to nudge songs.

Hm. There's nothing inherent in MIDI that this should be a limitation.
All decent current controllers are MIDI based and use MIDI CCs for
jogwheels just fine.

> For the turntables, I will transmit keypresses of varying velocity (the 
> velocity will encode how much the wheel has moved during that period). 
> I'll use a different key for clockwise and counter-clockwise motion.

Don't do that. Really.

There are almost as many ways of encoding wheel motion as there are
controllers, but all of them (that I've ever encountered) agree on 
this principle: One controller, one number (key or CC#). If you use 
different numbers for different directions, your driver will not work 
for the vast majority of software, including mixxx, without some
significant changes.

IMO it is not the job of a kernel driver to interpret incoming
messages, only to translate them. Therefore I'd caution against
using some time-period logic to determine the velocity of the
wheel. It'd generally be better to simply translate whatever
messages come from the DM2 into MIDI, and let individual software
decide what they mean (and be able to tweak things like the time
period resolution, if the desired "meaning" in a particular piece of 
software is "how fast was the wheel spun" -- bearing in mind that
in some other piece of software, the desired meaning might be
"how *far* was the wheel spun", or even some exotic combination 
of the two.)

That said, the sort of scheme you are talking about (what you
call "pulsed keypress" is widely used in other MIDI controllers,
but (a) it's generally a CC, not a keypress, and (b) values >64
indicate clockwise, <62 anti-clockwise, 63 stop, and the distance
from 63 indicates velocity, rather than the frequency with which
pulses arrive. This is implemented as "spread64" midioption in mixxx
and has the advantage of configurable sensitivity.

> - Can this be integrated into Mixxx (by having a MIDI key run the cursor 
> down or up in the playlist, and two more keys load the song into the 
> left or right turntable

No I don't think you can control playlist scroll or song loading from MIDI. 

> ; by having a MIDI key advance a track by a 
> certain amount depending on the velocity, etc.)?

Yes I think you'd want the wheels to act as jog or scratch wheels
on the track (using the 'wheel' control).

But the first thing to do, if you haven't already, is look at the 
existing DM2 support in mixxx. There's a DM2MIDI file and a MIDI map 
in the midi directory. If your driver can do whatever DM2MIDI does
with the wheels, (ignoring what I said earlier about drivers not
doing too much interpretation...), then you could work to the
same spec and use the same XML -- ie the wheels go on CC#1 and CC#3.

Ben


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to