transpose_pitch_carrier_by_interval

pitchtools.transpose_pitch_carrier_by_interval(pitch_carrier, interval)

Transposes pitch_carrier by named interval.

>>> chord = Chord("<c' e' g'>4")
>>> pitchtools.transpose_pitch_carrier_by_interval(
...     chord, '+m2')
Chord("<df' f' af'>4")

Transpose pitch_carrier by numbered interval:

>>> chord = Chord("<c' e' g'>4")
>>> pitchtools.transpose_pitch_carrier_by_interval(chord, 1)
Chord("<cs' f' af'>4")

Returns non-pitch-carrying input unchaged:

>>> rest = Rest('r4')
>>> pitchtools.transpose_pitch_carrier_by_interval(rest, 1)
Rest('r4')

Return pitch_carrier.