A tight BPM clock generator for Arduino and PlatformIO using hardware timer interruption. AVR, Teensy, STM32xx, ESP32 and RP2040 support
Engine rewrited to perform higher PPQN resolutions and better swing styles.
// avaliable resolutions
// [ uClock.PPQN_24, uClock.PPQN_48, uClock.PPQN_96, uClock.PPQN_384, uClock.PPQN_480, uClock.PPQN_960 ]
// not mandatory to call, the default is 96PPQN if not set
uClock.setPPQN(uClock.PPQN_96);
BREAKCHANGES: If you are comming from uClock version < 2.0 versions keep attention to the breakchanges so you can update your code to the new API interface changes:
setClock96PPQNOutput(onClock96PPQNOutputCallback) is now setOnPPQN(onPPQNCallback) and his clock depends on the PPQN setup using setPPQN (clockPPQNResolution). For clock setup you now use a separeted callback via setOnSync24(onSync48Callback) or setOnSync24(onSync48Callback)
setClock16PPQNOutput(ClockOut16PPQN) is now setOnStep(onStepCall) and its not dependent on clock PPQN resolution
setOnClockStartOutput(onClockStartCallback) is now setOnClockStart(onClockStartCallback)
setOnClockStopOutput(onClockStopCallback) is now setOnClockStop(onClockStopCallback)
setOnClockStartOutput(onClockStartCallback) is now setOnClockStart(onClockStartCallback)
If you have write a sequencer using setClock16PPQNOutput only its ok to just change the API call to setOnStep, but if you were dependent on setClock96PPQNOutput you migth need to review you tick counting system depending on wich PPQN clock resolution you choose.
After long waiting on TODO list, the shufle is done!
Please take a read at the following thread comment for more info on how to program and create your shuffle signatures to use with uClock: https://github.com/midilab/uClock/issues/27#issuecomment-1730294705
This release enhance esp32 API usage by hidding the concurrency handle implementation to support UART and Serial general calls inside callbacks.
This release implementation makes use of FreeRTOS layer of esp32 support for arduino.
Official platformio support published: https://registry.platformio.org/libraries/midilab/uClock
to install it on your platformio project: pio pkg install --library "midilab/uClock@^1.4.1"
Thanks to @Jackson-Devices to manage the tests and examples.
An experimental support of ESP32, since this is a 2 cores platform there are some scenarios not tested extensivelly to guarantee full working uClock port, anyway, this is the one used for the Aciduino V2 ESP32 support working so far without problems.
fixed a bpm printing problem within midi monitor examples that freezes the microcontroler.
Bugfixed a problem that freezed Xiao when using TinyUSB from adafruit and uClock library.