Hi,
last week I asked about the meaning of ppq - thanks a lot so far for
all the answers! Now I have a related question, namely about tempo: If
I set ppq to 1, then tempo should be the duration of a quarter note in
microseconds, right?
But there seems to be a factor of about 100 between this and what I
get with my test program. Setting tempo to 100000000 makes one quarter
last about one second. Is there something wrong with my program or
what's my mistake?
Thanks again,
Gerald
--
snd_seq_queue_tempo_t *queue_tempo ;
snd_seq_get_queue_tempo (seq_handle, queue_id, queue_tempo) ;
int ppq = 1 ;
snd_seq_queue_tempo_set_ppq (queue_tempo, ppq) ;
unsigned int tempo = 100000000 ;
snd_seq_queue_tempo_set_tempo (queue_tempo, tempo) ;
snd_seq_set_queue_tempo (seq_handle, queue_id, queue_tempo) ;
snd_seq_ev_clear(&ev);
snd_seq_ev_set_source(&ev, port_id);
snd_seq_ev_set_subs(&ev);
snd_seq_ev_set_noteon(&ev, 9, 60, 127) ;
snd_seq_tick_time_t tick = 0 ;
for ( int i=0 ; i<4 ; i++ ) {
snd_seq_ev_schedule_tick(&ev, queue_id, 0, tick);
snd_seq_event_output(seq_handle, &ev);
tick++ ;
}
snd_seq_drain_output(seq_handle);
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel