class_docstr: Predict VST controls, but explicitly handle RNN state.
class_docstr_tok: ["Predict","VST","controls",",","but","explicitly","handle","RNN","state","."]
docstr: Convert f0 and loudness to synthesizer parameters.
code: def call(self, f0_scaled, pw_scaled, state):
      """Convert f0 and loudness to synthesizer parameters."""
      f0_scaled = tf.reshape(f0_scaled, [1, 1, 1])
      pw_scaled = tf.reshape(pw_scaled, [1, 1, 1])
      state = tf.reshape(state, [1, self.state_size])
  
      f0_hz = ddsp.training.preprocessing.inv_scale_f0_hz(f0_scaled)
  
      inputs = {
          "f0_scaled": f0_scaled,
          "pw_scaled": pw_scaled,
          "state": state,
      }
  
      # Run through the model.
      outputs = self.decoder(inputs, training=False)
  
      # Apply the nonlinearities.
      harm_controls = self.processor_group.harmonic.get_controls(
          outputs["amps"], outputs["harmonic_distribution"], f0_hz
      )
  
      noise_controls = self.processor_group.filtered_noise.get_controls(
          outputs["noise_magnitudes"]
      )
  
      # Return 1-D tensors.
      amps = harm_controls["amplitudes"][0, 0]
      hd = harm_controls["harmonic_distribution"][0, 0]
      noise = noise_controls["magnitudes"][0, 0]
      state = outputs["state"][0]
      return amps, hd, noise, state
  
imports: import ddsp
  from ddsp.training import models
  from ddsp.training import train_util
  import gin
  import tensorflow
label_desc: Use image node_id 4 for calling the VSTStatelessPredictControls obj's underlying member method code with example usage: obj.call(f0_scaled, pw_scaled, state) and returns: amps,  hd,  noise,  state