pitchtools.PitchRange

Inheritance diagram of abjad.tools.pitchtools.PitchRange.PitchRange.PitchRange

class abjad.tools.pitchtools.PitchRange.PitchRange.PitchRange(*args, **kwargs)[source]

New in version 2.0.

Abjad model of pitch range:

abjad> pitchtools.PitchRange(-12, 36)
PitchRange('[C3, C7]')

Initalize from pitch numbers, pitch names, pitch instances, one-line reprs or other pitch range objects.

Pitch ranges test for equality and inequality against other pitch ranges.

Pitch ranges test less than, greater than, less-equal and greater-equal against pitches.

Pitch ranges do not sort relative to other pitch ranges.

Pitch ranges are immutable.

Read-only Properties

PitchRange.one_line_named_chromatic_pitch_repr[source]

Read-only one-line named chromatic pitch repr of pitch of range:

abjad> pitch_range = pitchtools.PitchRange(-12, 36)
abjad> pitch_range.one_line_named_chromatic_pitch_repr
'[C3, C7]'

Return string.

PitchRange.one_line_numbered_chromatic_pitch_repr[source]

Read-only one-line numbered chromatic pitch repr of pitch of range:

abjad> pitch_range = pitchtools.PitchRange(-12, 36)
abjad> pitch_range.one_line_numbered_chromatic_pitch_repr
'[-12, 36]'

Return string.

PitchRange.pitch_range_name[source]

New in version 2.7.

Read-only name of pitch range:

abjad> pitch_range = pitchtools.PitchRange(-12, 36, pitch_range_name='four-octave range')
abjad> pitch_range.pitch_range_name
'four-octave range'

Return string or none.

PitchRange.pitch_range_name_markup[source]

New in version 2.7.

Read-only markup of pitch range name:

abjad> from abjad.tools.markuptools import Markup
abjad> pitch_range = pitchtools.PitchRange(-12, 36, pitch_range_name_markup=Markup('four-octave range'))
abjad> pitch_range.pitch_range_name_markup
Markup('four-octave range')

Default to pitch_range_name when pitch_range_name_markup not set explicitly.

Return markup or none.

PitchRange.start_pitch[source]

Read-only start pitch of range:

abjad> pitch_range = pitchtools.PitchRange(-12, 36)
abjad> pitch_range.start_pitch
NamedChromaticPitch('c')

Return pitch.

PitchRange.start_pitch_is_included_in_range[source]

Read-only boolean true when start pitch is included in range. Otherwise false:

abjad> pitch_range = pitchtools.PitchRange(-12, 36)
abjad> pitch_range.start_pitch_is_included_in_range
True

Return boolean.

PitchRange.stop_pitch[source]

Read-only stop pitch of range:

abjad> pitch_range = pitchtools.PitchRange(-12, 36)
abjad> pitch_range.stop_pitch
NamedChromaticPitch("c''''")

Return pitch.

PitchRange.stop_pitch_is_included_in_range[source]

Read-only boolean true when stop pitch is included in range. Otherwise false:

abjad> pitch_range = pitchtools.PitchRange(-12, 36)
abjad> pitch_range.stop_pitch_is_included_in_range
True

Return boolean.

Special Methods

PitchRange.__contains__(arg)[source]
PitchRange.__delattr__()

x.__delattr__(‘name’) <==> del x.name

Note

Inherited from __builtin__.object

PitchRange.__eq__(arg)[source]
PitchRange.__ge__(arg)[source]
PitchRange.__gt__(arg)[source]
PitchRange.__hash__() <==> hash(x)

Note

Inherited from __builtin__.object

PitchRange.__le__(arg)[source]
PitchRange.__lt__(arg)[source]
PitchRange.__ne__(arg)[source]
PitchRange.__repr__()

Interpreter representation of Abjad object defaulting to class name, mandatory arguments, keyword arguments.

Return string.

Note

Inherited from abctools.AbjadObject

PitchRange.__setattr__()

x.__setattr__(‘name’, value) <==> x.name = value

Note

Inherited from __builtin__.object

PitchRange.__str__() <==> str(x)

Note

Inherited from __builtin__.object

Table Of Contents

This Page