Help developing my own beat detection Module

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
bobbymcbobface
Citizen
Posts: 78
Joined: Tue Jun 04, 2019 8:31 pm

Help developing my own beat detection Module

Post 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 :)
I make games that run on potatoes :P
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests