pitchtypes.harmonic.HarmonicIntervalClass
- class pitchtypes.harmonic.HarmonicIntervalClass(exponents)
Bases:
Harmonic
- __init__(exponents)
Methods
__init__
(exponents)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.
parse_exponents
(exponents)- Interval
alias of
HarmonicInterval
- IntervalClass
alias of
HarmonicIntervalClass
- __eq__(other)
Return self==value.
- __getattr__(item)
This method is called when an attribute is not found in the instance’s __dict__. It allows to access the linked Pitch, Interval, PitchClass, and IntervalClass types via the base type.
- __hash__()
Return hash(self).
- __repr__()
Return repr(self).
- __setattr__(key, value)
Implement setattr(self, name, value).
- __weakref__
list of weak references to the object
- classmethod link_interval_class_type(skip_name_check=False, create_init=None, create_add=None, create_sub=None, create_mul=None, create_div=None, create_neg=None)
A decorator to link an interval class type to its base type. :type skip_name_check:
bool
:param skip_name_check: skip the name check and don’t raise :type create_init:Optional
[bool
] :param create_init: if True, create a default __init__ method :type create_add:Optional
[bool
] :param create_add: if True, create a default __add__ method :type create_sub:Optional
[bool
] :param create_sub: if True, create a default __sub__ method :type create_mul:Optional
[bool
] :param create_mul: if True, create a default __mul__ method :type create_div:Optional
[bool
] :param create_div: if True, create a default __truediv__ method :type create_neg:Optional
[bool
] :param create_neg: if True, create a default __neg__ method :meta private:
- classmethod link_interval_type(skip_name_check=False, create_init=None, create_add=None, create_sub=None, create_mul=None, create_div=None, create_neg=None, create_to_class=None)
A decorator to link an interval type to its base type. :type skip_name_check:
bool
:param skip_name_check: skip the name check and don’t raise :type create_init:Optional
[bool
] :param create_init: if True, create a default __init__ method :type create_add:Optional
[bool
] :param create_add: if True, create a default __add__ method :type create_sub:Optional
[bool
] :param create_sub: if True, create a default __sub__ method :type create_mul:Optional
[bool
] :param create_mul: if True, create a default __mul__ method :type create_div:Optional
[bool
] :param create_div: if True, create a default __truediv__ method :type create_neg:Optional
[bool
] :param create_neg: if True, create a default __neg__ method :type create_to_class:Optional
[bool
] :param create_to_class: if True, create a default to_class method :meta private:
- classmethod link_pitch_class_type(skip_name_check=False, create_init=None, create_add=None, create_sub=None)
A decorator to link a pitch class type to its base type. :type skip_name_check:
bool
:param skip_name_check: skip the name check and don’t raise :type create_init:Optional
[bool
] :param create_init: if True, create a default __init__ method :type create_add:Optional
[bool
] :param create_add: if True, create a default __add__ method :type create_sub:Optional
[bool
] :param create_sub: if True, create a default __sub__ method :return: a decorator that links the pitch class type to the base type :meta private:
- classmethod link_pitch_type(skip_name_check=False, create_init=None, create_add=None, create_sub=None, create_to_class=None)
A decorator to link a pitch type to its base type. :type skip_name_check:
bool
:param skip_name_check: skip the name check and don’t raise :type create_init:Optional
[bool
] :param create_init: if True, create a default __init__ method :type create_add:Optional
[bool
] :param create_add: if True, create a default __add__ method :type create_sub:Optional
[bool
] :param create_sub: if True, create a default __sub__ method :type create_to_class:Optional
[bool
] :param create_to_class: if True, create a default to_class method :meta private: