iterpitches


Functions

iterate_out_of_range

Iterates out-of-range notes and chords in argument.

respell_with_flats

Respells pitches in argument with flats.

respell_with_sharps

Respells pitches in argument with sharps.

sounding_pitches_are_in_range

Returns true when all pitches in argument sound within pitch_range.

transpose_from_sounding_pitch

Transpose notes and chords in argument from sounding pitch to written pitch.

transpose_from_written_pitch

Transposes notes and chords in argument from sounding pitch to written pitch.

abjad.iterpitches.iterate_out_of_range(argument)[source]

Iterates out-of-range notes and chords in argument.

>>> staff = abjad.Staff("c'8 r8 <d fs>8 r8")
>>> violin = abjad.Violin()
>>> abjad.attach(violin, staff[0])
>>> abjad.show(staff)  
>>> for leaf in abjad.iterpitches.iterate_out_of_range(staff):
...     leaf
... 
Chord('<d fs>8')
Return type:

Iterator[Leaf]

abjad.iterpitches.respell_with_flats(argument)[source]

Respells pitches in argument with flats.

>>> staff = abjad.Staff("cs'8 ds' es' fs' gs' as' bs'4")
>>> abjad.show(staff)  
>>> abjad.iterpitches.respell_with_flats(staff)
>>> abjad.show(staff)  
Return type:

None

abjad.iterpitches.respell_with_sharps(argument)[source]

Respells pitches in argument with sharps.

>>> staff = abjad.Staff("cf'8 df' ef' ff' gf' af' bf'4")
>>> abjad.show(staff)  
>>> abjad.iterpitches.respell_with_sharps(staff)
>>> abjad.show(staff)  
Return type:

None

abjad.iterpitches.sounding_pitches_are_in_range(argument, pitch_range)[source]

Returns true when all pitches in argument sound within pitch_range.

Return type:

bool

abjad.iterpitches.transpose_from_sounding_pitch(argument)[source]

Transpose notes and chords in argument from sounding pitch to written pitch.

>>> staff = abjad.Staff("<c' e' g'>4 d'4 r4 e'4")
>>> clarinet = abjad.ClarinetInBFlat()
>>> abjad.attach(clarinet, staff[0])
>>> abjad.show(staff)  
>>> abjad.iterpitches.transpose_from_sounding_pitch(staff)
>>> abjad.show(staff)  
Return type:

None

abjad.iterpitches.transpose_from_written_pitch(argument)[source]

Transposes notes and chords in argument from sounding pitch to written pitch.

>>> staff = abjad.Staff("<c' e' g'>4 d'4 r4 e'4")
>>> clarinet = abjad.ClarinetInBFlat()
>>> abjad.attach(clarinet, staff[0])
>>> abjad.show(staff)  
>>> abjad.iterpitches.transpose_from_written_pitch(staff)
>>> abjad.show(staff)  
Return type:

None