Discussion of Python midi library

Mike Brenner mikeb at mitre.org
Mon Apr 8 13:13:25 EDT 2002


Here is a suggestion as to what to encapsulate (each one is harder than the next.

1. Midi Instruments (preferably the hundred general midi instruments from grand-piano up through gunshot and the hundreds of xg midi instruments available on the more advanced synthesizers and sequencers). The attributes of the instruments would include:

	- a handle with which to grab the instrument -- for example, if my application wishes to grade the quality of low pitch bells (gongs) on a particular sequencer, giving me a set of poor gongs (clavinet, celesta, cow bell, and fx_5_brightness), a set of fair gongs (tubular bells, glockenspiel), and a set of good gongs (lower range pan flute, charang, tinkle bell, and silver bell), I would need unique names for all these instruments
	- the name of the instrument
	- the midi code to invoke that instrument on the currently selected hardware
	- over what ranges of pitch they are valid (don't use a piccolo 3 octaves below middle C)
	- over what ranges of rhythm they are valid (don't use legato strings for 64th notes)
	- instruments they are similar to, if the original choice is not available


2. Midi Selection Sequences. Each midi hardware will have certain selection sequences, bank selection commands, patch selection commands, controllers, etc. There must be a way of doing the machine independent stuff in a machine independent manner and yet there must be a way to insert the device-specific stuff. The currently selected hardware must be part of the model. There must be ways to insert, delete, modify, move, and copy notes and other commands into channels, including setting their velocity (loudness), frequency (pitch), duration, etc. A single command will enter a chord, a triple, a comment such as key, a meta event, etc.


3. Image. A string image function must represent every object, possibly in a standard format like xml, musicml, etc.)


4. Time. There must be a consistent time model used throughout, which easily represents notes, rests, start, finish, etc.


5. Graphical representations in staff format, say, in jpeg or png format.


6. Reading in a bit-mapped graphical representation (say a jpeg or png file) of a staff into midi format.


7. Pattern recognition of a wav file into a midi format, choosing the right notes, durations, and instruments.






More information about the Python-list mailing list