pitchscapes.util.key_estimates_to_str

pitchscapes.util.key_estimates_to_str(estimates, sharp_flat='sharp', use_capitalisation=True)[source]

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