### Chordal Analysis
*xmlChordAna* is a python script that makes a chordal analysis of a MusicXML file.
An interactive demo is avaiable on the
[Chord Analysis](../keys09/abc2chord.html?../js/pre_wind.js) page. It runs the script on
my server and formats the output in some neat html.
At the command line *xmlChordAna* is used as follows:
> ./xmlChordAna.py scorefile.xml
The output is printed in plain text looks like this:
File: bwv539p_arr.xml, ticks per quarternote: 384
342 note groups, 102 chord segments
Key: Am, confidence: 33%
---- chord Dmin, score: 90%
0 D3, D4, F4, A4
2 D3, F4, A4, D5
2 1/2 F4, A4, D5, D3
3 F4, A4, D5, C#3
3 1/2 F4, A4, D5, D3
---- chord Ehdim, score: 75%
4 D5, E3, E4, G4
---- chord C#hdim, score: 92%
5 E3, E4, G4, C#5
5 1/2 E3, E4, G4, B4
6 E3, E4, G4, C#5
6 1/2 E4, G4, C#5, E3
7 E4, G4, C#5, D3
7 1/2 E4, G4, C#5, E3
See [this explanation](https://wim.vree.org/keys09/uitleg.html) for more info.
### KeyScape
On the [KeyScape](../keys09) page you can find two other interactive demos. One makes
a *keyscape* from a MIDI file. The other runs the same chordal analysis as *xmlChordAna*,
but for a MIDI file. There is no download page (yet) for these programs.
### B40 notes
*xml2b40* is a python script to convert a MusicXML file to a list of B40 events.
It is invoked from the command line as follows:
> ./xml2b40.py -t 384 scorefile.xml
and produces the following output:
0 129
0 169
0 180
0 192
768 -192
768 -169
768 192
768 209
960 -129
960 129
1152 -129
1152 124
1344 -124
1344 129
1536 -192
1536 -180
...
Each line contains two numbers: the time and a B40 note.
*TO DO: More explanation*