-
Notifications
You must be signed in to change notification settings - Fork 434
Closed
Description
Starting a thread to stash some ideas for documenting better the expected (tested) nested stream hierachy of (Opus) - Score - Part - Measure - (Voice)
Here's a warning we could emit on show or write:
index c43979d30..12c9855d1 100644
--- a/music21/base.py
+++ b/music21/base.py
@@ -2575,6 +2575,9 @@ class Music21Object(prebase.ProtoM21Object):
scClass = common.findSubConverterForFormat(regularizedConverterFormat)
formatWriter = scClass()
+ if self.isStream and not self.isWellFormedNotation():
+ environLocal.warn('''Your operations on this stream have left it malformed.
+Try running makeNotation(), or see docs for stream.isWellFormedNotation()''')
return formatWriter.write(self,
regularizedConverterFormat,
fp=fp,
@@ -2642,6 +2645,9 @@ class Music21Object(prebase.ProtoM21Object):
scClass = common.findSubConverterForFormat(regularizedConverterFormat)
formatWriter = scClass()
+ if self.isStream and not self.isWellFormedNotation():
+ environLocal.warn('''Your operations on this stream have left it malformed.
+Try running makeNotation(), or see docs for stream.isWellFormedNotation()''')
return formatWriter.show(self,
regularizedConverterFormat,
app=app,Somewhere in the user's guide wouldn't be a bad idea, either. Maybe a couple more examples in the doctests for stream.isWellFormedNotation.
This comes up constantly on the list, as you know.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels