self.title=titleor''# Do not initialise title empty
self.sectionList=sectionListor[]
self.title=titleor''# Do not initialise title empty
self.subtitle=subtitle
self.composer=composer
self.arranger=arranger
@ -74,98 +91,119 @@ class Document:
def__eq__(self,other):
ifisinstance(other,self.__class__):
textEqual=self.title==other.titleandself.subtitle==other.subtitleandself.composer==other.composerandself.arranger==other.arrangerandself.timeSignature==other.timeSignatureandself.tempo==other.tempo# check all the text values for equality
textEqual=self.title==other.titleandself.subtitle==other.subtitleandself.composer==other.composerandself.arranger==other.arrangerandself.timeSignature==other.timeSignatureandself.tempo==other.tempo# check all the text values for equality
ET.SubElement(chordElement,"voicing",attrib={'instrument':'piano'}).text=c.voicings['piano'][0]# return first element of list as feature has not been implemented
<chordsheet><title>Angela</title><subtitle>Theme from 'Taxi'</subtitle><arranger>Max</arranger><composer>Bob James</composer><timesignature>4</timesignature><chords><chord><name>E♭maj7</name><voicinginstrument="guitar">x,x,1,3,3,3</voicing></chord><chord><name>A♭ma7</name><voicinginstrument="guitar">x,x,1,1,1,3</voicing></chord><chord><name>Gm7</name><voicinginstrument="guitar">3,x,3,3,3,x</voicing></chord><chord><name>B♭/D</name><voicinginstrument="guitar">x,x,0,3,3,1</voicing></chord><chord><name>A♭maj7/C</name><voicinginstrument="guitar">x,3,1,1,1,3</voicing></chord><chord><name>B♭</name><voicinginstrument="guitar">x,1,3,3,3,1</voicing></chord><chord><name>A♭</name><voicinginstrument="guitar">4,6,6,5,4,4</voicing></chord><chord><name>E♭/G</name><voicinginstrument="guitar">x,x,5,3,4,3</voicing></chord><chord><name>Fm</name><voicinginstrument="guitar">x,x,3,1,1,1</voicing></chord><chord><name>A♭/B♭</name><voicinginstrument="guitar">6,x,6,5,4,4</voicing></chord><chord><name>E♭</name><voicinginstrument="guitar">x,6,5,3,4,3</voicing></chord><chord><name>E♭7</name><voicinginstrument="guitar">x,x,1,3,2,3</voicing></chord><chord><name>A♭maj9</name><voicinginstrument="guitar">4,x,5,3,4,3</voicing></chord><chord><name>Fm7</name><voicinginstrument="guitar">1,x,1,1,1,x</voicing></chord></chords><sectionname="Intro"><block><length>2.0</length><chord>E♭maj7</chord></block><block><length>2.0</length><chord>A♭ma7</chord></block><block><length>2.0</length><chord>Gm7</chord></block><block><length>2.0</length><chord>B♭/D</chord></block><block><length>2.0</length><chord>A♭maj7/C</chord></block><block><length>2.0</length><chord>B♭</chord></block><block><length>1.0</length><chord>A♭</chord></block><block><length>1.0</length><chord>E♭/G</chord></block><block><length>1.0</length><chord>Fm</chord></block><block><length>1.0</length><chord>A♭/B♭</chord></block><block><length>2.0</length><chord>E♭</chord></block><block><length>2.0</length><chord>E♭7</chord></block><block><length>2.0</length><chord>A♭maj9</chord></block><block><length>2.0</length><chord>E♭/G</chord></block><block><length>2.0</length><chord>Fm7</chord></block><block><length>2.0</length><chord>B♭</chord></block><block><length>1.0</length><chord>A♭</chord></block><block><length>1.0</length><chord>E♭/G</chord></block><block><length>1.0</length><chord>Fm</chord></block><block><length>1.0</length><chord>A♭/B♭</chord></block></section></chordsheet>
<chordsheet><title>Kiss of Life</title><subtitle>Sade</subtitle><arranger>Ivan Holmes</arranger><composer>Sade Adu, Paul S. Denman, Andrew Hale, Stuart Matthewman</composer><timesignature>4</timesignature><chords><chord><name>AM9</name></chord><chord><name>F♯m11</name></chord><chord><name>DM7</name></chord><chord><name>C♯m7</name></chord><chord><name>Bm7</name></chord></chords><sectionname="Intro/Verse"><block><length>8.0</length><chord>AM9</chord></block><block><length>8.0</length><chord>F♯m11</chord></block><block><length>1.5</length><chord>DM7</chord></block><block><length>2.0</length><chord>C♯m7</chord></block><block><length>4.5</length><chord>Bm7</chord></block><block><length>8.0</length><chord>F♯m11</chord></block></section><sectionname="Chorus/Bridge"><block><length>3.5</length><chord>Bm7</chord></block><block><length>4.5</length><chord>F♯m11</chord></block><block><length>3.5</length><chord>Bm7</chord></block><block><length>4.5</length><chord>F♯m11</chord></block></section></chordsheet>
<chordsheet><title>Composition</title><composer>A. Person</composer><timesignature>4</timesignature><chords><chord><name>B</name><voicinginstrument="guitar">x,x,2,3,4,1</voicing></chord><chord><name>E</name><voicinginstrument="guitar">0,2,2,1,0,0</voicing></chord><chord><name>Cm9</name><voicinginstrument="guitar">x,x,8,8,8,10</voicing></chord><chord><name>D7♭5♯9</name></chord></chords><progression><block><length>4</length><chord>B</chord><notes>These are notes.</notes></block><block><length>4</length><chord>E</chord></block><block><length>12</length><chord>Cm9</chord></block><block><length>6</length><chord>D7♭5♯9</chord></block><block><length>6</length><notes>For quiet contemplation.</notes></block><block><length>46</length><chord>D7♭5♯9</chord><notes>A very long block to test wrapping!</notes></block></progression></chordsheet>
<chordsheet><title>Composition</title><composer>A. Person</composer><timesignature>4</timesignature><chords><chord><name>B</name><voicinginstrument="guitar">x,x,2,3,4,1</voicing></chord><chord><name>E</name><voicinginstrument="guitar">0,2,2,1,0,0</voicing></chord><chord><name>Cm9</name><voicinginstrument="guitar">x,x,8,8,8,10</voicing></chord><chord><name>D7♭5♯9</name></chord></chords><sectionname="Test section"><block><length>4</length><chord>B</chord><notes>These are notes.</notes></block><block><length>4</length><chord>E</chord></block><block><length>12</length><chord>Cm9</chord></block><block><length>6</length><chord>D7♭5♯9</chord></block><block><length>6</length><notes>For quiet contemplation.</notes></block><block><length>46</length><chord>D7♭5♯9</chord><notes>A very long block to test wrapping!</notes></block></section></chordsheet>