Re: [LAD] making sense of Jack MIDI; or, is this an appropriate use for Jack?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: M Donalies <ingeniousnebbish@...>, linux-audio-dev@lists.linuxaudio.org <linux-audio-dev@...>
Date: Saturday, February 16, 2013 - 8:58 am

----- Mail original -----

> De : M Donalies

> Using Alsa sequencer, I put events on a queue with a time and Alsa takes care

I've tried to do that move from an ALSA backend to a JACK MIDI one in QMidiArp, and used vectors as a queue for event timings. It doesn't support tempo changes on the fly and I even didn't think about how to implement this.
The ALSA sequencer queue has a very convenient features called 'echo events', that is you can tell the sequencer to call back your program at a distinct time in the future, do calculations and place back notes into the queue at that time.
JACK calls the processing thread regularly and it is up to you to watch when it's time to respond with events. So in QMidiArp I tried to reproduce this echo event mechanism using an additional 'echo queue' vector.

I don't pretend that this is a good solution (neither its implementation) but for the purposes of QMidiArp as a rather simple sequencer it does the job quite well. 
And I agree with Pedro that the need to be careful about what
functions you call within the JACK process (rt) thread was quite a
challenge, and it required some substantial changes to the whole
program, gui etc...So if you set up the entire program for JACK (which admittedly should be the case for MIDI+AUDIO apps)  right
from the beginning this is already more straight forward, but moving a
program from ALSA to JACK MIDI is not.

It would be really nice if some future JACK version had a built-in sequencer queue, and some rumors say there are or have been plans?

Regards
Frank
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Frank Kober, (Sat Feb 16, 8:58 am)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Fri Feb 15, 5:53 pm)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 12:16 pm)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 5:22 pm)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 9:39 am)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 10:03 am)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Sat Feb 16, 11:03 am)
Re: [LAD] making sense of Jack MIDI; or, is this an appropri..., Pedro Lopez-Cabanillas, (Fri Feb 15, 7:15 pm)