setUpGui(); //Call our setUpGui method
try
{
Sequencer sequencer = MidiSystem.getSequencer(); //Create a new midi system sequencer
sequencer.open(); //Open up the sequencer object we created
sequencer.addControllerEventListener(ml, new int[] {127});
//Add a control event listener using our ml object
Sequence seq = new Sequence(Sequence.PPQ, 4); //Create a new sequence with a type and res
Track track = seq.createTrack(); //Set the track to our new track on seq