docstr: Tests converting between the unit interval and MIDI values.
  
  Args:
    clip: Whether to clip the input to [0.0, 1.0].
docstr_tok: ["Tests","converting","between","the","unit","interval","and","MIDI","values",".","Args",":","clip",":","Whether","to","clip","the","input","to","[","0.0",",","1.0","]","."]
code: def test_unit_to_midi_is_accurate(self, clip):
      """Tests converting between the unit interval and MIDI values.
  
      Args:
        clip: Whether to clip the input to [0.0, 1.0].
      """
      midi_min, midi_max = 20.0, 90.0
      unit = np.linspace(-1.0, 2.0, 1000)
      np_midi = np.clip(unit, 0.0, 1.0) if clip else unit
      np_midi = midi_min + (midi_max - midi_min) * np_midi
      tf_midi = core.unit_to_midi(
          unit, midi_min=midi_min, midi_max=midi_max, clip=clip
      )
      self.assertAllClose(tf_midi, np_midi)
  
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 4 for calling the UtilitiesTest obj's underlying member method code with example usage: obj.test_unit_to_midi_is_accurate(clip) without return types