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
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)
thanks