2

I am running the Jfugue test program, here is the code:

package ge;

import org.jfugue.*;

public class GE {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Player player = new Player();
       Pattern pattern = new Pattern("C D E F G A B I[MARIMBA]");
       player.play(pattern);
       System.exit(0); // If using Java 1.4 or lower
    }
}

The code does work so far, that is, it compiles and the notes are played. However, I can change the instrument around however much I wish, I always get piano music.

How can I change this?

David Koelle
  • 20,726
  • 23
  • 93
  • 130
newnewbie
  • 993
  • 2
  • 11
  • 26

1 Answers1

5

You should set the instrument at the beginning of the sequence, not at the end of it. Sequence "I[MARIMBA] C D E F G A B" is played as a marimba instrument for me.

Archeg
  • 8,364
  • 7
  • 43
  • 90