Exemplo n.º 1
0
 def setUp(self):
     self.enc = encoder_decoder.MultipleEventSequenceEncoder([
         encoder_decoder.OneHotEventSequenceEncoderDecoder(
             testing_lib.TrivialOneHotEncoding(2)),
         encoder_decoder.OneHotEventSequenceEncoderDecoder(
             testing_lib.TrivialOneHotEncoding(3))
     ])
Exemplo n.º 2
0
 def setUp(self):
     super().setUp()
     self.enc = encoder_decoder.ConditionalEventSequenceEncoderDecoder(
         encoder_decoder.OneHotEventSequenceEncoderDecoder(
             testing_lib.TrivialOneHotEncoding(2)),
         encoder_decoder.OneHotEventSequenceEncoderDecoder(
             testing_lib.TrivialOneHotEncoding(3)))
 def setUp(self):
   self.min_note = 60
   self.max_note = 72
   self.transpose_to_key = 0
   self.med = encoder_decoder.OneHotEventSequenceEncoderDecoder(
       melody_encoder_decoder.MelodyOneHotEncoding(self.min_note,
                                                   self.max_note))
Exemplo n.º 4
0
    def __init__(self, window_size_seconds, density_bin_ranges):
        """Initialize a NoteDensityPerformanceControlSignal.

    Args:
      window_size_seconds: The size of the window, in seconds, used to compute
          note density (notes per second).
      density_bin_ranges: List of note density (notes per second) bin boundaries
          to use when quantizing. The number of bins will be one larger than the
          list length.
    """
        self._window_size_seconds = window_size_seconds
        self._density_bin_ranges = density_bin_ranges
        self._encoder = encoder_decoder.OneHotEventSequenceEncoderDecoder(
            self.NoteDensityOneHotEncoding(density_bin_ranges))
Exemplo n.º 5
0
 def setUp(self):
   self.enc = encoder_decoder.OptionalEventSequenceEncoder(
       encoder_decoder.OneHotEventSequenceEncoderDecoder(
           testing_lib.TrivialOneHotEncoding(3)))
Exemplo n.º 6
0
 def setUp(self):
   self.enc = encoder_decoder.OneHotEventSequenceEncoderDecoder(
       testing_lib.TrivialOneHotEncoding(3, num_steps=range(3)))
Exemplo n.º 7
0
 def setUp(self):
     self.enc = encoder_decoder.OneHotEventSequenceEncoderDecoder(
         TrivialOneHotEncoding(3))