aspose file tools
The moose likes Java in General and the fly likes simple play midi file example Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "simple play midi file example" Watch "simple play midi file example" New topic
Author

simple play midi file example

Scott Pike
Greenhorn

Joined: Jan 17, 2007
Posts: 12
I am doing Junit test for my class programs. When they completely pass I want them to play a little midi song once. What is a simple code I can enter in the Junit test that will allow me to play the file that is in my documents? Please give me an example and tell me what I will need.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Google for Java MIDI and see what shows up. You're probably going to need Synthesizer and Sequencer objects. I enjoyed MIDI programming in Pascal but had little joy in Java. Everything I tried seemed to get into invalid states that could not be killed.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: simple play midi file example
 
Similar Threads
MIDI
JavaFX and sound
MIDIControl in Use ?
Accessing a local file
Is it possible to play a midi file