java.io.InputStream fileIn = getClass().getResourceAsStream(MW2Constants.DEFAULT_SYSEX_FILENAME); fileIn.read(sysex); fileIn.close(); p = new Patch(sysex, this);  } catch (Exception e) { System.err.println("Unable to find " + MW2Constants.DEFAULT_SYSEX_FILENAME + " using hardcoded default.");  sysex[0] = MW2Constants.SYSEX_START_BYTE; sysex[1] = (byte) 0x3E; sysex[2] = (byte) 0x0E; sysex[3] = (byte) 0x00; sysex[4] = (byte) 0x10; sysex[5] = (byte) 0x20; sysex[6] = (byte) 0x00;  sysex[263] = (byte) 0x00; sysex[264] = MW2Constants.SYSEX_END_BYTE;  p = new Patch(sysex, this); setPatchName(p, "New program"); calculateChecksum(p); }  return p;
java.io.InputStream fileIn = getClass().getResourceAsStream(MW2Constants.DEFAULT_SYSEX_FILENAME); fileIn.read(sysex); fileIn.close(); p = new Patch(sysex, this);  } catch (Exception e) { System.err.println("Unable to find " + MW2Constants.DEFAULT_SYSEX_FILENAME + " using hardcoded default.");  sysex[0] = MW2Constants.SYSEX_START_BYTE; sysex[1] = (byte) 0x3E; sysex[2] = (byte) 0x0E; sysex[3] = (byte) 0x00; sysex[4] = (byte) 0x10; sysex[5] = (byte) 0x20; sysex[6] = (byte) 0x00;   sysex[264] = MW2Constants.SYSEX_END_BYTE;  p = new Patch(sysex, this); setPatchName(p, "New program"); calculateChecksum(p); }  return p;
    public Patch createNewPatch() {		byte[] sysex  = new byte[MW2Constants.PATCH_SIZE];		Patch p;        try {			java.io.InputStream fileIn = getClass().getResourceAsStream(MW2Constants.DEFAULT_SYSEX_FILENAME);			fileIn.read(sysex);			fileIn.close();			p = new Patch(sysex, this);		} catch (Exception e) {			System.err.println("Unable to find " + MW2Constants.DEFAULT_SYSEX_FILENAME + " using hardcoded default.");			sysex[0] = MW2Constants.SYSEX_START_BYTE;			sysex[1] = (byte) 0x3E; // Waldorf Electronics GmbH ID			sysex[2] = (byte) 0x0E; // Microwave 2 ID			sysex[3] = (byte) 0x00; // Device ID			sysex[4] = (byte) 0x10; // Sound Dump			sysex[5] = (byte) 0x20; // Location (use Edit Buffer)			sysex[6] = (byte) 0x00; // Location (use Edit Buffer)			sysex[263] = (byte) 0x00; // Checksum			sysex[264] = MW2Constants.SYSEX_END_BYTE;			p = new Patch(sysex, this);			setPatchName(p, "New program");			calculateChecksum(p);		}		return p;    }