How can I play individual MIDI notes in a Web page?
I know of two ways to do it:
Write an ActiveX control. Then it only works on Windows. I used to write ActiveX controls a long time ago, but now nobody likes to install them.
Write a Java applet. This is OK if the user already has Java installed, but many users disable applets. This is the way I did it and you can see the result at newfweiler.com -- if it happens to work on your particular setup. You'll need at least Java 5, although I suppose I could rewrite it in Java 1.2 if I had to. The "Real Time Sequencer" and "Java Sound Synthesizer" don't work for me; I think you have to install wavetables or something to make them work.
Most users have Flash installed, but I looked in the Flash and Flex documentation and did not see anything equivalent to javax.sound.midi.
There are several ways to play a MIDI file in a Web page, and you can find "Javascript Pianos" that play a one-note MIDI file whenever you press a key. You can't play multiple notes at once or hold the key down for a long note.
What I'm trying to do is the equivalent of javax.sound.midi.Receiver.send(midiMsg, -1) using only what most people typically have installed on the machine.