Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 6 additions & 24 deletions music21/clef.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'''
from __future__ import annotations

from collections.abc import Iterable, Sequence
from collections.abc import Sequence
import typing as t
import unittest

Expand Down Expand Up @@ -390,15 +390,14 @@ class TabClef(PitchClef):
>>> a.sign
'TAB'
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.sign = 'TAB'
self.line = 5

def getStemDirectionForPitches(
self,
pitchList: pitch.Pitch|Iterable[pitch.Pitch],
pitches: pitch.Pitch|Sequence[pitch.Pitch],
*,
firstLastOnly: bool = True,
extremePitchOnly: bool = False,
Expand All @@ -424,7 +423,6 @@ class GClef(PitchClef):
>>> a.lowestLine
31
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.sign = 'G'
Expand All @@ -442,7 +440,6 @@ class FrenchViolinClef(GClef):
>>> a.line
1
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 1
Expand All @@ -463,7 +460,6 @@ class TrebleClef(GClef):
>>> note.Note('E4').pitch.diatonicNoteNum
31
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 2
Expand All @@ -482,12 +478,11 @@ class Treble8vbClef(GClef):
* Changed in v11: no longer a subclass of :class:`~music21.clef.TrebleClef`.
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 2
self.lowestLine = (7 * 4) + 3
self.octaveChange = -1
self.lowestLine = (7 * 3) + 3


class Treble8vaClef(GClef):
Expand All @@ -502,12 +497,11 @@ class Treble8vaClef(GClef):
* Changed in v11: no longer a subclass of :class:`~music21.clef.TrebleClef`.
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 2
self.lowestLine = (7 * 4) + 3
self.octaveChange = 1
self.lowestLine = (7 * 5) + 3


class GSopranoClef(GClef):
Expand All @@ -521,7 +515,6 @@ class GSopranoClef(GClef):
>>> a.line
3
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 3
Expand All @@ -538,7 +531,6 @@ class CClef(PitchClef):
>>> a.sign
'C'
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.sign = 'C'
Expand All @@ -555,7 +547,6 @@ class SopranoClef(CClef):
>>> a.line
1
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 1
Expand All @@ -573,7 +564,6 @@ class MezzoSopranoClef(CClef):
>>> a.line
2
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 2
Expand All @@ -590,7 +580,6 @@ class AltoClef(CClef):
>>> a.line
3
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 3
Expand All @@ -608,7 +597,6 @@ class TenorClef(CClef):
>>> a.line
4
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 4
Expand All @@ -625,7 +613,6 @@ class CBaritoneClef(CClef):
>>> a.line
5
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 5
Expand All @@ -641,7 +628,6 @@ class FClef(PitchClef):
>>> a.sign
'F'
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.sign = 'F'
Expand Down Expand Up @@ -677,7 +663,6 @@ class BassClef(FClef):
>>> a.sign
'F'
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 4
Expand All @@ -694,12 +679,11 @@ class Bass8vbClef(FClef):
>>> a.octaveChange
-1
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 4
self.lowestLine = (7 * 2) + 5
self.octaveChange = -1
self.lowestLine = (7 * 1) + 5


class Bass8vaClef(FClef):
Expand All @@ -710,12 +694,11 @@ class Bass8vaClef(FClef):
>>> a.sign
'F'
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 4
self.lowestLine = (7 * 2) + 5
self.octaveChange = 1
self.lowestLine = (7 * 3) + 5


class SubBassClef(FClef):
Expand All @@ -726,7 +709,6 @@ class SubBassClef(FClef):
>>> a.sign
'F'
'''

def __init__(self, **keywords):
super().__init__(**keywords)
self.line = 5
Expand Down
Loading