Codebase list abcmidi / ee35384
Imported Upstream version 20141016 Ross Gammon 9 years ago
6 changed file(s) with 34 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
0 2014 September 28
0 2014 October 16
11
1053310533 September 28 2014
1053410534
1053510535 Extended the maximum bendstring length to 50.
10536
10537
10538 October 16 2014
10539
10540 Abc2midi: in some applications it may be desirable to suppresses
10541 all messages. A new option -silent was introduced to suppress the
10542 the other warnings and messages not handled by the -quiet option.
10543 eg.
10544 abc2midi nottingham.abc -silent -quiet
10545 produces almost not output except for the MIDI files.
10546
11 .SH NAME
22 \fBabc2midi\fP \- converts abc file to MIDI file(s)
33 .SH SYNOPSIS
4 abc2midi \fIinfile\fP [\fIrefnum\fP] [-c] [-v] [-ver] [-t] [-n limit] [-RS] [-quiet] [-Q tempo] [-NFNP] [-NFER] [-NGRA] [-STFW] [-OCC] [-NCOM] [-HARP] [-BF] [-TT] [-o outfile] -CSM [filename]
4 abc2midi \fIinfile\fP [\fIrefnum\fP] [-c] [-v] [-ver] [-t] [-n limit] [-RS] [-quiet] [-silent] [-Q tempo] [-NFNP] [-NFER] [-NGRA] [-STFW] [-OCC] [-NCOM] [-HARP] [-BF] [-TT] [-o outfile] -CSM [filename]
55 .SH DESCRIPTION
66 The default action is to write a MIDI file for each abc tune
77 with the filename <stem>N.mid, where <stem> is the filestem
3030 use 3:1 instead of 2:1 for broken rhythms
3131 .TP
3232 .B -quiet
33 Suppresses some commong warnings.
33 Suppresses some common warnings.
34 .TP
35 .B -silent
36 Supresses other messages.
3437 .TP
3538 .B -n \fI X\fP
3639 limits the length of the file name stem to X characters
00 abcMIDI : abc <-> MIDI conversion utilities
11
22 midi2abc version 2.94 January 05 2014
3 abc2midi version 3.36 September 28 2014
3 abc2midi version 3.37 October 16 2014
44 abc2abc version 1.75 September 08 2013
55 yaps version 1.56 November 04 2013
66 abcmatch version 1.62 January 01 2014
245245 -n <limit> set limit for length of filename stem
246246 -RS use 3:1 instead of 2:1 for broken rhythms
247247 -quiet suppress some common warnings
248 -silent suppresses other messages
248249 -Q <tempo> in quarter notes/minute
249250 -NFNP ignore all dynamic indications (!f! !ff! !p! etc.)
250251 -NFER ignore fermata markings
8989 extern int verbose;
9090 extern int quiet;
9191 extern int sf, mi;
92 extern int silent; /* [SS] 2014-10-16 */
9293
9394 extern int retuning,bend; /* [SS] 2012-04-01 */
9495 int drumbars;
650651 }
651652 while ((partno < parts) &&
652653 (part_start[partlabel] == -1)) {
653 event_error("Part not defined");
654 if (!silent) event_error("Part not defined");
654655 partno = partno + 1;
655656 if (partno < parts) {
656657 partlabel = (int)part.st[partno] - (int)'A';
27812782 char msg[100];
27822783 sprintf(msg,"unequal notes in chord %d/%d versus %d/%d",
27832784 note_num,note_denom,num[j],denom[j]);
2784 event_warning(msg);
2785 if (!silent) event_warning(msg);
27852786 num[j] = note_num;
27862787 denom[j] = note_denom;
27872788 }
32153216 };
32163217 j = j + 1;
32173218 };
3218 if ((expect_repeat)&&(pass==1)) {
3219 if ((expect_repeat)&&(pass==1) && !silent) {
32193220 event_error("Missing :| at end of tune");
32203221 };
32213222 clearQ();
3030 * Wil Macaulay (wil@syndesis.com)
3131 */
3232
33 #define VERSION "3.36 September 28 2014"
33 #define VERSION "3.37 October 16 2014"
3434 /* enables reading V: indication in header */
3535 #define XTEN1 1
3636 /*#define INFO_OCTAVE_DISABLED 1*/
130130 int retuning = 0; /* [SS] 2012-04-01 */
131131 int bend = 8192; /* [SS] 2012-04-01 */
132132 int comma53 = 0; /* [SS] 2014-01-12 */
133 int silent = 0; /* [SS] 2014-10-16 */
133134 void init_p48toc53 (); /* [SS] 2014-01-12 */
134135 void convert_to_comma53 (char acc, int *midipitch, int* midibend);
135136
772773 }
773774
774775 if (getarg("-OCC",argc,argv) != -1) oldchordconvention=1;
776 if (getarg("-silent",argc,argv) != -1) silent = 1; /* [SS] 2014-10-16 */
775777
776778 maxnotes = 500;
777779 /* allocate space for notes */
804806 printf(" -n <limit> set limit for length of filename stem\n");
805807 printf(" -RS use 3:1 instead of 2:1 for broken rhythms\n");
806808 printf(" -quiet suppress some common warnings\n");
809 printf(" -silent suppresses most messages\n");
807810 printf(" -Q default tempo (quarter notes/minute)\n");
808811 printf(" -NFNP don't process !p! or !f!-like fields\n");
809812 printf(" -NCOM suppress comments in output MIDI file\n");
22912294 if (pastheader && parts == -1) return; /* [SS] 2014-04-10 */
22922295 if (pastheader) {
22932296 if (((int)*p < 'A') || ((int)*p > 'Z')) {
2294 event_error("Part must be one of A-Z");
2297 if (!silent) event_error("Part must be one of A-Z");
22952298 return;
22962299 };
22972300 if ((headerpartlabel == 1) && (part.st[0] == *p)) {
37463749 } else {
37473750 /* Experimental feature supports "_ignored words" */
37483751 if (strchr("_^<>@", (int)*p) == NULL) {
3749 event_error("Guitar chord does not start with A-G or a-g");
3752 if (!silent) event_error("Guitar chord does not start with A-G or a-g");
37503753 };
37513754 return;
37523755 };
37743777 p = p + 1;
37753778 p = get_accidental(p, &accidental);
37763779 inversion = pitchof(note, accidental, 1, 0, 0) - middle_c;
3777 } else {
3780 } else if (!silent) {
37783781 event_error(" / must be followed by A-G or a-g in gchord");
37793782 };
37803783 };
41724175 /*printf("tied_num = %d done = %d inchord = %d\n",tied_num, done, inchord);*/
41734176 place = place + 1;
41744177 };
4175 if (tietodo == 1) {
4178 if (tietodo == 1 && !silent) {
41764179 event_error("Could not find note to be tied");
41774180 };
41784181 };
52475250 if (parts > -1) {
52485251 addfeature(PART, ' ', 0, 0);
52495252 };
5250 if (headerpartlabel == 1) {
5253 if (headerpartlabel == 1 && !silent) {
52515254 event_error("P: field in header should go after K: field");
52525255 };
52535256 if (verbose > 1) {
52835286 if ((fp = fopen(outname, "wb")) == NULL) {
52845287 event_fatal_error("File open failed");
52855288 };
5286 printf("writing MIDI file %s\n", outname);
5289 if (!silent) printf("writing MIDI file %s\n", outname);
52875290 Mf_putc = myputc;
52885291 Mf_writetrack = writetrack;
52895292 header_time_num = time_num;
53145317 /* blank line found in abc signifies the end of a tune */
53155318 {
53165319 if (dotune) {
5317 print_voicecodes();
5320 if (!silent) print_voicecodes();
53185321 finishfile();
53195322 parseroff();
53205323 dotune = 0;