MRDetectBpmOperation 0.0.2

MRDetectBpmOperation 0.0.2

TestsTested
LangLanguage C++C++
License MIT
ReleasedLast Release Aug 2015

Maintained by Héctor Marqués.



MRDetectBpmOperation is a concrete subclass of NSOperation that uses the SoundTouch Audio Processing Library for detecting BPM of a media resource.

    NSURL *fileURL = [[NSBundle mainBundle] URLForResource:@"song" withExtension:@"mp3"];

    MRDetectBpmOperation *operation = [MRDetectBpmOperation bpmOperationWithAssetURL:fileURL];

    [operation setCompletionBlockWithSuccess:^(MROperation *operation) {
        NSLog(@"%f BPM", ((MRDetectBpmOperation *)operation).bpm);
    } failure:^(MROperation *operation, NSError *error) {
        NSLog(@"%@", error);
    }];

    [operation start];

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

Manually

Perform the following steps:

  • Add the SoundTouch library into your project (e.g. copy External/soundtouch-1.9.0/include and External/soundtouch-1.9.0/source/SoundTouch directories).
  • Add ANDROID=1 SOUNDTOUCH_INTEGER_SAMPLES=1 to GCC_PREPROCESSOR_DEFINITIONS in your project settings.
  • Copy MRDetectBpmOperation directory into your project.

License

MRDetectBpmOperation is available under the MIT license. See the LICENSE file for more info.