silentsugar / abc4j

Automatically exported from code.google.com/p/abc4j
1 stars 0 forks source link

I can't play a Tune #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. I create a Tune:

X:1
T:Escala Corcheas en Do Mayor
M:4/4
L:1/8
C:Tever
K:Cmaj
CDEFGABc | cBAGFEDC |]

2. I try to play the tune

File abcFile = new File (part);
//creates a tunebook from the previous file
TuneBook book = new TuneBook(abcFile);
//retrieves the first tune notation of the ceili.abc file
Tune myTune = book.getTune(1);
//creates a midi player to play tunes
TunePlayer player = new TunePlayer();
//starts the player and play the tune
player.start();
player.play(myTune);

3. The program show me this error:

java.lang.ArrayIndexOutOfBoundsException: 0
    at 
abc.midi.MidiConverterAbstract.toMidiSequence(MidiConverterAbstract.java:54
)
    at abc.midi.TunePlayer.play(TunePlayer.java:144)
    at Principal.pruebaReproducirPartitura(Principal.java:35)
    at Principal.main(Principal.java:43)
java.lang.IllegalStateException: sequence not set
    at com.sun.media.sound.RealTimeSequencer.start(Unknown Source)
    at abc.midi.TunePlayer.play(TunePlayer.java:147)
    at Principal.pruebaReproducirPartitura(Principal.java:35)
    at Principal.main(Principal.java:43)

What version of the product are you using? On what operating system?

I use Eclipse with abc4j_v0.5.jar
I'm now using Windows 7

Thank you very much to listen my issue ;)

Tever

Original issue reported on code.google.com by tever.tr...@gmail.com on 7 Jun 2010 at 1:29