2023.08.22

This commit is contained in:
sshlien
2023-08-22 09:21:59 -04:00
parent 5534c8935d
commit 3f405a1aba
4 changed files with 25 additions and 11 deletions

View File

@@ -1,2 +1,2 @@
Juen 25 2023 August 22 2023

View File

@@ -15093,3 +15093,14 @@ be the acoutic piano (0) by default.
If more than one channel with the same program color, they should be If more than one channel with the same program color, they should be
added together. added together.
August 22 2023
Midistats improved the calculation of the number of rhythm patterns
in a channel (barChn[chan].rhythmPattern) by allowing for dithering
of note onset. Introduced dithermargin variable in function
stats_noteon(). In function, output_track_summary(), suppressed
notemeanpitch for percussion channel.

View File

@@ -6,20 +6,18 @@ 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.38 May 06 2022 midicopy version 1.38 May 06 2022
midistats version 0.59 February 08 2023 midistats version 0.71 August 222023
24th January 2002 24th January 2002
Copyright James Allwright Copyright James Allwright
J.R.Allwright@westminster.ac.uk jamesallwright@yahoo.co.uk
University of Westminster, University of Westminster,
London, UK London, UK
October 2021 August 2023
Copyright Seymour Shlien
Seymour Shlien
Ottawa, Canada
fy733@ncf.ca fy733@ncf.ca
Ottawa, Canada
This is free software. You may copy and re-distribute it under the terms of This is free software. You may copy and re-distribute it under the terms of
the GNU General Public License version 2 or later, which is available from the GNU General Public License version 2 or later, which is available from

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.70 June 25 2023 midistats" #define VERSION "0.71 August 22 2023 midistats"
#include <limits.h> #include <limits.h>
/* Microsoft Visual C++ Version 6.0 or higher */ /* Microsoft Visual C++ Version 6.0 or higher */
@@ -584,7 +584,10 @@ for (i=1;i<17;i++) {
printf("trkinfo "); printf("trkinfo ");
printf("%d %d ",i,trkdata.program[i]); /* channel number and program*/ printf("%d %d ",i,trkdata.program[i]); /* channel number and program*/
printf("%d %d ",trkdata.notecount[i],trkdata.chordcount[i]); printf("%d %d ",trkdata.notecount[i],trkdata.chordcount[i]);
printf("%d %d ",trkdata.notemeanpitch[i], trkdata.notelength[i]); /* [SS] 2023-08-22 */
if (i != 10) printf("%d %d ",trkdata.notemeanpitch[i], trkdata.notelength[i]);
else
printf("-1 0 ");
printf("%d %d ",trkdata.cntlparam[i],trkdata.pressure[i]); /* [SS] 2022-03-04 */ printf("%d %d ",trkdata.cntlparam[i],trkdata.pressure[i]); /* [SS] 2022-03-04 */
printf("%d %d",trkdata.quietTime[i],trkdata.rhythmpatterns[i]); printf("%d %d",trkdata.quietTime[i],trkdata.rhythmpatterns[i]);
trkdata.quietTime[i] = 0; trkdata.quietTime[i] = 0;
@@ -628,7 +631,9 @@ int chan, pitch, vol;
int delta; int delta;
int barnum; int barnum;
int unit; int unit;
int dithermargin; /* [SS] 2023-08-22 */
dithermargin = unitDivision/2 - 1;
if (vol == 0) { if (vol == 0) {
/* treat as noteoff */ /* treat as noteoff */
stats_noteoff(chan,pitch,vol); stats_noteoff(chan,pitch,vol);
@@ -661,7 +666,7 @@ int chan, pitch, vol;
barChn[chan].rhythmPattern = 0; barChn[chan].rhythmPattern = 0;
barChn[chan].activeBarNumber = barnum; barChn[chan].activeBarNumber = barnum;
} }
unit = (Mf_currtime % divisionsPerBar)/unitDivision; unit = ((Mf_currtime+dithermargin) % divisionsPerBar)/unitDivision;
//printf("unit = %d pattern = %d \n",unit,barChn[chan].rhythmPattern); //printf("unit = %d pattern = %d \n",unit,barChn[chan].rhythmPattern);
barChn[chan].rhythmPattern = barChn[chan].rhythmPattern |= (1UL << unit); barChn[chan].rhythmPattern = barChn[chan].rhythmPattern |= (1UL << unit);
} }