Repository: cuthbertLab/music21
Pull request #979 (2021-04-22 02:41:23)

Remove SpacerRests, normal rests with hideObjectOnPrint
After doing this, however, maybe spacer rests ARE different from just hidden rests?  Now after wanting to remove them for years, I'm conflicted.  @jacobtylerwalls -- want to weigh in?


Patch:
diff --git a/music21/_version.py b/music21/_version.py
index 420e32879..333fa7463 100644
--- a/music21/_version.py
+++ b/music21/_version.py
@@ -42,7 +42,7 @@ When changing, update the single test case in base.py.
 Changing this number invalidates old pickles -- do it if the old pickles create a problem.
 '''
 
-__version_info__ = (7, 0, 4)  # can be 4-tuple: (7, 0, 5, 'a2')
+__version_info__ = (7, 0, 5)  # can be 4-tuple: (7, 0, 5, 'a2')
 
 v = '.'.join(str(x) for x in __version_info__[0:3])
 if len(__version_info__) > 3 and __version_info__[3]:
diff --git a/music21/analysis/reduction.py b/music21/analysis/reduction.py
index f4ac14192..96c44cca0 100644
--- a/music21/analysis/reduction.py
+++ b/music21/analysis/reduction.py
@@ -916,11 +916,11 @@ class Test(unittest.TestCase):
         match = [(repr(e), e.offset, e.duration.quarterLength) for e in flat_stream.notesAndRests]
         self.maxDiff = None
         self.assertEqual(match,
-                         [('<music21.note.Rest rest>', 0.0, 1.0),
+                         [('<music21.note.Rest quarter>', 0.0, 1.0),
                           ('<music21.note.Note F#>', 1.0, 1.0),
-                          ('<music21.note.Rest rest>', 2.0, 1.0),
+                          ('<music21.note.Rest quarter>', 2.0, 1.0),
                           ('<music21.note.Note C#>', 3.0, 1.0),
-                          ('<music21.note.Rest rest>', 4.0, 1.0),
+                          ('<music21.note.Rest quarter>', 4.0, 1.0),
                           ('<music21.note.Note G#>', 5.0, 1.0)])
 
         # test that lyric is found
@@ -1320,4 +1320,3 @@ _DOC_ORDER = []
 if __name__ == '__main__':
     import music21
     music21.mainTest(Test)  # , runTest='testPartReductionSchoenberg')
-
diff --git a/music21/audioSearch/__init__.py b/music21/audioSearch/__init__.py
index 6bf5ddbe2..1cc74a8c3 100644
--- a/music21/audioSearch/__init__.py
+++ b/music21/audioSearch/__init__.py
@@ -668,7 +668,7 @@ def joinConsecutiveIdenticalPitches(detectedPitchObjects):
     >>> len(notesList)
     24
     >>> print(notesList)
-    [<music21.note.Rest rest>, <music21.note.Note C>, <music21.note.Note C>,
+    [<music21.note.Rest quarter>, <music21.note.Note C>, <music21.note.Note C>,
      <music21.note.Note D>, <music21.note.Note E>, <music21.note.Note F>,
      <music21.note.Note G>, <music21.note.Note A>, <music21.note.Note B>,
      <music21.note.Note C>, ...]
@@ -836,7 +836,7 @@ def notesAndDurationsToStream(
         {2.0} <music21.note.Note B>
         {2.5} <music21.note.Note F#>
         {4.0} <music21.note.Note C>
-        {4.25} <music21.note.Rest rest>
+        {4.25} <music21.note.Rest quarter>
     '''
     # rounding lengths
     p2 = stream.Part()
diff --git a/music21/base.py b/music21/base.py
index 7e59f8f62..262e04b42 100644
--- a/music21/base.py
+++ b/music21/base.py
@@ -28,7 +28,7 @@ available after importing `music21`.
 <class 'music21.base.Music21Object'>
 
 >>> music21.VERSION_STR
-'7.0.4'
+'7.0.5'
 
 Alternatively, after doing a complete import, these classes are available
 under the module "base":
diff --git a/music21/braille/segment.py b/music21/braille/segment.py
index 8107c82ae..424adf6a3 100644
--- a/music21/braille/segment.py
+++ b/music21/braille/segment.py
@@ -196,11 +196,11 @@ class BrailleElementGrouping(ProtoM21Object):
         >>> bg.append(note.Note('F4'))
         >>> bg
         <music21.braille.segment.BrailleElementGrouping [<music21.note.Note C>,
-            <music21.note.Note D>, <music21.note.Rest rest>, <music21.note.Note F>]>
+            <music21.note.Note D>, <music21.note.Rest quarter>, <music21.note.Note F>]>
         >>> print(bg)
         <music21.note.Note C>
         <music21.note.Note D>
-        <music21.note.Rest rest>
+        <music21.note.Rest quarter>
         <music21.note.Note F>
 
         These are the defaults and they are shared across all objects...
@@ -1504,9 +1504,9 @@ def findSegments(music21Part, **partKeywords):
     ===
     Measure 15, Note Grouping 1:
     <music21.note.Note C>
-    <music21.note.Rest rest>
+    <music21.note.Rest quarter>
     <music21.note.Note F>
-    <music21.note.Rest rest>
+    <music21.note.Rest quarter>
     ===
     Measure 16, Note Grouping 1:
     <music21.note.Note A->
@@ -2233,7 +2233,7 @@ def splitNoteGrouping(noteGrouping, beatDivisionOffset=0):
 
     >>> right
     <music21.braille.segment.BrailleElementGrouping
-        [<music21.note.Rest rest>, <music21.note.Note E>]>
+        [<music21.note.Rest quarter>, <music21.note.Note E>]>
 
 
     Now split one beat division earlier than it should be.  For 2/2 that means
@@ -2245,7 +2245,7 @@ def splitNoteGrouping(noteGrouping, beatDivisionOffset=0):
         [<music21.note.Note C>]>
     >>> right
     <music21.braille.segment.BrailleElementGrouping
-        [<music21.note.Note D>, <music21.note.Rest rest>, <music21.note.Note E>]>
+        [<music21.note.Note D>, <music21.note.Rest quarter>, <music21.note.Note E>]>
     '''
     music21Measure = stream.Measure()
     for brailleElement in noteGrouping:
diff --git a/music21/capella/fromCapellaXML.py b/music21/capella/fromCapellaXML.py
index 2dab05992..ac70cfe52 100644
--- a/music21/capella/fromCapellaXML.py
+++ b/music21/capella/fromCapellaXML.py
@@ -414,7 +414,7 @@ class CapellaImporter:
         >>> restElement = ci.domElementFromText('<rest><duration base="1/2"/></rest>')
         >>> r = ci.restFromRest(restElement)
         >>> r
-        <music21.note.Rest rest>
+        <music21.note.Rest half>
         >>> r.duration.type
         'half'
         '''
diff --git a/music21/converter/subConverters.py b/music21/converter/subConverters.py
index d5d719c2b..b498c57ff 100644
--- a/music21/converter/subConverters.py
+++ b/music21/converter/subConverters.py
@@ -658,13 +658,13 @@ class ConverterHumdrum(SubConverter):
             {0.0} <music21.humdrum.spineParser.MiscTandem **kern>
             {0.0} <music21.stream.Measure 1 offset=0.0>
                 {0.0} <music21.meter.TimeSignature 2/4>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest 1/6ql>
                 {0.1667} <music21.note.Note G#>
                 {0.3333} <music21.note.Note F#>
                 {0.5} <music21.note.Note E>
                 {0.6667} <music21.note.Note C#>
                 {0.8333} <music21.note.Note F>
-                {1.0} <music21.note.Rest rest>
+                {1.0} <music21.note.Rest 1/6ql>
                 {1.1667} <music21.note.Note D>
                 {1.3333} <music21.note.Note E->
                 {1.5} <music21.note.Note G>
@@ -727,7 +727,7 @@ class ConverterTinyNotation(SubConverter):
             {0.0} <music21.clef.TrebleClef>
             {0.0} <music21.meter.TimeSignature 3/4>
             {0.0} <music21.note.Note E>
-            {1.0} <music21.note.Rest rest>
+            {1.0} <music21.note.Rest quarter>
             {2.0} <music21.note.Note F#>
         {3.0} <music21.stream.Measure 2 offset=3.0>
             {0.0} <music21.note.Note G>
diff --git a/music21/duration.py b/music21/duration.py
index 4098abe55..00920f9ec 100644
--- a/music21/duration.py
+++ b/music21/duration.py
@@ -2172,7 +2172,7 @@ class Duration(prebase.ProtoM21Object, SlottedObjectMixin):
 
         >>> gd = d.getGraceDuration()
         >>> gd
-        <music21.duration.GraceDuration unlinked type:zero quarterLength:0.0>
+        <music21.duration.GraceDuration unlinked type:complex quarterLength:0.0>
         >>> gd.quarterLength
         0.0
         >>> gd.components
@@ -2198,6 +2198,7 @@ class Duration(prebase.ProtoM21Object, SlottedObjectMixin):
             newComponents.append(DurationTuple(c.type, c.dots, 0.0))
         gd.components = newComponents  # set new components
         gd.linked = False
+        gd.type = self.type
         gd.quarterLength = 0.0
         return gd
 
diff --git a/music21/features/jSymbolic.py b/music21/features/jSymbolic.py
index cdd885220..8997c2a1f 100644
--- a/music21/features/jSymbolic.py
+++ b/music21/features/jSymbolic.py
@@ -24,6 +24,7 @@ from math import isclose
 from music21 import base
 from music21 import exceptions21
 from music21.features import base as featuresModule
+from music21.instrument import Instrument
 
 from music21 import environment
 _MOD = 'features.jSymbolic'
@@ -3322,6 +3323,20 @@ class PitchedInstrumentsPresentFeature(featuresModule.FeatureExtractor):
      1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
+
+    Default instruments will lack a `.midiProgram`, so they raise exceptions:
+
+    >>> i = instrument.Instrument()
+    >>> i.midiProgram is None
+    True
+    >>> s2 = stream.Stream()
+    >>> s2.append(i)
+    >>> s2.append(note.Note())
+    >>> fe2 = features.jSymbolic.PitchedInstrumentsPresentFeature(s2)
+    >>> fe2.extract()
+    Traceback (most recent call last):
+    music21.features.jSymbolic.JSymbolicFeatureException:
+    <music21.instrument.Instrument ''> lacks a midiProgram
     '''
     id = 'I1'
 
@@ -3342,18 +3357,16 @@ class PitchedInstrumentsPresentFeature(featuresModule.FeatureExtractor):
         s = self.data['partitionByInstrument']
         # each part has content for each instrument
         # count = 0
-        if s is not None:
-            for p in s.parts:
-                # always one instrument
-                x = p.getElementsByClass('Instrument')
-                if x:
-                    i = x[0]
-                    if p.recurse().notes:
-                        self.feature.vector[i.midiProgram] = 1
-                else:
-                    pass
-        else:
+        if not s:
             raise JSymbolicFeatureException('input lacks instruments')
+        for p in s.parts:
+            # always one instrument
+            i = p.getElementsByClass(Instrument).first()
+            if p.recurse().notes:
+                if i.midiProgram is None:
+                    iStr = str(i) or repr(i)
+                    raise JSymbolicFeatureException(f'{iStr} lacks a midiProgram')
+                self.feature.vector[i.midiProgram] = 1
 
 
 class UnpitchedInstrumentsPresentFeature(featuresModule.FeatureExtractor):
@@ -3408,6 +3421,13 @@ class NotePrevalenceOfPitchedInstrumentsFeature(
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
 
+    `.midiProgram` cannot be None:
+
+    >>> s1.getInstruments().first().midiProgram = None
+    >>> fe2 = features.jSymbolic.NotePrevalenceOfPitchedInstrumentsFeature(s1)
+    >>> fe2.extract()
+    Traceback (most recent call last):
+    music21.features.jSymbolic.JSymbolicFeatureException: Acoustic Guitar lacks a midiProgram
     '''
     id = 'I3'
 
@@ -3434,9 +3454,12 @@ class NotePrevalenceOfPitchedInstrumentsFeature(
             raise JSymbolicFeatureException('input lacks notes')
         for p in s.parts:
             # always one instrument
-            i = p.getElementsByClass('Instrument').first()
+            i = p.getElementsByClass(Instrument).first()
             pNotes = p.recurse().notes
             if pNotes:
+                if i.midiProgram is None:
+                    iStr = str(i) or repr(i)
+                    raise JSymbolicFeatureException(f'{iStr} lacks a midiProgram')
                 self.feature.vector[i.midiProgram] = len(pNotes) / total
 
 
@@ -3539,7 +3562,7 @@ class VariabilityOfNotePrevalenceOfPitchedInstrumentsFeature(
         coll = []
         for p in s.parts:
             # always one instrument
-            i = p.getElementsByClass('Instrument').first()
+            i = p.getElementsByClass(Instrument).first()
             pNotes = p.recurse().notes
             if pNotes:
                 coll.append(len(pNotes) / total)
@@ -3689,7 +3712,7 @@ class InstrumentFractionFeature(featuresModule.FeatureExtractor):
         if not total:
             raise JSymbolicFeatureException('input lacks notes')
         for p in s.parts:
-            i = p.getElementsByClass('Instrument').first()
+            i = p.getElementsByClass(Instrument).first()
             if i.midiProgram in self._targetPrograms:
                 count += len(p.flat.notes)
         self.feature.vector[0] = count / total
diff --git a/music21/instrument.py b/music21/instrument.py
index b623867f9..dd0e3b22f 100644
--- a/music21/instrument.py
+++ b/music21/instrument.py
@@ -2123,11 +2123,11 @@ def partitionByInstrument(streamObj):
             {0.0} <music21.meter.TimeSignature 4/4>
             {0.0} <music21.note.Note C>
             {1.0} <music21.note.Note D>
-            {2.0} <music21.note.Rest rest>
+            {2.0} <music21.note.Rest quarter>
             {3.0} <music21.note.Note F#>
         {4.0} <music21.stream.Measure 2 offset=4.0>
             {0.0} <music21.note.Note G#>
-            {1.0} <music21.note.Rest rest>
+            {1.0} <music21.note.Rest half>
             {3.0} <music21.note.Note C>
         {8.0} <music21.stream.Measure 3 offset=8.0>
             {0.0} <music21.note.Note C>
@@ -2137,7 +2137,7 @@ def partitionByInstrument(streamObj):
             {0.0} <music21.instrument.AltoSaxophone 'Alto Saxophone'>
             {0.0} <music21.clef.TrebleClef>
             {0.0} <music21.meter.TimeSignature 4/4>
-            {0.0} <music21.note.Rest rest>
+            {0.0} <music21.note.Rest half>
             {2.0} <music21.note.Note E>
             {3.0} <music21.note.Note F>
         {4.0} <music21.stream.Measure 2 offset=4.0>
@@ -2153,9 +2153,9 @@ def partitionByInstrument(streamObj):
             {0.0} <music21.note.Note C#>
             {1.0} <music21.note.Note D#>
             {2.0} <music21.note.Note E#>
-            {3.0} <music21.note.Rest rest>
+            {3.0} <music21.note.Rest quarter>
         {4.0} <music21.stream.Measure 2 offset=4.0>
-            {0.0} <music21.note.Rest rest>
+            {0.0} <music21.note.Rest quarter>
             {1.0} <music21.note.Note A#>
             {2.0} <music21.note.Note B#>
             {3.0} <music21.note.Note C#>
@@ -2165,6 +2165,7 @@ def partitionByInstrument(streamObj):
 
     TODO: parts should be in Score Order. Coincidence that this almost works.
     TODO: use proper recursion to make a copy of the stream.
+    TODO: final barlines should be aligned.
     '''
     from music21 import stream
 
diff --git a/music21/lily/translate.py b/music21/lily/translate.py
index a7e4744c9..b39fed8bc 100644
--- a/music21/lily/translate.py
+++ b/music21/lily/translate.py
@@ -1291,9 +1291,6 @@ class LilypondConverter:
                         simpleElementParts.append('? ')
             else:
                 simpleElementParts.append('s ')
-
-        elif 'SpacerRest' in c:
-            simpleElementParts.append('s ')
         elif 'Rest' in c:
             if noteOrRest.hasStyleInformation and noteOrRest.style.hideObjectOnPrint:
                 simpleElementParts.append('s ')
@@ -1868,7 +1865,8 @@ class LilypondConverter:
         >>> v1.replacementDuration = 4.0
 
         >>> v2 = variant.Variant()
-        >>> sp2 = note.SpacerRest()
+        >>> sp2 = note.Rest()
+        >>> sp2.style.hideObjectOnPrint = True
         >>> sp2.duration.quarterLength = 4.0
         >>> v2.replacementDuration = 4.0
         >>> v2.append(sp2)
@@ -1876,7 +1874,8 @@ class LilypondConverter:
         ...     v2.append(el)
 
         >>> v3 = variant.Variant()
-        >>> sp3 = note.SpacerRest()
+        >>> sp3 = note.Rest()
+        >>> sp3.style.hideObjectOnPrint = True
         >>> sp3.duration.quarterLength = 8.0
         >>> v3.replacementDuration = 4.0
         >>> v3.append(sp3)
@@ -1884,7 +1883,8 @@ class LilypondConverter:
         ...     v3.append(el)
 
         >>> v4 = variant.Variant()
-        >>> sp4 = note.SpacerRest()
+        >>> sp4 = note.Rest()
+        >>> sp4.style.hideObjectOnPrint = True
         >>> sp4.duration.quarterLength = 16.0
         >>> v4.replacementDuration = 4.0
         >>> v4.append(sp4)
@@ -1947,7 +1947,7 @@ class LilypondConverter:
 
         def findOffsetOfFirstNonSpacerElement(inputStream):
             for el in inputStream:
-                if 'SpacerRest' in el.classes:
+                if 'Rest' in el.classes and el.style.hideObjectOnPrint:
                     pass
                 else:
                     return inputStream.elementOffset(el)
@@ -2004,7 +2004,8 @@ class LilypondConverter:
 
             # make spacer with spacerDuration and append
             if spacerDuration > 0.0:
-                spacer = note.SpacerRest()
+                spacer = note.Rest()
+                spacer.style.hideObjectOnPrint = True
                 spacer.duration.quarterLength = spacerDuration
                 # noinspection PyTypeChecker
                 lySpacer = self.lySimpleMusicFromNoteOrRest(spacer)
@@ -2133,7 +2134,9 @@ class LilypondConverter:
 
         musicList = []
 
-        varFilter = variantObject.getElementsByClass('SpacerRest')
+        varFilter = [r for r in variantObject.getElementsByClass('Rest')
+                     if r.style.hideObjectOnPrint]
+
         if varFilter:
             spacer = varFilter[0]
             spacerDur = spacer.duration.quarterLength
diff --git a/music21/mei/base.py b/music21/mei/base.py
index eb0a0561c..33a86629c 100644
--- a/music21/mei/base.py
+++ b/music21/mei/base.py
@@ -2330,13 +2330,16 @@ def spaceFromElement(elem, slurBundle=None):  # pylint: disable=unused-argument
     <space>  A placeholder used to fill an incomplete measure, layer, etc. most often so that the
     combined duration of the events equals the number of beats in the measure.
 
+    Returns a Rest element with hideObjectOnPrint = True
+
     In MEI 2013: pg.440 (455 in PDF) (MEI.shared module)
     '''
     # NOTE: keep this in sync with restFromElement()
 
     theDuration = _qlDurationFromAttr(elem.get('dur'))
     theDuration = makeDuration(theDuration, int(elem.get('dots', 0)))
-    theSpace = note.SpacerRest(duration=theDuration)
+    theSpace = note.Rest(duration=theDuration)
+    theSpace.style.hideObjectOnPrint = True
 
     if elem.get(_XMLID) is not None:
         theSpace.id = elem.get(_XMLID)
diff --git a/music21/midi/translate.py b/music21/midi/translate.py
index 92b403ab5..8d65a27c2 100644
--- a/music21/midi/translate.py
+++ b/music21/midi/translate.py
@@ -1796,22 +1796,22 @@ def midiTrackToStream(
         {0.0} <music21.clef.TrebleClef>
         {0.0} <music21.meter.TimeSignature 4/4>
         {0.0} <music21.note.Note C>
-        {1.0} <music21.note.Rest rest>
+        {1.0} <music21.note.Rest quarter>
         {2.0} <music21.chord.Chord F3 G#4 C5>
-        {3.0} <music21.note.Rest rest>
+        {3.0} <music21.note.Rest quarter>
     {4.0} <music21.stream.Measure 2 offset=4.0>
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest eighth>
         {0.5} <music21.note.Note B->
-        {1.5} <music21.note.Rest rest>
+        {1.5} <music21.note.Rest half>
         {3.5} <music21.chord.Chord D2 A4>
     {8.0} <music21.stream.Measure 3 offset=8.0>
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest eighth>
         {0.5} <music21.chord.Chord C#2 B-3 G#6>
-        {1.0} <music21.note.Rest rest>
+        {1.0} <music21.note.Rest dotted-quarter>
         {2.5} <music21.chord.Chord F#3 A4 C#5>
     {12.0} <music21.stream.Measure 4 offset=12.0>
         {0.0} <music21.chord.Chord F#3 A4 C#5>
-        {2.5} <music21.note.Rest rest>
+        {2.5} <music21.note.Rest dotted-quarter>
         {4.0} <music21.bar.Barline type=final>
     '''
     # environLocal.printDebug(['midiTrackToStream(): got midi track: events',
@@ -2669,7 +2669,7 @@ def midiStringToStream(strData, **keywords):
             {0.0} <music21.clef.TrebleClef>
             {0.0} <music21.meter.TimeSignature 4/4>
             {0.0} <music21.note.Note G>
-            {1.0} <music21.note.Rest rest>
+            {1.0} <music21.note.Rest dotted-half>
             {4.0} <music21.bar.Barline type=final>
     '''
     from music21 import midi as midiModule
diff --git a/music21/musicxml/m21ToXml.py b/music21/musicxml/m21ToXml.py
index 9fc832cdc..a9683e865 100644
--- a/music21/musicxml/m21ToXml.py
+++ b/music21/musicxml/m21ToXml.py
@@ -68,6 +68,10 @@ def typeToMusicXMLType(value):
     Traceback (most recent call last):
     music21.musicxml.xmlObjects.MusicXMLExportException:
     Cannot convert inexpressible durations to MusicXML.
+    >>> musicxml.m21ToXml.typeToMusicXMLType('zero')
+    Traceback (most recent call last):
+    music21.musicxml.xmlObjects.MusicXMLExportException:
+    Cannot convert durations without types to MusicXML.
     '''
     # MusicXML uses long instead of longa
     if value == 'longa':
@@ -76,6 +80,8 @@ def typeToMusicXMLType(value):
         raise MusicXMLExportException('Cannot convert "2048th" duration to MusicXML (too short).')
     elif value == 'inexpressible':
         raise MusicXMLExportException('Cannot convert inexpressible durations to MusicXML.')
+    elif value == 'zero':
+        raise MusicXMLExportException('Cannot convert durations without types to MusicXML.')
     else:
         return value
 
@@ -3383,27 +3389,13 @@ class MeasureExporter(XMLExporterBase):
             mxVoice = SubElement(mxNote, 'voice')
             mxVoice.text = str(self.currentVoiceId)
 
-        if d.type != 'zero':
-            mxType = Element('type')
-            mxType.text = typeToMusicXMLType(d.type)
-            self.setStyleAttributes(mxType, n, 'size', 'noteSize')
-            mxNote.append(mxType)
-            for unused_dotCounter in range(d.dots):
-                SubElement(mxNote, 'dot')
-                # TODO: dot placement...
-
-        elif d.components:
-            mxType = Element('type')
-            mxType.text = typeToMusicXMLType(d.components[0].type)
-            self.setStyleAttributes(mxType, n, 'size', 'noteSize')
-            if (n.hasStyleInformation
-                    and hasattr(n.style, 'noteSize')
-                    and n.style.noteSize is not None):
-                mxType.set('size', n.style.noteSize)
-
-            mxNote.append(mxType)
-            for unused_dotCounter in range(d.components[0].dots):
-                SubElement(mxNote, 'dot')
+        mxType = Element('type')
+        mxType.text = typeToMusicXMLType(d.type)
+        self.setStyleAttributes(mxType, n, 'size', 'noteSize')
+        mxNote.append(mxType)
+        for unused_dotCounter in range(d.dots):
+            SubElement(mxNote, 'dot')
+            # TODO: dot placement...
 
         if (hasattr(n, 'pitch')
                 and n.pitch.accidental is not None
diff --git a/music21/musicxml/xmlToM21.py b/music21/musicxml/xmlToM21.py
index fda2c5734..fa31f8204 100644
--- a/music21/musicxml/xmlToM21.py
+++ b/music21/musicxml/xmlToM21.py
@@ -1800,7 +1800,7 @@ class PartParser(XMLParserBase):
 
         >>> measureRest = m.notesAndRests[0]
         >>> measureRest
-        <music21.note.Rest rest>
+        <music21.note.Rest dotted-half>
         >>> measureRest.duration.type
         'half'
         >>> measureRest.duration.quarterLength
@@ -3051,7 +3051,7 @@ class MeasureParser(XMLParserBase):
         >>> mxr = EL('<note><rest/><duration>5040</duration><type>eighth</type></note>')
         >>> r = MP.xmlToRest(mxr)
         >>> r
-        <music21.note.Rest rest>
+        <music21.note.Rest eighth>
         >>> r.duration.quarterLength
         0.5
 
@@ -3060,7 +3060,7 @@ class MeasureParser(XMLParserBase):
         ...              '</rest><duration>5040</duration><type>eighth</type></note>')
         >>> r = MP.xmlToRest(mxr)
         >>> r
-        <music21.note.Rest rest>
+        <music21.note.Rest eighth>
 
         A rest normally lies at B4 in treble clef, but here we have put it at
         G4, so we'll shift it down two steps.
@@ -3269,7 +3269,7 @@ class MeasureParser(XMLParserBase):
         >>> gn1 = note.Note(duration=c2)
         >>> gn2 = MP.xmlGraceToGrace(mxGrace, gn1)
         >>> gn2.duration
-        <music21.duration.GraceDuration unlinked type:zero quarterLength:0.0>
+        <music21.duration.GraceDuration unlinked type:eighth quarterLength:0.0>
         '''
         numDots = 0
         tuplets = ()
diff --git a/music21/note.py b/music21/note.py
index edbbc106e..d855458ee 100644
--- a/music21/note.py
+++ b/music21/note.py
@@ -839,9 +839,9 @@ class GeneralNote(base.Music21Object):
         >>> ng.duration.isGrace
         True
         >>> ng.duration
-        <music21.duration.GraceDuration unlinked type:zero quarterLength:0.0>
+        <music21.duration.GraceDuration unlinked type:half quarterLength:0.0>
         >>> ng.duration.type
-        'zero'
+        'half'
         >>> ng.duration.components
         (DurationTuple(type='half', dots=0, quarterLength=0.0),)
 
@@ -850,7 +850,7 @@ class GeneralNote(base.Music21Object):
 
         >>> ng2 = n.getGrace(appoggiatura=True)
         >>> ng2.duration
-        <music21.duration.AppoggiaturaDuration unlinked type:zero quarterLength:0.0>
+        <music21.duration.AppoggiaturaDuration unlinked type:half quarterLength:0.0>
         >>> ng2.duration.slash
         False
 
@@ -860,7 +860,7 @@ class GeneralNote(base.Music21Object):
         >>> r = note.Rest(quarterLength=0.5)
         >>> r.getGrace(inPlace=True)
         >>> r.duration
-        <music21.duration.GraceDuration unlinked type:zero quarterLength:0.0>
+        <music21.duration.GraceDuration unlinked type:eighth quarterLength:0.0>
         '''
         if inPlace is False:
             e = copy.deepcopy(self)
@@ -1733,7 +1733,15 @@ class Rest(GeneralNote):
         self.fullMeasure = 'auto'  # see docs; True, False, 'always',
 
     def _reprInternal(self):
-        return self.name
+        duration_name = self.duration.fullName.lower()
+        if len(duration_name) < 15:  # dotted quarter = 14
+            return duration_name.replace(' ', '-')
+        else:
+            ql = self.duration.quarterLength
+            if ql == int(ql):
+                ql = int(ql)
+            ql_string = str(ql)
+            return f'{ql_string}ql'
 
     def __eq__(self, other):
         '''
@@ -1775,25 +1783,6 @@ class Rest(GeneralNote):
         return self.duration.fullName + ' Rest'
 
 
-class SpacerRest(Rest):
-    '''
-    This is exactly the same as a rest, but it is a SpacerRest.
-    This object should only be used for making hidden space in a score in lilypond.
-
-    DEPRECATED in v.7 -- use a normal rest with .hideObjectOnPrint
-
-    >>> sr = note.SpacerRest(type='whole')
-    >>> sr
-    <music21.note.SpacerRest rest duration=4.0>
-    '''
-
-    def __init__(self, *arguments, **keywords):
-        super().__init__(**keywords)
-
-    def _reprInternal(self):
-        return f'{self.name} duration={self.duration.quarterLength}'
-
-
 # ------------------------------------------------------------------------------
 # test methods and classes
 
@@ -2185,7 +2174,7 @@ class Test(unittest.TestCase):
 
 # ------------------------------------------------------------------------------
 # define presented order in documentation
-_DOC_ORDER = [Note, Rest, SpacerRest, Unpitched, NotRest, GeneralNote, Lyric]
+_DOC_ORDER = [Note, Rest, Unpitched, NotRest, GeneralNote, Lyric]
 
 if __name__ == '__main__':
     # sys.arg test options will be used in mainTest()
diff --git a/music21/noteworthy/translate.py b/music21/noteworthy/translate.py
index b71ca160c..fe0fd0c1b 100644
--- a/music21/noteworthy/translate.py
+++ b/music21/noteworthy/translate.py
@@ -519,8 +519,8 @@ class NoteworthyTranslator:
         >>> nwt.translateRest({'Dur': '4th'})
         >>> measureIn.show('text')
         {0.0} <music21.note.Note C#>
-        {2.0} <music21.note.Rest rest>
-        {2.75} <music21.note.Rest rest>
+        {2.0} <music21.note.Rest dotted-eighth>
+        {2.75} <music21.note.Rest quarter>
 
         '''
         durationInfo = attributes['Dur']
@@ -628,7 +628,7 @@ class NoteworthyTranslator:
         >>> nwt.currentKey.sharps
         4
         >>> measureIn.show('text')
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest dotted-half>
         {3.0} <music21.key.KeySignature of 4 sharps>
         '''
         ke = attributes['Signature']
diff --git a/music21/search/base.py b/music21/search/base.py
index 662b1676e..8310295de 100644
--- a/music21/search/base.py
+++ b/music21/search/base.py
@@ -343,7 +343,7 @@ def rhythmicSearch(thisStreamOrIterator, searchList):
         {2.0} <music21.note.Note F>
     {6.0} <music21.stream.Measure 3 offset=6.0>
         {0.5} <music21.note.Note C>
-        {2.0} <music21.note.Rest rest>
+        {2.0} <music21.note.Rest quarter>
         {3.0} <music21.bar.Barline type=final>
 
     Now we will search for all dotted-quarter/eighth elements in the Stream:
diff --git a/music21/stream/base.py b/music21/stream/base.py
index a69e460b8..78b49341f 100644
--- a/music21/stream/base.py
+++ b/music21/stream/base.py
@@ -157,7 +157,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
     >>> s2.show('text')
     {0.0} <music21.clef.TrebleClef>
     {0.0} <music21.stream.Part embeddedPart>
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest quarter>
     {1.0} <music21.note.Note E->
 
     New in v7 -- providing a single element now works:
@@ -184,7 +184,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
     {0.0} <music21.stream.Measure 1 offset=0.0>
         {1.0} <music21.note.Note E->
     {1.5} <music21.stream.Measure 2 offset=1.5>
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest quarter>
 
     Here, every element is a Stream that's not a Measure, so we instead insert:
 
@@ -193,7 +193,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
     {0.0} <music21.stream.PartStaff 0x...>
         {1.0} <music21.note.Note E->
     {0.0} <music21.stream.PartStaff 0x...>
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest quarter>
     '''
     # this static attributes offer a performance boost over other
     # forms of checking class
@@ -402,7 +402,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
 
         >>> subslice = s[2:5]
         >>> subslice
-        [<music21.note.Note E>, <music21.note.Rest rest>, <music21.note.Note F>]
+        [<music21.note.Note E>, <music21.note.Rest quarter>, <music21.note.Note F>]
         >>> len(subslice)
         3
         >>> s[1].offset
@@ -2098,7 +2098,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         >>> s.append(c1)
         >>> s.show('text')
         {0.0} <music21.note.Note D>
-        {2.0} <music21.note.Rest rest>
+        {2.0} <music21.note.Rest half>
         {4.0} <music21.chord.Chord C4 E4>
 
         Save the original Streams for later
@@ -2143,7 +2143,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         Chords can also be inserted into rests:
 
         >>> s3.getElementsByOffset(2.0).first()
-        <music21.note.Rest rest>
+        <music21.note.Rest half>
         >>> s3.insertIntoNoteOrChord(2.0, chord.Chord('C4 E4 G#4'))
         >>> s3.show('text')
         {0.0} <music21.note.Note D>
@@ -2156,7 +2156,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
 
         >>> s4.show('text', addEndTimes=True)
         {0.0 - 2.0} <music21.note.Note D>
-        {2.0 - 4.0} <music21.note.Rest rest>
+        {2.0 - 4.0} <music21.note.Rest half>
         {4.0 - 5.0} <music21.chord.Chord C4 E4>
 
         >>> for i in [0.0, 4.0, 6.0]:  # skipping 2.0 for now
@@ -2166,9 +2166,9 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         >>> s4.insertIntoNoteOrChord(2.0, r)
         >>> s4.show('text', addEndTimes=True)
         {0.0 - 2.0} <music21.note.Note D>
-        {2.0 - 4.0} <music21.note.Rest rest>
+        {2.0 - 4.0} <music21.note.Rest half>
         {4.0 - 5.0} <music21.chord.Chord C4 E4>
-        {6.0 - 7.0} <music21.note.Rest rest>
+        {6.0 - 7.0} <music21.note.Rest quarter>
 
         Notice that (1) the original duration and not the new duration is used, unless
         there is no element at that place, and (2) if an element is put into a place where
@@ -3905,7 +3905,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
 
         >>> t5 = st1.getElementAfterElement(n1, [note.Rest])
         >>> t5
-        <music21.note.Rest rest>
+        <music21.note.Rest quarter>
         >>> t5 is r3
         True
         >>> t6 = st1.getElementAfterElement(n1, [note.Rest, note.Note])
@@ -4356,14 +4356,14 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
             {0.0} <music21.clef.TrebleClef>
             {0.0} <music21.key.Key of f# minor>
             {0.0} <music21.meter.TimeSignature 4/4>
-            {0.0} <music21.note.Rest rest>
+            {0.0} <music21.note.Rest quarter>
         {1.0} <music21.stream.Measure 1 offset=1.0>
-            {0.0} <music21.note.Rest rest>
+            {0.0} <music21.note.Rest whole>
         {5.0} <music21.stream.Measure 2 offset=5.0>
-            {0.0} <music21.note.Rest rest>
+            {0.0} <music21.note.Rest whole>
         {9.0} <music21.stream.Measure 3 offset=9.0>
             {0.0} <music21.layout.SystemLayout>
-            {0.0} <music21.note.Rest rest>
+            {0.0} <music21.note.Rest whole>
         {13.0} <music21.stream.Measure 4 offset=13.0>
         ...
 
@@ -4432,12 +4432,12 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
                 {0.0} <music21.clef.TrebleClef>
                 {0.0} <music21.key.Key of f# minor>
                 {0.0} <music21.meter.TimeSignature 4/4>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest quarter>
             {1.0} <music21.stream.Measure 1 offset=1.0>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest whole>
                 ...
             {33.0} <music21.stream.Measure 9 offset=33.0>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest dotted-half>
                 {3.0} <music21.bar.Barline type=final>
         {0.0} <music21.stream.Part Alto>
             {0.0} <music21.instrument.Instrument 'P2: Alto: Instrument 2'>
@@ -4445,12 +4445,12 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
                 {0.0} <music21.clef.TrebleClef>
                 {0.0} <music21.key.Key of f# minor>
                 {0.0} <music21.meter.TimeSignature 4/4>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest quarter>
             {1.0} <music21.stream.Measure 1 offset=1.0>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest whole>
             ...
             {33.0} <music21.stream.Measure 9 offset=33.0>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest dotted-half>
                 {3.0} <music21.bar.Barline type=final>
         {0.0} <music21.layout.StaffGroup ...>
 
@@ -4473,9 +4473,9 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         >>> pt = p.template(retainVoices=False)
         >>> pt.show('text')
         {0.0} <music21.stream.Measure 1 offset=0.0>
-            {0.0} <music21.note.Rest rest>
+            {0.0} <music21.note.Rest whole>
         {4.0} <music21.stream.Measure 2 offset=4.0>
-            {0.0} <music21.note.Rest rest>
+            {0.0} <music21.note.Rest whole>
         >>> pt[0][0].quarterLength
         4.0
 
@@ -5985,10 +5985,10 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         >>> s.show('text', addEndTimes=True)
         {0.0 - 6.3} <music21.stream.Part part1>
             {4.0 - 5.0} <music21.note.Note C#>
-            {5.3 - 6.3} <music21.note.Rest rest>
+            {5.3 - 6.3} <music21.note.Rest quarter>
         {0.0 - 6.5} <music21.stream.Part part2>
             {2.12 - 4.12} <music21.note.Note D->
-            {5.5 - 6.5} <music21.note.Rest rest>
+            {5.5 - 6.5} <music21.note.Rest quarter>
 
         >>> cc = s.chordify()
 
@@ -5998,11 +5998,11 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         Fraction(22, 25)
 
         >>> cc.show('text', addEndTimes=True)
-        {0.0 - 2.12} <music21.note.Rest rest>
+        {0.0 - 2.12} <music21.note.Rest 53/25ql>
         {2.12 - 4.0} <music21.chord.Chord D-4>
         {4.0 - 4.12} <music21.chord.Chord C#4 D-4>
         {4.12 - 5.0} <music21.chord.Chord C#4>
-        {5.0 - 6.5} <music21.note.Rest rest>
+        {5.0 - 6.5} <music21.note.Rest dotted-quarter>
 
         Here's how addPartIdAsGroup works:
 
@@ -9448,7 +9448,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         :class:`~music21.note.Note`,
         :class:`~music21.chord.Chord`,
         :class:`~music21.note.Rest`) but also their subclasses, such as
-        `Harmony` objects (`ChordSymbols`, `FiguredBass`), `SpacerRests` etc.
+        `Harmony` objects (`ChordSymbols`, `FiguredBass`), etc.
 
 
         >>> s1 = stream.Stream()
@@ -9460,7 +9460,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         >>> s1.show('text')
         {0.0} <music21.key.KeySignature of no sharps or flats>
         {0.0} <music21.note.Note B>
-        {1.0} <music21.note.Rest rest>
+        {1.0} <music21.note.Rest quarter>
         {2.0} <music21.chord.Chord A B->
 
         `.notesAndRests` removes the `KeySignature` object but keeps the `Rest`.
@@ -9468,7 +9468,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         >>> notes1 = s1.notesAndRests.stream()
         >>> notes1.show('text')
         {0.0} <music21.note.Note B>
-        {1.0} <music21.note.Rest rest>
+        {1.0} <music21.note.Rest quarter>
         {2.0} <music21.chord.Chord A B->
 
         The same caveats about `Stream` classes and `.flat` in `.notes` apply here.
@@ -9504,7 +9504,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         >>> p1.show('text')
         {0.0} <music21.key.KeySignature of no sharps or flats>
         {0.0} <music21.note.Note B>
-        {1.0} <music21.note.Rest rest>
+        {1.0} <music21.note.Rest quarter>
         {2.0} <music21.chord.Chord A B->
 
         >>> noteStream = p1.notes.stream()
@@ -10041,8 +10041,8 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
         >>> s.storeAtEnd(bar.Barline('final'))
         >>> gapStream = s.findGaps()
         >>> gapStream.show('text', addEndTimes=True)
-        {0.0 - 1.0} <music21.note.Rest rest>
-        {3.0 - 5.0} <music21.note.Rest rest>
+        {0.0 - 1.0} <music21.note.Rest quarter>
+        {3.0 - 5.0} <music21.note.Rest half>
 
         Returns None if not gaps:
 
@@ -10693,7 +10693,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
                 {0.0} <music21.stream.Voice 3>
                     {0.0} <music21.note.Note E>
                     ...
-                    {3.0} <music21.note.Rest rest>
+                    {3.0} <music21.note.Rest quarter>
                 {0.0} <music21.stream.Voice 4>
                     {0.0} <music21.note.Note F#>
                     ...
@@ -10702,13 +10702,13 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
                 {0.0} <music21.stream.Voice 3>
                     {0.0} <music21.note.Note E>
                     ...
-                    {3.0} <music21.note.Rest rest>
+                    {3.0} <music21.note.Rest quarter>
                 {0.0} <music21.stream.Voice 4>
                     {0.0} <music21.note.Note E>
                     ...
                     {3.5} <music21.note.Note A>
             {8.0} <music21.stream.Measure 3 offset=8.0>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest whole>
                 {4.0} <music21.bar.Barline type=final>
         {0.0} <music21.layout.ScoreLayout>
 
@@ -10722,13 +10722,13 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
                 {0.0} <music21.meter.TimeSignature 4/4>
                 {0.0} <music21.note.Note E>
                 ...
-                {3.0} <music21.note.Rest rest>
+                {3.0} <music21.note.Rest quarter>
             {4.0} <music21.stream.Measure 2 offset=4.0>
                 {0.0} <music21.note.Note E>
                 ...
-                {3.0} <music21.note.Rest rest>
+                {3.0} <music21.note.Rest quarter>
             {8.0} <music21.stream.Measure 3 offset=8.0>
-                {0.0} <music21.note.Rest rest>
+                {0.0} <music21.note.Rest whole>
                 {4.0} <music21.bar.Barline type=final>
         {0.0} <music21.stream.Part Piano-v1>
             {0.0} <music21.instrument.Instrument 'P1: Piano: '>
@@ -12290,7 +12290,7 @@ class Stream(core.StreamCoreMixin, base.Music21Object):
                     continue  # do nothing
                 else:
                     shiftOffset = self.elementOffset(cV) - startOffset
-                    r = note.SpacerRest()
+                    r = note.Rest()
                     r.duration.quarterLength = shiftOffset
                     r.style.hideObjectOnPrint = True
                     for el in cV._stream:
@@ -12707,10 +12707,10 @@ class Measure(Stream):
         >>> m.append(note.Note('D4', type='eighth'))
         >>> m.show('text')
         {0.0} <music21.meter.TimeSignature 3/4>
-        {0.0} <music21.note.Rest rest>
-        {0.5} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest eighth>
+        {0.5} <music21.note.Rest eighth>
         {1.0} <music21.note.Note C>
-        {2.0} <music21.note.Rest rest>
+        {2.0} <music21.note.Rest eighth>
         {2.5} <music21.note.Note D>
         >>> m.padAsAnacrusis(useInitialRests=True)
         >>> m.paddingLeft
@@ -12718,7 +12718,7 @@ class Measure(Stream):
         >>> m.show('text')
         {0.0} <music21.meter.TimeSignature 3/4>
         {0.0} <music21.note.Note C>
-        {1.0} <music21.note.Rest rest>
+        {1.0} <music21.note.Rest eighth>
         {1.5} <music21.note.Note D>
         '''
         if useInitialRests:
diff --git a/music21/stream/filters.py b/music21/stream/filters.py
index c1d47c0b4..338bf83b5 100644
--- a/music21/stream/filters.py
+++ b/music21/stream/filters.py
@@ -112,7 +112,7 @@ class IsFilter(StreamFilter):
     >>> for el in s.iter.addFilter(isFilter2):
     ...     print(el)
     <music21.note.Note C#>
-    <music21.note.Rest rest>
+    <music21.note.Rest quarter>
 
     '''
     derivationStr = 'is'
@@ -151,14 +151,14 @@ class IsNotFilter(IsFilter):
     >>> for el in s.iter.addFilter(stream.filters.IsNotFilter(n)):
     ...     el
     <music21.key.KeySignature of 3 flats>
-    <music21.note.Rest rest>
+    <music21.note.Rest quarter>
 
     test that resetting works...
 
     >>> for el in s.iter.addFilter(stream.filters.IsNotFilter(n)):
     ...     el
     <music21.key.KeySignature of 3 flats>
-    <music21.note.Rest rest>
+    <music21.note.Rest quarter>
 
 
     multiple...
@@ -229,7 +229,7 @@ class ClassFilter(StreamFilter):
     >>> for x in sI:
     ...     print(x)
     <music21.note.Note C>
-    <music21.note.Rest rest>
+    <music21.note.Rest quarter>
     <music21.note.Note D>
 
     >>> sI.filters.append(stream.filters.ClassFilter('Note'))
@@ -285,7 +285,7 @@ class ClassNotFilter(ClassFilter):
 
     >>> for x in sI:
     ...     print(x)
-    <music21.note.Rest rest>
+    <music21.note.Rest quarter>
     '''
     derivationStr = 'getElementsNotOfClass'
 
diff --git a/music21/stream/iterator.py b/music21/stream/iterator.py
index 8c4d7b8ae..f57177b7e 100644
--- a/music21/stream/iterator.py
+++ b/music21/stream/iterator.py
@@ -462,7 +462,7 @@ class StreamIterator(prebase.ProtoM21Object):
         >>> s.recurse().notes.first()
         <music21.note.Note D>
         >>> s.recurse().getElementsByClass('Rest').first()
-        <music21.note.Rest rest>
+        <music21.note.Rest half>
 
         If no elements match, returns None:
 
@@ -513,7 +513,7 @@ class StreamIterator(prebase.ProtoM21Object):
         >>> s.recurse().notes.last()
         <music21.note.Note G>
         >>> s.recurse().getElementsByClass('Rest').last()
-        <music21.note.Rest rest>
+        <music21.note.Rest quarter>
 
         New in v7.
 
@@ -741,7 +741,7 @@ class StreamIterator(prebase.ProtoM21Object):
         >>> s3 = s.iter.stream()
         >>> s3.show('t')
         {0.0} <music21.note.Note C>
-        {1.0} <music21.note.Rest rest>
+        {1.0} <music21.note.Rest quarter>
         {2.0} <music21.note.Note D>
         {3.0} <music21.bar.Barline type=regular>
 
@@ -911,7 +911,7 @@ class StreamIterator(prebase.ProtoM21Object):
         >>> s.append(note.Note('D'))
         >>> for el in s.iter.getElementsByClass('Rest'):
         ...     print(el)
-        <music21.note.Rest rest>
+        <music21.note.Rest quarter>
 
 
         ActiveSite is restored...
@@ -930,7 +930,7 @@ class StreamIterator(prebase.ProtoM21Object):
 
         >>> for el in s.iter.getElementsByClass(note.Rest):
         ...     print(el)
-        <music21.note.Rest rest>
+        <music21.note.Rest quarter>
 
         '''
         return self.addFilter(filters.ClassFilter(classFilterList), returnClone=returnClone)
@@ -964,8 +964,8 @@ class StreamIterator(prebase.ProtoM21Object):
          <music21.note.Note F>]
 
         >>> list(s.recurse().getElementsByQuerySelector('Rest'))
-        [<music21.note.Rest rest>,
-         <music21.note.Rest rest>]
+        [<music21.note.Rest quarter>,
+         <music21.note.Rest whole>]
 
         Note that unlike with stream slices, the querySelector does not do anything special
         for id searches.  `.first()` will need to be called to find the element (if any)
@@ -1341,7 +1341,7 @@ class StreamIterator(prebase.ProtoM21Object):
         >>> for el in s.iter.notesAndRests:
         ...     print(el)
         <music21.note.Note C>
-        <music21.note.Rest rest>
+        <music21.note.Rest quarter>
         <music21.note.Note D>
 
         chained filters... (this makes no sense since notes is a subset of notesAndRests)
diff --git a/music21/stream/makeNotation.py b/music21/stream/makeNotation.py
index 54d1655fc..e8b268fe0 100644
--- a/music21/stream/makeNotation.py
+++ b/music21/stream/makeNotation.py
@@ -726,7 +726,7 @@ def makeRests(
     >>> b.lowestOffset
     0.0
     >>> b.show('text')
-    {0.0} <music21.note.Rest rest>
+    {0.0} <music21.note.Rest 20ql>
     {20.0} <music21.note.Note C>
     >>> b[0].duration.quarterLength
     20.0
@@ -749,9 +749,9 @@ def makeRests(
     >>> b.lowestOffset
     0.0
     >>> b.show('text')
-    {0.0} <music21.note.Rest rest>
+    {0.0} <music21.note.Rest 20ql>
     {20.0} <music21.note.Note C>
-    {21.0} <music21.note.Rest rest>
+    {21.0} <music21.note.Rest 9ql>
     {30.0} <music21.note.Note D>
     >>> b[0].style.hideObjectOnPrint
     True
@@ -781,13 +781,13 @@ def makeRests(
     {0.0 - 4.0} <music21.stream.Measure 1 offset=0.0>
         {0.0 - 0.0} <music21.clef.TrebleClef>
         {0.0 - 0.0} <music21.meter.TimeSignature 4/4>
-        {0.0 - 4.0} <music21.note.Rest rest>
+        {0.0 - 4.0} <music21.note.Rest whole>
     {4.0 - 8.0} <music21.stream.Measure 2 offset=4.0>
         {0.0 - 1.0} <music21.note.Note C>
-        {1.0 - 4.0} <music21.note.Rest rest>
+        {1.0 - 4.0} <music21.note.Rest dotted-half>
     {8.0 - 12.0} <music21.stream.Measure 3 offset=8.0>
         {0.0 - 1.0} <music21.note.Note D>
-        {1.0 - 4.0} <music21.note.Rest rest>
+        {1.0 - 4.0} <music21.note.Rest dotted-half>
         {4.0 - 4.0} <music21.bar.Barline type=final>
 
     Changed in v6 -- all but first attribute are keyword only
@@ -878,7 +878,7 @@ def makeRests(
 
     if returnObj.hasMeasures():
         # split rests at measure boundaries
-        returnObj.makeTies(classFilterList=(note.Rest,))
+        returnObj.makeTies(classFilterList=(note.Rest,), inPlace=True)
 
         # reposition measures
         accumulatedTime = 0.0
@@ -988,11 +988,11 @@ def makeTies(
     {0.0} <music21.stream.Measure 1 offset=0.0>
         {0.0} <music21.clef.TrebleClef>
         {0.0} <music21.meter.TimeSignature 4/4>
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest whole>
     {4.0} <music21.stream.Measure 2 offset=4.0>
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest whole>
     {8.0} <music21.stream.Measure 3 offset=8.0>
-        {0.0} <music21.note.Rest rest>
+        {0.0} <music21.note.Rest whole>
         {4.0} <music21.bar.Barline type=final>
 
     Notes: uses base.Music21Object.splitAtQuarterLength() once it has figured out
@@ -1019,7 +1019,7 @@ def makeTies(
     {0.0 - 3.0} <music21.stream.Measure 1 offset=0.0>
         {0.0 - 0.0} <music21.clef.TrebleClef>
         {0.0 - 0.0} <music21.meter.TimeSignature 2/4>
-        {0.0 - 3.0} <music21.note.Rest rest>
+        {0.0 - 3.0} <music21.note.Rest dotted-half>
     {2.0 - 4.0} <music21.stream.Measure 2 offset=2.0>
         {1.0 - 2.0} <music21.note.Note C>
     {4.0 - 6.0} <music21.stream.Measure 3 offset=4.0>
diff --git a/music21/tinyNotation.py b/music21/tinyNotation.py
index 9f854016a..cd9b60020 100644
--- a/music21/tinyNotation.py
+++ b/music21/tinyNotation.py
@@ -58,7 +58,7 @@ Here is an example of TinyNotation in action.
     {0.0} <music21.clef.TrebleClef>
     {0.0} <music21.meter.TimeSignature 3/4>
     {0.0} <music21.note.Note E>
-    {1.0} <music21.note.Rest rest>
+    {1.0} <music21.note.Rest quarter>
     {2.0} <music21.note.Note F#>
 {3.0} <music21.stream.Measure 2 offset=3.0>
     {0.0} <music21.note.Note G>
diff --git a/music21/tree/verticality.py b/music21/tree/verticality.py
index fd2908e5a..1084acd19 100644
--- a/music21/tree/verticality.py
+++ b/music21/tree/verticality.py
@@ -570,7 +570,7 @@ class Verticality(prebase.ProtoM21Object):
         <music21.tree.verticality.Verticality 400.0 {}>
         >>> el = verticality.makeElement(1/3)
         >>> el
-        <music21.note.Rest rest>
+        <music21.note.Rest 1/3ql>
         >>> el.duration.fullName
         'Eighth Triplet (1/3 QL)'
 
diff --git a/music21/variant.py b/music21/variant.py
index c65b7cc48..a3eead728 100644
--- a/music21/variant.py
+++ b/music21/variant.py
@@ -2365,6 +2365,8 @@ class Variant(base.Music21Object):
             {2.0} <music21.note.Note A>
             {3.0} <music21.note.Note B>
         '''
+        spacerFilter = lambda r: r.hasStyleInformation and r.style.hideObjectOnPrint
+
         if contextStream is None:
             contextStream = self.activeSite
             if contextStream is None:
@@ -2380,7 +2382,10 @@ class Variant(base.Music21Object):
         vStart = self.getOffsetBySite(contextStream)
 
         if includeSpacers is True:
-            spacerDuration = self.getElementsByClass('SpacerRest').first().duration.quarterLength
+            spacerDuration = (self
+                              .getElementsByClass('Rest')
+                              .addFilter(spacerFilter)
+                              .first().duration.quarterLength)
         else:
             spacerDuration = 0.0
 


Test patch:
diff --git a/music21/mei/test_base.py b/music21/mei/test_base.py
index 07ca8db2e..b8f01d057 100644
--- a/music21/mei/test_base.py
+++ b/music21/mei/test_base.py
@@ -1408,29 +1408,21 @@ class Test(unittest.TestCase):
         self.assertEqual('the id', actual.id)
         self.assertEqual('start', actual.duration.tuplets[0].type)
 
-    @mock.patch('music21.note.SpacerRest')
-    @mock.patch('music21.mei.base.makeDuration')
-    @mock.patch('music21.mei.base.scaleToTuplet')
-    def testUnit2TestRestFromElement(self, mockTuplet, mockMakeDur, mockSpacer):
+    def testUnit2TestRestFromElement(self):
         '''
         spaceFromElement(): test @dur, @dots, @xml:id, and tuplet-related attributes
         '''
-        elem = ETree.Element('rest', attrib={'dur': '4', 'dots': '1', _XMLID: 'the id',
-                                             'm21TupletNum': '5', 'm21TupletNumbase': '4',
-                                             'm21TupletType': 'start'})
-        mockMakeDur.return_value = 'the duration'
-        mockNewSpace = mock.MagicMock('new rest')
-        mockSpacer.return_value = mockNewSpace
-        mockTuplet.return_value = 'tupletized'
-        expected = mockTuplet.return_value
-
+        elem = ETree.Element('rest', attrib={'dur': '4',
+                                             'dots': '1',
+                                             _XMLID: 'the id',
+                                             'm21TupletNum': '5',
+                                             'm21TupletNumbase': '4',
+                                             'm21TupletType': 'start',
+                                             })
         actual = base.spaceFromElement(elem)
-
-        self.assertEqual(expected, actual)
-        mockSpacer.assert_called_once_with(duration=mockMakeDur.return_value)
-        mockMakeDur.assert_called_once_with(1.0, 1)
-        mockTuplet.assert_called_once_with(mockSpacer.return_value, elem)
-        self.assertEqual('the id', mockNewSpace.id)
+        self.assertIsInstance(actual, note.Rest)
+        self.assertTrue(actual.style.hideObjectOnPrint)
+        self.assertEqual('the id', actual.id)
 
     def testIntegration2TestRestFromElement(self):
         '''
@@ -1450,30 +1442,30 @@ class Test(unittest.TestCase):
         self.assertEqual('start', actual.duration.tuplets[0].type)
 
     @mock.patch('music21.mei.base.restFromElement')
-    def testUnit3TestRestFromElement(self, mockRest):
+    def testUnit3TestRestFromElement(self, mockRestFromElement):
         '''
         mRestFromElement(): reacts properly to an Element with the @dur attribute
         '''
         elem = ETree.Element('mRest', attrib={'dur': '2'})
-        mockRest.return_value = 'the rest'
+        mockRestFromElement.return_value = 'the rest'
 
         actual = base.mRestFromElement(elem)
 
-        self.assertEqual(mockRest.return_value, actual)
-        mockRest.assert_called_once_with(elem, None)
+        self.assertEqual(mockRestFromElement.return_value, actual)
+        mockRestFromElement.assert_called_once_with(elem, None)
 
     @mock.patch('music21.mei.base.restFromElement')
-    def testUnit4TestRestFromElement(self, mockRest):
+    def testUnit4TestRestFromElement(self, mockRestFromElement):
         '''
         mRestFromElement(): reacts properly to an Element without the @dur attribute
         '''
         elem = ETree.Element('mRest')
-        mockRest.return_value = mock.MagicMock()
+        mockRestFromElement.return_value = mock.MagicMock()
 
         actual = base.mRestFromElement(elem)
 
-        self.assertEqual(mockRest.return_value, actual)
-        mockRest.assert_called_once_with(elem, None)
+        self.assertEqual(mockRestFromElement.return_value, actual)
+        mockRestFromElement.assert_called_once_with(elem, None)
         self.assertTrue(actual.m21wasMRest)
 
     @mock.patch('music21.mei.base.spaceFromElement')
diff --git a/music21/stream/tests.py b/music21/stream/tests.py
index 6a061cc16..d6cf35b51 100644
--- a/music21/stream/tests.py
+++ b/music21/stream/tests.py
@@ -1933,29 +1933,30 @@ class Test(unittest.TestCase):
 
         match = str([(n.offset, n, n.duration) for n in m2.flat.notesAndRests])
         self.assertEqual(match,
-                         '[(0.0, <music21.note.Rest rest>, <music21.duration.Duration 1.0>), '
+                         '[(0.0, <music21.note.Rest quarter>, <music21.duration.Duration 1.0>), '
                          + '(1.0, <music21.note.Note C>, <music21.duration.Duration 1.0>), '
-                         + '(2.0, <music21.note.Rest rest>, <music21.duration.Duration 2.0>)]')
+                         + '(2.0, <music21.note.Rest half>, <music21.duration.Duration 2.0>)]')
 
         match = str([(n.offset, n, n.duration) for n in m2.flat])
         self.assertEqual(match,
-                         '[(0.0, <music21.note.Rest rest>, <music21.duration.Duration 1.0>), '
+                         '[(0.0, <music21.note.Rest quarter>, <music21.duration.Duration 1.0>), '
                          + '(1.0, <music21.note.Note C>, <music21.duration.Duration 1.0>), '
-                         + '(2.0, <music21.note.Rest rest>, <music21.duration.Duration 2.0>)]')
+                         + '(2.0, <music21.note.Rest half>, <music21.duration.Duration 2.0>)]')
 
         # m2.show()
 
         match = str(list(s.flat.notesAndRests))
-        self.assertEqual(match, '[<music21.note.Rest rest>, <music21.note.Note C>, '
-                                  + '<music21.note.Rest rest>, <music21.note.Rest rest>, '
-                                  + '<music21.note.Note C>, <music21.note.Rest rest>]')
+        self.assertEqual(match, '[<music21.note.Rest half>, <music21.note.Note C>, '
+                                  + '<music21.note.Rest quarter>, <music21.note.Rest quarter>, '
+                                  + '<music21.note.Note C>, <music21.note.Rest half>]')
         match = str([(n, n.duration) for n in s.flat.notesAndRests])
-        self.assertEqual(match, '[(<music21.note.Rest rest>, <music21.duration.Duration 2.0>), '
-                                  + '(<music21.note.Note C>, <music21.duration.Duration 1.0>), '
-                                  + '(<music21.note.Rest rest>, <music21.duration.Duration 1.0>), '
-                                  + '(<music21.note.Rest rest>, <music21.duration.Duration 1.0>), '
-                                  + '(<music21.note.Note C>, <music21.duration.Duration 1.0>), '
-                                  + '(<music21.note.Rest rest>, <music21.duration.Duration 2.0>)]')
+        self.assertEqual(match,
+                         '[(<music21.note.Rest half>, <music21.duration.Duration 2.0>), '
+                          + '(<music21.note.Note C>, <music21.duration.Duration 1.0>), '
+                          + '(<music21.note.Rest quarter>, <music21.duration.Duration 1.0>), '
+                          + '(<music21.note.Rest quarter>, <music21.duration.Duration 1.0>), '
+                          + '(<music21.note.Note C>, <music21.duration.Duration 1.0>), '
+                          + '(<music21.note.Rest half>, <music21.duration.Duration 2.0>)]')
 
         GEX = m21ToXml.GeneralObjectExporter()
         unused_mx = GEX.parse(s).decode('utf-8')
@@ -5457,16 +5458,20 @@ class Test(unittest.TestCase):
 
         sPost = s.makeRests(fillGaps=True, inPlace=False)
         self.assertEqual(str(list(sPost.voices[0].notesAndRests)),
-                         '[<music21.note.Rest rest>, <music21.note.Note C>, '
-                         + '<music21.note.Rest rest>, <music21.note.Note C>, '
-                         + '<music21.note.Rest rest>, <music21.note.Note C>, '
-                         + '<music21.note.Rest rest>, <music21.note.Note C>, '
-                         + '<music21.note.Rest rest>]')
+                         '[<music21.note.Rest half>, <music21.note.Note C>, '
+                         + '<music21.note.Rest 2.25ql>, '
+                         + '<music21.note.Note C>, '
+                         + '<music21.note.Rest 2.5ql>, '
+                         + '<music21.note.Note C>, '
+                         + '<music21.note.Rest 4.25ql>, '
+                         + '<music21.note.Note C>, '
+                         + '<music21.note.Rest half>]')
         self.assertEqual(str(list(sPost.voices[1].notesAndRests)),
-                         '[<music21.note.Rest rest>, <music21.note.Note C>, '
-                         + '<music21.note.Rest rest>, <music21.note.Note C>, '
-                         + '<music21.note.Rest rest>, <music21.note.Note C>, '
-                         + '<music21.note.Rest rest>, <music21.note.Note C>]')
+                         '[<music21.note.Rest 16th>, <music21.note.Note C>, '
+                         + '<music21.note.Rest 3.25ql>, '
+                         + '<music21.note.Note C>, '
+                         + '<music21.note.Rest dotted-quarter>, <music21.note.Note C>, '
+                         + '<music21.note.Rest breve>, <music21.note.Note C>]')
 
         # sPost.show()