pitchtypes.basetypes.AbstractBase

class pitchtypes.basetypes.AbstractBase(value, is_pitch, is_class, **kwargs)

Bases: object

This is the abstract base class for all pitch and interval types of the library. It provides some shared functionality and properties. See Abstract Base for more detailed explanations.

__init__(value, is_pitch, is_class, **kwargs)

Methods

__init__(value, is_pitch, is_class, **kwargs)

convert_to(other_type)

create_subtypes()

link_interval_class_type([skip_name_check, ...])

A decorator to link an interval class type to its base type.

link_interval_type([skip_name_check, ...])

A decorator to link an interval type to its base type.

link_pitch_class_type([skip_name_check, ...])

A decorator to link a pitch class type to its base type.

link_pitch_type([skip_name_check, ...])

A decorator to link a pitch type to its base type.

name_check(cls, sub_type, suffix, ...)

Check if sub_type follows the standard naming convention.

set_func_attr(sub_type, flags, names, funcs)

Add functions funcs as methods with names to class sub_type, controlled by flags.

__eq__(other)

Return self==value.

__hash__()

Return hash(self).

__repr__()

Return repr(self).

__setattr__(key, value)

Implement setattr(self, name, value).

__weakref__

list of weak references to the object (if defined)