pitchtypes.logfreq.LogFreqPitchClass
- class pitchtypes.logfreq.LogFreqPitchClass(value, is_freq=False, **kwargs)
Bases:
LogFreq
- __init__(value, is_freq=False, **kwargs)
Initialise from frequency or log-frequency value. :type value: :param value: frequency or log-frequency (default) value :param is_log: whether value is frequency or log-frequency
Methods
__init__
(value[, is_freq])Initialise from frequency or log-frequency value.
convert_to
(other_type)create_subtypes
()freq
()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.
print_precision
([precision])- Interval
alias of
LogFreqInterval
- IntervalClass
alias of
LogFreqIntervalClass
- Pitch
alias of
LogFreqPitch
- PitchClass
alias of
LogFreqPitchClass
- __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: