equal
deleted
inserted
replaced
1 ### Chordal Analysis |
1 ### Chordal Analysis |
2 |
2 |
3 *xmlChordAna* is a python script that makes a chordal analysis of a MusicXML file. |
3 *xmlChordAna* is a python script that makes a chordal analysis of a MusicXML file. |
4 |
4 |
5 An interactive demo is avaiable on the |
5 An [interactive demo][1] is avaiable on the |
6 [Chord Analysis](../keys09/abc2chord.html?../js/pre_wind.js) page. It runs the script on |
6 [Chord Analysis][1] page. It runs the script on |
7 my server and formats the output in some neat html. |
7 my server and formats the output in some neat html. |
8 |
8 |
9 At the command line *xmlChordAna* is used as follows: |
9 At the command line *xmlChordAna* is used as follows: |
10 |
10 |
11 > ./xmlChordAna.py scorefile.xml |
11 > ./xmlChordAna.py scorefile.xml |
28 5 1/2 E3, E4, G4, B4 |
28 5 1/2 E3, E4, G4, B4 |
29 6 E3, E4, G4, C#5 |
29 6 E3, E4, G4, C#5 |
30 6 1/2 E4, G4, C#5, E3 |
30 6 1/2 E4, G4, C#5, E3 |
31 7 E4, G4, C#5, D3 |
31 7 E4, G4, C#5, D3 |
32 7 1/2 E4, G4, C#5, E3 |
32 7 1/2 E4, G4, C#5, E3 |
|
33 ... |
33 |
34 |
34 See [this explanation](https://wim.vree.org/keys09/uitleg.html) for more info. |
35 See [this explanation](https://wim.vree.org/keys09/uitleg.html) for more info. |
35 |
36 |
36 ### KeyScape |
37 ### KeyScape |
37 |
38 |
38 On the [KeyScape](../keys09) page you can find two other interactive demos. One makes |
39 On the [KeyScape](../keys09) page you can find two other interactive demos. One makes |
39 a *keyscape* from a MIDI file. The other runs the same chordal analysis as *xmlChordAna*, |
40 a *keyscape* from a MIDI file. The other runs the same chordal analysis as *xmlChordAna*, |
40 but for a MIDI file. There is no download page (yet) for these programs. |
41 but for a MIDI file. There is no download page (yet) for these programs. |
41 |
42 |
42 ### B40 notes |
43 ### Base-40 note numbers |
43 |
44 |
44 *xml2b40* is a python script to convert a MusicXML file to a list of B40 events. |
45 *xml2b40* is a python script to convert a MusicXML file to a list of base-40 events. |
45 It is invoked from the command line as follows: |
46 It is invoked from the command line as follows: |
46 |
47 |
47 > ./xml2b40.py -t 384 scorefile.xml |
48 > ./xml2b40.py -t 384 scorefile.xml |
48 |
49 |
49 and produces the following output: |
50 and produces the following output: |
64 1344 129 |
65 1344 129 |
65 1536 -192 |
66 1536 -192 |
66 1536 -180 |
67 1536 -180 |
67 ... |
68 ... |
68 |
69 |
69 Each line contains two numbers: the time and a B40 note. |
70 Each line contains two numbers: the time and a base-40 note. |
|
71 The time is in ticks, where a quarter note is 384 ticks. The base-40 note number is positive |
|
72 when the note starts sounding and negative when the note stops sounding. |
70 |
73 |
71 *TO DO: More explanation* |
74 The base-40 note number system encodes 40 pitches in an octave. |
|
75 It is maps all single and double accidentals. |
|
76 For instance, the first 10 numbers are: |
|
77 |
|
78 1: Cbb |
|
79 2: Cb |
|
80 3: C |
|
81 4: C# |
|
82 5: C## |
|
83 6: not used |
|
84 7: Dbb |
|
85 8: Db |
|
86 9: D |
|
87 10: D# |
|
88 |
|
89 Base-40 numbers allow precise matching of chord patterns. For instance, chord pattern |
|
90 C7 only matches |
|
91 C-E-Bb and not C-E-A# or C-Fb-Bb or B#-E-Bb etc. |
|
92 |
|
93 The idea of base-40 note numbers is due to B. Hewlett and described in |
|
94 [this paper][2] |
|
95 |
|
96 [1]: ../keys09/abc2chord.html?../js/pre_wind.js |
|
97 [2]: http://www.ccarh.org/publications/reprints/base40/ |