11

Possible Duplicate:
Python Music Library?

Is there a way to play musical notes in Python? Also setting duration would be useful. If there are any built-in modules for it then that will be great, but if there is an outside module I need to download that is also fine.

If anyone can post exact examples that would be helpful! Thanks!

Community
  • 1
  • 1
Lenny Khazan
  • 111
  • 1
  • 1
  • 3
  • Step 1. Search for "Python and Music". Step 2. Read the links. Step 3. Update your question to be more specific. This has been asked here, and a great deal of information is available through Google. – S.Lott Apr 01 '11 at 20:52
  • @S.Lott I've been struggling to find a solution for this, no luck in last two days. Though great deal of info is available through google. – Dilawar Jun 09 '19 at 10:20

3 Answers3

5

Look here for many audio libraries: http://wiki.python.org/moin/PythonInMusic

You probably want MusicKit.

jhocking
  • 5,527
  • 1
  • 24
  • 38
4

The Python standard library includes the winsound module, which allows you to play tones with a specific frequency and duration on Windows platforms.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
2

This is an interesting question I have never thought about doing this before. From a quick search it looks like http://musickit.sourceforge.net/ or http://sndobj.sourceforge.net/ are good solutions. I will look into it more.

Tom
  • 1,986
  • 2
  • 18
  • 29