Giter Club home page Giter Club logo

beatdetektor's People

Contributors

cjcliffe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beatdetektor's Issues

About detecting every beat for music game

Hi, I am wondering how could I use this brilliant algorithm to detect every beat for music game.

And about the test, I am not quite understand the meaning of three different testing range, which are defined as low, medium and high.

Thanks in advance for your help.

How to determine the BPM data is valid in realtime...

So far I think I have the code working, I have currently an array of DFT "bins" 32 of them, 40hz to approx 200hz in 5hz increments... I call the BPM algo by first populating the vector with the bins 1 2 3 ... 32 32 ... 3 2 1... this is correct, I am faking out the FFT vector :-)

I get quality scores that climb as the music is played sometimes in excess of 50,000, is this OK?

The winner # seems to be 10X too big and the winner_lo seems OK, but just is delayed compared to winner...

But in the scenario of printing out the BPM to the screen, how to determine when the time is right and the BPM is currently solid and valid.

Thanks for the awesome code!

RichardS

Unable to get BPM Value

I have a wave file. I go through 1025 bytes samples and read the wav

std::vector<float> floatVect[ 1024 ];

while (inFile->eof() == 0) {

     // Read a chunk of samples from the input file
    num = inFile->read(shortBuffer, BUFF_SIZE);
    samples = num / nChannels;

     //// here we calculate FFT with AccelerateToolbox in output vector
     ////// short int shortBuffer go to FFT samples in output
     ///// now convert to float

   for(int i=0;i<samples;i++) {
        float fSample = output[ i ] / 32768.0f;
        floatVect->push_back(fSample);   //// <---- push to the float vector
    }

}



 /// calculate BPM
 bpmDetect->process( inFile->getLengthMS()/1000.0f, *floatVect);
  bpm = bpmDetect->winning_bpm;
 bpmDetect->reset();

 inFile->rewind();

The resulting bpm is always bpm = 0.

Is that right to accumulate the float samples from the FFT and then pass the vector to the process() method with the wav duration expressed in seconds ?

Audio input example?

Hello i'm trying to put together an audio input example so i could calculate the BPM of a track playing through my line in ( or even microphone input ).

Unfortunately i didn't understand exactly how the "time" parameter from the "process" method is supposed to be used ( specially in that case, where i don't necessarily know when the track changes, etcs ).

Here is some code i put together trying to solve this puzzle using the lovely p5.js library, please let me know how i could tweak this to achieve the desired effect.

Thank you for such amazing project,

<script src="js/p5-zip/p5.js"></script>
<script src="js/p5-zip/addons/p5.sound.js"></script>

<script src="js/beatdetektor-master/beatdetektor.js"></script>

<script>

  // beatdetektor stuff

  bd_med = new BeatDetektor(85,169);

  vu = new BeatDetektor.modules.vis.VU();
  kick_det = new BeatDetektor.modules.vis.BassKick();

  // p5 stuff
  mic = new p5.AudioIn();
  mic.start();
  fft = new p5.FFT();
  fft.setInput(mic);

  funk = function(){
    spectrum = fft.analyze();

    bd_med.process( (new Date).getTime(), spectrum)
  }

  // analyse with 60 frames, we could maybe use requestAnimationFrame here
  setInterval( funk, 1000/60 )

</script>

Hello,

Hello, I did a FFT of an audio file's raw data and I now have a 1024-length Float32Array. I want to use the beat detector to determine the BPM of the audio file. I'm having difficulty figuring out how to use the BeatDetektor functions and wanted to know if you could help. Thanks.

Please document expected FFT input format

How is the FFT input scaled? Decibels? Logarithmically? Should the input data be interleaved? Is it just the magnitudes?

I'm passing decibel-scaled FFT magnitudes, and getting BPM's in the range of 0.5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.