ah I think I get it now -- snd_seq_ev_set_queue_pos_tick is a macro which constructs a special event type, it's not a function on the queue. So I have to construct of these events then pass it to the timer at 0:0 ?
$aconnect -i client 0: 'System' [type=kernel] 0 'Timer ' I'd still like to understand the ideas behind the architecture here though -- why do we have snd_seq_queue_tempo_set_tempo as a direct function on the queue to change tempo, but we have to send this event to a port to change position ? On Mon, Apr 4, 2016 at 10:11 AM, Charles Fox <charles....@gmail.com> wrote: > Thanks very much Clemens. > > I saw this function in the API, but from from the name and signature, > snd_seq_ev_set_queue_pos_tick(ev,q,ttime), I thought it was a method for a > single event rather for the whole queue. Could you explain what the ev > argument is for and what I need to put in it; and also why its called > snd_seq_ev_set_queue_pos_tick rather than snd_seq_queue_set_pos_tick ? > > (I can see in the API docs this text, which I think tells what I need to > put in ev, but I don't understand why this is needed, why's it not just > snd_seq_queue_set_pos_tick(q,ttime) ? > > ((ev)->type = SND_SEQ_EVENT_SETPOS_TICK > <http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_events.html#ggaef39e1f267006faf7abc91c3cb32ea40aeb233aee7f0548cd3b0fdc811c15d3ec> > ,\ > snd_seq_ev_set_dest > <http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_middle.html#gaff2d03c7db0d6d5cfeec429d160d9459>(ev, > SND_SEQ_CLIENT_SYSTEM > <http://www.alsa-project.org/alsa-doc/alsa-lib/group___sequencer.html#ga5437f98c59679c92ee4d940ac643169e>, > SND_SEQ_PORT_SYSTEM_TIMER > <http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_port.html#ga02870ceddec24d3cc5609ec728b0cb92> > ),\ > (ev)->data.queue.queue = (q),\ > (ev)->data.queue.param.time.tick = (ttime)) > > ) > > thanks > > > > > charles > > > > > > > > > > > > On Mon, Apr 4, 2016 at 9:12 AM, Clemens Ladisch <cladi...@googlemail.com> > wrote: > >> Charles Fox wrote: >> > The midiarp.c demo in the tutorial shows how to read the tick state, >> > and how to get and set the tempo. So I was expecting to find >> > a function called something like snd_seq_queue_set_tick , but there >> > doesn't seem to be one in the API. >> >> To set a queue's timer's position, send a message >> SND_SEQ_EVENT_SETPOS_TICK >> and/or SND_SEQ_EVENT_SETPOS_TIME to the global timer port. >> >> There are macros snd_seq_ev_set_queue_pos_tick() and >> snd_seq_ev_set_queue_pos_real() to help you construct such messages. >> >> >> Regards, >> Clemens >> > > > -- Dr Charles Fox Director, Ibex Automation Ltd, www.ibexautomation.co.uk Academic Fellow, University of Leeds
------------------------------------------------------------------------------
_______________________________________________ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user