Mx.Clock (mx v0.1.0)

Copy Markdown View Source

The Unix time in microseconds mx plays against: the system's, or while a song renders offline, the time its render has reached.

A render sets the time with start_render/1 and moves it on with advance/1, so the band, its loops and the engine work out a song as they do when it plays, only as fast as the render goes.

Summary

Functions

Moves a render's time on to at_us.

The time now, in Unix microseconds.

Whether a song is rendering offline, so the time moves only as the render moves it.

Stops following the system's time and holds the time at start_us until advance/1 moves it.

Follows the system's time again.

Functions

advance(at_us)

Moves a render's time on to at_us.

now()

The time now, in Unix microseconds.

rendering?()

Whether a song is rendering offline, so the time moves only as the render moves it.

start_render(start_us)

Stops following the system's time and holds the time at start_us until advance/1 moves it.

stop_render()

Follows the system's time again.