Python Forum

Full Version: Writing a floating point aifc file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm an audio developer and would like to read and write 32 bit floating point audio files for test purposes. After hours of farting around, I've managed to realize that the problems I'm having are restricted to the floating point format. I can successfully write a 16 bit fixed point file from a numpy array (even though there are no examples in the aifc documentation).

I also saw a couple other libraries PySoundFile and Audiolab, though they were either really old and/or didn't install properly.

What is the right way to get this done in python. There are a shocking lack of google results on the subject of writing sound files in python. 

And if this is the wrong forum, could someone point to the right place?
you can cast an integer to float with:
x = int(45)
print('x: {}'.format(x))
x = float(x)
print('x: {}'.format(x))
As far as audio packages in python, look here: https://pypi.python.org/pypi?%3Aaction=s...mit=search
And for AIFC files specifically: https://pypi.python.org/pypi?%3Aaction=s...mit=search