mirror of
https://github.com/sshlien/abcmidi.git
synced 2025-12-12 05:21:02 +00:00
Compare commits
4 Commits
2022.03.08
...
2022.04.28
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df48d39dc7 | ||
|
|
181f2022f3 | ||
|
|
85e4e1ba50 | ||
|
|
47a0cecc5d |
72
doc/CHANGES
72
doc/CHANGES
@@ -14661,4 +14661,76 @@ if (strstr(line,"%%begintext") != NULL) {
|
|||||||
which returns the pointer to %%begintext in the line.
|
which returns the pointer to %%begintext in the line.
|
||||||
|
|
||||||
|
|
||||||
|
March 20 2022
|
||||||
|
|
||||||
|
abc2midi bug: I could not demonstrate this bug on my own system.
|
||||||
|
|
||||||
|
When abc2midi is compiled on a Debian linux system using the -O2 compilation
|
||||||
|
flag (by default), it produces a faulty midi file for abc files containing
|
||||||
|
gchords. Here is a sample file.
|
||||||
|
|
||||||
|
%abc-2.2
|
||||||
|
X:1
|
||||||
|
T:Test
|
||||||
|
M:C
|
||||||
|
L:1/4
|
||||||
|
Q:1/4=135
|
||||||
|
V:S clef=treble
|
||||||
|
V:s clef=treble
|
||||||
|
K:C
|
||||||
|
%%score (s S)
|
||||||
|
%
|
||||||
|
[V:s] "C" x2 "a" x2 |
|
||||||
|
[V:S] C C A A |
|
||||||
|
|
||||||
|
The problem occurs with the bass accompaniment generated by "a". The
|
||||||
|
bass accompaniment creates a long string of A,, notes.
|
||||||
|
|
||||||
|
This problem disappears when abc2midi is compiled without the
|
||||||
|
-O2 optimizer.
|
||||||
|
|
||||||
|
Analysis: the bug was traced to the code gchord_configure in genmidi.c.
|
||||||
|
The limit of the loops
|
||||||
|
for (j=0; j<chordlen[chordnum]; j++)
|
||||||
|
contain bad data when chordnum is set to -1 (for bass accompaniment).
|
||||||
|
|
||||||
|
Fix: exit from gchord_configure function when chordnum is less than
|
||||||
|
zero.
|
||||||
|
|
||||||
|
The problem was identified to me by Jakob Englhauser. Jakob verified
|
||||||
|
that this fix works.
|
||||||
|
|
||||||
|
|
||||||
|
April 06 2022 midi2abc: removal of spaces in text strings for control
|
||||||
|
messages.
|
||||||
|
|
||||||
|
|
||||||
|
April 27 2022 abc2midi: Recanting change from February 18 2022.
|
||||||
|
The swap was incorrect.
|
||||||
|
Fix: swapped p2 and p1 in
|
||||||
|
*transpose = p2 - p1;
|
||||||
|
in parsesound() in parseabc.c
|
||||||
|
abc2midi now transposes this file correctly.
|
||||||
|
|
||||||
|
|
||||||
|
X:1
|
||||||
|
T: transposition
|
||||||
|
M: 4/4
|
||||||
|
L: 1/4
|
||||||
|
K:Cm
|
||||||
|
V:1 shift=cF
|
||||||
|
cdef|gabc'|
|
||||||
|
V:2 sound=cF
|
||||||
|
cdef|gabc'|
|
||||||
|
V:3 score=cF
|
||||||
|
cdef|gabc'|
|
||||||
|
V:4 instrument=cF
|
||||||
|
cdef|gabc'|
|
||||||
|
|
||||||
|
Note that the command instrument=cF is not part of the abc standard
|
||||||
|
and abc2svg does not recognize it.
|
||||||
|
|
||||||
|
|
||||||
|
April 28 2022
|
||||||
|
|
||||||
|
midi2abc: minor change for -stats function
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
abcMIDI : abc <-> MIDI conversion utilities
|
abcMIDI : abc <-> MIDI conversion utilities
|
||||||
|
|
||||||
midi2abc version 3.52 March 04 2022
|
midi2abc version 3.54 April 28 2022
|
||||||
abc2midi version 4.69 February 22 2022
|
abc2midi version 4.72 April 27 2022
|
||||||
abc2abc version 2.16 February 22 2022
|
abc2abc version 2.16 February 22 2022
|
||||||
yaps version 1.88 February 22 2022
|
yaps version 1.88 February 22 2022
|
||||||
abcmatch version 1.80 November 25 2021
|
abcmatch version 1.80 November 25 2021
|
||||||
|
|||||||
@@ -358,7 +358,9 @@ void configure_gchord()
|
|||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
int inchord, note;
|
int inchord, note;
|
||||||
|
|
||||||
gchordnotes_size = 0;
|
gchordnotes_size = 0;
|
||||||
|
if (chordnum < 0) return; /* [SS] 2022-03-20 */
|
||||||
|
|
||||||
inchord = 0;
|
inchord = 0;
|
||||||
if (inversion != -1) {
|
if (inversion != -1) {
|
||||||
|
|||||||
18
midi2abc.c
18
midi2abc.c
@@ -45,7 +45,7 @@
|
|||||||
* based on public domain 'midifilelib' package.
|
* based on public domain 'midifilelib' package.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define VERSION "3.52 March 04 2022 midi2abc"
|
#define VERSION "3.54 April 28 2022 midi2abc"
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
/* Microsoft Visual C++ Version 6.0 or higher */
|
/* Microsoft Visual C++ Version 6.0 or higher */
|
||||||
@@ -732,6 +732,7 @@ void stats_pressure(chan,press)
|
|||||||
int chan, press;
|
int chan, press;
|
||||||
{
|
{
|
||||||
trkdata.pressure[0]++;
|
trkdata.pressure[0]++;
|
||||||
|
trkdata.pressure[chan+1]++; /* [SS] 2022.04.28 */
|
||||||
}
|
}
|
||||||
|
|
||||||
void txt_parameter(chan,control,value)
|
void txt_parameter(chan,control,value)
|
||||||
@@ -1426,7 +1427,7 @@ int chan, pitch, press;
|
|||||||
char *key;
|
char *key;
|
||||||
if (prtime(timeunits)) return;
|
if (prtime(timeunits)) return;
|
||||||
key = pitch2key(pitch);
|
key = pitch2key(pitch);
|
||||||
printf("Channel Pressure %2d %3s %3d\n",chan+1,key,press);
|
printf("Pressure %2d %3s %3d\n",chan+1,key,press); /* [SS] 2022.04.28 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1530,13 +1531,14 @@ if (trkdata.program[chan+1] != 0) {
|
|||||||
void mftxt_parameter(chan,control,value)
|
void mftxt_parameter(chan,control,value)
|
||||||
int chan, control, value;
|
int chan, control, value;
|
||||||
{
|
{
|
||||||
|
/* removal of spaces [SS] 2022-04-06 in ctype array */
|
||||||
static char *ctype[] = {
|
static char *ctype[] = {
|
||||||
"BankSelect", "ModulationWheel", /*1*/
|
"BankSelect", "ModulationWheel", /*1*/
|
||||||
"Breath controller", "unknown", /*3*/
|
"BreathController", "unknown", /*3*/
|
||||||
"FootPedal", "PortamentoTime", /*5*/
|
"FootPedal", "PortamentoTime", /*5*/
|
||||||
"DataEntry", "Volume", /*7*/
|
"DataEntry", "Volume", /*7*/
|
||||||
"Balance", "unknown", /*9*/
|
"Balance", "unknown", /*9*/
|
||||||
"Pan position", "Expression", /*11*/
|
"PanPosition", "Expression", /*11*/
|
||||||
"EffectControl1", "EffectControl2", /*13*/
|
"EffectControl1", "EffectControl2", /*13*/
|
||||||
"unknown", "unknown", /*15*/
|
"unknown", "unknown", /*15*/
|
||||||
"Slider1", "Slider2", /*17*/
|
"Slider1", "Slider2", /*17*/
|
||||||
@@ -1548,11 +1550,11 @@ int chan, control, value;
|
|||||||
"unknown", "unknown", /*29*/
|
"unknown", "unknown", /*29*/
|
||||||
"unknown", "unknown", /*31*/
|
"unknown", "unknown", /*31*/
|
||||||
"BankSelect(fine)", "ModulationWheel(fine)", /*33*/
|
"BankSelect(fine)", "ModulationWheel(fine)", /*33*/
|
||||||
"Breath controller (fine)", "unknown", /*35*/
|
"BreathController(fine)", "unknown", /*35*/
|
||||||
"FootPedal(fine)", "PortamentoTime(fine)", /*37*/
|
"FootPedal(fine)", "PortamentoTime(fine)", /*37*/
|
||||||
"DataEntry(fine)", "Volume(fine)", /*39*/
|
"DataEntry(fine)", "Volume(fine)", /*39*/
|
||||||
"Balance(fine)", "unknown", /*41*/
|
"Balance(fine)", "unknown", /*41*/
|
||||||
"Pan position (fine)", "Expression (fine)", /*43*/
|
"PanPosition(fine)", "Expression(fine)", /*43*/
|
||||||
"EffectControl1(fine)", "EffectControl2(fine)", /*45*/
|
"EffectControl1(fine)", "EffectControl2(fine)", /*45*/
|
||||||
"unknown", "unknown", /*47*/
|
"unknown", "unknown", /*47*/
|
||||||
"unknown", "unknown", /*49*/
|
"unknown", "unknown", /*49*/
|
||||||
@@ -1579,9 +1581,9 @@ int chan, control, value;
|
|||||||
"unknown", "EffectsLevel", /*91*/
|
"unknown", "EffectsLevel", /*91*/
|
||||||
"TremoloLevel", "ChorusLevel", /*93*/
|
"TremoloLevel", "ChorusLevel", /*93*/
|
||||||
"CelesteLevel", "PhaserLevel", /*95*/
|
"CelesteLevel", "PhaserLevel", /*95*/
|
||||||
"Data button increment", "Data button decrement", /*97*/
|
"DataButtonIncrement", "DataButtonDecrement", /*97*/
|
||||||
"NRP(fine)", "NRP(coarse)", /*99*/
|
"NRP(fine)", "NRP(coarse)", /*99*/
|
||||||
"Registered parameter (fine)", "Registered parameter (coarse)", /*101*/
|
"RegisteredParameter(fine)", "RegisteredParameter(coarse)", /*101*/
|
||||||
"unknown", "unknown", /*103*/
|
"unknown", "unknown", /*103*/
|
||||||
"unknown", "unknown", /*105*/
|
"unknown", "unknown", /*105*/
|
||||||
"unknown", "unknown", /*107*/
|
"unknown", "unknown", /*107*/
|
||||||
|
|||||||
@@ -1056,7 +1056,7 @@ parsesound (s, word, gottranspose, transpose)
|
|||||||
*transpose = 0;
|
*transpose = 0;
|
||||||
} else {
|
} else {
|
||||||
/* printf("midi note = %d\n",p2); */
|
/* printf("midi note = %d\n",p2); */
|
||||||
*transpose = p1 - p2; /* [SS] 2022.02.18 */
|
*transpose = p2 - p1; /* [SS] 2022.02.18 2022.04.27 */
|
||||||
/* printf("transpose = %d\n",*transpose); */
|
/* printf("transpose = %d\n",*transpose); */
|
||||||
*gottranspose = 1;
|
*gottranspose = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
4
store.c
4
store.c
@@ -186,7 +186,7 @@ int main()
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define VERSION "4.70 February 22 2022 abc2midi"
|
#define VERSION "4.72 April 27 2022 abc2midi"
|
||||||
|
|
||||||
/* enables reading V: indication in header */
|
/* enables reading V: indication in header */
|
||||||
#define XTEN1 1
|
#define XTEN1 1
|
||||||
@@ -1860,7 +1860,7 @@ nmidicmd++;
|
|||||||
/* [SS] 2015-06-01 For converting the %%MIDIx command to a
|
/* [SS] 2015-06-01 For converting the %%MIDIx command to a
|
||||||
%%MIDI command
|
%%MIDI command
|
||||||
*/
|
*/
|
||||||
void event_midi();
|
void event_midi(char* s); /* [SS] 2022-03-19 */
|
||||||
|
|
||||||
|
|
||||||
void process_midix(s)
|
void process_midix(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user