Comments (6)
Dancer's beat detection is moderately simple -- it looks for a peak that meets the requirements of the beat object (correct frequency, amplitude greater than threshold, amplitude greater than the decaying previous beat). Essentially a beat can be thought of as a bass drum kick. If there's a lot of double bass going on, you'll have more than one "beat detected" than per music-theory-beat.
Perhaps the current beat functionality should be turned into a "kick" feature, with beat detection focusing on triggering once per "beat" (4 times a measure in a 4/4 song).
from dancer.js.
Thanks for ur reply!
Have you got some ideas?
Code in particular to implement?
Sorry to ask for this, but i'm quite ignorant about sound management.
I'vr seen there is a library called beatdetektor.js, can be useful to implent it in dancer.js? but i don't know how to use it :).
Then...how can i connect dancer to soundmanager?
Thanks,
Marco
Il giorno 07/ago/2012, alle ore 19:01, Jordan Santell [email protected] ha scritto:
Dancer's beat detection is moderately simple -- it looks for a peak that meets the requirements of the beat object (correct frequency, amplitude greater than threshold, amplitude greater than the decaying previous beat). Essentially a beat can be thought of as a bass drum kick. If there's a lot of double bass going on, you'll have more than one "beat detected" than per music-theory-beat.
Perhaps the current beat functionality should be turned into a "kick" feature, with beat detection focusing on triggering once per "beat" (4 times a measure in a 4/4 song).
—
Reply to this email directly or view it on GitHub.
from dancer.js.
Maybe it does make sense to change beat to kick.
I think beat detection (as in BPM) could get very sophisticated, but this would be neat to implement. Here's one starting place: http://stackoverflow.com/questions/657073/how-to-detect-bpm-of-the-song-by-programming but I think academic sources would be better.
It should be trivial to implement a metronome-type event for when the time signature and tempo of a song are known.
The complication with either is managing the event loop... if someone is doing something even a little complex on each 'beat' the events would pile up, but maybe that's up to the user to sort out.
from dancer.js.
mmhhh another question:
- which is the uom of the frequency parameter? by default 0-10 what does it mean?
I'm now experimenting with a sort of filter checking time when a beat occours...
from dancer.js.
yeah i would like to know as well what are frequency and threshold? i think i need to better understand those in order to know which values will do best.
from dancer.js.
@circlegarage The frequency array is an ordered list of frequencies -- each element represents i_40hz to i_40+40hz (roughly, I have to look up again what the range of each slice is), with the normalized value of that element being that frequency's amplitude. The frequency param in beat
is what frequency range to focus in for the detection, usually something low.
Currently, it uses SM2 to fallback on if HTML5 audio APIs are not supported. Plans in the future to be able to pass in an SM2 object so it can be tied into another SM2 player already on the site.
@Yahav Threshold is a minimum normalized amplitude a frequency must reach in order to be considered a 'beat'. Once a beat is detected, the amplitude of the previously detected beat must be overcome by the amplitude of the next beat, and the previously detected beat's amplitude decays at the decay rate set.
@cesutherland Agreed, "beat" should be renamed to "kick" -- beat detection (as in firing a callback four times every measure in a 4/4 song), can be implemented otherwise, but this feature is more of detecting a kick drum.
from dancer.js.
Related Issues (20)
- Prototyping arrays + dancer.js
- [enhancement] [audio-data-api] Check Latest Firefox Mp3 playback support
- sounds glitches after change of audio src HOT 2
- Documentation for Flash Fallback
- MediaStream from Web RTC API as a data source? HOT 6
- Allow user configuration of SAMPLE_SIZE HOT 1
- Can't get any data in FF22
- Insecure Operations FF21 - adapterMoz.js
- Browserify HOT 1
- isUnsupportedSafari needs updating
- Work on iOS / android? HOT 1
- Uncaught Error(s) when playing live streams? HOT 2
- Get Raw Complete Waveform Data HOT 2
- Demo fails in Fx 30
- Stopped working in Chrome as well HOT 3
- Play two dancer instances at the same time
- Demo failed when play in IE 11(win7 and win8)
- Fatal crashes in new versions on io example
- blob audio url
- Demo doesn't run HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dancer.js.