orbichord/identify.py
def chordSymbolIndex(chord : Chord) -> str:
    """Identify chords based on its chord symbol index.

    The chord symbol index is an index that is unique to each named chord.

    Parameters
    ----------
        chord : Chord
            Chord to be identified.

    Return
    ------
        str
            A string with the pitch names.
    """
    # Remove repeated pitch class
    pcs = []
    veto = set()
    for pc in chord.pitchClasses:
        if pc in veto:
            continue
        pcs.append(pc)
        veto.add(pc)
    # The first pc is the bass, the remaining ps
    # are sorted to treat each inversion the same
    # independent of the permutations.
    pcs = [pcs[0]] + sorted(pcs[1:])
    return '<' + ''.join(map(base10toN, pcs)) + '>'
Identify chords based on its chord symbol index.

    The chord symbol index is an index that is unique to each named chord.

    Parameters
    ----------
        chord : Chord
            Chord to be identified.

    Return
    ------
        str
            A string with the pitch names.
    
Identify chords based on its chord symbol index.
The chord symbol index is an index that is unique to each named chord.

Parameters

chord : Chord
Chord to be identified.

Return

str
A string with the pitch names.
Identify chords based on its chord symbol index . The chord symbol index is an index that is unique to each named chord . Parameters chord : Chord Chord to be identified . Return str A string with the pitch names .
def chordSymbolIndex(chord : Chord) -> str:
    pcs = []
    veto = set()
    for pc in chord.pitchClasses:
        if pc in veto:
            continue
        pcs.append(pc)
        veto.add(pc)
    pcs = [pcs[0]] + sorted(pcs[1:])
    return '<' + ''.join(map(base10toN, pcs)) + '>'
def chordSymbolIndex ( chord : Chord ) -> str : pcs = [ ] veto = set ( ) for pc in chord . pitchClasses : if pc in veto : continue pcs . append ( pc ) veto . add ( pc ) pcs = [ pcs [ 0 ] ] + sorted ( pcs [ 1 : ] ) return '<' + '' . join ( map ( base10toN , pcs ) ) + '>'
Identify chords based on its chord symbol index.
Identify chords based on its chord symbol index .
"""Identify chords based on its chord symbol index.

    The chord symbol index is an index that is unique to each named chord.

    Parameters
    ----------
        chord : Chord
            Chord to be identified.

    Return
    ------
        str
            A string with the pitch names.
    """ # Remove repeated pitch class # The first pc is the bass, the remaining ps # are sorted to treat each inversion the same # independent of the permutations.
chord
Chord