Skip to content

Commit

Permalink
Merge pull request #7 from dlepaux/dev
Browse files Browse the repository at this point in the history
fix due to the example
  • Loading branch information
dlepaux authored Mar 18, 2018
2 parents b7bd67c + b821d96 commit d5bc177
Show file tree
Hide file tree
Showing 20 changed files with 93 additions and 393 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ test
node_modules
.nyc_output
coverage
example
doc
.coveralls.yml
.editorconfig
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Coverage Status](https://coveralls.io/repos/github/dlepaux/realtime-bpm-analyzer/badge.svg?branch=master)](https://coveralls.io/github/dlepaux/realtime-bpm-analyzer?branch=master)
[![npm](https://img.shields.io/npm/l/express.svg)]()

This tool allow to compute the BPM (Beats Per minutes) in real time, of a song on an <audio></audio> or <video></video> node thanks to the [WebAudioAPI](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API).
This tool allow to compute the BPM (Beats Per minutes) in real time, of a song on an `<audio></audio>` or `<video></video>` node thanks to the [WebAudioAPI](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API).

Please, note that the main use case for this tool, is to get the BPM **during** the video / audio **play**. In fact, it pre-compute datas instead to store the entire AudioBuffer in memory. So it can quickly return BPM.

Expand Down Expand Up @@ -49,12 +49,17 @@ Please, note that the main use case for this tool, is to get the BPM **during**
console.log('bpm', bpm);
}
});
// Attach realTime function to audioprocess event
// Attach realTime function to audioprocess event.inputBuffer (AudioBuffer)
scriptProcessorNode.onaudioprocess = function (e) {
onAudioProcess.analyze(e);
onAudioProcess.analyze(e.inputBuffer);
};
```

## Example

You can find here [a functionnal example](https://github.com/dlepaux/realtime-bpm-analyzer-example) of this tool.


## Technical approch

This tool has been largely inspired by the [Tornqvist project](https://github.com/tornqvist/bpm-detective).
Expand All @@ -79,3 +84,5 @@ This tool is designed to detect BPM by detecting all peaks for all thresolds, be

This library was been inspired from [Tornqvist project](https://github.com/tornqvist/bpm-detective) which also based on [Joe Sullivan's algorithm](http://joesul.li/van/beat-detection-using-web-audio/). Thank you to both of them

## Todo
- Add controls
43 changes: 0 additions & 43 deletions example/app/app.js

This file was deleted.

22 changes: 0 additions & 22 deletions example/app/assets/index.html

This file was deleted.

Binary file removed example/app/assets/media/new_order-blue_monday.mp3
Binary file not shown.
3 changes: 0 additions & 3 deletions example/app/scss/app.scss

This file was deleted.

29 changes: 0 additions & 29 deletions example/brunch-config.coffee

This file was deleted.

23 changes: 0 additions & 23 deletions example/package.json

This file was deleted.

Empty file removed example/public/.gitkeep
Empty file.
6 changes: 0 additions & 6 deletions example/public/css/master.css

This file was deleted.

1 change: 0 additions & 1 deletion example/public/css/master.css.map

This file was deleted.

22 changes: 0 additions & 22 deletions example/public/index.html

This file was deleted.

Loading

0 comments on commit d5bc177

Please sign in to comment.