Metronome

pub package

Efficient, accurate, cross-platform metronome; supports volume, BPM, and audio source settings.

Metronome

Quick Start

Init

final metronome = Metronome();
double bpm = 120;
double vol = 50;
metronome.init('assets/audio/snare.wav', bpm: bpm, volume: vol);

Play

metronome.play();

Stop

metronome.stop();

Volume

metronome.getVolume();
metronome.setVolume(50);

Set BPM

metronome.setBPM(120); 

get Play state

metronome.isPlaying();

setAudioFile

metronome.setAudioFile('assets/audio/snare.wav');

destroy

metronome.destroy();

About Web

Please add the example/web/app.js file to index.html under your web. As follows:

<script src="app.js" defer></script>