|
-
Apr 29th, 2003, 09:23 AM
#1
Thread Starter
Lively Member
Java MIDI support?????
Hey Everybody!
Anybody know how to play a MIDI file in Java or in Java applets?
I know it's possible but I just don't know how to do it.
-
Apr 29th, 2003, 09:49 AM
#2
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 29th, 2003, 12:20 PM
#3
Dazed Member
Quite Easy. The java.applet.AppletStub and java.applet.AppletContext interfaces describe services that the web browser or applet viewer provides to applets. Note if your applet declares a main method these interfaces will have null AppletStub and AppletContext members. Therefore if you try to use these methods in such an applet a NullPointerException will be thrown.
The applet class has five methods that download sounds from the web. The two play() methods download a sound file and play it immediately. The two getAudioClip() methods and the static Applet.newAudioClip() method save a sound for later playing.
public void play(Url u)
public void play(Url u, String filename)
public AudioClip getAudioClip(Url u)
public AudioClip getAudioClip(Url u, String filename)
public static final AudioClip newAudioClip(Url u)
-
Apr 30th, 2003, 03:20 AM
#4
But in non-Applets you still have to use the javax.sound.midi package...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|