mirror of
https://github.com/sshlien/abcmidi.git
synced 2025-12-08 19:01:02 +00:00
Compare commits
4 Commits
2022.03.20
...
2022.05.05
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e564bf9954 | ||
|
|
df48d39dc7 | ||
|
|
181f2022f3 | ||
|
|
85e4e1ba50 |
39
doc/CHANGES
39
doc/CHANGES
@@ -14701,3 +14701,42 @@ The problem was identified to me by Jakob Englhauser. Jakob verified
|
|||||||
that this fix works.
|
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
|
||||||
|
|
||||||
|
|
||||||
|
May 05 2022
|
||||||
|
|
||||||
|
midicopy: introduced new options -nopressure and -nocntrl
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
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.70 March 20 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
|
||||||
midicopy version 1.37 October 10 2020
|
midicopy version 1.38 May 06 2022
|
||||||
|
|
||||||
24th January 2002
|
24th January 2002
|
||||||
|
|
||||||
|
|||||||
78
midi2abc.c
78
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)
|
||||||
@@ -1341,7 +1342,7 @@ void stats_trackend()
|
|||||||
{
|
{
|
||||||
trkdata.npulses[tracknum] = Mf_currtime;
|
trkdata.npulses[tracknum] = Mf_currtime;
|
||||||
if (trkdata.npulses[0] < Mf_currtime) trkdata.npulses[0] = Mf_currtime;
|
if (trkdata.npulses[0] < Mf_currtime) trkdata.npulses[0] = Mf_currtime;
|
||||||
output_track_summary();
|
output_track_summary();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -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,30 +1531,31 @@ 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[] = {
|
||||||
"Bank Select", "Modulation Wheel", /*1*/
|
"BankSelect", "ModulationWheel", /*1*/
|
||||||
"Breath controller", "unknown", /*3*/
|
"BreathController", "unknown", /*3*/
|
||||||
"Foot Pedal", "Portamento Time", /*5*/
|
"FootPedal", "PortamentoTime", /*5*/
|
||||||
"Data Entry", "Volume", /*7*/
|
"DataEntry", "Volume", /*7*/
|
||||||
"Balance", "unknown", /*9*/
|
"Balance", "unknown", /*9*/
|
||||||
"Pan position", "Expression", /*11*/
|
"PanPosition", "Expression", /*11*/
|
||||||
"Effect Control 1", "Effect Control 2", /*13*/
|
"EffectControl1", "EffectControl2", /*13*/
|
||||||
"unknown", "unknown", /*15*/
|
"unknown", "unknown", /*15*/
|
||||||
"Slider 1", "Slider 2", /*17*/
|
"Slider1", "Slider2", /*17*/
|
||||||
"Slider 3", "Slider 4", /*19*/
|
"Slider3", "Slider4", /*19*/
|
||||||
"unknown", "unknown", /*21*/
|
"unknown", "unknown", /*21*/
|
||||||
"unknown", "unknown", /*23*/
|
"unknown", "unknown", /*23*/
|
||||||
"unknown", "unknown", /*25*/
|
"unknown", "unknown", /*25*/
|
||||||
"unknown", "unknown", /*27*/
|
"unknown", "unknown", /*27*/
|
||||||
"unknown", "unknown", /*29*/
|
"unknown", "unknown", /*29*/
|
||||||
"unknown", "unknown", /*31*/
|
"unknown", "unknown", /*31*/
|
||||||
"Bank Select (fine)", "Modulation Wheel (fine)", /*33*/
|
"BankSelect(fine)", "ModulationWheel(fine)", /*33*/
|
||||||
"Breath controller (fine)", "unknown", /*35*/
|
"BreathController(fine)", "unknown", /*35*/
|
||||||
"Foot Pedal (fine)", "Portamento Time (fine)", /*37*/
|
"FootPedal(fine)", "PortamentoTime(fine)", /*37*/
|
||||||
"Data Entry (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*/
|
||||||
"Effect Control 1 (fine)", "Effect Control 2 (fine)", /*45*/
|
"EffectControl1(fine)", "EffectControl2(fine)", /*45*/
|
||||||
"unknown", "unknown", /*47*/
|
"unknown", "unknown", /*47*/
|
||||||
"unknown", "unknown", /*49*/
|
"unknown", "unknown", /*49*/
|
||||||
"unknown", "unknown", /*51*/
|
"unknown", "unknown", /*51*/
|
||||||
@@ -1563,25 +1565,25 @@ int chan, control, value;
|
|||||||
"unknown", "unknown", /*59*/
|
"unknown", "unknown", /*59*/
|
||||||
"unknown", "unknown", /*61*/
|
"unknown", "unknown", /*61*/
|
||||||
"unknown", "unknown", /*63*/
|
"unknown", "unknown", /*63*/
|
||||||
"Hold Pedal", "Portamento", /*65*/
|
"HoldPedal", "Portamento", /*65*/
|
||||||
"Susteno Pedal", "Soft Pedal", /*67*/
|
"SustenoPedal", "SoftPedal", /*67*/
|
||||||
"Legato Pedal", "Hold 2 Pedal", /*69*/
|
"LegatoPedal", "Hold2Pedal", /*69*/
|
||||||
"Sound Variation", "Sound Timbre", /*71*/
|
"SoundVariation", "SoundTimbre", /*71*/
|
||||||
"Sound Release Time", "Sound Attack Time", /*73*/
|
"SoundReleaseTime", "SoundAttackTime", /*73*/
|
||||||
"Sound Brightness", "Sound Control 6", /*75*/
|
"SoundBrightness", "SoundControl6", /*75*/
|
||||||
"Sound Control 7", "Sound Control 8", /*77*/
|
"SoundControl7", "Sound Control8", /*77*/
|
||||||
"Sound Control 9", "Sound Control 10", /*79*/
|
"SoundControl9", "Sound Control10", /*79*/
|
||||||
"GP Button 1", "GP Button 2", /*81*/
|
"GPButton1", "GPButton2", /*81*/
|
||||||
"GP Button 3", "GP Button 4", /*83*/
|
"GPButton3", "GPButton4", /*83*/
|
||||||
"unknown", "unknown", /*85*/
|
"unknown", "unknown", /*85*/
|
||||||
"unknown", "unknown", /*87*/
|
"unknown", "unknown", /*87*/
|
||||||
"unknown", "unknown", /*89*/
|
"unknown", "unknown", /*89*/
|
||||||
"unknown", "Effects Level", /*91*/
|
"unknown", "EffectsLevel", /*91*/
|
||||||
"Tremolo Level", "Chorus Level", /*93*/
|
"TremoloLevel", "ChorusLevel", /*93*/
|
||||||
"Celeste Level", "Phaser Level", /*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*/
|
||||||
@@ -1591,10 +1593,10 @@ int chan, control, value;
|
|||||||
"unknown", "unknown", /*115*/
|
"unknown", "unknown", /*115*/
|
||||||
"unknown", "unknown", /*117*/
|
"unknown", "unknown", /*117*/
|
||||||
"unknown", "unknown", /*119*/
|
"unknown", "unknown", /*119*/
|
||||||
"All Sound Off", "All Controllers Off", /*121*/
|
"AllSoundOff", "AllControllersOff", /*121*/
|
||||||
"Local Keyboard (on/off)","All Notes Off", /*123*/
|
"LocalKeyboard(on/off)","AllNotesOff", /*123*/
|
||||||
"Omni Mode Off", "Omni Mode On", /*125*/
|
"OmniModeOff", "OmniModeOn", /*125*/
|
||||||
"Mono Operation", "Poly Operation"};
|
"MonoOperation", "PolyOperation"};
|
||||||
|
|
||||||
/* if (onlychan >=0 && chan != onlychan) return; */
|
/* if (onlychan >=0 && chan != onlychan) return; */
|
||||||
if (prtime(timeunits)) return;
|
if (prtime(timeunits)) return;
|
||||||
|
|||||||
17
midicopy.c
17
midicopy.c
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VERSION "1.37 October 10 2020 midicopy"
|
#define VERSION "1.38 May 05 2022 midicopy"
|
||||||
#include "midicopy.h"
|
#include "midicopy.h"
|
||||||
#define NULLFUNC 0
|
#define NULLFUNC 0
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
@@ -112,6 +112,8 @@ int chosen_drum = 0; /* [SS] 2013-10-01 */
|
|||||||
int drumvelocity = 0; /* [SS] 2013-10-01 */
|
int drumvelocity = 0; /* [SS] 2013-10-01 */
|
||||||
int attenuation = 70; /* [SS] 2017-11-27 */
|
int attenuation = 70; /* [SS] 2017-11-27 */
|
||||||
int nobends = 0; /* [SS] 2017-12-15 */
|
int nobends = 0; /* [SS] 2017-12-15 */
|
||||||
|
int nopressure = 0; /* [SS] 2022-05-05 */
|
||||||
|
int nocntrl = 0; /* [SS] 2022-05-05 */
|
||||||
int zerochannels = 0; /* [SS] 2020-10-09 */
|
int zerochannels = 0; /* [SS] 2020-10-09 */
|
||||||
|
|
||||||
long Mf_numbyteswritten = 0L;
|
long Mf_numbyteswritten = 0L;
|
||||||
@@ -1060,9 +1062,10 @@ chanmessage (int status, int c1, int c2)
|
|||||||
copy_noteon (chan, c1, c2);
|
copy_noteon (chan, c1, c2);
|
||||||
break;
|
break;
|
||||||
case 0xa0:
|
case 0xa0:
|
||||||
copy_pressure (chan, c1, c2);
|
if (nopressure == 0) copy_pressure (chan, c1, c2);
|
||||||
break;
|
break;
|
||||||
case 0xb0:
|
case 0xb0:
|
||||||
|
if (nocntrl == 0)
|
||||||
copy_parameter (chan, c1, c2);
|
copy_parameter (chan, c1, c2);
|
||||||
break;
|
break;
|
||||||
case 0xe0:
|
case 0xe0:
|
||||||
@@ -1073,7 +1076,7 @@ chanmessage (int status, int c1, int c2)
|
|||||||
copy_program (chan, c1);
|
copy_program (chan, c1);
|
||||||
break;
|
break;
|
||||||
case 0xd0:
|
case 0xd0:
|
||||||
copy_chanpressure (chan, c1);
|
if (nopressure == 0) copy_chanpressure (chan, c1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1851,6 +1854,8 @@ main (int argc, char *argv[])
|
|||||||
printf ("-focusonchannels n1,n2,...\n"); /* [SS] 2017-11-27 */
|
printf ("-focusonchannels n1,n2,...\n"); /* [SS] 2017-11-27 */
|
||||||
printf ("-attenuation n\n"); /* [SS] 2017-11-27 */
|
printf ("-attenuation n\n"); /* [SS] 2017-11-27 */
|
||||||
printf ("-nobends\n"); /* [SS] 2017-11-27 */
|
printf ("-nobends\n"); /* [SS] 2017-11-27 */
|
||||||
|
printf ("-nopressure\n"); /* [SS] 2022-05-05 */
|
||||||
|
printf ("-nocntrl\n"); /* [SS] 2022-05-05 */
|
||||||
printf ("-indrums n1,n2,... (drums to include)\n"); /* [SS] 2019-12-22 */
|
printf ("-indrums n1,n2,... (drums to include)\n"); /* [SS] 2019-12-22 */
|
||||||
printf ("-xdrums n1,n2,... (drums to exclude)\n"); /* [SS] 2019-12-22 */
|
printf ("-xdrums n1,n2,... (drums to exclude)\n"); /* [SS] 2019-12-22 */
|
||||||
printf ("-onlydrums (only channel 10)\n"); /* [SS] 2019-12-22 */
|
printf ("-onlydrums (only channel 10)\n"); /* [SS] 2019-12-22 */
|
||||||
@@ -2091,6 +2096,12 @@ main (int argc, char *argv[])
|
|||||||
arg = getarg("-nobends",argc,argv);
|
arg = getarg("-nobends",argc,argv);
|
||||||
if (arg >=0) nobends=1;
|
if (arg >=0) nobends=1;
|
||||||
|
|
||||||
|
/* [SS] 2022-05-05 */
|
||||||
|
arg = getarg("-nopressure",argc,argv);
|
||||||
|
if (arg >=0) nopressure=1;
|
||||||
|
|
||||||
|
arg = getarg("-nocntrl",argc,argv);
|
||||||
|
if (arg >=0) nocntrl = 1;
|
||||||
|
|
||||||
repflag = getarg ("-replace", argc, argv);
|
repflag = getarg ("-replace", argc, argv);
|
||||||
if (repflag >= 0)
|
if (repflag >= 0)
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user