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

Class ChordInput

source code

 object --+        
          |        
InputReader --+    
              |    
          Input --+
                  |
                 ChordInput

Input wrapper for textual chord input.

This is the simplest type of input, usually taken from the command line.

You must provide a list of chord symbols and either a list of durations or a list of times when constructing this. To process pure text (which includes computing durations/times and splitting up chords), use ChordInput.from_string.

Instance Methods [hide private]
 
__init__(self, inputs, durations=None, times=None, roman=False, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
__len__(self) source code
 
__getitem__(self, item) source code
 
slice(self, start=None, end=None)
Subclasses should provide a way of slicing (taking a subsequence of) the input that returns an input of the original type.
source code
 
to_db_input(self)
This data type is useful for reading textual input.
source code

Inherited from Input: get_gold_analysis

Inherited from Input (private): _get_string_name

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]
 
from_string(input, name='<string input>', roman=False)
Produce a wrapped-up version of the input directly from an input string, which may come, for example, from the command line.
source code
 
from_file(filename, options={}) source code
Class Variables [hide private]
  FILE_INPUT_OPTIONS = [ModuleOption('roman', filter= str_to_boo...

Inherited from InputReader: SHELL_TOOLS

Properties [hide private]

Inherited from Input: string_name

Inherited from object: __class__

Method Details [hide private]

__init__(self, inputs, durations=None, times=None, roman=False, *args, **kwargs)
(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)

__len__(self)
(Length operator)

source code 
Overrides: Input.__len__

__getitem__(self, item)
(Indexing operator)

source code 
Overrides: Input.__getitem__

slice(self, start=None, end=None)

source code 

Subclasses should provide a way of slicing (taking a subsequence of) the input that returns an input of the original type.

Overrides: Input.slice
(inherited documentation)

from_file(filename, options={})
Static Method

source code 
Overrides: InputReader.from_file

to_db_input(self)

source code 

This data type is useful for reading textual input. For internal processing, however, it can be converted to a DbInput, which is generally more convenient to handle.


Class Variable Details [hide private]

FILE_INPUT_OPTIONS

Value:
[ModuleOption('roman', filter= str_to_bool, help_text= "read chord sym\
bols as roman numberals. " "Default is to assume note names", usage= "\
roman=B, where B is a boolean", default= False),]