[Stk] prototyping in python?

Iain Duncan iainduncanlists at gmail.com
Wed Nov 2 13:02:32 PDT 2011


Preliminary tests seem to imply this works really well actually. I'm
pleasantly surprised, I was able to put some pointless number crunching in
the non-audio thread and spit to the screen, sending my python process up
to 30-40% Cpu use and gnome -terminal up to about 50% ( on a quad core chip
mind you ) without noticing any underruns. Mind you, I have no idea what
the real latency is, I have my buffer set at 64, but dac.getStreamLatency()
is reporting 0.00 so I might have to benchmark.

Wondering if either of you would happen to have an idea of how I could
easily make the audio gen really audio heavy?

An ideal benchmark I think would be to get some audio-in, process it, and
spit it out, but that may take a while.

The gen as is now:

0.5 * cos( 2. * 3.1416 * self.freq * self.idx / SAMPLE_RATE )

perhaps making a matrix of a whole bunch of those would do it.

thanks
Iain



On Wed, Nov 2, 2011 at 12:52 PM, Iain Duncan <iainduncanlists at gmail.com>wrote:

> Thanks Gary, I got in touch with Antoine and will be helping to extend
> that example.
>
> thanks
> iain
>
> On Wed, Nov 2, 2011 at 10:58 AM, Iain Duncan <iainduncanlists at gmail.com>wrote:
>
>> Well it works, and it seems to be running ok on my box ( some clicking,
>> but the sine sounds clean ).
>>
>> I noticed the python file has a mixture of spaces and tabs, so it opened
>> up looking funny in my editor, I'm converting that. I emailed Antoine to
>> see if he's still working on this or what the status is. I'll definitely
>> play around with it. I assume none of the other stk stuff has been ported
>> given that Python is not really appropriate for real time dsp eh?
>>
>> Looking over my notes I realized I got busy and never tested the crtsine
>> example on my firepod for you, I'll get to that to.
>>
>> thanks
>> Iain
>>
>>  On Wed, Nov 2, 2011 at 7:24 AM, Gary Scavone <gary at ccrma.stanford.edu>wrote:
>>
>>> Hi Iain,
>>>
>>> If it helps, there is a python wrapper for RtAudio in the latest release
>>> of RtAudio (look in the "contrib/python/" directory).
>>>
>>> --gary
>>>
>>> On 2011-11-02, at 12:22 AM, Iain Duncan wrote:
>>>
>>> > Hi, I'm working on an a project that I intend to do using the STK, but
>>> am hoping I can prototype the architecture in python until I've figured out
>>> the various components and their responsibilities and dependencies. Does
>>> anyone know of any kind of python library ( or method? ) that would let me
>>> simulate the way callback based STK apps using RTAudio work? IE I want to
>>> have a python master callable that gets called once per audio sample and
>>> has a way of sending out it's results.
>>> >
>>> > I've found a bunch of python audio libs but it doesn't seem like they
>>> work that way, maybe I'm missing something?
>>> >
>>> > thanks!
>>> > Iain
>>> > _______________________________________________
>>> > Stk mailing list
>>> > Stk at ccrma.stanford.edu
>>> > http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20111102/c759478a/attachment.html 


More information about the Stk mailing list