class_docstr: File decoder based on aubio 
class_docstr_tok: ["File","decoder","based","on","aubio"]
code: def setup(self, channels=None, samplerate=None, blocksize=None):
      if self.start or self.duration:
          if self.start > self.uri_duration:
              raise ValueError(
                  "Segment start time exceeds media duration"
              )
          if self.duration is None:
              self.duration = self.uri_duration - self.start
          if self.start + self.duration > self.uri_duration:
              raise ValueError(
                  "Segment duration exceeds media duration"
              )
  
      kwargs = {}
      if channels is not None:
          kwargs.update({"channels": channels})
      if samplerate is not None:
          kwargs.update({"samplerate": samplerate})
      if blocksize is not None and blocksize != self.source.hop_size:
          kwargs.update({"hop_size": blocksize})
      if len(kwargs):
          self.source = aubio.source(self.uri, **kwargs)
  
      self.output_blocksize = self.source.hop_size
      self.output_channels = self.source.channels
      self.output_samplerate = self.source.samplerate
  
      self.frames_read = 0
      self.start_frame = int(self.start * self.output_samplerate)
      if self.duration:
          seconds_to_read = self.duration
          self.frames_to_read = int(
              seconds_to_read * self.output_samplerate
          )
  
      if self.duration:
          self.input_duration = self.duration
          self.input_totalframes = self.frames_to_read
  
      if self.start > 0:
          self.source.seek(self.start_frame)
  
file_path: TimeSide/timeside/plugins/decoder/aubio.py
imports: from timeside.core.decoder import Decoder, IDecoder, implements, interfacedoc
  from timeside.plugins.decoder.utils import get_sha1, get_media_uri_info
  import aubio
  import mimetypes
label_desc: Use image node_id 2 for calling the AubioDecoder obj's underlying member method code with example usage: obj.setup(channels, samplerate, blocksize) without return types