Re: [LAU] Yet another audio interface post

From: Renato <rennabh@email-addr-hidden>
Date: Mon Jul 12 2010 - 00:27:19 EEST

On Sun, 11 Jul 2010 19:58:04 +0200
Pedro Ferreira <ilzogoiby@email-addr-hidden> wrote:

> > I have a Rig Kontrol 2 from Native Instruments. It does have a
> > driver for Alsa, and I'm happily using it with JACK. AFAIK the
> > driver is the same for all the NI devices, snd-usb-caiaq; when I
> > was trying to get mine to work (wasn't straightforward due to bugs
> > in the driver which the dev has worked out, now it should be
> > plug-play) I found in some places reports of  attempts of using the
> > Audio Kontrol 1 on linux - the NI forums I guess, I could try to
> > fetch them out if google is not your friend.
>
> I've found some of them, but I found no-one using it for recording
> (with Ardour or whatever).
> > So for the audio part there should be no difficulties IMHO, and
> > if there were the dev (which is on the alsa mailing list) is a very
> > friendly guy and I guess he would help you.
>
> Good, good :)
>
> > BUT: I don't know if the things (knobs, buttons etc.) on the Audio
> > Kontrol 1 produce MIDI, however I doubt it, since the ones on my RK2
> > don't - they produce HID-like events though, that is it is
> > recognized as sort of a keyboard or mouse.
>
> In the manual, they say you can choose between MIDI and "key
> commands". However, it seems that the mapping is done by some software
> that needs to be running. Is it like this in your RK2?

The RK2 was meant for use only with the dedicated software (Guitar
Rig), so I guess that's why they didn't make it MIDI-wise. But maybe
the Audio Kontrol 1 is meant for a broader use, so it would be
reasonable for it to have MIDI.
I encourage you to ask Daniel Mack about it: he's the dev of the driver
and he works for NI, he knows alot about the interiors of these
devices. I think I found his mail on the alsa wiki, otherwise I can
send it to you off-list.

> I guess that's
> the HID events you're referring too... in that case I could just use
> puredata as you say, or create some simple program for doing it. I
> could live with that.
> How does the caiaq driver handle these events? How do you capture
> them?

Well the driver uses the linux/input.h library to create these events;
they are totally like a keyboard. For example, if I plug in my RK2 and
I press button 1 on it, it has the same effect as if I press button 1
on my PC keyboard. This behaviour is coded in the kernel driver.
Through supercollider I "grab" the RK2, so that it won't be avaiable to
the rest of the system, and use a dedicated class (GeneralHID) to make
MIDI out of it. I think I even posted some code on the alsa wiki:

http://alsa.opensrc.org/index.php/NativeInstruments#SuperCollider

(I should really update that code, it's unecessarily complicated for
a basic example)

>
> > I wouldn't recommend it to someone who can still buy
> > something that sends out straight midi (I bought my RK2 before
> > moving to linux).
>
> Yes, but the problem right now is that Firewire is out of question (as
> I have some bogus Ricoh chipset), and there are not many USB2 devices
> working right now... I'd love to be proven wrong on this one :)
>
> > So all in all I bet you could get it working, but probably (unless
> > it sends out MIDI) you'd have to put together some pd patch or sc
> > code.
>
> That wouldn't be a big deal, I could hack something... I just want to
> make sure that I won't end up with some piece of hardware that has no
> hope of ever being used on Linux.
>
> Thanks a lot!
>
> Pedro

yeah, if you're not too uncomfortable using things like pd and sc, it
definetely shouldn't be difficult. And it has it's upsides: once you
learn how to do it, you know even how to generate midi from your mouse,
joystick, joypad.... whatever HID. And, with some logic structures, you
can do some more sophisticated things (example: keeping one certain
button pressed changes all the MIDI CCs of the other buttons...)

regards
renato

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Mon Jul 12 04:15:01 2010

This archive was generated by hypermail 2.1.8 : Mon Jul 12 2010 - 04:15:01 EEST