scheduling accuracy for audio

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andrea valle

    #1

    scheduling accuracy for audio

    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

    andrea.valle@un ito.it

  • Paul Rubin

    #2
    Re: scheduling accuracy for audio

    andrea valle <andrea.valle@u nito.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.

    Comment

    • andrea valle

      #3
      Re: scheduling accuracy for audio

      Thanks Paul,
      that's what I suspected.

      -a-



      On 9 Jul 2006, at 19:22, Paul Rubin wrote:
      andrea valle <andrea.valle@u nito.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.
      --

      >
      >
      Andrea Valle
      DAMS - Facoltà di Scienze della Formazione
      Università degli Studi di Torino

      andrea.valle@un ito.it

      Comment

      Working...