Hello to all,
I would like to write a program which does the following:
detect the input events generated by a usb device which i own - the Rig
Kontrol 2 from Native Instruments which is a pedal board intended for
guitar use and which already has a linux driver - and trigger with those
midi messages; i.e, pushing a button would create a midi note on/off,
rolling the pedal a midi CC. As said, the pedal produces already linux
input events so it would be a matter of creating a midi client (jack or
alsa), grab these events and create midi from them. I would then use
these midi messages to control Jack applications (mostly rakarrack)
My C/programming knowledge is basic, so I ask your advice:
1) would it be easier to achieve this through jack or alsa? I'm confused
here because jack applications i use - hydrogen for example - for what
concerns midi, they all appear under the ALSA tab in qjackctl's
Connection window. Are they really alsa midi clients being wrapped by
jack? Is there a reason for writing alsa midi clients instead of native
jack midi clients?
So my problem is if i should learn the jack api or the alsa one.
2) Once I've decided on 1), which is the best place to document myself?
I would prefer, if possible, to learn only what i need for this simple
project - which for me btw is anything but simple. I mean not learning
the whole jack or alsa api if i'm only going to use the basics.
I really want to do this, but as you can see it's a difficult project
for me. It would be wonderful if someone could give me kind of detailed
advice on what "bricks" i'll need: relevant functions from the apis,
general code structure and well, anything that will make me life
easier :)
thank you,
Renato