(note_sequence, split, sample_size, randomize,
                              to_tensors_fn)
return combine_converter_tensors(results, sample_size, randomize)
Splits a `NoteSequence`, processes and combines the `ConverterTensors`.

  Args:
    note_sequence: The `NoteSequence` to split, process and combine.
    split: If True, the given note_sequence is split into multiple based on time
      changes, and the tensor outputs are concatenated.
    sample_size: Outputs are sampled if size exceeds this value.
    randomize: If True, outputs are randomly sampled (this is generally done
      during training).
    to_tensors_fn: A fn that converts a `NoteSequence` to `ConverterTensors`.

  Returns:
    A `ConverterTensors` obj.
Splits a `NoteSequence`, processes and combines the `ConverterTensors`.
Splits a NoteSequence processes and combines the ConverterTensors .
def split_process_and_combine(note_sequence, split, sample_size, randomize,
                              to_tensors_fn):
  """Splits a `NoteSequence`, processes and combines the `ConverterTensors`.

  Args:
    note_sequence: The `NoteSequence` to split, process and combine.
    split: If True, the given note_sequence is split into multiple based on time
      changes, and the tensor outputs are concatenated.
    sample_size: Outputs are sampled if size exceeds this value.
    randomize: If True, outputs are randomly sampled (this is generally done
      during training).
    to_tensors_fn: A fn that converts a `NoteSequence` to `ConverterTensors`.

  Returns:
    A `ConverterTensors` obj.
  """
  note_sequences = sequences_lib.split_note_sequence_on_time_changes(
      note_sequence) if split else [note_sequence]
  results = []
  for ns in note_sequences:
    tensors = to_tensors_fn(ns)
    sampled_results = maybe_sample_items(
        list(zip(*tensors)), sample_size, randomize)
    if sampled_results:
      results.append(ConverterTensors(*zip(*sampled_results)))
    else:
      results.append(ConverterTensors())
  return combine_converter_tensors(results, sample_size, randomize)
def split_process_and_combine ( note_sequence , split , sample_size , randomize , to_tensors_fn ) : note_sequences = sequences_lib . split_note_sequence_on_time_changes ( note_sequence ) if split else [ note_sequence ] results = [ ] for ns in note_sequences : tensors = to_tensors_fn ( ns ) sampled_results = maybe_sample_items ( list ( zip ( * tensors ) ) , sample_size , randomize ) if sampled_results : results . append ( ConverterTensors ( * zip ( * sampled_results ) ) ) else : results . append ( ConverterTensors ( ) ) return combine_converter_tensors ( results , sample_size , randomize )