pitchscapes.reader.sample_scape

pitchscapes.reader.sample_scape(n_time_intervals, file_path=None, scape=None, **kwargs)[source]

Sample points from a scape on a uniform grid. The total time [min_time, max_time] is divided into n_time_intervals equally sized intervals. A sample for every possible combination of start and end time is collected and returned, ordered first by start time and then by end time. :type n_time_intervals: :param n_time_intervals: the number of time intervals :type file_path: :param file_path: path to a file for reading a scape via get_pitch_scape (alternative to passing scape directly) :type scape: :param scape: the scape to sample (alternative to providing file_path) :type kwargs: :param kwargs: kwargs to pass to get_pitch_scape :return: array of samples (first dimension has size n_time_intervals * (n_time_intervals + 1) / 2)