I knew I was missing something simple!

Thanks!

On Sun, 4 Jun 2023 at 13:19, William Brent <william.brent@gmail.com> wrote:
Hi Eric,

Sounds like you might want to be using libpd_process_raw() instead. If I'm remembering correctly, libpd_process_float() expects interleaved samples in the buffer you feed it, and process_raw() expects blocks of samples interleaved by channel.



On Sat, Jun 3, 2023 at 3:50 PM Eric Lennartson <lennartsoneric@gmail.com> wrote:
Hello all, 

I have been experimenting with using python and libpd, and for the most part it works well.
However, I have been trying to use the other processing methods such as libpd_process_float() or libpd_process_double(), but when I do I just get crazy noise.
The code I'm working with is just a modified version of the echo.py file in the samples section of the libpd github page. Basically, all I have done is change the pyaudio format to paFloat32, created a dummy buffer to pass to the process method with array.array('f', range(libpd_blocksize()) and called libpd_process_float() instead. I did check to see if the format was supported using pyaudio's is_format_supported() method and it returned True. The pd patch itself is just a quite sine tone straight into the dac. So I'm really scratching my head here, what am I missing?

Thanks for any insight you can provide.

Eric
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list


--
William Brent

“Great minds flock together”
Conflations: conversational idiom for the 21st century

www.conflations.com