Re: [LAD] prototyping callback based architecture in python?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <Linux-audio-dev@...>
Date: Friday, November 4, 2011 - 5:36 pm

2011/11/2 Iain Duncan :

You could implement the callbacks (and link it to STK) with Cython.
(not CPython)
This would require you to write a Cython-Header file for the called
STK functions.
Cython works very well for this, although you have to learn it, because
it's neither real C nor real Python, but it's close.

With some attentiveness, you could write rt- functions in Cython,
because they compile to pure C / binary.

> I want to have a python master callable that gets called once per

No, Once per audio buffer, consisting of many (e.g. 128) samples.
That's a better choice, usually, even if you do sample-by-sample
processing within the function/callback.

> and has a way of sending out it's results to the audio

Note:
Don't use python threads (as implemented in CPython), they do not
work for this.
You might have more luck with the more recent multiprocessing module,
( http://docs.python.org/library/multiprocessing.html )
It was introduced to circumvent some of PythonThreads limitations.

--
E.R.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] prototyping callback based architecture in python?, Emanuel Rumpf, (Fri Nov 4, 5:36 pm)