render Click Track
Render a fixed-length click track to PCM for sample-locked playback.
Unlike the live metronome (a wall-clock timer that free-runs on its own clock), this returns a single buffer whose beats sit at sample-accurate offsets. Mixed as a track in SonixMixer alongside a reference/lesson track, it stays phase-locked to that reference and cannot drift — the correct way to click over an accompanied exercise.
Runs a synchronous decode of the sama/beat samples; call off the main thread. The samples must already be at sampleRate (mono PCM16 WAV).
Return
the click track, or null if the samples can't be decoded / inputs invalid
Parameters
Path to the downbeat (beat 0 of each cycle) sample
Path to the regular-beat sample
Tempo in beats per minute (> 0)
Beats per cycle; sama plays on index 0
Total length of the rendered track in milliseconds
Output sample rate (default 16000; must match the samples)