Sound generation / synthesis with python?

后端 未结 7 1184
执念已碎
执念已碎 2020-12-02 08:17

Is it possible to get python to generate a simple sound like a sine wave?

Is there a module available for this? If not, how would you go about creating your own?

7条回答
  •  猫巷女王i
    2020-12-02 08:45

    After wasting time on some uncompilable or non-existent projects, I discovered the python module wavebender, which offers generation of single or multiple channels of sine, square and combined waves. The results can be written either to a wavefile or to sys.stdout, from where they can be interpreted directly by aplay in real-time. Some useful examples are explained here, and are included at the project's github page.

提交回复
热议问题