[LAU] sample processing in python

Olivier Guilyardi ml at xung.org
Sat May 23 19:38:15 EDT 2009


Atte André Jensen wrote:

> I'd like to process samples, mostly slice, splice, mix and fade, 
> preferably in python, and preferably without any 3rd part library 
> installed. I couldn't find such functionality inside standard python, 
> did I overlook something?
> 
> I could (and have) write wrappers around sox, but since sox seems to 
> change it's "API" all the time that's not such a nice solution. I 
> guess/hope ecasound is more stable with regards to it's interface, would 
> that be a better option?
> 
> Are there other languages, c++ or c for instance that have the 
> functionality I'm looking for build in? I might consider letting go of 
> my beloved python if other languages have something available as standard...

You can load and save samples in Python without any 3rd party module, using the
standard library: http://docs.python.org/library/mm.html. That said, I would
recommend that you use Audiolab instead, as mentionned on this thread.

Then, you do not need any API to perform such simple operations as slicing,
splicing, mixing and fading. All you need is a couple of loops, and a few
additions and multiplications.

-- 
  Olivier



More information about the Linux-audio-user mailing list