class_docstr: Performance RNN generation code as a SequenceGenerator interface.
docstr: Creates a PerformanceRnnSequenceGenerator.
  
  Args:
    model: Instance of PerformanceRnnModel.
    details: A generator_pb2.GeneratorDetails for this generator.
    steps_per_second: Number of quantized steps per second.
    num_velocity_bins: Number of quantized velocity bins. If 0, don't use
        velocity.
    control_signals: A list of PerformanceControlSignal objects.
    optional_conditioning: If True, conditioning can be disabled dynamically.
    max_note_duration: The maximum note duration in seconds to allow during
        generation. This model often forgets to release notes; specifying a
        maximum duration can force it to do so.
    fill_generate_section: If True, the model will generate RNN steps until
        the entire generate section has been filled. If False, the model will
        estimate the number of RNN steps needed and then generate that many
        events, even if the generate section isn't completely filled.
    checkpoint: Where to search for the most recent model checkpoint. Mutually
        exclusive with `bundle`.
    bundle: A GeneratorBundle object that includes both the model checkpoint
        and metagraph. Mutually exclusive with `checkpoint`.
    note_performance: If true, a NotePerformance object will be used
        for the primer.
docstr_tok: ["Creates","a","PerformanceRnnSequenceGenerator",".","Args",":","model",":","Instance","of","PerformanceRnnModel",".","details",":","A","generator_pb2.GeneratorDetails","for","this","generator",".","steps_per_second",":","Number","of","quantized","steps","per","second",".","num_velocity_bins",":","Number","of","quantized","velocity","bins",".","If","0",",","do","n't","use","velocity",".","control_signals",":","A","list","of","PerformanceControlSignal","objects",".","optional_conditioning",":","If","True",",","conditioning","can","be","disabled","dynamically",".","max_note_duration",":","The","maximum","note","duration","in","seconds","to","allow","during","generation",".","This","model","often","forgets","to","release","notes",";","specifying","a","maximum","duration","can","force","it","to","do","so",".","fill_generate_section",":","If","True",",","the","model","will","generate","RNN","steps","until","the","entire","generate","section","has","been","filled",".","If","False",",","the","model","will","estimate","the","number","of","RNN","steps","needed","and","then","generate","that","many","events",",","even","if","the","generate","section","is","n't","completely","filled",".","checkpoint",":","Where","to","search","for","the","most","recent","model","checkpoint",".","Mutually","exclusive","with","`","bundle","`",".","bundle",":","A","GeneratorBundle","object","that","includes","both","the","model","checkpoint","and","metagraph",".","Mutually","exclusive","with","`","checkpoint","`",".","note_performance",":","If","true",",","a","NotePerformance","object","will","be","used","for","the","primer","."]
code: def __init__(
      self,
      model,
      details,
      steps_per_second=note_seq.DEFAULT_STEPS_PER_SECOND,
      num_velocity_bins=0,
      control_signals=None,
      optional_conditioning=False,
      max_note_duration=MAX_NOTE_DURATION_SECONDS,
      fill_generate_section=True,
      checkpoint=None,
      bundle=None,
      note_performance=False,
  ):
      """Creates a PerformanceRnnSequenceGenerator.
  
      Args:
        model: Instance of PerformanceRnnModel.
        details: A generator_pb2.GeneratorDetails for this generator.
        steps_per_second: Number of quantized steps per second.
        num_velocity_bins: Number of quantized velocity bins. If 0, don't use
            velocity.
        control_signals: A list of PerformanceControlSignal objects.
        optional_conditioning: If True, conditioning can be disabled dynamically.
        max_note_duration: The maximum note duration in seconds to allow during
            generation. This model often forgets to release notes; specifying a
            maximum duration can force it to do so.
        fill_generate_section: If True, the model will generate RNN steps until
            the entire generate section has been filled. If False, the model will
            estimate the number of RNN steps needed and then generate that many
            events, even if the generate section isn't completely filled.
        checkpoint: Where to search for the most recent model checkpoint. Mutually
            exclusive with `bundle`.
        bundle: A GeneratorBundle object that includes both the model checkpoint
            and metagraph. Mutually exclusive with `checkpoint`.
        note_performance: If true, a NotePerformance object will be used
            for the primer.
      """
      super(PerformanceRnnSequenceGenerator, self).__init__(
          model, details, checkpoint, bundle
      )
      self.steps_per_second = steps_per_second
      self.num_velocity_bins = num_velocity_bins
      self.control_signals = control_signals
      self.optional_conditioning = optional_conditioning
      self.max_note_duration = max_note_duration
      self.fill_generate_section = fill_generate_section
      self._note_performance = note_performance
  
file_path: magenta/magenta/models/performance_rnn/performance_sequence_generator.py
imports: from __future__ import division
  import ast
  import functools
  import math
  from magenta.models.performance_rnn import performance_model
  from magenta.models.shared import sequence_generator
  from magenta.pipelines import performance_pipeline
  import note_seq
  from note_seq import performance_controls
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new PerformanceRnnSequenceGenerator object from inherited base classes: sequence_generator with example: obj = PerformanceRnnSequenceGenerator(model, details, steps_per_second, num_velocity_bins, control_signals, optional_conditioning, max_note_duration, fill_generate_section, checkpoint, bundle, note_performance)