mutwo.music_utilities

Object

Documentation

mutwo.music_utilities.DuplicatePlayingIndicatorConverterMappingWarning

mutwo.music_utilities.UnsortedIntervalTupleError

mutwo.music_utilities.NotInstalledError

mutwo.music_utilities.IndicatorCollectionParser

Parse strings to IndicatorCollection.

mutwo.music_utilities.linear_space

Return evenly spaced numbers over a specified interval.

linear_space(start, end, sample_count=50)[source]

Return evenly spaced numbers over a specified interval.

Parameters:
  • start (float) – The starting value of the sequence.

  • end (float) –

  • sample_count (int) –

Return type:

Generator

:param stop : The end value of the sequence. :param sample_count: int, Number of samples to generate.

Default is 50. Must be non-negative.

This is a simplified version of ‘numpy.linspace’.

class DuplicatePlayingIndicatorConverterMappingWarning(articulation_name, playing_indicator_converter)[source]

Bases: RuntimeWarning

Public Data Attributes:

Inherited from BaseException

args

Public Methods:

Inherited from BaseException

with_traceback

Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.


Parameters:

articulation_name (str) –

class UnsortedIntervalTupleError(interval_tuple)[source]

Bases: Exception

Public Data Attributes:

Inherited from BaseException

args

Public Methods:

Inherited from BaseException

with_traceback

Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.


class NotInstalledError(object_, package)[source]

Bases: Exception

Public Data Attributes:

Inherited from BaseException

args

Public Methods:

Inherited from BaseException

with_traceback

Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.


Parameters:
  • object_ (str) –

  • package (str) –

class IndicatorCollectionParser(*args, **kwargs)[source]

Bases: ConfigParser

Parse strings to IndicatorCollection.

See configparser.ConfigParser for provided arguments.

Public Data Attributes:

STATEMENT_DELIMITER

Inherited from RawConfigParser

SECTCRE

OPTCRE

OPTCRE_NV

NONSPACECRE

BOOLEAN_STATES

converters

Public Methods:

parse(s, indicator_collection)

Inherited from ConfigParser

set(section, option[, value])

Set an option.

add_section(section)

Create a new section in the configuration.

Inherited from RawConfigParser

defaults()

sections()

Return a list of section names, excluding [DEFAULT]

add_section(section)

Create a new section in the configuration.

has_section(section)

Indicate whether the named section is present in the configuration.

options(section)

Return a list of option names for the given section name.

read(filenames[, encoding])

Read and parse a filename or an iterable of filenames.

read_file(f[, source])

Like read() but the argument must be a file-like object.

read_string(string[, source])

Read configuration from a given string.

read_dict(dictionary[, source])

Read configuration from a dictionary.

readfp(fp[, filename])

Deprecated, use read_file instead.

get(section, option, *[, raw, vars, fallback])

Get an option value for a given section.

getint(section, option, *[, raw, vars, fallback])

getfloat(section, option, *[, raw, vars, ...])

getboolean(section, option, *[, raw, vars, ...])

items([section, raw, vars])

Return a list of (name, value) tuples for each option in a section.

popitem()

Remove a section from the parser and return it as a (section_name, section_proxy) tuple.

optionxform(optionstr)

has_option(section, option)

Check for the existence of a given option in a given section.

set(section, option[, value])

Set an option.

write(fp[, space_around_delimiters])

Write an .ini-format representation of the configuration state.

remove_option(section, option)

Remove an option.

remove_section(section)

Remove a file section.

Inherited from MutableMapping

pop(k[,d])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()

as a 2-tuple; but raise KeyError if D is empty.

clear()

update([E, ]**F)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

setdefault(k[,d])

Inherited from Mapping

get(k[,d])

keys()

items()

values()


parse(s, indicator_collection)[source]
Parameters:
Return type:

IndicatorCollection

STATEMENT_DELIMITER = ';'