public MidiEvent makeEvent(int comd, int chan, int one, int two, int tick) { MidiEvent event = null; try { ShortMessage a = new ShortMessage(); a.setMessage(comd, chan, one, two); event = new MidiEvent(a, tick); } catch (Exception e) { } return event; }
public MidiEvent eventErzeugen(int comd, int chan, int one, int two, int tick) { MidiEvent event = null; try { ShortMessage a = new ShortMessage(); a.setMessage(comd, chan, one, two); event = new MidiEvent(a, tick); } catch (Exception e) { } return event; } // Methode eventErzeugen schließen
public boolean createEvent(int type, int num, long tick) { ShortMessage message = new ShortMessage(); try { message.setMessage(type + cc.num, num, cc.velocity); MidiEvent event = new MidiEvent(message, tick); track.add(event); return true; } catch (Exception ex) { ex.printStackTrace(); return false; } }