Generating Smooth Audio From Python On A Low-powered Computer
I am trying to write a simple audio function generator in Python, to be run on a Raspberry Pi (model 2). The code essentially does this: Generate 1 second of the audio signal (sa
Solution 1:
I was looking for a similar question to yours, and found a variation that plays a pre-calculated length by concatenating a bunch of pre-calculated chunks.
http://milkandtang.com/blog/2013/02/16/making-noise-in-python/
Using a for loop with a 1-second pre-calculated chunk "play_tone" function seems to generate a smooth sounding output, but this is on a PC. If this doesn't work for you, it may be that the raspberry pi has a different back-end implementation that doesn't like successive writes.
Post a Comment for "Generating Smooth Audio From Python On A Low-powered Computer"