简体   繁体   中英

How do I use the multiprocess library with winsound in python?

I am writing a basic piano style program that uses functions with winsound.Beep to play different note. I am new to multi-processing, and was wondering how I would be able to play two notes at once. If that is not possible, perhaps there is a way to combine frequencies that I do not know. Thanks for reading ~Jimnebob

It seems like Beep function couldn't play several notes at the same time. You can record the sound of 'Beep' through sounddevice library, save the sound in wav files. Then, use subprocess.Popen to achieve multiprocess. The subprocess would play the wav files.

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