Efficient, accurate, cross-platform metronome; supports volume, BPM, and audio source settings.
- Add support for time signature #2
- Add Windows support
- Add CallBack function on Tick for web
final metronome = Metronome();
metronome.init('
assets/audio/snare.wav',
bpm: 120,
volume: 50,
//When set to true, the music of other apps will stop when the metronome is played.
enableSession: true,
enableTickCallback: true,
);
metronome.play();
metronome.pause();
metronome.stop();
metronome.getVolume();
metronome.setVolume(50);
metronome.setBPM(120);
metronome.getBPM();
metronome.isPlaying();
metronome.setAudioFile('assets/audio/snare.wav');
metronome.destroy();
metronome.onListenTick((_) {
print('tick');
});
Please add the example/web/app.js
file to index.html under your web. As follows:
<script src="app.js" defer></script>