§
    ƒØj  ã                  ó‚   — d Z ddlmZ ddlZej        rddlmZ ddlmZ dd
„Z	e
dk    rddlZ ej        ¦   «          dS dS )zt
Chord utilities too obscure to go on the Chord object, yet still helpful
enough to go in the music21 core library.
é    )ÚannotationsN)Úchord)ÚpitchÚcúchord.ChordÚreturnúdict[int, pitch.Pitch]c                ó‚   — |                       ¦   «         j        }i }| j        D ]}|j        |z
  dz  dz   }||vr|||<   Œ|S )a´  
    Return a dictionary of all chordSteps in the chord.
    If more than one pitch shares the same chordStep such as the third
    in (C, E-, E, G), then only the first will appear in the dictionary.

    The dictionary will be ordered by the order of pitches in the Chord.

    More efficient than calling [getChordStep(x) for x in range(1, 8)]
    which would be O(n^2) on number of pitches.

    Requires `root()` to be defined.

    >>> ch = chord.Chord('C4 E4 G4 B4 C5 D5')
    >>> chord.tools.allChordSteps(ch)
    {1: <music21.pitch.Pitch C4>,
     3: <music21.pitch.Pitch E4>,
     5: <music21.pitch.Pitch G4>,
     7: <music21.pitch.Pitch B4>,
     2: <music21.pitch.Pitch D5>}
    é   é   )ÚrootÚdiatonicNoteNumÚpitches)r   Úroot_dnnÚout_mapÚ	thisPitchÚdiatonicDistances        úˆ/Users/tedpeters/Documents/Projects/Claude Projects/Misc Tools/notename-sheets/.venv/lib/python3.11/site-packages/music21/chord/tools.pyÚallChordStepsr      s^   € ð* �vŠv‰xŒxÔ'€HØ&(€GØ”Yð 2ð 2ˆ	Ø&Ô6¸ÑAÀQÑFÈ!ÑKÐØ 7Ð*Ð*Ø(1ˆGÐ$Ñ%øØ€Nó    Ú__main__)r   r   r   r	   )Ú__doc__Ú
__future__r   ÚtypingÚtÚTYPE_CHECKINGÚmusic21r   r   r   Ú__name__ÚmainTest© r   r   ú<module>r!      s¦   ððð ð #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð à„?ð ØÐÐÐÐÐØÐÐÐÐÐðð ð ð ð< ˆzÒÐØ€N€N€NØ€GÔÑÔÐÐÐð Ðr   