scheduling accuracy for audio

A

andrea valle

Dear all,

I have created a large Python-based GUI project and I'd like to use it
as a GUI interface for real time audio sequencing (using the
SuperCollider -SC- synthesis server).
Python (the client) and SC (the server) can communicate via OSC
protocol (there are available implementations). SC will generate events
responding to Python messages.

In order to have sequencing I have to send at precise timing messages
from Python to SC. Obviously, being a musical application, I need
millisecond time accuracy, with less latency as possible or at least a
fixed (short) latency. More, I need to have multithreading, with many
processes sending messages from Python to SC.

I know that I can create a similar architecture in Python with sched
and time modules, using scheduler class and .sleep method. But I was
wondering: how precise will be timing?
Is .sleep suitable for audio/music.


Any hints?

Thanks a lot

Best

-a-



Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
(e-mail address removed)
 
P

Paul Rubin

andrea valle said:
In order to have sequencing I have to send at precise timing messages
from Python to SC. Obviously, being a musical application, I need
millisecond time accuracy, with less latency as possible or at least a
fixed (short) latency. More, I need to have multithreading, with many
processes sending messages from Python to SC.

You really can't get that kind of accuracy with a non-realtime OS.
The way this is handled in actual audio applications the sound board
has a fair amount of buffering, so you send the right number of
samples and precise scheduling isn't so important.
 
A

andrea valle

Thanks Paul,
that's what I suspected.

-a-



You really can't get that kind of accuracy with a non-realtime OS.
The way this is handled in actual audio applications the sound board
has a fair amount of buffering, so you send the right number of
samples and precise scheduling isn't so important.
Andrea Valle
DAMS - Facoltà di Scienze della Formazione
Università degli Studi di Torino
http://www.semiotiche.it/andrea
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

[OT] wxpython dmg 0
problem with setup.py 0
wave.readframes() (or conversion?) 2

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top