pitchscapes.scapes.PitchScape_
- class pitchscapes.scapes.PitchScape_(values=None, scape=None, **kwargs)[source]
Bases:
Scape
Continuous-time scape that takes a discrete-time scape and interpolates linearly for points that lie in between the discrete time points. This is the exact continuous generalisation when using DiscretePitchScape as discrete-time scape.
Public Methods:
__init__
([values, scape])Initialise PitchScape either from count values or from DiscretePitchScape.
__getitem__
(item)Return value of the scape at position :type item: :param item: (start, end) with start < end :return: value of the scape for the time window (start, end)
get_adjacent_indices
(start, end, times)interpolate
(start, end)Inherited from
Scape
__init__
(min_time, max_time)__getitem__
(item)Return value of the scape at position :type item: :param item: (start, end) with start < end :return: value of the scape for the time window (start, end)
assert_valid_time_window
(start, end)
- __annotations__ = {}
- __dict__ = mappingproxy({'__module__': 'pitchscapes.scapes', '__doc__': '\n Continuous-time scape that takes a discrete-time scape and interpolates linearly for points that lie in between the\n discrete time points. This is the exact continuous generalisation when using DiscretePitchScape as discrete-time\n scape.\n ', '__init__': <function PitchScape_.__init__>, '__getitem__': <function PitchScape_.__getitem__>, 'get_adjacent_indices': <staticmethod(<function PitchScape_.get_adjacent_indices>)>, 'interpolate': <function PitchScape_.interpolate>, '__annotations__': {}})
- __getitem__(item)[source]
Return value of the scape at position :type item: :param item: (start, end) with start < end :return: value of the scape for the time window (start, end)
- __init__(values=None, scape=None, **kwargs)[source]
Initialise PitchScape either from count values or from DiscretePitchScape. :type values: :param values: pitch-class counts (do not provide together with scape) :type scape: :param scape: DiscretePitchScape object (do not provide together with values) :type kwargs: :param kwargs: keyword arguments passed on to initialize DiscretePitchScape (use only when also providing values)
- __module__ = 'pitchscapes.scapes'
- __weakref__
list of weak references to the object (if defined)
- assert_valid_time_window(start, end)