Archived:How to generate and play MIDI notes in PySymbian
You can play any sound file (including midi) with Python. But for generating a midi file you have to use another way.
With it, you can play a single note with the following code.
from smidi import play
play([(64,192), (32, 192)])