class_docstr: Synthesize audio with a bank of harmonic sinusoidal oscillators.
docstr: Constructor.
  
  Args:
    n_samples: Fixed length of output audio.
    sample_rate: Samples per a second.
    scale_fn: Scale function for amplitude and harmonic distribution inputs.
    normalize_below_nyquist: Remove harmonics above the nyquist frequency
      and normalize the remaining harmonic distribution to sum to 1.0.
    amp_resample_method: Mode with which to resample amplitude envelopes.
      Must be in ['nearest', 'linear', 'cubic', 'window']. 'window' uses
      overlapping windows (only for upsampling) which is smoother
      for amplitude envelopes with large frame sizes.
    use_angular_cumsum: Use angular cumulative sum on accumulating phase
      instead of tf.cumsum. If synthesized examples are longer than ~100k
      audio samples, consider use_angular_cumsum to avoid accumulating
      noticible phase errors due to the limited precision of tf.cumsum.
      However, using angular cumulative sum is slower on accelerators.
    name: Synth name.
docstr_tok: ["Constructor",".","Args",":","n_samples",":","Fixed","length","of","output","audio",".","sample_rate",":","Samples","per","a","second",".","scale_fn",":","Scale","function","for","amplitude","and","harmonic","distribution","inputs",".","normalize_below_nyquist",":","Remove","harmonics","above","the","nyquist","frequency","and","normalize","the","remaining","harmonic","distribution","to","sum","to","1.0.","amp_resample_method",":","Mode","with","which","to","resample","amplitude","envelopes",".","Must","be","in","[","'nearest","'",",","'linear","'",",","'cubic","'",",","'window","'","]",".","'window","'","uses","overlapping","windows","(","only","for","upsampling",")","which","is","smoother","for","amplitude","envelopes","with","large","frame","sizes",".","use_angular_cumsum",":","Use","angular","cumulative","sum","on","accumulating","phase","instead","of","tf.cumsum",".","If","synthesized","examples","are","longer","than","~100k","audio","samples",",","consider","use_angular_cumsum","to","avoid","accumulating","noticible","phase","errors","due","to","the","limited","precision","of","tf.cumsum",".","However",",","using","angular","cumulative","sum","is","slower","on","accelerators",".","name",":","Synth","name","."]
code: def __init__(
      self,
      n_samples=64000,
      sample_rate=16000,
      scale_fn=core.exp_sigmoid,
      normalize_below_nyquist=True,
      amp_resample_method="window",
      use_angular_cumsum=False,
      name="harmonic",
  ):
      """Constructor.
  
      Args:
        n_samples: Fixed length of output audio.
        sample_rate: Samples per a second.
        scale_fn: Scale function for amplitude and harmonic distribution inputs.
        normalize_below_nyquist: Remove harmonics above the nyquist frequency
          and normalize the remaining harmonic distribution to sum to 1.0.
        amp_resample_method: Mode with which to resample amplitude envelopes.
          Must be in ['nearest', 'linear', 'cubic', 'window']. 'window' uses
          overlapping windows (only for upsampling) which is smoother
          for amplitude envelopes with large frame sizes.
        use_angular_cumsum: Use angular cumulative sum on accumulating phase
          instead of tf.cumsum. If synthesized examples are longer than ~100k
          audio samples, consider use_angular_cumsum to avoid accumulating
          noticible phase errors due to the limited precision of tf.cumsum.
          However, using angular cumulative sum is slower on accelerators.
        name: Synth name.
      """
      super().__init__(name=name)
      self.n_samples = n_samples
      self.sample_rate = sample_rate
      self.scale_fn = scale_fn
      self.normalize_below_nyquist = normalize_below_nyquist
      self.amp_resample_method = amp_resample_method
      self.use_angular_cumsum = use_angular_cumsum
  
imports: from ddsp import core
  from ddsp import processors
  import gin
  import tensorflow.compat.v2
label_desc: Use image node_id 1 to create a new Harmonic object from inherited base classes: processors with example: obj = Harmonic(n_samples, sample_rate, scale_fn, normalize_below_nyquist, amp_resample_method, use_angular_cumsum, name)