Re: Real time event accuracy

2012-05-10 Thread Mark Lawrence
On 09/05/2012 16:52, Tobiah wrote: I'd like to send MIDI events from python to another program. I'd like advice as to how to accurately time the events. I'll have a list of floating point start times in seconds for the events, and I'd like to send them off as close to the correct time as possib

Re: Real time event accuracy

2012-05-10 Thread John O'Hagan
On Wed, 09 May 2012 08:52:59 -0700 Tobiah wrote: > I'd like to send MIDI events from python to another > program. I'd like advice as to how to accurately > time the events. I'll have a list of floating point > start times in seconds for the events, and I'd like to send them > off as close to th

Re: Real time event accuracy

2012-05-09 Thread Dave Angel
On 05/09/2012 03:26 PM, Tobiah wrote: >> I don't think you can really do this accurately enough to get good >> sound, but the basic mechanism is time.sleep(t) which takes a floating >> point argument. That turns into the appropriate microsleep, I think. > I think the time would have to come from a

Re: Real time event accuracy

2012-05-09 Thread Tobiah
> I don't think you can really do this accurately enough to get good > sound, but the basic mechanism is time.sleep(t) which takes a floating > point argument. That turns into the appropriate microsleep, I think. I think the time would have to come from a hardware clock. -- http://mail.python.or

Re: Real time event accuracy

2012-05-09 Thread Paul Rubin
Tobiah writes: > I'd like to send MIDI events from python to another > program. I'd like advice as to how to accurately > time the events. I'll have a list of floating point > start times in seconds for the events, and I'd like to send them > off as close to the correct time as possible. I don'

Re: Real time event accuracy

2012-05-09 Thread Pedro Kroger
> I'd also appreciate suggestions and pointers to a > suitable python MIDI library, and maybe an outline > of what must be done to get the MIDI events to the other program's MIDI in. Mark Wirt's MidiUtil is a nice library for MIDI. It doesn't do exactly what you want (it generates MIDI files) bu

Re: Real time event accuracy

2012-05-09 Thread Pedro Kroger
I don't know the details of how Kontakt works, but you can try pygame.midi: pygame.midi - is a portmidi wrapper orginally based on the pyportmidi wrapper. Also pygame.music can play midi files. Can get input from midi devices and can output to midi devices. For osx, linux and windows. New with p

Re: Real time event accuracy

2012-05-09 Thread Toby
On 05/09/2012 09:13 AM, Dave Angel wrote: > On 05/09/2012 11:52 AM, Tobiah wrote: >> I'd like to send MIDI events from python to another >> program. I'd like advice as to how to accurately >> time the events. I'll have a list of floating point >> start times in seconds for the events, and I'd lik

Re: Real time event accuracy

2012-05-09 Thread Dave Angel
On 05/09/2012 11:52 AM, Tobiah wrote: > I'd like to send MIDI events from python to another > program. I'd like advice as to how to accurately > time the events. I'll have a list of floating point > start times in seconds for the events, and I'd like to send them > off as close to the correct tim

Real time event accuracy

2012-05-09 Thread Tobiah
I'd like to send MIDI events from python to another program. I'd like advice as to how to accurately time the events. I'll have a list of floating point start times in seconds for the events, and I'd like to send them off as close to the correct time as possible. I'd also appreciate suggestions