On Thu, May 2, 2013 at 4:39 PM, Stefan Hajnoczi <[email protected]> wrote:
> On Wed, May 1, 2013 at 9:33 PM, Andrej Kruták <[email protected]> wrote:
> > On Wed, May 1, 2013 at 7:30 PM, Stefan Hajnoczi <[email protected]>
> wrote:
> >>
> >> On Wed, May 1, 2013 at 11:11 AM, Andrej Kruták <[email protected]> wrote:
> >> > As I said, I don't know much about MIDI, so it's hard to tell for me,
> if
> >> > the
> >> > messages in X3 (bean) resemble it at all. What's your plan if it's
> >> > different, is the userspace (planned t be) flexible enough? How is the
> >> > profile uploading/downloading handled with the XT?
> >>
> >> Userspace should support multiple devices in a data-driven way -
> >> adding support for a new device should (mostly) mean populating a
> >> table of MIDI messages.
> >>
> > So in case there's no real MIDI in the device, you expect it to be
> somehow
> > emulated by the driver, right? But for example the volume is send from
> X3 as
> > a float number, while in MIDI (after a short look) it seems to be just an
> > unsigned char....
>
> No, MIDI is not emulated by the driver. In some cases the driver
> spies on MIDI traffic or generates MIDI messages internally, but it
> doesn't process MIDI messages and convert them into Line6-specific I/O
> operations.
>
> MIDI is extensible and you can send arbitrary data over it (may
> involve a 7-bit encoding). Line6 uses a custom MIDI mapping and
> parameters can be floats, fixed-point, etc.
>
> 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?
>> Don't expect anything close to the Line6 Editor working yet.
> >> Personally, I care about a solid PCM and MIDI driver, but I don't care
> >> so much about a Line6 Editor. If someone invests the time then I'm
> >> sure it would be doable in a couple of months.
> >>
> >
> > For me, it'd be enough to just dump all the settings, put (some of) them
> > back through some sys file, for example (or ioctl). According to the USB
> > comm, it seems it's easily doable. Editing would be nice, I saw there's
> some
> > work around that done already - but as yuo say, someone has to have time
> for
> > it... :)
>
> Dumping the device is easy on the HD300, maybe it's the same on yours.
>
> Not sure. X3 doesn't support MIDI (no midi in/out ports on the device
itself) according to the specs. But I doubt they have completely different
HW for X3 and X3 Live (which has MIDI), so the protocol could be the same -
and the USB data could be indeed some encoded MIDI messages...
The device has a MIDI dump option available in an options menu. You
> can select whether to dump just the current patch or all patches.
>
> When you activate MIDI dump the device sends all the patches over
> MIDI. On your computer you can use amidi(1) to save this to file.
>
> Later you use amidi(1) to send the sysex back to the device, restoring
> the patch(es).
>
> If you don't enjoy using amidi(1) I bet some of the graphical DAWs or
> MIDI tools under Linux also support storing/loading sysex dumps.
>
> I'll try to read something about this (sysex, MIDI format etc.) so I don't
bother you with basic stuff..
Anyhow, back to the audio stream. How does the data transfer work on HD300?
Is there any setup, or you just read/write the appropriate USB ports?
--
Andrej
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Line6linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/line6linux-devel