Best way to make class aware of TempoClock

I’m writing some classes and most of 'em gets passed the same instance of TempoClock on instantiation. This is fine but It would
be neater to that have that TempoClock somehow be embedded automagically. This is just so that I don’t have to have to pass the TempoClock object every time I create one of my objects.

What would be the neatest way to make this happen?

A simple class like MyClassTempoClock, which has a classvar clock, would be a simple way to do this and keep it inside your library.

You could even write a function that sees if clock is set yet, and then do whatever magic you need to set it up correctly (this isn’t so useful here, but as a more abstract idea it is), and then access it by MyClassTempoClock.clock()

Note one instance method for class Object & inherited by every object:


Nice! Also, I totally forgot about *initClass. Really came in handy.
This is what i did. Pretty, pretty, pretty neat.

MyTempoClock {
	classvar <>clock;

	*initClass {
		clock =;

	*tempo {arg tempo;

	*beats {