So the hearth beat of this code is the var clkpls and all small counters called in Dutch "tellers" are synchronized on this var.
miditimer = new Timer(midiclockrate, listener); // sets the midi clock
miditimer.setRepeats(true);
class EventHandler implements ActionListener {
public void actionPerformed(ActionEvent evt) {
Object source = evt.getSource();
if (source == miditimer) { // clkpls reads out the pascal timer
clkpls++; // augments the clock pulse counter
}
public void clkset(int x, int y) { // after pascal clkset(6,klok); para not used
// miditimer.stop(); // I do not know if you should stop a timer
miditimer.start(); // before starting
miditimer.setRepeats(true);
clkpls = 0;
System.out.println(" midi clock started, rate in mili " + midiclockrate);
}
public void stopclk() {
miditimer.stop();
}