Python Forum
Writing a floating point aifc file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Writing a floating point aifc file
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:
And for AIFC files specifically:

Possibly Related Threads…
Thread Author Replies Views Last Post
  HELP! writing to csv file repeats, but code looks good. TheBeast 2 693 Mar-26-2019, 10:09 PM
Last Post: TheBeast
  reading, modifying and writing json file metalray 2 8,385 Jun-06-2018, 03:09 PM
Last Post: metalray
  Upload csv file as numbers (floating?) and extract element, row, and column bentaz 7 1,797 Mar-19-2018, 05:34 PM
Last Post: bentaz

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020