Precise timing event dispatching in Java
First of all, let me clarify that you can't do precise timing on a &quot;normal&quot; desktop or server operating system. You can be close, but the schedulers are not designed for that, you're not guaranteed to get a time slice for execution at all. The smaller your time-slices get, the bigger the error margins will be. The higher the load on the machine will be, the more slices you will miss.

 * Like my girlfriend, Java has some problems to be on time. He is always a bite late.

I'm most likely old and grumpy, but &quot;funny&quot; comments and variable names are a waste of everyones time at the end of the day. That and, if you ever want to use your code as portfolio for a job, or in your job, might cost you. Because when I see that comment, I can deduct a few things:

The programmer considers it okay to make fun of others in the public.
The programmer does not know anything about how the JVM works.
The programmer does not know anything about how the OS scheduler works.
The programmer does most likely not know anything about the Java ecosystem (Java is used for high-speed trading with stock exchanges, doing trades in the microsecond range).

Of course, what you do in your private projects is none of my business, but be aware that this comes at a cost in one way or another...and maybe not for you, as others might have to maintain your code at some point.
And to ask a different question...does your girlfriend know she's a cheap joke on the internet for you?

long n;
int i=0;

These names could be better, a lot better actually.

long nanosBetweenTicks = (long) (60_000_000_000d / bpm);

This would, do well as a constant.

__JAVA_CORRECTION_NANOS

Normally, you don't have leading underscores under the Java convention.

i++; // erf... let's hope we miss only one tick

That is what I was talking about earlier and is a very good example for a completely unhelpful comment. It tells me that the programmer either had no idea what they were doing, or did not care enough to check it.

while(System.nanoTime()&lt;n + nanosBetweenTicks) /* no body here! */;

I believe that this will not be optimized away because of the System.nanoTime() function call, but I would not bet on it.

The code is otherwise well formatted, and most of the names are good. I'm not sure about the rest of the logic, it seems oddly complicated for what you describe.