pitchscapes.util

Functions

axis_set_invisible(ax[, splines, ticks, ...])

center_width_to_start_end(center, width)

Transform (center, width) coordinates of a window to (start, end) coordinates

coords_from_times(times[, start_end_idx, ...])

Generate various coordinate information from a given list of times. Given N points in time, the returned arrays will

euclidean_distance(x, y[, axis])

key_estimates_to_str(estimates[, ...])

Transform an array of key estimates into string representation :type estimates: :param estimates: 2D numpy array of shape Nx2 with N estimates, where the first entry in each row indicates whether it is major (0) or minor (1) and the second entry indicates the tonic (0-11, starting a C in chromatically ascending order) :type sharp_flat: :param sharp_flat: one of ['sharp', 'flat'] (default 'sharp'); whether to use sharps or flats for chromatic notes (i.e. C# versus Db) :type use_capitalisation: :param use_capitalisation: True/False (default True); whether to indicate major/minor by capitalisation ('C' versus 'c') or spelled out ('C major' versus 'C minor') :return: 1D array of length N with the string descriptions.

multi_sample_pitch_scapes(scapes, n_samples)

random_batch_ids(n_data, n_batches)

safe_int(s)

sample_discrete_scape(scape[, times, ...])

Generator that returns values from scape on a discrete time grid.

sample_pitch_scape(scape, n_samples[, ...])

start_end_to_center_width(start, end)

Transform (start, end) coordinates of a window to (center, width) coordinates

to_array(x)