Package jazzparser :: Package harmonical :: Module input :: Class HarmonicalInputFile
[hide private]
[frames] | no frames]

Class HarmonicalInputFile

source code

object --+
         |
        HarmonicalInputFile
Known Subclasses:

Base class for input files to the harmonical.

Instance Methods [hide private]
 
render(*args, **kwargs)
Subclasses must provide a way of building an audio signal.
source code
 
render_midi(*args, **kwargs)
Subclasses may provide a way of building a tuned midi file.
source code

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

Static Methods [hide private]
 
from_file(filename, formats=None)
Read in an input file.
source code
 
process_global_directives(data) source code
 
from_data(*args, **kwargs)
Subclasses must provide this method to create an instance from the lines of data read in from a file.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

from_file(filename, formats=None)
Static Method

source code 

Read in an input file. This method detects the type of input and returns an instance of the appropriate subclass.

Parameters:
  • formats (list of strings) - list of formats to allow. By default, accepts any format. If a list is given and the file's format isn't in it, raises an error.

from_data(*args, **kwargs)
Static Method

source code 

Subclasses must provide this method to create an instance from the lines of data read in from a file. Should take a second argument which will be a dictionary of the global directive values.

Decorators:
  • @abstractmethod

render(*args, **kwargs)

source code 

Subclasses must provide a way of building an audio signal.

Decorators:
  • @abstractmethod

render_midi(*args, **kwargs)

source code 

Subclasses may provide a way of building a tuned midi file.

Decorators:
  • @abstractmethod
Raises:
  • NotImplementedError - if this input format doesn't support midi generation.