On Thursday 02 May 2013 22:51:04 Stefan Hajnoczi wrote:
> On Thu, May 2, 2013 at 7:51 PM, Andrej Kruták <[email protected]> wrote:
> > On Thu, May 2, 2013 at 4:39 PM, Stefan Hajnoczi <[email protected]>
> >> Can you explain what you mean regarding volume sent as a float? Do
> >> you have a traffic capture?
> >
> > This is how the frames look like, either incoming or outcoming.
> >
> > OUT: 1C 00 01 00 | 06 00 0A 40 01 03 00 | 15 00 00 00 00 00 00 03 00 01 00
> > 00 00 05 00 10 3F CE 66 33 3F
> > IN: 1C 00 01 00 | 06 00 0A 03 00 40 00 | 15 00 00 00 00 00 00 03 00 01 00
> > 00 00 05 00 10 3F 70 BE 79 3F
> >
> > My guess is that the first 4 bytes is frame header (more frames can be
> > combined into single packet, first byte is frame len - 4). The second part
> > is the packet header (with type and source/destination flags of some kind,
> > or so it seems - the 40/03 bytes there). I'm not sure if some part of the
> > last thing could be a MIDI message - as I said, I don't know too much in
> > this regard. Anyhow, the last 4 bytes is an IEEE 754 float (seems like
> > it's
> > in big endian). The 05 byte means the volume knob id.
> >
> > So... you said MIDI is extensible - do you think the last part of the
> > above
> > (or last two parts?) could be somehow directly used in the userspace?
>
> The CE and BE bytes indicate this is not part of a MIDI message. MIDI
> data is 7-bit, the top bit must be clear. Therefore this cannot be
> MIDI.
Damn :-( This makes things more complicated in two ways:
*) My previous proposal to use raw values won't work since not only the
parameter range, but also the data type differs among devices. So a mapping to
the most expressive data type (float in this case) is desirable.
*) Technically it is possible to map a virtual MIDI device to the USB
interface (just as it is done by the PODxt driver) and then send arbitrary
(not necessarily MIDI-conforming) data to that device. However, this is at
least confusing since such device would be listed among available MIDI devices
although it doesn't follow the MIDI standard. I tried to use libusb to
directly access the USB interface in user-space code, but this requires to
claim the interface, which is not possible if PCM data is transmitted over the
interface at the same time by the kernel driver. This raises two questions:
-) Is it possible to access a USB interface by libusb which is currently
claimed by a kernel driver?
-) If MIDI is not appropriate, which other interface can be used by the kernel
driver as a "link" between the USB interface and user-space code?
Do you have any suggestions?
Kind regards,
Markus
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Line6linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/line6linux-devel