3

I'm trying to control the volume of a pattern. From the documentation I found this:

X[Volume]=10200;

which they mentioned controls the volume. I'm not sure how to use this. Should I declare something to use this? From what I understand this is a 'Controller' functionality. Below is my code.

import org.jfugue.*;

public class masterVolume {
    public static void main(String[] args)
    {
        Controller controller = new Controller();
        Player player = new Player();
        Pattern pattern = new Pattern("C D E F G A B");
        player.play(pattern);

        X[Volume]=10200; //error    
    }
}
Mike Smith
  • 139
  • 2
  • 2
  • 12

1 Answers1

4

I think you should pass it to the MIDI controller like so:

    Pattern pattern = new Pattern(" X[Volume]=10200 C D E F G A B");
drzymala
  • 2,009
  • 20
  • 26
  • 1
    Validated by the author of JFugue :) – David Koelle Mar 11 '13 at 19:24
  • not working for me. Pattern pattern1 = new Pattern(" X[Volume]=2000 C D E"); new Player().play(pattern1); Pattern pattern2 = new Pattern(" X[Volume]=10200 C D E"); new Player().play(pattern2); --> This two have the same volume in my laptop – BabaNew Dec 28 '18 at 10:38