music21.volpiano¶
The Volpiano font is a specialized font for encoding Western Plainchant easily with immediate visual feedback (see the CANTUS database).
This module parses chants encoded in Volpiano and can generate Volpiano from any music21 Stream.
This module will move to a medren repository hopefully by v.5
Functions¶
-
music21.volpiano.fromStream(s, *, layoutToBreaks=False)¶ Convert a Stream to Volpiano.
These tests show how the same input converts back out:
>>> input = '1--c--d---f--d---ed--c--d---f---g--h--j---hgf--g--h---' >>> veniSancti = volpiano.toPart(input) >>> volpiano.fromStream(veniSancti) '1---c-d-f-d-ed-c-d-f-g-h-j-hg-f-g-h-'
>>> breakTest = volpiano.toPart('1---e-E--') >>> volpiano.fromStream(breakTest) '1---e-E-'
>>> accTest = volpiano.toPart('1---e--we--e--We--e') >>> volpiano.fromStream(accTest) '1---e-we-e-We-e-'
-
music21.volpiano.toPart(volpianoText, *, breaksToLayout=False)¶ Returns a music21 Part from volpiano text.
>>> veniSancti = volpiano.toPart('1---c--d---f--d---ed--c--d---f' ... + '---g--h--j---hgf--g--h---') >>> veniSancti.show('text') {0.0} <music21.stream.Measure 0 offset=0.0> {0.0} <music21.clef.TrebleClef> {0.0} <music21.note.Note C> {1.0} <music21.note.Note D> {2.0} <music21.note.Note F> {3.0} <music21.note.Note D> {4.0} <music21.note.Note E> {5.0} <music21.note.Note D> {6.0} <music21.volpiano.Neume <music21.note.Note E><music21.note.Note D>> {6.0} <music21.note.Note C> {7.0} <music21.note.Note D> {8.0} <music21.note.Note F> {9.0} <music21.note.Note G> {10.0} <music21.note.Note A> {11.0} <music21.note.Note B> {12.0} <music21.note.Note A> {13.0} <music21.note.Note G> {14.0} <music21.note.Note F> {15.0} <music21.volpiano.Neume <music21.note.Note A><music21.note.Note G>> {15.0} <music21.note.Note G> {16.0} <music21.note.Note A>
Clefs!
>>> clefTest = volpiano.toPart('1---c--2---c') >>> clefTest.show('text') {0.0} <music21.stream.Measure 0 offset=0.0> {0.0} <music21.clef.TrebleClef> {0.0} <music21.note.Note C> {1.0} <music21.clef.BassClef> {1.0} <music21.note.Note E> >>> for n in clefTest.recurse().notes: ... n.nameWithOctave 'C4' 'E2'
Flats and Naturals:
>>> accTest = volpiano.toPart('1---e--we--e--We--e') >>> [n.name for n in accTest.recurse().notes] ['E', 'E-', 'E-', 'E', 'E']
Breaks and barlines
>>> breakTest = volpiano.toPart('1---e-7-e-77-e-777-e-3-e-4') >>> breakTest.show('text') {0.0} <music21.stream.Measure 0 offset=0.0> {0.0} <music21.clef.TrebleClef> {0.0} <music21.note.Note E> {1.0} <music21.volpiano.LineBreak object at 0x105250fd0> {1.0} <music21.note.Note E> {2.0} <music21.volpiano.PageBreak object at 0x105262128> {2.0} <music21.note.Note E> {3.0} <music21.volpiano.ColumnBreak object at 0x105262240> {3.0} <music21.note.Note E> {4.0} <music21.bar.Barline style=regular> {4.0} <music21.stream.Measure 0 offset=4.0> {0.0} <music21.note.Note E> {1.0} <music21.bar.Barline style=double>
As layout objects using breaksToLayout=True
>>> breakTest = volpiano.toPart('1---e-7-e-77-e-777-e-3-e-4', breaksToLayout=True) >>> breakTest.show('text') {0.0} <music21.stream.Measure 0 offset=0.0> {0.0} <music21.clef.TrebleClef> {0.0} <music21.note.Note E> {1.0} <music21.layout.SystemLayout> {1.0} <music21.note.Note E> {2.0} <music21.layout.PageLayout> {2.0} <music21.note.Note E> {3.0} <music21.volpiano.ColumnBreak object at 0x105262240> {3.0} <music21.note.Note E> {4.0} <music21.bar.Barline style=regular> {4.0} <music21.stream.Measure 0 offset=4.0> {0.0} <music21.note.Note E> {1.0} <music21.bar.Barline style=double>
Liquescence test:
>>> breakTest = volpiano.toPart('1---e-E-') >>> breakTest.recurse().notes[0].editorial.misc {'liquescence': False} >>> breakTest.recurse().notes[0].notehead 'normal' >>> breakTest.recurse().notes[1].editorial.misc {'liquescence': True} >>> breakTest.recurse().notes[1].notehead 'x'
ColumnBreak¶
-
class
music21.volpiano.ColumnBreak(*arguments, **keywords)¶ Indicates that the page breaks at this point in the manuscript
Denoted by three 7s.
ColumnBreak bases
ColumnBreak read-only properties
Read-only properties inherited from Music21Object:
ColumnBreak read/write properties
Read/write properties inherited from Music21Object:
ColumnBreak methods
Methods inherited from Music21Object:
ColumnBreak instance variables
Instance variables inherited from Music21Object:
LineBreak¶
-
class
music21.volpiano.LineBreak(*arguments, **keywords)¶ Indicates that the line breaks at this point in the manuscript.
Denoted by one 7.
LineBreak bases
LineBreak read-only properties
Read-only properties inherited from Music21Object:
LineBreak read/write properties
Read/write properties inherited from Music21Object:
LineBreak methods
Methods inherited from Music21Object:
LineBreak instance variables
Instance variables inherited from Music21Object:
Neume¶
-
class
music21.volpiano.Neume(*arguments, **keywords)¶ A spanner that represents a Neume. No name of the neume, just that it is a Neume.
Neume bases
Neume read-only properties
Read-only properties inherited from Music21Object:
Neume read/write properties
Read/write properties inherited from Music21Object:
Neume methods
Methods inherited from Spanner:
Methods inherited from Music21Object:
Neume instance variables
Instance variables inherited from Music21Object:
PageBreak¶
-
class
music21.volpiano.PageBreak(*arguments, **keywords)¶ Indicates that the page breaks at this point in the manuscript
Denoted by two 7s.
PageBreak bases
PageBreak read-only properties
Read-only properties inherited from Music21Object:
PageBreak read/write properties
Read/write properties inherited from Music21Object:
PageBreak methods
Methods inherited from Music21Object:
PageBreak instance variables
Instance variables inherited from Music21Object: