An interesting question on the forum has me scratching my head here, perhaps someone knows this?
"What's the best method to access to soundcard info and number of channels from a PD patch? I try to explain... I'm comunicating PD patch with Flash using OSC. How can I retry soundcard type, info, and number of channels from the PD patch and send to Flash app? Thanks a lot in advance."
So, is there a message that can be used to query the state of the audio engine and return stuff like sample rate, channels?
a.
On Tue, 22 Apr 2008 17:41:18 +0100, Andy Farnell wrote:
So, is there a message that can be used to query the state of the audio engine and return stuff like sample rate, channels?
a few years ago, i implemented a message-based access to pd's audio backend ... possibly the patch is still somewhere around ... maybe you can still find it on the sf patch tracker?
hth, tim
Hallo, Andy Farnell hat gesagt: // Andy Farnell wrote:
An interesting question on the forum has me scratching my head here, perhaps someone knows this?
"What's the best method to access to soundcard info and number of channels from a PD patch? I try to explain... I'm comunicating PD patch with Flash using OSC. How can I retry soundcard type, info, and number of channels from the PD patch and send to Flash app? Thanks a lot in advance."
So, is there a message that can be used to query the state of the audio engine and return stuff like sample rate, channels?
samplerate~ of course is easy, but for the other things I don't know an elegant solution. This is especially hard as Pd uses so many different ways to access a sound device: Portaudio, ALSA, OSS, JACK, ASIO, Coraudio, maybe more?
You could try to eavesdrop on the [r pd] receiver, watch for audio-related messages:
print: audio-setapi 1 print: audio-dialog 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 44100 50 print: audio-setapi 2 print: audio-dialog 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 44100 50
but that only works for changes to a running patch.
Frank Barknecht _ ______footils.org__
Hi Andy,
things you might already know, but never the less:
[receive pd dsp] will give you the status of the dsp engine (0/1)
and
[samplerate~] when banged outputs the current samplerate.
but getting the number of channels and the device number might be harder though.
regards, Peter
Andy Farnell wrote:
An interesting question on the forum has me scratching my head here, perhaps someone knows this?
"What's the best method to access to soundcard info and number of channels from a PD patch? I try to explain... I'm comunicating PD patch with Flash using OSC. How can I retry soundcard type, info, and number of channels from the PD patch and send to Flash app? Thanks a lot in advance."
So, is there a message that can be used to query the state of the audio engine and return stuff like sample rate, channels?
a.