(self, n_samples, pitch=None, max_audio_length=64000)
return self.generate_samples_from_z(z, pitches, max_audio_length)
Generate random latent fake samples.

    If pitch is not specified, pitches will be sampled randomly.

    Args:
      n_samples: Number of samples to generate.
      pitch: List of pitches to generate.
      max_audio_length: Trim generation to <= this length.

    Returns:
      An array of audio for the notes [n_notes, n_audio_samples].
Generate random latent fake samples.
Generate random latent fake samples .
def generate_samples(self, n_samples, pitch=None, max_audio_length=64000):
    """Generate random latent fake samples.

    If pitch is not specified, pitches will be sampled randomly.

    Args:
      n_samples: Number of samples to generate.
      pitch: List of pitches to generate.
      max_audio_length: Trim generation to <= this length.

    Returns:
      An array of audio for the notes [n_notes, n_audio_samples].
    """
    # Create list of pitches to generate
    if pitch is not None:
      pitches = [pitch]*n_samples
    else:
      all_pitches = []
      for k, v in self.pitch_counts.items():
        all_pitches.extend([k]*v)
      pitches = np.random.choice(all_pitches, n_samples)
    z = self.generate_z(len(pitches))
    return self.generate_samples_from_z(z, pitches, max_audio_length)
def generate_samples ( self , n_samples , pitch = None , max_audio_length = 64000 ) : # Create list of pitches to generate if pitch is not None : pitches = [ pitch ] * n_samples else : all_pitches = [ ] for k , v in self . pitch_counts . items ( ) : all_pitches . extend ( [ k ] * v ) pitches = np . random . choice ( all_pitches , n_samples ) z = self . generate_z ( len ( pitches ) ) return self . generate_samples_from_z ( z , pitches , max_audio_length )