class_docstr: Parameterize impulse response as a simple exponential decay.
class_docstr_tok: ["Parameterize","impulse","response","as","a","simple","exponential","decay","."]
docstr: Convert network outputs into ir response.
  
  Args:
    audio: Dry audio. 2-D Tensor of shape [batch, n_samples].
    gain: Linear gain of impulse response. Scaled by self._scale_fn.
      2D Tensor of shape [batch, 1]. Not used if trainable=True.
    decay: Exponential decay coefficient. The final impulse response is
      exp(-(2 + exp(decay)) * time) where time goes from 0 to 1.0 over the
      reverb_length samples. 2D Tensor of shape [batch, 1]. Not used if
      trainable=True.
  
  Returns:
    controls: Dictionary of effect controls.
  
  Raises:
    ValueError: If trainable=False and gain and decay are not provided.
docstr_tok: ["Convert","network","outputs","into","ir","response",".","Args",":","audio",":","Dry","audio",".","2-D","Tensor","of","shape","[","batch",",","n_samples","]",".","gain",":","Linear","gain","of","impulse","response",".","Scaled","by","self._scale_fn",".","2D","Tensor","of","shape","[","batch",",","1","]",".","Not","used","if","trainable=True",".","decay",":","Exponential","decay","coefficient",".","The","final","impulse","response","is","exp","(","-","(","2","+","exp","(","decay",")",")","*","time",")","where","time","goes","from","0","to","1.0","over","the","reverb_length","samples",".","2D","Tensor","of","shape","[","batch",",","1","]",".","Not","used","if","trainable=True",".","Returns",":","controls",":","Dictionary","of","effect","controls",".","Raises",":","ValueError",":","If","trainable=False","and","gain","and","decay","are","not","provided","."]
code: def get_controls(self, audio, gain=None, decay=None):
      """Convert network outputs into ir response.
  
      Args:
        audio: Dry audio. 2-D Tensor of shape [batch, n_samples].
        gain: Linear gain of impulse response. Scaled by self._scale_fn.
          2D Tensor of shape [batch, 1]. Not used if trainable=True.
        decay: Exponential decay coefficient. The final impulse response is
          exp(-(2 + exp(decay)) * time) where time goes from 0 to 1.0 over the
          reverb_length samples. 2D Tensor of shape [batch, 1]. Not used if
          trainable=True.
  
      Returns:
        controls: Dictionary of effect controls.
  
      Raises:
        ValueError: If trainable=False and gain and decay are not provided.
      """
      if self.trainable:
          gain, decay = (
              self._gain[tf.newaxis, :],
              self._decay[tf.newaxis, :],
          )
      else:
          if gain is None or decay is None:
              raise ValueError(
                  'Must provide "gain" and "decay" tensors if '
                  "ExpDecayReverb trainable=False."
              )
  
      ir = self._get_ir(gain, decay)
  
      if self.trainable:
          ir = self._match_dimensions(audio, ir)
  
      return {"audio": audio, "ir": ir}
  
imports: from ddsp import core
  from ddsp import processors
  from ddsp import synths
  import gin
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling the ExpDecayReverb obj's underlying member method code with example usage: obj.get_controls(audio, gain, decay) and returns: dict