[HN Gopher] Tempo, Beat and Downbeat Estimation
___________________________________________________________________
Tempo, Beat and Downbeat Estimation
Author : lerch
Score : 35 points
Date : 2021-11-07 17:14 UTC (5 hours ago)
(HTM) web link (tempobeatdownbeat.github.io)
(TXT) w3m dump (tempobeatdownbeat.github.io)
| red0point wrote:
| Does anyone know something able to do this in real-time? So it's
| able to sync, e.g. an LED light with music being played?
| pininja wrote:
| I've seen audio systems that use my hand tapping in a pad to
| "learn" (sample over time) the beat/tempo in real-time.
|
| I wonder if there's some signal correlated enough with beat to
| stand in for my hand?
|
| Edit: their code works on samples of audio. [0] A "real-time"
| solution could be short samples immediately processed after
| capturing until some quality metric is met.
|
| [0]
| https://colab.research.google.com/drive/1tuOqNyO9gdMmYJsj33f...
| fergonco wrote:
| Anecdote from drummer here. I made an Android application
| that would detect the stroke on the snare and would show the
| tempo.
|
| Of course, you only hit the snare in 2 and 4, so you had to
| multiply it by two... and forget it completely during breaks!
|
| What amazed me is that it was so sensitive that I could
| detect even normal footsteps on rather solid floors.
| Acen wrote:
| Something that's always amazed me doing live sound work, is
| how sensitive mics are to what I'd class as practically
| inaudible noises.
|
| Say I have a mic on a stand at the back of a room (i.e.
| Earthworks M30), someone can enter the door from the
| opposite side, and quietly walk somewhere else in the room.
| The mic will pick up each step they're making in a pretty
| obvious fashion on a spectrograph in Smaart. Or a fan from
| an LED light hanging from truss in the ceiling.
| mason55 wrote:
| There are a few options, depends on your hardware (x86?
| Arduino?)
| cronix wrote:
| Personally I use the FastLED library a lot using various
| microcontrollers. There are plenty of "sound reactive" or
| "audio reactive" or "beat detection" projects if you search the
| user forum on reddit. You can basically use either a microphone
| or line level input (depending on if microcontroller has built
| in DAC, etc). There are plenty of examples/tutorials and code
| provided. There are also FFT libraries so you can break the
| audio into multiple frequencies so you can do things like have
| bass light up red and treble light up blue, etc. You can really
| do quite a lot with this stuff.
|
| https://www.reddit.com/r/FastLED/
| tomduncalf wrote:
| Yup, there's a stand-alone piece of software called Waveclock
| which can do that: https://wavesum.net/waveclock-audio-to-midi-
| clock.html.
|
| This will output midi clock messages, so you'd need to find a
| way to convert these to trigger whatever you want to trigger.
| There's probably software to do this, or you could write your
| own.
|
| You'll want to create a "loopback" or "virtual" MIDI cable so
| your software can receive the MIDI messages from Waveclock (on
| Mac you can use the built in IAC Bus feature for this, on
| Windows I think you'll need a driver, or you might be able to
| directly create a midi input in your code depending on the
| library), then it should be a fairly simple case of responding
| to MIDI clock messages (there are usually 24 clock messages per
| beat, so you'll want to only respond to every 1 in 24).
|
| There are libraries for pretty much every language to make
| working with MIDI easier - JS supports WebMIDI (and there are
| npm libs to make working with it easier), JUCE is a good C++
| framework for this kind of thing, and for Swift you can try
| AudioKit.
|
| For the musicians out there, Ableton Live 11 can also follow
| the tempo of live music and sync your set to it.
___________________________________________________________________
(page generated 2021-11-07 23:01 UTC)