mirror of
https://github.com/sshlien/abcmidi.git
synced 2026-02-04 04:38:10 +00:00
2022.01.27
This commit is contained in:
23
doc/CHANGES
23
doc/CHANGES
@@ -14567,3 +14567,26 @@ To prevent overrunning the array errmsg[80]
|
|||||||
used snprintf instead of sprintf
|
used snprintf instead of sprintf
|
||||||
snprintf(errmsg, 80, "I: key \' %s\' not recognized", key);
|
snprintf(errmsg, 80, "I: key \' %s\' not recognized", key);
|
||||||
|
|
||||||
|
|
||||||
|
January 27 2022
|
||||||
|
|
||||||
|
abcmidi: new feature
|
||||||
|
%%MIDI pitchbendrange semi
|
||||||
|
maps the pitchwheel 0 to 16383 to semi semitones. By default semi
|
||||||
|
is set to 2. If you change it to 4, then the pitchwheel maps into
|
||||||
|
4 semitones. This effects all microtones in the active channel
|
||||||
|
when semi is not 2. %%MIDI temperament commands may not work
|
||||||
|
correctly. Here is an example.
|
||||||
|
|
||||||
|
X:1
|
||||||
|
T: pitch bend with RPN
|
||||||
|
M: 4/4
|
||||||
|
L: 1/4
|
||||||
|
K: G
|
||||||
|
%%MIDI program 70
|
||||||
|
G2 B2 |\
|
||||||
|
%%MIDI bendstring 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500
|
||||||
|
!bend! G4 |\
|
||||||
|
%%MIDI pitchbendrange 7
|
||||||
|
!bend! G4 |
|
||||||
|
|
||||||
|
|||||||
@@ -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.65 January 13 2022
|
abc2midi version 4.66 January 27 2022
|
||||||
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
|
||||||
|
|||||||
33
genmidi.c
33
genmidi.c
@@ -1420,8 +1420,6 @@ static void midi_re_tune (int channel) {
|
|||||||
this is done.
|
this is done.
|
||||||
*/
|
*/
|
||||||
char data[2];
|
char data[2];
|
||||||
data[0] = (char) (bend & 0x7f); /* least significant bits */
|
|
||||||
data[1] = (char) ((bend >>7) & 0x7f);
|
|
||||||
/* indicate that we are applying RPN fine and gross tuning using
|
/* indicate that we are applying RPN fine and gross tuning using
|
||||||
the following two control commands.
|
the following two control commands.
|
||||||
control 101 0
|
control 101 0
|
||||||
@@ -1444,6 +1442,29 @@ data[1] = (char) (bend & 0x7f); /* least significant bits */
|
|||||||
write_event(control_change, channel, data, 2);
|
write_event(control_change, channel, data, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* [SS] 2022-01-27 */
|
||||||
|
static void midiPitchBendRange (int semis) {
|
||||||
|
/* by default the pitch whell maps 0 to 16383 to a range of 2
|
||||||
|
* semitones. This function uses the RPN control command to
|
||||||
|
* expand the range to semis semitones.
|
||||||
|
*/
|
||||||
|
char data[2];
|
||||||
|
/* indicate that we are applying RPN fine and gross tuning using
|
||||||
|
the following two control commands.
|
||||||
|
control 101 0
|
||||||
|
control 100 0 */
|
||||||
|
data[0] = 101; /* RPN command */
|
||||||
|
data[1] = 0; /* type of command */
|
||||||
|
write_event(control_change, channel, data, 2);
|
||||||
|
data[0] = 6; /* contains most significant byte */
|
||||||
|
data[1] = semis;
|
||||||
|
write_event(control_change, channel, data, 2);
|
||||||
|
data[0] = 38; /* contains least significant byte (range in cents) */
|
||||||
|
data[1] = 0;
|
||||||
|
write_event(control_change, channel, data, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* [SS] 2011-07-04 */
|
/* [SS] 2011-07-04 */
|
||||||
@@ -2100,6 +2121,14 @@ int noteson;
|
|||||||
else bendtype = 2;
|
else bendtype = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* [SS] 2022-01-27 */
|
||||||
|
else if (strcmp(command, "pitchbendrange") == 0) {
|
||||||
|
int semis;
|
||||||
|
semis = readsnump(&p);
|
||||||
|
midiPitchBendRange(semis);
|
||||||
|
done = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
else if (strcmp(command, "drone") == 0) {
|
else if (strcmp(command, "drone") == 0) {
|
||||||
skipspace(&p);
|
skipspace(&p);
|
||||||
|
|||||||
Reference in New Issue
Block a user