Compare commits

...

1 Commits

Author SHA1 Message Date
sshlien
34f6ef01e2 2024.03.13 2024-03-13 12:17:06 -04:00
4 changed files with 19 additions and 5 deletions

View File

@@ -1,2 +1,2 @@
March 05 2024
March 13 2024

View File

@@ -1,4 +1,4 @@
.TH MIDISTATS 1 "11 February 2024"
.TH MIDISTATS 1 "18 February 2024"
.SH NAME
\fBmidistats\fP \- program to summarize the statistical properties of a midi file
.SH SYNOPSIS
@@ -139,6 +139,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

View File

@@ -6,7 +6,7 @@ abc2abc version 2.21 February 19 2024
yaps version 1.93 February 19 2024
abcmatch version 1.83 February 19 2024
midicopy version 1.39 November 08 2022
midistats version 0.88 March 05 2024
midistats version 0.89 March 13 2024
24th January 2002
Copyright James Allwright

View File

@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define VERSION "0.88 March 05 2024 midistats"
#define VERSION "0.89 March 13 2024 midistats"
/* midistrats.c is a descendent of midi2abc.c which was becoming to
large. The object of the program is to extract statistical characterisitic
@@ -204,6 +204,8 @@ struct notememory {int eighthUnit;
int jumpCount;
int totalNotes;
int totalPitches;
int quietTime;
int used;
} nm[17];
struct notememory tracknm;
@@ -709,6 +711,8 @@ for (i=1;i<17;i++) {
printf(" %f",trkdata.pitchEntropy[i]);
} else
printf("-1 0");
nm[i].quietTime += trkdata.quietTime[i];
nm[i].used = channel_used_in_track[i];
trkdata.quietTime[i] = 0; /* in case channel i is used in another track */
trkdata.numberOfGaps[i] = 0;
if (lasttrack > 1) printf(" %d %d %d\n",tracknm.zeroCount,tracknm.stepCount,tracknm.jumpCount);
@@ -776,6 +780,8 @@ void clearNotememory () {
nm[i].jumpCount = 0;
nm[i].totalNotes =0;
nm[i].totalPitches =0;
nm[i].quietTime = 0;
nm[i].used = 0;
}
}
@@ -1363,7 +1369,10 @@ int i;
printf("\npavg: ");
/* avoid dividing by 0 */
for(i=0;i<16;i++) printf(" %d",nm[i].totalPitches/(1+nm[i].totalNotes));
printf("\n");
printf("\nspread: ");
for(i=1;i<17;i++) if(nm[i].used > 0) printf(" %d",100*(trkdata.npulses[0] - nm[i].quietTime)/trkdata.npulses[0]);
else printf(" %d",0);
printf("\n");
}
void dualDrumPattern (int perc1, int perc2) {