[alsa-devel] Loop sequencer

Aldrin Martoq amartoq at dcc.uchile.cl
Sun Apr 6 14:52:50 CEST 2008

On Fri, Mar 28, 2008 at 3:26 AM, Guillaume Dupré <gui.dupre at gmail.com> wrote:
> Hello
>  I try to program a loop midi sequencer with libasound .
>  For the moment, I have this :


>  sleep(4) ;

use snd_seq_sync_output_queue() instead.

>  It works, no problem .
>  But now, I want to do a loop with my two notes .
>  I searched on the Internet but I didn't find .

I guess there is no loop helpers in alsa-lib. You must make your own.

Check how other looping software is doing. I think you could do
something like a function that receives a loop sequence (array of
events sorted by time), a time (or tick) and a max time or max events.

int dump_loop(events[], base_time, max_time);

This function should put the appropiate event from the events[] based
on the time frame and up to the max_time or max_events.

Aldrin Martoq
Episodio 002 (Lunes 24 Marzo)!

More information about the Alsa-devel mailing list