mutwo.isis_converters§

Object

Documentation

mutwo.isis_converters.EventToIsisScore

Class to convert mutwo events to a ISiS score file.

mutwo.isis_converters.EventToSingingSynthesis

Generate audio files with ISiS.

class EventToIsisScore(simple_event_to_pitch=<function EventToIsisScore.<lambda>>, simple_event_to_volume=<function EventToIsisScore.<lambda>>, simple_event_to_vowel=<function EventToIsisScore.<lambda>>, simple_event_to_consonant_tuple=<function EventToIsisScore.<lambda>>, is_simple_event_rest=<function EventToIsisScore.<lambda>>, tempo=60, global_transposition=0, default_sentence_loudness=None, n_events_per_line=5)[source]§

Class to convert mutwo events to a ISiS score file.

Parameters:
  • simple_event_to_pitch (Callable[[SimpleEvent], Pitch]) – Function to extract an instance of mutwo.music_parameters.abc.Pitch from a simple event.

  • simple_event_to_volume (Callable[[SimpleEvent], Volume]) –

  • simple_event_to_vowel (Callable[[SimpleEvent], str]) –

  • simple_event_to_consonant_tuple (Callable[[SimpleEvent], tuple[str, ...]]) –

  • is_simple_event_rest (Callable[[SimpleEvent], bool]) –

  • tempo (Union[float, Fraction, int]) – Tempo in beats per minute (BPM). Defaults to 60.

  • global_transposition (int) – global transposition in midi numbers. Defaults to 0.

  • n_events_per_line (int) – How many events the score shall contain per line. Defaults to 5.

  • default_sentence_loudness (Optional[Union[float, Fraction, int]]) –

Public Methods:

__init__([simple_event_to_pitch, ...])

convert(event_to_convert, path)

Render ISiS score file from the passed event.

Inherited from Converter

convert(event_to_convert, path)

Render ISiS score file from the passed event.

__call__(*args, **kwargs)

Call self as a function.

Private Data Attributes:

_extracted_data_dict_rest

_abc_impl

Inherited from EventConverter

_abc_impl

Inherited from Converter

_abc_impl

Inherited from ABC

_abc_impl


convert(event_to_convert, path)[source]§

Render ISiS score file from the passed event.

Parameters:
Return type:

None

Example:

>>> from mutwo import core_events
>>> from mutwo import music_events
>>> from mutwo import music_parameters
>>> from mutwo import isis_converters
>>> notes = core_events.SequentialEvent(
>>>    [
>>>         music_events.NoteLike(music_parameters.WesternPitch(pitch_name), 0.5, 0.5)
>>>         for pitch_name in 'c f d g'.split(' ')
>>>    ]
>>> )
>>> for consonants, vowel, note in zip([[], [], ['t'], []], ['a', 'o', 'e', 'a'], notes):
>>>     note.vowel = vowel
>>>     note.consonants = consonants
>>> event_to_isis_score = isis.EventToIsisScore('my_singing_score')
>>> event_to_isis_score.convert(notes)
class EventToSingingSynthesis(isis_score_converter, *flag, remove_score_file=False, isis_executable_path=None)[source]§

Generate audio files with ISiS.

Parameters:

Disclaimer: Before using the EventToSingingSynthesis, make sure ISiS has been correctly installed on your system.

Public Methods:

__init__(isis_score_converter, *flag[, ...])

convert(event_to_convert, path[, score_path])

Render sound file via ISiS from mutwo event.

Inherited from Converter

convert(event_to_convert, path[, score_path])

Render sound file via ISiS from mutwo event.

__call__(*args, **kwargs)

Call self as a function.

Private Data Attributes:

_abc_impl

Inherited from Converter

_abc_impl

Inherited from ABC

_abc_impl


convert(event_to_convert, path, score_path=None)[source]§

Render sound file via ISiS from mutwo event.

Parameters:
  • event_to_convert (Union[SimpleEvent, SequentialEvent[SimpleEvent]]) – The event that shall be rendered.

  • path (str) – The path / filename of the resulting sound file

  • score_path (Optional[str]) – The path where the score file shall be written to.

Return type:

None

Disclaimer: Before using the EventToSingingSynthesis, make sure ISiS has been correctly installed on your system.

mutwo.isis_converters.configurations§

Configure the behaviour of classes in mutwo.isis_converters

DEFAULT_ISIS_EXECUTABLE_PATH = 'isis.sh'§

The path to the ISiS shell script. When installing ISiS with the packed ‘Install_ISiS_commandline.sh’ script, the path should be ‘isis.sh’.

mutwo.isis_converters.constants§

Constants to be used for and with mutwo.isis_converters.

The file mostly contains different flags for running ISiS. The flag definitions are documented here.

SECTION_LYRIC_NAME = 'lyrics'§

Section name for lyrics in score config file

SECTION_SCORE_NAME = 'score'§

Section name for score in score config file

SILENT_FLAG = '--quiet'§

Flag for preventing ISiS from printing any information during rendering.