API documentationΒΆ

Mutwo is an event based framework for composing music or other time-based arts.

The structure of the framework is centred around objects with a duration property which are called Events (and which are defined in the mutwo.events package). These events may have several more attributes besides their duration attribute (e. g. pitch, volume). Abstractions for such attributes are defined in mutwo.parameters. The mutwo.converters package aims to translate mutwo data to third-party software data (or upside down). The mutwo.generators package supports algorithmic generation of artistic data.


The main packages are:

mutwo.converters

Several subpackages to convert data from and to mutwo.

mutwo.events

Time-based Event abstractions.

mutwo.generators

Classes and functions that generate data with the potential of artistic use.

mutwo.parameters

Abstractions for attributes that can be assigned to Event objects.

mutwo.utilities

Utility functions.


This tree provides a deep overview of all submodules:

mutwo.converters.abc

Defining the public api for any converter class.

mutwo.converters.frontends.abjad_attachments

Build Abjad attachments from Mutwo data.

mutwo.converters.frontends.csound

Render sound files from mutwo data via Csound.

mutwo.converters.frontends.ekmelily

Build tuning files for Lilypond extension Ekmelily.

mutwo.converters.frontends.isis

Render signing signals from mutwo data via ISiS.

mutwo.converters.frontends.midi

Render midi files (SMF) from mutwo data.

mutwo.converters.frontends.reaper

mutwo.converters.frontends.abjad_constants

Constants to be used for and with mutwo.converters.frontends.abjad.

mutwo.converters.frontends.csound_constants

Constants to be used for and with mutwo.converters.frontends.csound.

mutwo.converters.frontends.ekmelily_constants

Constants to be used for and with mutwo.converters.frontends.ekmelily.

mutwo.converters.frontends.isis_constants

Constants to be used for and with mutwo.converters.frontends.isis.

mutwo.converters.frontends.midi_constants

Several constants which are used for the midi converter module.

mutwo.converters.frontends.reaper_constants

mutwo.converters.symmetrical.metricities

Calculate metricity of a bar

mutwo.converters.symmetrical.loudness

Calculate loudness from amplitude.

mutwo.converters.symmetrical.playing_indicators

Apply PlayingIndicator on Event.

mutwo.converters.symmetrical.tempos

Apply tempo curve on any Event and convert TempoPoint to beat-length-in-seconds.

mutwo.converters.frontends.abjad

Build Lilypond scores via Abjad from Mutwo data.

mutwo.events.abc

Abstract base classes for events (definition of public API).

mutwo.events.basic

Generic event classes which can be used in multiple contexts.

mutwo.events.music

Event classes which are designated for musical usage.

mutwo.generators.brown

Algorithms which are related to Scottish botanist Robert Brown.

mutwo.generators.edwards

Algorithms which are related to British composer Michael Edwards.

mutwo.generators.gray

Algorithms which are related to US-American researcher Frank Gray.

mutwo.generators.toussaint

Algorithms which are related to Canadian computer scientist G.

mutwo.generators.edwards_constants

Constants which are used in mutwo.generators.edwards.

mutwo.parameters.abc

Abstract base classes for different parameters.

mutwo.parameters.commas

Abstractions of tuning commas

mutwo.parameters.notation_indicators

Define notation indicators for simple events.

mutwo.parameters.pitches

Submodule for the parameter pitch.

mutwo.parameters.playing_indicators

Define playing indicators for simple events.

mutwo.parameters.tempos

Submodule for the parameter tempo.

mutwo.parameters.volumes

Submodule for the parameter volume.

mutwo.parameters.pitches_constants

This module adds several constants that are used for the different pitch classes.

mutwo.parameters.volumes_constants

This module adds several constants that are used for the different volume classes.

mutwo.utilities.decorators

Generic decorators that are used within mutwo.

mutwo.utilities.prime_factors

Prime number calculations.

mutwo.utilities.tools

Generic utility functions.