class_docstr: Encodes Harmonic synthesizer parameters to MIDI representation.
docstr: Forward pass for the encoder.
  
  Args:
    f0_midi: Tensor containing an f0 curve in MIDI scale. [batch, time, 1]
    amps: Tensor with amplitude curve in log scale. [batch, time, 1].
    hd: Tensor with harmonic distribution in log scale.
      [batch, time, n_harmonics].
    noise: Tensor with noise magnitudes in log scale.
      [batch, time, n_noise_bands].
  
  Returns:
    z_pitch, z_vel: Un-quantized pitch and velocity encodings, respecitively.
docstr_tok: ["Forward","pass","for","the","encoder",".","Args",":","f0_midi",":","Tensor","containing","an","f0","curve","in","MIDI","scale",".","[","batch",",","time",",","1","]","amps",":","Tensor","with","amplitude","curve","in","log","scale",".","[","batch",",","time",",","1","]",".","hd",":","Tensor","with","harmonic","distribution","in","log","scale",".","[","batch",",","time",",","n_harmonics","]",".","noise",":","Tensor","with","noise","magnitudes","in","log","scale",".","[","batch",",","time",",","n_noise_bands","]",".","Returns",":","z_pitch",",","z_vel",":","Un-quantized","pitch","and","velocity","encodings",",","respecitively","."]
code: def call(self, f0_midi, amps, hd, noise) -> ["z_pitch", "z_vel"]:
      """Forward pass for the encoder.
  
      Args:
        f0_midi: Tensor containing an f0 curve in MIDI scale. [batch, time, 1]
        amps: Tensor with amplitude curve in log scale. [batch, time, 1].
        hd: Tensor with harmonic distribution in log scale.
          [batch, time, n_harmonics].
        noise: Tensor with noise magnitudes in log scale.
          [batch, time, n_noise_bands].
  
      Returns:
        z_pitch, z_vel: Un-quantized pitch and velocity encodings, respecitively.
      """
      x = tf.concat([f0_midi, amps, hd, noise], axis=-1)
  
      x = self.net(x)
      x = self.norm(x)
      x = self.dense_out(x)
  
      z_pitch = x[..., 0:1]
      z_vel = x[..., 1:2]
  
      if self.f0_residual:
          z_pitch += f0_midi
  
      return z_pitch, z_vel
  
imports: import ddsp
  from ddsp import spectral_ops
  from ddsp.training import nn
  import gin
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the HarmonicToMidiEncoder obj's underlying member method code with example usage: obj.call(f0_midi, amps, hd, noise) and returns: z_pitch,  z_vel