Page 1 of 1

Help developing my own beat detection Module

Posted: Sun Dec 15, 2019 10:49 am
by bobbymcbobface
hi all

so recently I've found a beat detection code here
but the problem is i don't want to use someone elses module on a count as I'm fussy like that :P

so can someone help me develop my own module or even give me a very small example of beat detection nothing huge just something that i can get started with and add more and more to as i go on .

The main things i need in my module are these:

Code: Select all

local Beat = require "Beat" --require the library

music = Beat:newSource("music.wav", "stream")

love.graphics.circle(100, 100, 100+music:getEnergy()*10)

music:onBeat(function()
  print("Beat!")
end)

music:setIntensity(20)

music:update(dt)

---and also the ability to drag and drop audio files onto the love program then add them to a queue which is played when entering the game (basically a drag and drop playlist) 
any help in making/implementing these commands (or even if you could just help me find the bit of code which controls the beat detection here) will be greatly appreciated

thanks :)