On Fre, 2013-02-01 at 02:58 -0200, Alexandre Torres Porres wrote:
Hi there, I see now you can easliy change pd's sample rate from preferences while the patches are running, this is a new thing, isn't it?
Oh, I never tried to change the sampling rate while Pd is running. Interesting. Thanks for bringing it up!
anyway, can you change the sample rate from patch via messages?
It seems so, yes. Actually, you can intercept the settings you configure to the audio dialog simply with a:
[r pd] | [print]
Those same messages can be sent to [s pd] in order to change audio settings.
When hitting apply, I get:
audio-dialog 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 48000 25 -1 64
(To guess which parameter represents the sampling rate is left to the reader ;-)
And also, can you learn, somehow, the sample rate from a sound file? Other softwares seem to do that easily, is there an object in Pd for that? Noy in vanilla I believe, right?
[iemlib/soundfile_info]
(works for WAV files)
Roman