Beispiel #1
0
    public String getInstrument() {
      SamplerChannel sc = Channel.this.getChannelInfo();

      if (sc.getInstrumentName() == null || sc.getInstrumentStatus() < 0) return null;

      Instrument instr = new Instrument();
      instr.setName(sc.getInstrumentName());
      instr.setInstrumentIndex(sc.getInstrumentIndex());
      instr.setPath(sc.getInstrumentFile());
      return instr.getDnDString();
    }
Beispiel #2
0
    public void setInstrument(String instr) {
      if (!Instrument.isDnDString(instr)) return;

      String[] args = instr.split("\n");
      if (args.length < 6) return;

      try {
        int idx = Integer.parseInt(args[5]);
        Channel.this.getModel().loadInstrument(args[4], idx);
      } catch (Exception x) {
        CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
      }
    }