I should mention, the Steel doesn't actually show up as an HID device (or a
MIDI device). It just sends HID and MIDI messages, over the bulk interface.
libhid isn't able to talk to the Steel since it doesn't present an HID
endpoint. Even though the messages wind up looking just like HID after
they've been pulled off their bulk endpoint.




On Tue, Jan 21, 2014 at 1:46 PM, Neale Pickett <ne...@woozle.org> wrote:

> Good idea.  Here's a (badly-drawn) diagram:
> https://docs.google.com/drawings/d/1H9r4pe3y7gvA8ibIc9v4Oqo3GTtnpBa0eKyqYo4FEzM/edit?usp=sharing
>
> A little background: The Hercules kernel driver for Linux hasn't been
> updated in years. There exists a constantly-growing set of patches to their
> driver that make it work under newer Linux, but it's never going to make it
> into the mainline kernel, and it's a drag to keep recompiling kernel
> drivers. So I wrote a userspace driver to get my MP3e2 working.
>
> Apparently Hercules got wind of this, and shipped me three more
> controllers, with the understanding that I was to make them all work in
> Mixxx. I decided to tackle the Steel next.
>
> Here's how things currently work for Linux people:
>
> bulkcontroller.cpp uses straight up libusb to talk directly to the
> controller. Right now there are three supported controllers in
> "src/controllers/bulk/", although I've only verified one of them (MP3e2) as
> actually working. Since the MP3e2 sends perfectly normal MIDI messages,
> bulkcontroller.cpp passes those straight through to common-bulk-midi.js,
> which is just a JavaScript shim to provide everything that's specified by
> "Hercules DJ Control MP3.midi.xml" (simple button->control tie ins). It
> passes everything else as a faked-out MIDI message to
> "Hercules-DJ-Control-MP3-scripts.js".
>
> Hercules-DJ-Control-MP3-scripts.js has not been touched by me, so it still
> does its normal thing for people with an OS-level driver (Mac and Windows)
> that makes it show up as a MIDI device.
>
> So you can see, the code is still providing a dumb shim between the bulk
> USB messages and MIDI, it's just doing it at the JavaScript level and not
> the C++ level. I could avoid having to duplicate the .midi.xml stuff in
> JavaScript if I moved the shim into C++, where I could directly call
> functions in midicontroller.cpp.
>
> Bear in mind, all this work is happening because RJ mentioned briefly in
> IRC once that he'd prefer users not to have to kick up a driver. I
> personally feel like it'd be a whole lot cleaner for everybody to
> completely remove the bulk controller stuff, and tell Linux people "go run
> hdjd, the Linux driver for legacy Hercules controllers". Then I could
> maintain my already-working code separate from Mixxx and not have to write
> long boring emails to the devel list about architecture :-)
>
>
>
> On Tue, Jan 21, 2014 at 1:05 PM, Sean M. Pappalardo - D.J. Pegasus <
> spappala...@mixxx.org> wrote:
>
>> Hello there.
>>
>>
>> On 01/21/2014 11:18 AM, Neale Pickett wrote:
>>
>>> When I was first writing this driver, you guys (probably Pegasus)
>>> encouraged me to make it its own type of driver and not piggyback on the
>>> MIDI driver. But now that a second device (2 out of 2) is known to send
>>> MIDI, it would actually be a significant reduction in lines of code if I
>>> went back to providing a driver that made these two use the MIDI code.
>>>
>>
>> I'm not quite clear on how everything is interacting here. When you say
>> "driver," I'm thinking Linux kernel (or user-space) driver. Can you knock
>> up a quick block diagram?
>>
>> How does this relate to the usb-bulk framework work you did over a year
>> ago that's in v1.11?
>>
>>
>>  The Steel actually has a second mode that sends HID messages. I haven't
>>> played with this one much since it was so easy to do the MIDI.
>>>
>>
>> You might want to look at using that. Sometimes more features and/or
>> higher resolution is available using HID compared to MIDI on some
>> controllers. Plus it should work without having to make any code changes.
>>
>>
>>  So, what say you? Can I retool the "bulk" code to be a shim in front of
>>> the MIDI code? Is it maybe too close to 1.12 for this kind of change?
>>>
>>
>> I can answer this better once I understand the above, though RJ has the
>> final word.
>>
>> Sincerely,
>> Sean M. Pappalardo
>> "D.J. Pegasus"
>> Mixxx Developer - Controller Specialist
>>
>
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to