简体   繁体   中英

Is it possible to convert (frequency, amplitude)-data to the corresponding (audio) sound in Python?

I am working on a Python project simulating the sounds produced by vibrating strings. If for a given string, I have determined the Fourier transform of the motion, those results can by a simple operation be changed into the data showing the amplitude per (audio) frequency.

Is it possible to then turn those (frequency, amplitude)-data into the corresponding sound using Python?

I have tried it using IPython.display.audio but didn't manage to get it working properly.

If i understand you correctly,you can extract and convert a specific (frequency, amplitude)-data into wav file with scipy.io.wavfile.write . Just don't forget to convert your array to [sample,channel] format.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM