class_docstr: Vamp plugins library interface analyzer
class_docstr_tok: ["Vamp","plugins","library","interface","analyzer"]
code: def post_process(self):
      # plugin = 'vamp-example-plugins:amplitudefollower:amplitude'
  
      wavfile = self.mediainfo()["uri"].split("file://")[-1]
  
      for plugin_line in self.plugin_list:
          plugin = ":".join(plugin_line)
          (time, duration, value) = self.vamp_plugin(plugin, wavfile)
          if value is None:
              return
  
          if duration is not None:
              plugin_res = self.new_result(
                  data_mode="value", time_mode="segment"
              )
              plugin_res.data_object.duration = duration
          else:
              plugin_res = self.new_result(
                  data_mode="value", time_mode="event"
              )
  
          plugin_res.data_object.time = time
          plugin_res.data_object.value = value
  
          # Fix strat, duration issues if audio is a segment
          #            if self.mediainfo()['is_segment']:
          #                start_index = np.floor(self.mediainfo()['start'] *
          #                                       self.result_samplerate /
          #                                       self.result_stepsize)
          #
          #                stop_index = np.ceil((self.mediainfo()['start'] +
          #                                      self.mediainfo()['duration']) *
          #                                     self.result_samplerate /
          #                                     self.result_stepsize)
          #
          #                fixed_start = (start_index * self.result_stepsize /
          #                               self.result_samplerate)
          #                fixed_duration = ((stop_index - start_index) * self.result_stepsize /
          #                                  self.result_samplerate)
          #
          #                plugin_res.audio_metadata.start = fixed_start
          #                plugin_res.audio_metadata.duration = fixed_duration
          #
          #                value = value[start_index:stop_index + 1]
          plugin_res.id_metadata.id += "." + ".".join(plugin_line[1:])
          plugin_res.id_metadata.name += " " + " ".join(plugin_line[1:])
  
          self.add_result(plugin_res)
  
imports: from timeside.core import implements, interfacedoc
  from timeside.core.analyzer import Analyzer
  from timeside.core.api import IAnalyzer
  from timeside.core.tools.parameters import HasTraits, List
  import subprocess
  import tempfile
  import numpy
  from timeside.core.tools.parameters import store_parameters
  from timeside.core.exceptions import VampImportError
label_desc: Use image node_id 8 for calling the VampSimpleHost obj's underlying member method code with example usage: obj.post_process() without return types