コード例 #1
0
  public MidiConfigurationCanvas(
      BlipBoxApplication application, MidiOutputEventHandler eventhandler, BlipBox sender) {
    this.eventhandler = eventhandler;
    this.sender = sender;

    JTabbedPane tabs = new JTabbedPane();

    JPanel control = new BlipBoxControlPanel(application);
    tabs.addTab("Setup", control);

    ModeConfigurationPanel panel = new ModeConfigurationPanel("Cross");
    modes.put(panel.getOperationMode(), panel);
    tabs.addTab("Cross Mode", panel);
    panel = new ModeConfigurationPanel("Criss");
    modes.put(panel.getOperationMode(), panel);
    tabs.addTab("Criss Mode", panel);

    add(tabs);

    setup("Cross", true, false, false);
    setup("Cross", SensorType.X_SENSOR, "Unassigned");
    setup("Cross", SensorType.Y_SENSOR, "Control Change", 1, Y_NOTES_CC, 0, 127);
    setup("Cross", SensorType.POT_SENSOR, "Control Change", 1, POT_CC, 0, 127);
    setup("Cross", SensorType.BUTTON1_SENSOR, "Mode Change", "Criss");

    setup("Criss", false, false, false);
    setup("Criss", SensorType.X_SENSOR, "Control Change", 1, X_CC, 0, 127);
    setup("Criss", SensorType.Y_SENSOR, "Control Change", 1, Y_CC, 0, 127);
    setup("Criss", SensorType.POT_SENSOR, "Control Change", 1, POT_CC, 0, 127);
    setup("Criss", SensorType.BUTTON1_SENSOR, "Mode Change", "Cross");
  }
コード例 #2
0
 public void setup(String mode, boolean doPlay, boolean doPb, boolean doAt) {
   ModeConfigurationPanel panel = modes.get(mode);
   panel.setup(doPlay, doPb, doAt);
 }
コード例 #3
0
 public void setup(String mode, SensorType sensor, String type, String toMode) {
   ModeConfigurationPanel panel = modes.get(mode);
   panel.setup(sensor, type, toMode);
 }
コード例 #4
0
 public void setup(
     String mode, SensorType sensor, String type, int channel, int cc, int min, int max) {
   ModeConfigurationPanel panel = modes.get(mode);
   panel.setup(sensor, type, channel, cc, min, max);
 }