docstr: Tests converting between MIDI values and the unit interval.
  
  Args:
    clip: Whether to clip the output to [0.0, 1.0].
docstr_tok: ["Tests","converting","between","MIDI","values","and","the","unit","interval",".","Args",":","clip",":","Whether","to","clip","the","output","to","[","0.0",",","1.0","]","."]
code: def test_midi_to_unit_is_accurate(self, clip):
      """Tests converting between MIDI values and the unit interval.
  
      Args:
        clip: Whether to clip the output to [0.0, 1.0].
      """
      midi_min, midi_max = 20.0, 90.0
      midi = np.linspace(0.0, 127.0, 1000)
      np_unit = (midi - midi_min) / (midi_max - midi_min)
      np_unit = np.clip(np_unit, 0.0, 1.0) if clip else np_unit
      tf_unit = core.midi_to_unit(
          midi, midi_min=midi_min, midi_max=midi_max, clip=clip
      )
      self.assertAllClose(tf_unit, np_unit)
  
imports: from absl.testing import parameterized
  from ddsp import core
  import librosa
  import numpy
  from scipy import signal
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling the UtilitiesTest obj's underlying member method code with example usage: obj.test_midi_to_unit_is_accurate(clip) without return types