TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Mar 2015 |
Maintained by Vadym Markov.
A simple tool to determine the BPM (beats per minute). Could be useful for any task that requires the measurement of tempo (tap controls for drum machines, metronomes, etc).
Please check Demo project for a basic example on how to use MARKTempoMeter.
// To handle every new beat
- (void)buttonDidTouchUpInside:(UIButton *)button
{
[[MARKTempoMeter sharedInstance] handleNewBeat];
}
// To receive current BPM via block
[MARKTempoMeter sharedInstance].updateBPMHandler = ^(NSUInteger BPM) {
NSLog(@"BPM: %lu", BPM);
};
// To receive current BPM via delegate
- (void)tempoMeter:(MARKTempoMeter *)tempoMeter didUpdateBPM:(NSUInteger)BPM
{
NSLog(@"BPM: %lu", BPM);
}
MARKTempoMeter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MARKTempoMeter'
Vadym Markov, [email protected]
MARKTempoMeter is available under the MIT license. See the LICENSE file for more info.