2024.01.15

This commit is contained in:
sshlien
2024-01-15 17:22:56 -05:00
parent ad41b9b053
commit 79e7ac2d97
5 changed files with 49 additions and 17 deletions

View File

@@ -1,2 +1,2 @@
January 02 2024 January 04 2024

View File

@@ -15207,3 +15207,23 @@ not adjusted by event_chordoff to compensate by the length value
specified at the end of the [ac'] chord, resulting in the problem. specified at the end of the [ac'] chord, resulting in the problem.
January 15 2024
abc2midi bug: the following example produces a warning, but the
the output midi file is correct.
Warning in line-char 7-23 : Track 1 Bar 1 has 1 time units while the time signature has 2
X:1
T:Test trill
L:1/4
M:2/2
Q:1/2=60
K:Dm
!trill!"C"g4- | g2^c2 |
Analysis: this warning is produced by checkbar() in genmidi.c. This problem was
reported in this file on November 23 2012. The code for handling tied notes is
quite intricate and I do not understand it. I am hesitant in tampering with the code.

View File

@@ -1,4 +1,4 @@
.TH MIDISTATS 1 "02 January 2024" .TH MIDISTATS 1 "04 January 2024"
.SH NAME .SH NAME
\fBmidistats\fP \- program to summarize the statistical properties of a midi file \fBmidistats\fP \- program to summarize the statistical properties of a midi file
.SH SYNOPSIS .SH SYNOPSIS
@@ -251,7 +251,7 @@ splits the two 4-bit values with a period. Thus 33 = (2*16 + 1).
.br .br
Returns the pitch class distribution for the entire midi file. Returns the pitch class distribution for the entire midi file.
.PP .PP
-nseqfor -nseqfor n
.br .br
Note sequence for channel n. This option produces a string of bytes Note sequence for channel n. This option produces a string of bytes
indicating the presence of a note in a time unit corresponding to indicating the presence of a note in a time unit corresponding to
@@ -269,13 +269,15 @@ twice of much memory.
Though the pitch resolution is not sufficient to distinguish Though the pitch resolution is not sufficient to distinguish
major or minor chords, it should be sufficient to be identify some major or minor chords, it should be sufficient to be identify some
repeating patterns. repeating patterns.
.PP
-nseq
.br
Same as above except it is applied to all channels except the
percussion channel.
-ver (version number) -ver (version number)
.B etc. (See drums.txt in doc folder.)
.SH AUTHOR .SH AUTHOR
Seymour Shlien <fy733@ncf.ca> Seymour Shlien <fy733@ncf.ca>

View File

@@ -6,7 +6,7 @@ abc2abc version 2.20 February 07 2023
yaps version 1.92 January 06 2023 yaps version 1.92 January 06 2023
abcmatch version 1.82 June 14 2022 abcmatch version 1.82 June 14 2022
midicopy version 1.39 November 08 2022 midicopy version 1.39 November 08 2022
midistats version 0.84 January 02 2023 midistats version 0.85 January 04 2024
24th January 2002 24th January 2002
Copyright James Allwright Copyright James Allwright

View File

@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#define VERSION "0.84 December 29 2023 midistats" #define VERSION "0.85 January 04 2024 midistats"
/* midistrats.c is a descendent of midi2abc.c which was becoming to /* midistrats.c is a descendent of midi2abc.c which was becoming to
large. The object of the program is to extract statistical characterisitic large. The object of the program is to extract statistical characterisitic
@@ -1178,15 +1178,17 @@ half = division/2;
for (i = 0; i<8000; i++) pseq[i] = 0; for (i = 0; i<8000; i++) pseq[i] = 0;
for (i = 0; i <lastEvent; i++) { for (i = 0; i <lastEvent; i++) {
channel = midievents[i].channel; channel = midievents[i].channel;
if (channel != chn) continue; if (channel == 9) continue; /* ignore percussion channel */
pitchclass = midievents[i].pitch % 12; if (channel == chn || chn == -1) {
noteNum = pitch2noteseq[pitchclass]; pitchclass = midievents[i].pitch % 12;
onset = midievents[i].onsetTime; noteNum = pitch2noteseq[pitchclass];
index = onset/half; onset = midievents[i].onsetTime;
if (index >= 8000) {printf("index too large in drumpattern\n"); index = onset/half;
if (index >= 8000) {printf("index too large in drumpattern\n");
break; break;
} }
pseq[index] = pseq[index] |= 1 << noteNum; pseq[index] = pseq[index] |= 1 << noteNum;
}
/*printf("pitchclass = %d noteNum =%d index = %d pseq[index] %d \n",pitchclass, noteNum, index, pseq[index]); */ /*printf("pitchclass = %d noteNum =%d index = %d pseq[index] %d \n",pitchclass, noteNum, index, pseq[index]); */
} }
printf("lastBeat = %d\n",lastBeat); printf("lastBeat = %d\n",lastBeat);
@@ -1589,6 +1591,13 @@ int argc;
} }
} }
arg = getarg("-nseq",argc,argv);
if (arg != -1) {
nseqfor = 1;
stats = 0;
nseqchn = -1;
}
arg = getarg("-ppathist",argc,argv); arg = getarg("-ppathist",argc,argv);
if (arg != -1) { if (arg != -1) {
percpatternhist = 1; percpatternhist = 1;
@@ -1626,10 +1635,11 @@ int argc;
printf(" -pulseanalysis\n"); printf(" -pulseanalysis\n");
printf(" -panal\n"); printf(" -panal\n");
printf(" -ppat\n"); printf(" -ppat\n");
printf(" -ppatfor\n"); printf(" -ppatfor pitch\n");
printf(" -ppathist\n"); printf(" -ppathist\n");
printf(" -pitchclass\n"); printf(" -pitchclass\n");
printf(" -nseqfor\n"); printf(" -nseq\n");
printf(" -nseqfor channel\n");
printf(" -ver version number\n"); printf(" -ver version number\n");
printf(" -d <number> debug parameter\n"); printf(" -d <number> debug parameter\n");
printf(" The input filename is assumed to be any string not\n"); printf(" The input filename is assumed to be any string not\n");