code: def testRegression(self):
      from numpy import sin, pi
  
      freq = 440.0
      attTime = 0.05  # attack time in s
      relTime = 0.1  # realease time in s
      silTime = 0.2  # silence time in s
      sr = 44100
      duration = 1  # time in s
      # first put some silence:
      input = [0] * (int)(silTime * sr)
  
      # attack:
      for i in range(int(attTime * sr)):
          input.append(
              float(i) / (attTime * sr) * sin(2.0 * pi * freq * i / sr)
          )
  
      # sustain:
      for i in range(int(attTime * sr), int((duration - relTime) * sr)):
          input.append(sin(2.0 * pi * freq * i / sr))
  
      # release:
      for i in range(int(relTime * sr)):
          input.append(
              (1 - (float(i) / (relTime * sr)))
              * sin(2.0 * pi * freq * i / sr)
          )
  
      self.assertAlmostEqual(Larm()(input), -1.6623098850, 1e-3)
  
file_path: essentia/test/src/unittests/temporal/test_larm.py
imports: from essentia_test import *
label_desc: Use image node_id 6 for calling the TestLarm obj's underlying member method code with example usage: obj.testRegression() without return types