code: def computeSingleBeatLoudness(self, beat, audio, sr):
      beatWindowDuration = 0.1
      beatDuration = 0.05
      start = int(round((beat - beatWindowDuration / 2) * sr))
      end = int(
          round(
              (beat + beatWindowDuration / 2 + beatDuration + 0.0001)
              * sr
          )
      )
      # SingleBeatLoudness will throw exception if the audio fragment is too short,
      # this will happen when the beat is too close to the beginning of the signal so that
      # the beat window will start actually before it
      if start < 0:
          # reposition the window
          end = start - end
          start = 0
      return SingleBeatLoudness(frequencyBands=[20, 150])(
          audio[start:end]
      )
  
file_path: essentia/test/src/unittests/rhythm/test_beatsloudness_streaming.py
imports: from essentia_test import *
  from essentia.streaming import BeatsLoudness, MonoLoader, RhythmExtractor
label_desc: Use image node_id 1 for calling the TestBeatsLoudness obj's underlying member method code with example usage: obj.computeSingleBeatLoudness(beat, audio, sr) and returns: SingleBeatLoudness