diff options
Diffstat (limited to 'upstream/debian-unstable/man1/midistats.1')
-rw-r--r-- | upstream/debian-unstable/man1/midistats.1 | 67 |
1 files changed, 57 insertions, 10 deletions
diff --git a/upstream/debian-unstable/man1/midistats.1 b/upstream/debian-unstable/man1/midistats.1 index 6b9c5d44..478707f6 100644 --- a/upstream/debian-unstable/man1/midistats.1 +++ b/upstream/debian-unstable/man1/midistats.1 @@ -1,16 +1,24 @@ -.TH MIDISTATS 1 "11 February 2024" +.TH MIDISTATS 1 "18 March 2024" .SH NAME \fBmidistats\fP \- program to summarize the statistical properties of a midi file .SH SYNOPSIS -midistats \fIinfile\fP +This is a long manual because the program extracts many different parameters +from the midi file depending upon the options selected. This manual +attempts to describe these parameters and how they are computed. +These parameters are formatted in a way so they can be read by other +applications such midiexplorer.tcl, runstats.tcl, and numerous Python +scripts. + +Many of the options were designed specifically for analyzing the +percussion track of the midi file. They are described in a separate +section below (Other options). + .SH DESCRIPTION -\fImidistats\fP analyzes the contents of a midi file and outputs key -information and various statistical measures. Each line of output -starts with the name of the variable or variable array and the -associated values. The output is interpreted by the user interface -midiexplorer.tcl. Both programs are still being improved. Here -is an explanation of some of the output. +If you run midistats without any options other than the name of +the midi input file, it will produce a table of values described +here. Each line of output starts with the name of the variable or +variable array and the associated values. .PP ntrks indicates the number of tracks in the midi file. .PP @@ -120,7 +128,12 @@ zeros.) In the case same channel occurs in several tracks, these numbers are the totals for all track containing that channel. Here is a description of these properties. .PP -nnotes: the total number of notes in each channel +programs: channel to midi program mapping +.PP +cnotes: the total number of notes in each channel +.PP +nnotes: the number of notes in each channel not including +those playing in the same time interval. .br nzeros: the number of notes whose previous note was the same pitch .br @@ -134,6 +147,11 @@ rpats: the number of rhythmpatterns for each channels. This is a duplication of data printed previously. .br pavg: the average pitch of all the notes for each channel. +.br +spread: the percentage of the track that each channel is active. +.PP +If some of the channels appear in more than one track, then +some of the above values may be incorrect. .PP In addition the midistats may return other codes that describe other characteristics. They include @@ -154,7 +172,36 @@ programcmd - there may be multiple program changes in a midi channel -.SH Advanced Percussion Analysis Tools +.SH Other options + +It is recommended that you only select one of the options +described here as the program was not designed to handle a +multiple number of options. + +.PP +If you run midistats with the -CSV option, it will return the +results in a form of comma separated values that can be loaded +into a Python panda dataframe. Each line refers to one of the +16 midi channels. The following Python 3 code illustrates +how you would load the midistats output into a dataframe. + +.br +import pandas as pd +.br +import io +.br +import subprocess +.br +cmd = ("midistats", "-CSV" , inputmidifilepath) +.br +process = subprocess.Popen(cmd, stdout=subprocess.PIPE) +.br +csv = io.StringIO(process.stdout.read().decode()) +.br +df = pd.read_csv(csv) + +where inputmidifilepath is the path to the midi file that +you are using. (eg. 'clean_midi/Zero/Chi sei.mid') .PP The MIDI file devotes channel 9 to the percussion instruments |