def __init__( self, instrument_name='viola', short_instrument_name='va.', instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=('alto', 'treble'), default_tuning=('C3', 'G3', 'D4', 'A4'), pitch_range='[C3, D6]', sounding_pitch_of_written_middle_c=None, ): Instrument.__init__( self, instrument_name=instrument_name, short_instrument_name=short_instrument_name, instrument_name_markup=instrument_name_markup, short_instrument_name_markup=short_instrument_name_markup, allowable_clefs=allowable_clefs, pitch_range=pitch_range, sounding_pitch_of_written_middle_c=\ sounding_pitch_of_written_middle_c, ) self._performer_names.extend([ 'string player', 'violist', ]) self._is_primary_instrument = True self._starting_clefs = indicatortools.ClefInventory(['alto']) self._default_tuning = indicatortools.Tuning(default_tuning)
def __init__( self, instrument_name='horn', short_instrument_name='hn.', instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=('bass', 'treble'), pitch_range='[B1, F5]', sounding_pitch_of_written_middle_c='F3', ): Instrument.__init__( self, instrument_name=instrument_name, short_instrument_name=short_instrument_name, instrument_name_markup=instrument_name_markup, short_instrument_name_markup=short_instrument_name_markup, allowable_clefs=allowable_clefs, pitch_range=pitch_range, sounding_pitch_of_written_middle_c=\ sounding_pitch_of_written_middle_c, ) self._performer_names.extend([ 'wind player', 'brass player', 'hornist', ]) self._is_primary_instrument = True self._starting_clefs = indicatortools.ClefInventory(['bass'])
def __init__( self, instrument_name='bassoon', short_instrument_name='bsn.', instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=('bass', 'tenor'), pitch_range='[Bb1, Eb5]', sounding_pitch_of_written_middle_c=None, ): Instrument.__init__( self, instrument_name=instrument_name, short_instrument_name=short_instrument_name, instrument_name_markup=instrument_name_markup, short_instrument_name_markup=short_instrument_name_markup, allowable_clefs=allowable_clefs, pitch_range=pitch_range, sounding_pitch_of_written_middle_c=\ sounding_pitch_of_written_middle_c, ) self._performer_names.extend([ 'wind player', 'reed player', 'double reed player', 'bassoonist', ]) self._starting_clefs = indicatortools.ClefInventory(['bass']) self._is_primary_instrument = True
def __init__( self, instrument_name='cello', short_instrument_name='vc.', instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=('bass', 'tenor', 'treble'), default_tuning=('C2', 'G2', 'D3', 'A3'), pitch_range='[C2, G5]', sounding_pitch_of_written_middle_c=None, ): Instrument.__init__( self, instrument_name=instrument_name, short_instrument_name=short_instrument_name, instrument_name_markup=instrument_name_markup, short_instrument_name_markup=short_instrument_name_markup, allowable_clefs=allowable_clefs, pitch_range=pitch_range, sounding_pitch_of_written_middle_c=\ sounding_pitch_of_written_middle_c, ) self._performer_names.extend([ 'string player', 'cellist', ]) self._starting_clefs = indicatortools.ClefInventory(['bass']) self._is_primary_instrument = True self._default_tuning = indicatortools.Tuning(default_tuning)
def __init__( self, instrument_name='alto flute', short_instrument_name='alt. fl.', instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=None, pitch_range='[G3, G6]', sounding_pitch_of_written_middle_c='G3', ): Instrument.__init__( self, instrument_name=instrument_name, short_instrument_name=short_instrument_name, instrument_name_markup=instrument_name_markup, short_instrument_name_markup=short_instrument_name_markup, allowable_clefs=allowable_clefs, pitch_range=pitch_range, sounding_pitch_of_written_middle_c=\ sounding_pitch_of_written_middle_c, ) self._performer_names.extend([ 'wind player', 'flautist', 'flutist', ]) self._starting_clefs = indicatortools.ClefInventory(['treble'])
def __init__( self, instrument_name='bass clarinet', short_instrument_name='bass cl.', instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=('treble', 'bass'), pitch_range='[Bb1, G5]', sounding_pitch_of_written_middle_c='Bb2', ): Instrument.__init__( self, instrument_name=instrument_name, short_instrument_name=short_instrument_name, instrument_name_markup=instrument_name_markup, short_instrument_name_markup=short_instrument_name_markup, allowable_clefs=allowable_clefs, pitch_range=pitch_range, sounding_pitch_of_written_middle_c=\ sounding_pitch_of_written_middle_c, ) self._performer_names.extend([ 'wind player', 'reed player', 'single reed player', 'clarinettist', 'clarinetist', ]) self._starting_clefs = indicatortools.ClefInventory(['treble'])
def __init__( self, instrument_name='alto trombone', short_instrument_name='alt. trb.', instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=('bass', 'tenor'), pitch_range='[A2, Bb5]', sounding_pitch_of_written_middle_c=None, ): Instrument.__init__( self, instrument_name=instrument_name, short_instrument_name=short_instrument_name, instrument_name_markup=instrument_name_markup, short_instrument_name_markup=short_instrument_name_markup, allowable_clefs=allowable_clefs, pitch_range=pitch_range, sounding_pitch_of_written_middle_c=\ sounding_pitch_of_written_middle_c, ) self._performer_names.extend([ 'brass player', 'trombonist', ]) self._starting_clefs = indicatortools.ClefInventory(['bass'])
def allowable_clefs(self): r'''Gets allowable clefs of instrument. Returns clef inventory. ''' if self._allowable_clefs is None: self._allowable_clefs = indicatortools.ClefInventory('treble') return self._allowable_clefs
def __init__( self, instrument_name=None, short_instrument_name=None, instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=None, pitch_range=None, sounding_pitch_of_written_middle_c=None, ): from abjad.tools import scoretools self._do_not_format = False if instrument_name is not None: assert isinstance(instrument_name, str), repr(instrument_name) self._instrument_name = instrument_name prototype = markuptools.Markup if instrument_name_markup is not None: assert isinstance(instrument_name_markup, prototype) self._instrument_name_markup = instrument_name_markup if short_instrument_name is not None: assert isinstance(short_instrument_name, str) self._short_instrument_name = short_instrument_name if short_instrument_name_markup is not None: assert isinstance(short_instrument_name_markup, prototype) self._short_instrument_name_markup = short_instrument_name_markup allowable_clefs = allowable_clefs or ['treble'] allowable_clefs = indicatortools.ClefInventory(allowable_clefs) self._allowable_clefs = allowable_clefs if isinstance(pitch_range, str): pitch_range = pitchtools.PitchRange(pitch_range) elif isinstance(pitch_range, pitchtools.PitchRange): pitch_range = copy.copy(pitch_range) elif pitch_range is None: pitch_range = pitchtools.PitchRange() else: raise TypeError(pitch_range) self._pitch_range = pitch_range sounding_pitch_of_written_middle_c = \ sounding_pitch_of_written_middle_c or pitchtools.NamedPitch("c'") sounding_pitch_of_written_middle_c = \ pitchtools.NamedPitch(sounding_pitch_of_written_middle_c) self._sounding_pitch_of_written_middle_c = \ sounding_pitch_of_written_middle_c self._default_scope = scoretools.Staff self._is_primary_instrument = False self._performer_names = ['instrumentalist'] self._starting_clefs = copy.copy(allowable_clefs)