class_docstr: Decodes MIDI notes (& velocities) to f0, amps, hd, noise.
class_docstr_tok: ["Decodes","MIDI","notes","(","&","velocities",")","to","f0",",","amps",",","hd",",","noise","."]
docstr: Forward pass for the MIDI decoder.
  
  Args:
    z_pitch: Tensor containing encoded pitch in MIDI scale. [batch, time, 1].
    z_vel: Tensor containing encoded velocity in MIDI scale. [batch, time, 1].
    z: Additional non-MIDI latent tensor. [batch, time, n_z]
  
  Returns:
    A dictionary to feed into a processor group.
docstr_tok: ["Forward","pass","for","the","MIDI","decoder",".","Args",":","z_pitch",":","Tensor","containing","encoded","pitch","in","MIDI","scale",".","[","batch",",","time",",","1","]",".","z_vel",":","Tensor","containing","encoded","velocity","in","MIDI","scale",".","[","batch",",","time",",","1","]",".","z",":","Additional","non-MIDI","latent","tensor",".","[","batch",",","time",",","n_z","]","Returns",":","A","dictionary","to","feed","into","a","processor","group","."]
code: def call(self, z_pitch, z_vel=None, z=None):
      """Forward pass for the MIDI decoder.
  
      Args:
        z_pitch: Tensor containing encoded pitch in MIDI scale. [batch, time, 1].
        z_vel: Tensor containing encoded velocity in MIDI scale. [batch, time, 1].
        z: Additional non-MIDI latent tensor. [batch, time, n_z]
  
      Returns:
        A dictionary to feed into a processor group.
      """
      # pylint: disable=unused-argument
      # x = tf.concat([z_pitch, z_vel], axis=-1)  # TODO(jesse): Allow velocity.
      x = z_pitch
      x = self.net(x) if z is None else self.net([x, z])
  
      if self.norm is not None:
          x = self.norm(x)
  
      x = self.dense_out(x)
  
      outputs = nn.split_to_dict(x, self.output_splits)
  
      if self.f0_residual:
          outputs["f0_midi"] += z_pitch
  
      outputs["f0_hz"] = core.midi_to_hz(
          outputs["f0_midi"], midi_zero_silence=self.midi_zero_silence
      )
      return outputs
  
imports: from ddsp import core
  from ddsp.training import nn
  import gin
  import tensorflow
label_desc: Use image node_id 2 for calling the MidiToHarmonicDecoder obj's underlying member method code with example usage: obj.call(z_pitch, z_vel, z) and returns: outputs