How to use the essentia.standard.BeatTrackerMultiFeature function in essentia

To help you get started, we’ve selected a few essentia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github urinieto / msaf / featextract.py View on Github external
def compute_beats(audio):
    """Computes the beats using Essentia."""
    logging.info("Computing Beats...")
    conf = 1.0
    beats, conf = ES.BeatTrackerMultiFeature()(audio)
    # beats = ES.BeatTrackerDegara()(audio)
    beats *= 44100 / msaf.Anal.sample_rate  # Essentia requires 44100 input

    # Double the beats if found beats are too little
    th = 0.9  # 1 would equal to at least 1 beat per second
    while beats.shape[0] / (audio.shape[0] / float(msaf.Anal.sample_rate)) < th \
            and beats.shape[0] > 2:
        beats = double_beats(beats)
    return beats, conf
github urinieto / SegmenterMIREX2014 / features.py View on Github external
def compute_beats(audio):
    """Computes the beats using Essentia."""
    logging.info("Computing Beats...")
    ticks, conf = ES.BeatTrackerMultiFeature()(audio)
    return ticks, conf