class_docstr: A class that mimics audiolab.sndfile but generates noise instead of reading
  a wave file. Additionally it can be told to have a "broken" header and thus crashing
  in the middle of the file. Also useful for testing ultra-short files of 20 samples.
class_docstr_tok: ["A","class","that","mimics","audiolab.sndfile","but","generates","noise","instead","of","reading","a","wave","file",".","Additionally","it","can","be","told","to","have","a","``","broken","''","header","and","thus","crashing","in","the","middle","of","the","file",".","Also","useful","for","testing","ultra-short","files","of","20","samples","."]
code: def read_frames(self, frames_to_read):
      if (
          self.has_broken_header
          and self.seekpoint + frames_to_read > self.num_frames // 2
      ):
          raise IOError()
  
      num_frames_left = self.num_frames - self.seekpoint
      if num_frames_left < frames_to_read:
          will_read = num_frames_left
      else:
          will_read = frames_to_read
      self.seekpoint += will_read
      return np.random.random(will_read) * 2 - 1
  
file_path: TimeSide/timeside/plugins/decoder/utils.py
imports: from __future__ import division
  import numpy
label_desc: Use image node_id 6 for calling the Noise obj's underlying member method code with example usage: obj.read_frames(frames_to_read) and returns: unknown