mirror of
https://github.com/sshlien/abcmidi.git
synced 2025-12-06 06:55:06 +00:00
2024.01.15
This commit is contained in:
20
doc/CHANGES
20
doc/CHANGES
@@ -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.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH MIDISTATS 1 "02 January 2024"
|
||||
.TH MIDISTATS 1 "04 January 2024"
|
||||
.SH NAME
|
||||
\fBmidistats\fP \- program to summarize the statistical properties of a midi file
|
||||
.SH SYNOPSIS
|
||||
@@ -251,7 +251,7 @@ splits the two 4-bit values with a period. Thus 33 = (2*16 + 1).
|
||||
.br
|
||||
Returns the pitch class distribution for the entire midi file.
|
||||
.PP
|
||||
-nseqfor
|
||||
-nseqfor n
|
||||
.br
|
||||
Note sequence for channel n. This option produces a string of bytes
|
||||
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
|
||||
major or minor chords, it should be sufficient to be identify some
|
||||
repeating patterns.
|
||||
.PP
|
||||
-nseq
|
||||
.br
|
||||
Same as above except it is applied to all channels except the
|
||||
percussion channel.
|
||||
|
||||
|
||||
-ver (version number)
|
||||
|
||||
.B etc. (See drums.txt in doc folder.)
|
||||
|
||||
|
||||
|
||||
.SH AUTHOR
|
||||
Seymour Shlien <fy733@ncf.ca>
|
||||
|
||||
@@ -6,7 +6,7 @@ abc2abc version 2.20 February 07 2023
|
||||
yaps version 1.92 January 06 2023
|
||||
abcmatch version 1.82 June 14 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
|
||||
Copyright James Allwright
|
||||
|
||||
30
midistats.c
30
midistats.c
@@ -18,7 +18,7 @@
|
||||
* 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
|
||||
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 <lastEvent; i++) {
|
||||
channel = midievents[i].channel;
|
||||
if (channel != chn) continue;
|
||||
pitchclass = midievents[i].pitch % 12;
|
||||
noteNum = pitch2noteseq[pitchclass];
|
||||
onset = midievents[i].onsetTime;
|
||||
index = onset/half;
|
||||
if (index >= 8000) {printf("index too large in drumpattern\n");
|
||||
if (channel == 9) continue; /* ignore percussion channel */
|
||||
if (channel == chn || chn == -1) {
|
||||
pitchclass = midievents[i].pitch % 12;
|
||||
noteNum = pitch2noteseq[pitchclass];
|
||||
onset = midievents[i].onsetTime;
|
||||
index = onset/half;
|
||||
if (index >= 8000) {printf("index too large in drumpattern\n");
|
||||
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("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);
|
||||
if (arg != -1) {
|
||||
percpatternhist = 1;
|
||||
@@ -1626,10 +1635,11 @@ int argc;
|
||||
printf(" -pulseanalysis\n");
|
||||
printf(" -panal\n");
|
||||
printf(" -ppat\n");
|
||||
printf(" -ppatfor\n");
|
||||
printf(" -ppatfor pitch\n");
|
||||
printf(" -ppathist\n");
|
||||
printf(" -pitchclass\n");
|
||||
printf(" -nseqfor\n");
|
||||
printf(" -nseq\n");
|
||||
printf(" -nseqfor channel\n");
|
||||
printf(" -ver version number\n");
|
||||
printf(" -d <number> debug parameter\n");
|
||||
printf(" The input filename is assumed to be any string not\n");
|
||||
|
||||
Reference in New Issue
Block a user