mirror of
https://github.com/sshlien/abcmidi.git
synced 2025-12-08 19:01:02 +00:00
Compare commits
2 Commits
2021.11.25
...
2021.12.12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
402f1ba212 | ||
|
|
3e1306aa26 |
46
doc/CHANGES
46
doc/CHANGES
@@ -14491,3 +14491,49 @@ with
|
|||||||
if (*nnotes > 0) { /* [SS] 2021-11-25 */
|
if (*nnotes > 0) { /* [SS] 2021-11-25 */
|
||||||
in the function make_note_representation(...)
|
in the function make_note_representation(...)
|
||||||
|
|
||||||
|
|
||||||
|
December 05 2021
|
||||||
|
|
||||||
|
abc2midi new feature. Abc2midi did not recognize double flats or double sharps
|
||||||
|
in the gchord. For example
|
||||||
|
|
||||||
|
X:1
|
||||||
|
T: Double flat gchord
|
||||||
|
M: 4/4
|
||||||
|
L: 1/4
|
||||||
|
K: C
|
||||||
|
"Dbb" C4| C4 |
|
||||||
|
|
||||||
|
returns the error message
|
||||||
|
Error in line-char 6-0 : Unrecognized chord name "b"
|
||||||
|
(Hint: use %MIDI chordname to define it. eg %MIDI chordname sus4 0 4 7).
|
||||||
|
|
||||||
|
Fix: in event_handle_gchord in store.c, now check for a double accidental.
|
||||||
|
|
||||||
|
|
||||||
|
December 10 2021
|
||||||
|
|
||||||
|
abc2midi: introduced gchord elements k and K. A gchord string can
|
||||||
|
contain and of the letters in zcfbghijkGHIJKx. Note that the chord
|
||||||
|
elements j,J,k,K are only defined for gchords with 4 or 5 notes like
|
||||||
|
M9 or M11. Here is a test example.
|
||||||
|
|
||||||
|
X:1
|
||||||
|
T: Gchord string
|
||||||
|
M: 4/4
|
||||||
|
L: 1/4
|
||||||
|
K: C
|
||||||
|
%%MIDI chordname x 0 3 5 7 9
|
||||||
|
%%MIDI gchord fGHIJK
|
||||||
|
"C11" C4 | C4 |
|
||||||
|
"Cx" C4 | C4|
|
||||||
|
"C11/E" C4 | C4|
|
||||||
|
"C11/G" C4 | C4|
|
||||||
|
"C11/B" C4 | C4|
|
||||||
|
|
||||||
|
|
||||||
|
December 12 2021
|
||||||
|
|
||||||
|
abcmidi: changed bar length warning as suggested by James Allwright.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
abcMIDI : abc <-> MIDI conversion utilities
|
abcMIDI : abc <-> MIDI conversion utilities
|
||||||
|
|
||||||
midi2abc version 3.48 June 27 2021
|
midi2abc version 3.48 June 27 2021
|
||||||
abc2midi version 4.61 October 11 2021
|
abc2midi version 4.64 December 12 2021
|
||||||
abc2abc version 2.15 May 25 2021
|
abc2abc version 2.15 May 25 2021
|
||||||
yaps version 1.87 May 25 2021
|
yaps version 1.87 May 25 2021
|
||||||
abcmatch version 1.80 November 25 2021
|
abcmatch version 1.80 November 25 2021
|
||||||
|
|||||||
20
genmidi.c
20
genmidi.c
@@ -398,7 +398,8 @@ char* s;
|
|||||||
p = s;
|
p = s;
|
||||||
j = 0;
|
j = 0;
|
||||||
seq_len = 0;
|
seq_len = 0;
|
||||||
while ((strchr("zcfbghijGHIJx", *p) != NULL) && (j <39)) {
|
/* [SS] 2021-12-10 */
|
||||||
|
while ((strchr("zcfbghijkGHIJKx", *p) != NULL) && (j <39)) {
|
||||||
if (*p == 0) break;
|
if (*p == 0) break;
|
||||||
gchord_seq[j] = *p;
|
gchord_seq[j] = *p;
|
||||||
p = p + 1;
|
p = p + 1;
|
||||||
@@ -530,7 +531,7 @@ int pass;
|
|||||||
if (bar_denom != 1) {
|
if (bar_denom != 1) {
|
||||||
sprintf(msg+strlen(msg), "/%d", bar_denom);
|
sprintf(msg+strlen(msg), "/%d", bar_denom);
|
||||||
};
|
};
|
||||||
sprintf(msg+strlen(msg), " units instead of %d", barsize);
|
sprintf(msg+strlen(msg), " time units while the time signature has %d", barsize);
|
||||||
if (pass == 2) {
|
if (pass == 2) {
|
||||||
strcat(msg, " in repeat");
|
strcat(msg, " in repeat");
|
||||||
};
|
};
|
||||||
@@ -2453,6 +2454,13 @@ int j;
|
|||||||
save_note(g_num*len, g_denom, gchordnotes[gchordnotes_size], 8192, gchord.chan, gchord.vel);
|
save_note(g_num*len, g_denom, gchordnotes[gchordnotes_size], 8192, gchord.chan, gchord.vel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* [SS] 2021-12-10 */
|
||||||
|
case 'k':
|
||||||
|
if(gchordnotes_size >4 && g_started && gchords)
|
||||||
|
save_note(g_num*len, g_denom, gchordnotes[4], 8192, gchord.chan, gchord.vel);
|
||||||
|
else /* [SS] 2016-01-03 */
|
||||||
|
save_note(g_num*len, g_denom, gchordnotes[gchordnotes_size], 8192, gchord.chan, gchord.vel);
|
||||||
|
|
||||||
case 'G':
|
case 'G':
|
||||||
if(gchordnotes_size>0 && g_started && gchords)
|
if(gchordnotes_size>0 && g_started && gchords)
|
||||||
save_note(g_num*len, g_denom, gchordnotes[0]-12, 8192, gchord.chan, gchord.vel);
|
save_note(g_num*len, g_denom, gchordnotes[0]-12, 8192, gchord.chan, gchord.vel);
|
||||||
@@ -2481,6 +2489,14 @@ int j;
|
|||||||
save_note(g_num*len, g_denom, gchordnotes[gchordnotes_size], 8192, gchord.chan, gchord.vel);
|
save_note(g_num*len, g_denom, gchordnotes[gchordnotes_size], 8192, gchord.chan, gchord.vel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* [SS] 2021-12-10 */
|
||||||
|
case 'K':
|
||||||
|
if(gchordnotes_size >3 && g_started && gchords)
|
||||||
|
save_note(g_num*len, g_denom, gchordnotes[4]-12, 8192, gchord.chan, gchord.vel);
|
||||||
|
else /* [SS] 2016-01-03 */
|
||||||
|
save_note(g_num*len, g_denom, gchordnotes[gchordnotes_size], 8192, gchord.chan, gchord.vel);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'x':
|
case 'x':
|
||||||
if(!gchord_error) {
|
if(!gchord_error) {
|
||||||
gchord_error++;
|
gchord_error++;
|
||||||
|
|||||||
18
store.c
18
store.c
@@ -186,7 +186,7 @@ int main()
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define VERSION "4.61 October 11 2021 abc2midi"
|
#define VERSION "4.64 December 12 2021 abc2midi"
|
||||||
|
|
||||||
/* enables reading V: indication in header */
|
/* enables reading V: indication in header */
|
||||||
#define XTEN1 1
|
#define XTEN1 1
|
||||||
@@ -4494,13 +4494,15 @@ void event_handle_gchord(s)
|
|||||||
char* s;
|
char* s;
|
||||||
{
|
{
|
||||||
int basepitch;
|
int basepitch;
|
||||||
char accidental, note;
|
char accidental, accidental2, note; /* [SS] 2021-12-05 */
|
||||||
char* p;
|
char* p;
|
||||||
char name[9];
|
char name[9];
|
||||||
int i;
|
int i;
|
||||||
int chordno;
|
int chordno;
|
||||||
int bassnote;
|
int bassnote;
|
||||||
int inversion;
|
int inversion;
|
||||||
|
int mult; /* [SS] 2021-12-05 */
|
||||||
|
mult = 1;
|
||||||
|
|
||||||
if (ignore_guitarchords == 1) return; /* [SS] 2019-12-09 */
|
if (ignore_guitarchords == 1) return; /* [SS] 2019-12-09 */
|
||||||
if ((*s >= '0') && (*s <= '5')) {
|
if ((*s >= '0') && (*s <= '5')) {
|
||||||
@@ -4527,7 +4529,9 @@ char* s;
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
p = get_accidental(p, &accidental);
|
p = get_accidental(p, &accidental);
|
||||||
basepitch = pitchof(note, accidental, 1, 0, 0) - middle_c;
|
p = get_accidental(p, &accidental2); /* [SS] 2021-12-05 */
|
||||||
|
if (accidental2 != '=') mult = 2; /* [SS] 2021-12-05 */
|
||||||
|
basepitch = pitchof(note, accidental, mult, 0, 0) - middle_c;
|
||||||
i = 0;
|
i = 0;
|
||||||
while ((i<9) && (*p != ' ') && (*p != '\0') && (*p != '(')
|
while ((i<9) && (*p != ' ') && (*p != '\0') && (*p != '(')
|
||||||
&& (*p != '/') && (*p != ')')) {
|
&& (*p != '/') && (*p != ')')) {
|
||||||
@@ -4543,12 +4547,16 @@ char* s;
|
|||||||
note = (int)*p - 'A' + 'a';
|
note = (int)*p - 'A' + 'a';
|
||||||
p = p + 1;
|
p = p + 1;
|
||||||
p = get_accidental(p, &accidental);
|
p = get_accidental(p, &accidental);
|
||||||
inversion = pitchof(note, accidental, 1, 0, 0) - middle_c;
|
p = get_accidental(p, &accidental2); /* [SS] 2021-12-05 */
|
||||||
|
if (accidental2 != '=') mult = 2; /* [SS] 2021-12-05 */
|
||||||
|
inversion = pitchof(note, accidental, mult, 0, 0) - middle_c;
|
||||||
} else if ((*p >= 'a') && (*p <= 'g')) {
|
} else if ((*p >= 'a') && (*p <= 'g')) {
|
||||||
note = (int)*p;
|
note = (int)*p;
|
||||||
p = p + 1;
|
p = p + 1;
|
||||||
p = get_accidental(p, &accidental);
|
p = get_accidental(p, &accidental);
|
||||||
inversion = pitchof(note, accidental, 1, 0, 0) - middle_c;
|
p = get_accidental(p, &accidental2); /* [SS] 2021-12-05 */
|
||||||
|
if (accidental2 != '=') mult = 2; /* [SS] 2021-12-05 */
|
||||||
|
inversion = pitchof(note, accidental, mult, 0, 0) - middle_c;
|
||||||
} else if (!silent) {
|
} else if (!silent) {
|
||||||
event_error(" / must be followed by A-G or a-g in gchord");
|
event_error(" / must be followed by A-G or a-g in gchord");
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user