BASIC vs Python

Jan Dries jan.dries at
Sun Dec 19 21:39:04 CET 2004

Andrew Dalke wrote:

> It looks like FMOD/PySonic is the closest to what I'm thinking
> of, and Snack coming in second.  I didn't look too deeply.  Most
> of them only play sound clips (mp3, wav, etc.) and don't have
> a way to specify what notes to play.

If you just want to play notes, you could look at MIDI.
There's a Python module out there somewhere that reads and writes 
And there's plenty of programs (such as Windows Media Playes) that can 
play MIDI files or can convert them to mp3 or wav or whatever.

In fact, I used all of these a while ago to enable me to write something 

import midi

notes = ( "MySong", """
F4 A4 A4 A2 A4- A4 G4 F4 G2 G2 r4 F4 F4 F4 A2-
A4 A4 G2 G4 B4 B4 A4 B4 C'2. r32 A4 C'2 C'2 C'4 C'4
C'4 B4 A4 B2 B2 r16 C'2 A2 G4 B2 B4 A4 F2. G4 E2 F2.
""" )


to generate MIDI-files from a simple notes description.


More information about the Python-list mailing list