Re: [LAD] ALSA sequencer: Early delivery of events.

From: Richard Cooper <pj0930@email-addr-hidden>
Date: Wed Mar 02 2016 - 17:50:01 EET

On Wed, 02 Mar 2016 08:06:05 -0500, Clemens Ladisch <clemens@email-addr-hidden> wrote:

>> Is it possible to ask ALSA to also deliver these events early along with that timestamp?
>
> No. You'd have to subtract the offset from the timestamp yourself.

I should have said that I'm receiving these events, not sending them, in case that affects the answer. ...but I assume it doesn't.

To further explain what I'm trying to do:

I've written a synthesizer that uses a large audio buffer and resynthesizes the audio in that buffer when new MIDI events arrive, so as to avoid xruns and achieve minimal latency simultaneously. While it makes sense to go through the rewind-and-resynthesize effort for events arriving from an external MIDI keyboard since those events cannot be known in advance, when it comes to events previously recorded into a sequencer, those events are known in advance and so it would make more sense to synthesize those notes correctly the first time so that the rewind-and-resynthesize effort isn't necessary. So I kind of want to make it do that, but obviously that requires that there be some way to receive the scheduled events from ALSA before their scheduled time.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Mar 2 20:15:02 2016

This archive was generated by hypermail 2.1.8 : Wed Mar 02 2016 - 20:15:02 EET