By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,563 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

scheduling accuracy for audio

P: n/a
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
an**********@unito.it

Jul 9 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
andrea valle <an**********@unito.itwrites:
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.
Jul 9 '06 #2

P: n/a
Thanks Paul,
that's what I suspected.

-a-

On 9 Jul 2006, at 19:22, Paul Rubin wrote:
andrea valle <an**********@unito.itwrites:
>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.
--
http://mail.python.org/mailman/listinfo/python-list

Andrea Valle
DAMS - Facoltą di Scienze della Formazione
Universitą degli Studi di Torino
http://www.semiotiche.it/andrea
an**********@unito.it

Jul 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.