mutwo.converters.frontends.isis module¶
Render signing signals from mutwo data via ISiS.
ISiS (IRCAM Singing Synthesis) is a “command line application for singing synthesis that can be used to generate singing signals by means of synthesizing them from melody and lyrics.”.
Classes:
|
Generate audio files with ISiS. |
|
Class to convert mutwo events to a `ISiS score file. |
- class IsisConverter(path, isis_score_converter, *flag, remove_score_file=False)[source]¶
Bases:
mutwo.converters.abc.ConverterGenerate audio files with ISiS.
- Parameters
path (str) – where to write the sound file
isis_score_converter (mutwo.converters.frontends.isis.IsisScoreConverter) – The
IsisScoreConverterthat shall be used to render the ISiS score file from a mutwo event.*flag –
Flag that shall be added when calling ISiS. Several of the supported ISiS flags can be found in
mutwo.converters.frontends.isis_constants.remove_score_file (bool) – Set to True if
IsisConvertershall remove the ISiS score file after rendering. Defaults to False.flag (str) –
Disclaimer: Before using the
IsisConverter, make sure ISiS has been correctly installed on your system.Methods:
convert(event_to_convert)Render sound file via ISiS from mutwo event.
- convert(event_to_convert)[source]¶
Render sound file via ISiS from mutwo event.
- Parameters
event_to_convert (Union[mutwo.events.basic.SimpleEvent, mutwo.events.basic.SequentialEvent[mutwo.events.basic.SimpleEvent]]) – The event that shall be rendered.
- Return type
None
Disclaimer: Before using the
IsisConverter, make sure ISiS has been correctly installed on your system.
- class IsisScoreConverter(path, simple_event_to_pitch=<function IsisScoreConverter.<lambda>>, simple_event_to_volume=<function IsisScoreConverter.<lambda>>, simple_event_to_vowel=<function IsisScoreConverter.<lambda>>, simple_event_to_consonants=<function IsisScoreConverter.<lambda>>, is_simple_event_rest=<function IsisScoreConverter.<lambda>>, tempo=60, global_transposition=0, default_sentence_loudness=None, n_events_per_line=5)[source]¶
Bases:
mutwo.converters.abc.EventConverterClass to convert mutwo events to a ISiS score file.
- Parameters
path (str) – where to write the ISiS score file
simple_event_to_pitch (Callable[[mutwo.events.basic.SimpleEvent], mutwo.parameters.abc.Pitch]) – Function to extract an instance of
mutwo.parameters.abc.Pitchfrom a simple event.simple_event_to_volume (Callable[[mutwo.events.basic.SimpleEvent], mutwo.parameters.abc.Volume]) –
simple_event_to_vowel (Callable[[mutwo.events.basic.SimpleEvent], str]) –
simple_event_to_consonants (Callable[[mutwo.events.basic.SimpleEvent], Tuple[str, ...]]) –
is_simple_event_rest (Callable[[mutwo.events.basic.SimpleEvent], bool]) –
tempo (Union[float, fractions.Fraction]) – 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, fractions.Fraction]]) –
Methods:
convert(event_to_convert)Render ISiS score file from the passed event.
- convert(event_to_convert)[source]¶
Render ISiS score file from the passed event.
- Parameters
event_to_convert (Union[mutwo.events.basic.SimpleEvent, mutwo.events.basic.SequentialEvent[mutwo.events.basic.SimpleEvent]]) – The event that shall be rendered to a ISiS score file.
- Return type
None
Example:
>>> from mutwo.events import events.basic, music >>> from mutwo.parameters import pitches >>> from mutwo.converters.frontends import isis >>> notes = events.basic.SequentialEvent( >>> [ >>> music.NoteLike(pitches.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 >>> isis_score_converter = isis.IsisScoreConverter('my_singing_score') >>> isis_score_converter.convert(notes)