def invert(self, axis=None): r'''Inverts numbered pitch around `axis`. .. container:: example Inverts pitch-class about pitch-class 0 explicitly: >>> abjad.NumberedPitch(2).invert(0) NumberedPitch(-2) >>> abjad.NumberedPitch(-2).invert(0) NumberedPitch(2) .. container:: example Inverts pitch-class about pitch-class 0 implicitly: >>> abjad.NumberedPitch(2).invert() NumberedPitch(-2) >>> abjad.NumberedPitch(-2).invert() NumberedPitch(2) .. container:: example Inverts pitch-class about pitch-class -3: >>> abjad.NumberedPitch(2).invert(-3) NumberedPitch(-8) Returns new numbered pitch. ''' return Pitch.invert(self, axis=axis)
def invert(self, axis=None): r'''Inverts named pitch around `axis`. .. container:: example **Example 1.** Inverts pitch around middle C explicitly: :: >>> NamedPitch("d'").invert("c'") NamedPitch('bf') :: >>> NamedPitch('bf').invert("c'") NamedPitch("d'") Default behavior. **Example 2.** Inverts pitch around middle C implicitly: :: >>> NamedPitch("d'").invert() NamedPitch('bf') :: >>> NamedPitch('bf').invert() NamedPitch("d'") Default behavior. **Example 3.** Inverts pitch around A3: :: >>> NamedPitch("d'").invert('a') NamedPitch('e') Interprets none-valued `axis` equal to middle C. Returns new named pitch. ''' return Pitch.invert(self, axis=axis)
def invert(self, axis=None): r'''Inverts numberd pitch around `axis`. .. container:: example **Example 1.** Inverts pitch-class about pitch-class 0 explicitly: :: >>> pitchtools.NumberedPitch(2).invert(0) NumberedPitch(-2) :: >>> pitchtools.NumberedPitch(-2).invert(0) NumberedPitch(2) Default behavior. **Example 2.** Inverts pitch-class about pitch-class 0 implicitly: :: >>> pitchtools.NumberedPitch(2).invert() NumberedPitch(-2) :: >>> pitchtools.NumberedPitch(-2).invert() NumberedPitch(2) Default behavior. **Example 3.** Inverts pitch-class about pitch-class -3: :: >>> pitchtools.NumberedPitch(2).invert(-3) NumberedPitch(-8) Returns new numbered pitch. ''' return Pitch.invert(self, axis=axis)