Builder
class Builder
Builder for advanced SonixMetronome configuration.
Usage:
val metronome = SonixMetronome.Builder()
.samaSamplePath(samaPath)
.beatSamplePath(beatPath)
.bpm(120f)
.beatsPerCycle(4)
.volume(0.8f)
.onBeat { beatIndex -> updateUI(beatIndex) }
.onError { error -> showError(error) }
.build()Content copied to clipboard
Functions
Link copied to clipboard
Set the path to the regular beat audio sample.
Link copied to clipboard
Set beats per cycle (talam).
Link copied to clipboard
Set initial tempo in beats per minute.
Link copied to clipboard
Build the SonixMetronome with configured options.
Link copied to clipboard
Called on each beat.
Link copied to clipboard
Called when an error occurs (e.g., sample loading failure).
Link copied to clipboard
Set the path to the downbeat (first beat) audio sample.
Link copied to clipboard
Set initial volume.