Package jazzparser :: Package data :: Package input :: Class SegmentedMidiBulkInput
[hide private]
[frames] | no frames]

Class SegmentedMidiBulkInput

source code

 object --+        
          |        
InputReader --+    
              |    
      BulkInput --+
                  |
                 SegmentedMidiBulkInput
Known Subclasses:

A CSV file containing midi file paths and the parameters for segmenting each one.

May store an index of a gold analysis with each input. This should appear in column 4. If these are given, the first line of the file should specify the path to the sequence input file as follows:

 GOLD: <relative path>

Columns: filename, time unit, tick offset, ignore (bool, optional), gold id (int, optional)

Nested Classes [hide private]
  INPUT_TYPE
Input wrapper for MIDI files with extra information about segmentation, in the form it's needed for the Raphael and Stoddard model and midi supertagging models: that is, offset (start of first bar) and bar length.
Instance Methods [hide private]
 
__init__(self, inputs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code

Inherited from BulkInput: __getitem__, __iter__, __len__, get_identifiers, get_partitions, subset

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from InputReader: process_option_dict

Static Methods [hide private]
 
writeln(csv, filename, time_unit=None, tick_offset=0, ignore=False, seq_index=None)
Writes a line to a segmidi bulk input file, opened as a CSV writer.
source code
 
from_file(filename, options={}) source code
Class Variables [hide private]
  FILE_INPUT_OPTIONS = [ModuleOption('truncate', filter= int, he...
  SHELL_TOOLS = BulkInput.SHELL_TOOLS+ [tools.PlayBulkMidiChunks...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, inputs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

from_file(filename, options={})
Static Method

source code 
Overrides: InputReader.from_file

Class Variable Details [hide private]

FILE_INPUT_OPTIONS

Value:
[ModuleOption('truncate', filter= int, help_text= "truncate each input\
 to this length.", usage= "truncate=L, where L is an integer")]

SHELL_TOOLS

Value:
BulkInput.SHELL_TOOLS+ [tools.PlayBulkMidiChunksTool()]