[linux-audio-dev] timesetevent alternative

Jens M Andreasen jens.andreasen at chello.se
Tue May 3 20:01:55 UTC 2005

I would probably lock on to the audio clock, in jack or otherwise, since
this is were it all ends up ultimately.

When the jack_process() gets called, count down the time to wait untill
time is zero or less, in which case you do your midi thing and pick the
next event.

On Tue, 2005-05-03 at 13:33 -0600, Garett Shulman wrote:
> Hello, About 5 years ago I hacked together a nice midi looper app. The 
> only problem is that it was for Windows. Anyway... I'm working towards 
> reimplamenting the app in linux. Basically, I have a circular linked 
> list of midi events. Each node has the event and the time to the next 
> event. In Windows there was a timeSetEvent function. I pass this 
> function the time_to_next_event, 
> function_to_call_after_time_to_next_event, and  
> data_to_pass_to_function. The function_to_call_after_time_to_next_event 
> just outputs the event and then calls timeSetEvent with the next nodes 
> data. I'm curious as to how others would implament something similar in 
> linux. Perhaps as a thread with sleep call? Is there a high resolution 
> sleep function? Any ideas? Thanks. -Garett

  c[]  //  Jens M Andreasen

More information about the Linux-audio-dev mailing list