def note_head(self, arg): from abjad.tools.scoretools.NoteHead import NoteHead if isinstance(arg, type(None)): self._note_head = None elif isinstance(arg, NoteHead): self._note_head = arg else: note_head = NoteHead(client=self, written_pitch=arg) self._note_head = note_head
def written_pitch(self, arg): from abjad.tools import pitchtools from abjad.tools.scoretools.NoteHead import NoteHead if arg is None: if self.note_head is not None: self.note_head.written_pitch = None else: if self.note_head is None: self.note_head = NoteHead(self, written_pitch=None) else: pitch = pitchtools.NamedPitch(arg) self.note_head.written_pitch = pitch
def __init__( self, written_pitch='snare', client=None, is_cautionary=None, is_forced=None, is_parenthesized=None, tweak_pairs=(), ): from abjad.ly import drums NoteHead.__init__( self, written_pitch=None, client=client, is_cautionary=is_cautionary, is_forced=is_forced, is_parenthesized=is_parenthesized, tweak_pairs=tweak_pairs, ) assert str(written_pitch) in drums drum_pitch = drums[str(written_pitch)] self._written_pitch = drum_pitch