mirror of
https://github.com/sshlien/abcmidi.git
synced 2025-12-06 06:55:06 +00:00
2022.12.07
This commit is contained in:
@@ -14858,3 +14858,10 @@ August 23 2022, September 01 2022
|
||||
|
||||
midi2abc -midistats introducing quietTime.
|
||||
|
||||
December 5 2022
|
||||
|
||||
Midi2abc has been getting too big and it is time to split it into
|
||||
separate applications. Midistats is a new application that will replace
|
||||
the midi2abc -midistats option.
|
||||
|
||||
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
The output of midi2abc with the -stats is used by
|
||||
the midiexplorer application which can by found on
|
||||
sourceforge.net. The output looks something like this
|
||||
|
||||
seymour@corsair:~/abc$ midi2abc summer.mid -stats
|
||||
ntrks 10
|
||||
ppqn 120
|
||||
trk 1
|
||||
timesig 4/4 0.00
|
||||
keysig C 0 0 0.00
|
||||
tempo 132.00 bpm
|
||||
trk 2
|
||||
metatext 3 Synth Bass 1
|
||||
program 1 38
|
||||
trkinfo 1 38 156 774 41022 50468
|
||||
trk 3
|
||||
metatext 3 Brass 1
|
||||
program 2 61
|
||||
trkinfo 2 61 102 0 6618 2982
|
||||
trk 4
|
||||
...
|
||||
trk 10
|
||||
metatext 3 Drums
|
||||
program 10 17
|
||||
trkinfo 10 17 1390 1158 108340 25777
|
||||
npulses 58552
|
||||
tempocmds 1
|
||||
pitchbends 0
|
||||
programcmd 0
|
||||
progs 35 38 50 54 61 80 81 102
|
||||
progsact 49460 50468 15426 3237 2982 22295 15938 4703
|
||||
progcolor 0.00 0.00 0.00 0.00 0.00 1.71 0.00 0.26 0.06 0.05 0.00 0.00 0.00 0.65 0.00 0.08 0.00
|
||||
drums 36 38 39 42 54
|
||||
drumhits 548 287 128 1073 512
|
||||
pitches 473 0 1267 216 20 344 36 717 0 321 364 0
|
||||
pitchact 0.32 0.00 1.10 0.15 0.03 0.22 0.03 0.51 0.00 0.26 0.20 0.00
|
||||
chnact 0.86 0.05 0.06 0.27 0.38 0.26 0.08 0.84 0.00 0.44 0.00 0.00 0.00 0.00 0.00 0.00
|
||||
pitchentropy 2.567729
|
||||
|
||||
|
||||
Here is a description of some of the values which are outputted.
|
||||
|
||||
timesig 4/4 beat number
|
||||
is issued each time the time signature is redefined. The beat number
|
||||
is a decimal number in quarter beats.
|
||||
|
||||
The same apples for keysig (key signature) and tempo redefinition.
|
||||
|
||||
For each channel, midi2abc prints a trkinfo vector which contains
|
||||
the following information.
|
||||
|
||||
the channel number
|
||||
the first program number assigned to the channel
|
||||
the number of notes not appearing inside a chord
|
||||
the number of notes appearing in a chord
|
||||
the sum of all the MIDI pitches of the notes
|
||||
the sum of all the note durations in pulses
|
||||
|
||||
Finally, midi2abc outputs the following data.
|
||||
|
||||
npulses -- the length of the longest track in pulses
|
||||
tempocmds - the number of tempo commands encountered
|
||||
pitchbends - the number of pitchbend commands encountered
|
||||
programcmd - the number of times the program assignment is
|
||||
reassigned
|
||||
progs vector - list of all the MIDI programs used
|
||||
progsact vector - the activity for each of the above MIDI programs. The
|
||||
activity is the sum of the note durations in pulses for each of the
|
||||
above programs.
|
||||
progcolor - described below
|
||||
drums - a list of all the MIDI percussion numbers used
|
||||
drumhits - the number of note on commands for each of the above percussion
|
||||
instruments.
|
||||
pitches - the number of note on commands for each of the 12 pitch
|
||||
classes (C, C#, D, D# ... B)
|
||||
pitchact - duration in pulses of all notes grouped by pitch classes
|
||||
chnact - duration in pulses of all notes grouped by channel
|
||||
pitchentropy - entropy of the pitchact probability density function
|
||||
|
||||
|
||||
progcolor: The 128 MIDI program numbers are mapped into 17 classes.
|
||||
These classes group keyboard instruments, brass instruments, guitar
|
||||
instruments etc into separate groups defined here.
|
||||
static int progmapper[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 1, 1, 1, 1, 1, 1, 2,
|
||||
3, 3, 3, 3, 3, 3, 3, 3,
|
||||
2, 2, 4, 4, 4, 4, 4, 2,
|
||||
5, 5, 5, 5, 5, 5, 5, 5,
|
||||
6, 6, 6, 6, 6, 2, 7, 10,
|
||||
7, 7, 7, 7, 8, 8, 8, 8,
|
||||
9, 9, 9, 9, 9, 9, 9, 9,
|
||||
11, 11, 11, 11, 11, 11, 11, 11,
|
||||
12, 12, 12, 12, 12, 12, 12, 12,
|
||||
13, 13, 13, 13, 13, 13, 13, 13,
|
||||
14, 14, 14, 14, 14, 14, 14, 14,
|
||||
15, 15, 15, 15, 15, 15, 15, 15,
|
||||
2, 2, 2, 2, 2, 12, 6, 12,
|
||||
1, 1, 10, 10, 10, 10, 10, 1,
|
||||
16, 16, 16, 16, 16, 16, 16, 16
|
||||
};
|
||||
|
||||
The activity in each of these programs is measured, normalized to
|
||||
a unit length vector and returned in the progcolor vector.
|
||||
|
||||
|
||||
82
doc/midistats.1
Normal file
82
doc/midistats.1
Normal file
@@ -0,0 +1,82 @@
|
||||
.TH MIDISTATS 1 "3 December 2022"
|
||||
.SH NAME
|
||||
\fBmidistats\fP \- program to summarize the statistical properties of a midi file
|
||||
.SH SYNOPSIS
|
||||
midistats \fIinfile\fP
|
||||
|
||||
.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.
|
||||
.PP
|
||||
ntrks indicates the number of tracks in the midi file.
|
||||
.PP
|
||||
ppqn the number of midi pulses per quarter note.
|
||||
.PP
|
||||
keysig the key signature, followed by a major/minor flag, the number
|
||||
of sharps (positive) or flats (negative) in the key, and the beat number
|
||||
where the key signature was found.
|
||||
.PP
|
||||
trk is followed by the track number for which the following information
|
||||
applies.
|
||||
.PP
|
||||
program is followed by the channel number and the General Midi Program
|
||||
number.
|
||||
.PP
|
||||
trkinfo is an array of 8 numbers which indicates the statistical properties
|
||||
of the track of interest. The following data is given:
|
||||
the channel number,
|
||||
the first program assigned to this channel,
|
||||
the number of notes for this channel counting any chords as one note,
|
||||
the total number of notes for this for this channel,
|
||||
the sum of the MIDI pitches for all the notes,
|
||||
the sum of the note durations in MIDI pulse units,
|
||||
the number of control parameter messages,
|
||||
and the number of pressure messages.
|
||||
|
||||
.PP
|
||||
After processing all the individual tracks, the following information
|
||||
applies to the entire midi file.
|
||||
.PP
|
||||
rhythmPatterns indicates the number of distinct rhythm patterns for each
|
||||
channel. A large number likely implies that the melody line occurs in
|
||||
this channel, while a small number indicates that this channel probably
|
||||
is used for chordal support.
|
||||
.PP
|
||||
npulses is the length of the longest midi track in midi pulse units
|
||||
.PP
|
||||
tempocmds specifies the number of times the tempo is changed in this
|
||||
file.
|
||||
.PP
|
||||
pitchbends specifies the total number of pitchbends in this file.
|
||||
.PP
|
||||
progs is a list of all the midi programs addressed
|
||||
.PP
|
||||
progsact the amount of activity for each of the above midi programs.
|
||||
The activity is the sum of the note durations in midi pulse units.
|
||||
.PP
|
||||
progcolor: is a 17 dimensional vector where each component maps into
|
||||
a specific group of MIDI programs. Some of these groups are, keyboard
|
||||
instruments, brass instruments, wind instruments, and etc. More information
|
||||
can be found in the midiexplorer documentation.
|
||||
.PP
|
||||
drums is a list of all the percussion instruments (channel 9) that were
|
||||
used.
|
||||
.PP
|
||||
drumhits indicates the number of notes for each of the above percussion
|
||||
instruments.
|
||||
.PP
|
||||
pitches is a histogram for the 11 pitch classes (C, C#, D ...B)
|
||||
that occur in the midi file.
|
||||
.PP
|
||||
pitchact is a similar histogram but is weighted by the length of
|
||||
the notes.
|
||||
|
||||
.SH AUTHOR
|
||||
Seymour Shlien <fy733@ncf.ca>
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ abc2abc version 2.18 June 14 2022
|
||||
yaps version 1.90 June 14 2022
|
||||
abcmatch version 1.82 June 14 2022
|
||||
midicopy version 1.38 May 06 2022
|
||||
midistats version 0.56 December 07 2022
|
||||
|
||||
24th January 2002
|
||||
|
||||
|
||||
Reference in New Issue
Block a user