Esempio n. 1
0
  /**
   * Load the file into memory
   *
   * @param is The InputStream to read the file from
   */
  public void load(BufferedInputStream in, Module module) throws IOException {
    readGeneralInfo(in, module);

    Pattern[] pattern = module.getPatterns();
    for (int i = 0; i < pattern.length; i++) {
      pattern[i] = new Pattern();
      readPattern(in, pattern[i]);
    }

    Instrument[] instrument = module.getInstruments();
    for (int i = 0; i < instrument.length; i++) {
      instrument[i] = new Instrument();
      readInstrument(in, instrument[i]);
    }
    in.close();
  }