Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update layout docs #1554

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions music21/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
just described, or to get the exact position on a page (or a graphical representation
of a page) for a particular measure or system. (Individual notes coming soon). Normal
Score streams can be changed into LayoutStreams by calling `divideByPages(s)` on them.
A Score that was organized: Score->Parts->Measures would then become:
LayoutScore->Pages->Systems->Parts->Measures.
A Score that was organized: Score->Part->Measure would then become:
LayoutScore->Page->System->Staff->Measure.

The new LayoutScore has methods that enable querying what page or system a measure is in, and
specifically where on a page a measure is (or the dimensions
Expand Down
6 changes: 0 additions & 6 deletions music21/tinyNotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ class TimeSignatureToken(Token):
'''
Represents a single time signature, like 1/4
'''

def parse(self, parent):
tsObj = meter.TimeSignature(self.token)
parent.stateDict['currentTimeSignature'] = tsObj
Expand All @@ -481,15 +480,12 @@ class NoteOrRestToken(Token):
'''
represents a Note or Rest. Chords are represented by Note objects
'''

def __init__(self, token=''):
super().__init__(token)
self.durationMap = [
(r'(\d+)', 'durationType'),
(r'(\.+)', 'dots'),
] # tie will be dealt with later.


self.durationFound = False

def applyDuration(self, n, t, parent):
Expand Down Expand Up @@ -549,7 +545,6 @@ class RestToken(NoteOrRestToken):
'''
A token starting with 'r', representing a rest.
'''

def parse(self, parent=None):
r = note.Rest()
self.applyDuration(r, self.token, parent)
Expand Down Expand Up @@ -577,7 +572,6 @@ class NoteToken(NoteOrRestToken):
<music21.note.Note B->
>>> n.nameWithOctave
'B-6'

'''
pitchMap = collections.OrderedDict([
('lowOctave', r'([A-G]+)'),
Expand Down