barrett@jhunix.HCF.JHU.EDU (Dan Barrett) (03/16/91)
My program "MIDI Playground" (MP) has just been posted in the newsgroup comp.sources.amiga. It is a small utility that lets your Amiga talk to a MIDI instrument. MP is a program I had been meaning to write for years, but just never got around to it before. Essentially, MP translates between 3 different languages: readable text, binary file data, and MIDI. It is good for many different tasks: o Learning about MIDI. Just type the command: 1> mp -it -om and MP will send text (input, -i) to MIDI (output, -o). Thus, anything you type will be converted to MIDI bytes and sent immediately to your MIDI instrument. You can type values in binary, octal, decimal, hexadecimal, characters, or strings, all mixed together. You can also see what MIDI code your instrument transmits. Type: 1> mp -im -ot and bang on the keyboard, for example. o Discovering your instrument's system exclusive implementation. Just convert incoming MIDI into outgoing text: 1> mp -im -ot Now press buttons, etc., on your instrument and watch them get translated on the Amiga screen. o Translating any binary file to text. Sort of like "Type OPT H" but fancier. 1> mp -ib -ot -g binary.file.name o A primitive patch librarian. To receive data: 1> mp -im -ob -p patch.file.name To send data: 1> mp -ib -om -g patch.file.name Note: MP is not designed to handle large amounts of data efficiently. (It WILL handle it, but not very fast.) o A self-tutor. You can learn how to use the program by bypassing MIDI entirely, and converting text input to text output: 1> mp -it -ot o A MIDI "compiler". Take a text description of MIDI data, like this: ; Play MIDI note 64 on channel 0, velocity 127 0x90 64 127 and convert it into binary data suitable for sending to a synthesizer: 1> mp -it -ob -g input.file -p output.file Although MP runs from the CLI, you can use the IconX program (supplied with WB 1.3) to attach an icon to a script file. Then fill the script file with MP commands. MP can be made to open its own input/output windows if you give input (-g, "get") or output (-p, "put") file names that are windows, like this: 1> mp -it -ot -g "CON:0/0/640/100/in" -p "CON:200/0/640/100/out" This was a really fun program to write. Initially, I just wanted a program that would let the user type base-10 integers that would be sent as bytes to a MIDI instrument. But I extended the program to be a 3-way translator as I described above. Most of the uses (above) I did not think of until the program was done! It has proved VERY useful to me, despite its simplicity, and I hope it will be very useful to you! The program is COMPLETELY in the Public Domain. You may use it for any purpose you like, use the source code, etc. If you take any of the source code, you don't even have to credit me as author (but it would be nice if you did). If any of you decide to use MP, please send me mail and tell me how you like it (or don't like it). Dan //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | Dan Barrett, Department of Computer Science Johns Hopkins University | | INTERNET: barrett@cs.jhu.edu | | | COMPUSERVE: >internet:barrett@cs.jhu.edu | UUCP: barrett@jhunix.UUCP | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////