From 159b98ea88c1c99d7639b7e5c1b200da981440a2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 26 Sep 2019 17:22:54 +0200 Subject: [PATCH] - gave the Timidity error functions better names and hooked up the WildMidi version. --- libraries/timidity/instrum.cpp | 42 +- libraries/timidity/instrum_sf2.cpp | 6 +- libraries/timidity/playmidi.cpp | 2 +- libraries/timidity/timidity.cpp | 58 +-- libraries/timidity/timidity/timidity.h | 2 +- libraries/timidityplus/common.cpp | 2 +- libraries/timidityplus/configfile.cpp | 176 +++---- libraries/timidityplus/instrum.cpp | 48 +- libraries/timidityplus/playmidi.cpp | 478 +++++++++--------- libraries/timidityplus/quantity.cpp | 4 +- libraries/timidityplus/readmidic.cpp | 70 +-- libraries/timidityplus/resample.cpp | 4 +- libraries/timidityplus/reverb.cpp | 8 +- libraries/timidityplus/sffile.cpp | 32 +- libraries/timidityplus/smplfile.cpp | 40 +- libraries/timidityplus/sndfont.cpp | 10 +- libraries/timidityplus/timiditypp/controls.h | 2 +- libraries/wildmidi/wildmidi/wildmidi_lib.h | 2 + .../mididevices/music_timidity_mididevice.cpp | 2 +- .../music_timiditypp_mididevice.cpp | 2 +- .../mididevices/music_wildmidi_mididevice.cpp | 10 + 21 files changed, 506 insertions(+), 494 deletions(-) diff --git a/libraries/timidity/instrum.cpp b/libraries/timidity/instrum.cpp index c2b3e62108..35d8ee5805 100644 --- a/libraries/timidity/instrum.cpp +++ b/libraries/timidity/instrum.cpp @@ -186,30 +186,30 @@ Instrument *Renderer::load_instrument(const char *name, int percussion, if (noluck) { - cmsg(CMSG_ERROR, VERB_DEBUG, "Instrument `%s' can't be found.\n", name); + printMessage(CMSG_ERROR, VERB_DEBUG, "Instrument `%s' can't be found.\n", name); return 0; } - cmsg(CMSG_INFO, VERB_NOISY, "Loading instrument %s\n", name); + printMessage(CMSG_INFO, VERB_NOISY, "Loading instrument %s\n", name); /* Read some headers and do cursory sanity checks. */ if (sizeof(header) != fp->read(&header, sizeof(header))) { failread: - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: Error reading instrument.\n", name); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: Error reading instrument.\n", name); fp->close(); return 0; } if (strncmp(header.Header, GF1_HEADER_TEXT, HEADER_SIZE - 4) != 0) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: Not an instrument.\n", name); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: Not an instrument.\n", name); fp->close(); return 0; } if (strcmp(header.Header + 8, "110") < 0) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: Is an old and unsupported patch version.\n", name); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: Is an old and unsupported patch version.\n", name); fp->close(); return 0; } @@ -225,14 +225,14 @@ failread: if (header.Instruments != 1 && header.Instruments != 0) /* instruments. To some patch makers, 0 means 1 */ { - cmsg(CMSG_ERROR, VERB_NORMAL, "Can't handle patches with %d instruments.\n", header.Instruments); + printMessage(CMSG_ERROR, VERB_NORMAL, "Can't handle patches with %d instruments.\n", header.Instruments); fp->close(); return 0; } if (idata.Layers != 1 && idata.Layers != 0) /* layers. What's a layer? */ { - cmsg(CMSG_ERROR, VERB_NORMAL, "Can't handle instruments with %d layers.\n", idata.Layers); + printMessage(CMSG_ERROR, VERB_NORMAL, "Can't handle instruments with %d layers.\n", idata.Layers); fp->close(); return 0; } @@ -244,7 +244,7 @@ failread: if (layer_data.Samples == 0) { - cmsg(CMSG_ERROR, VERB_NORMAL, "Instrument has 0 samples.\n"); + printMessage(CMSG_ERROR, VERB_NORMAL, "Instrument has 0 samples.\n"); fp->close(); return 0; } @@ -258,7 +258,7 @@ failread: if (sizeof(patch_data) != fp->read(&patch_data, sizeof(patch_data))) { fail: - cmsg(CMSG_ERROR, VERB_NORMAL, "Error reading sample %d.\n", i); + printMessage(CMSG_ERROR, VERB_NORMAL, "Error reading sample %d.\n", i); delete ip; fp->close(); return 0; @@ -294,14 +294,14 @@ fail: sp->tremolo_sweep_increment = 0; sp->tremolo_phase_increment = 0; sp->tremolo_depth = 0; - cmsg(CMSG_INFO, VERB_DEBUG, " * no tremolo\n"); + printMessage(CMSG_INFO, VERB_DEBUG, " * no tremolo\n"); } else { sp->tremolo_sweep_increment = convert_tremolo_sweep(patch_data.TremoloSweep); sp->tremolo_phase_increment = convert_tremolo_rate(patch_data.TremoloRate); sp->tremolo_depth = patch_data.TremoloDepth; - cmsg(CMSG_INFO, VERB_DEBUG, " * tremolo: sweep %d, phase %d, depth %d\n", + printMessage(CMSG_INFO, VERB_DEBUG, " * tremolo: sweep %d, phase %d, depth %d\n", sp->tremolo_sweep_increment, sp->tremolo_phase_increment, sp->tremolo_depth); } @@ -311,14 +311,14 @@ fail: sp->vibrato_sweep_increment = 0; sp->vibrato_control_ratio = 0; sp->vibrato_depth = 0; - cmsg(CMSG_INFO, VERB_DEBUG, " * no vibrato\n"); + printMessage(CMSG_INFO, VERB_DEBUG, " * no vibrato\n"); } else { sp->vibrato_control_ratio = convert_vibrato_rate(patch_data.VibratoRate); sp->vibrato_sweep_increment = convert_vibrato_sweep(patch_data.VibratoSweep, sp->vibrato_control_ratio); sp->vibrato_depth = patch_data.VibratoDepth; - cmsg(CMSG_INFO, VERB_DEBUG, " * vibrato: sweep %d, ctl %d, depth %d\n", + printMessage(CMSG_INFO, VERB_DEBUG, " * vibrato: sweep %d, ctl %d, depth %d\n", sp->vibrato_sweep_increment, sp->vibrato_control_ratio, sp->vibrato_depth); } @@ -344,7 +344,7 @@ fail: } if (sp->scale_factor != 1024) { - cmsg(CMSG_INFO, VERB_DEBUG, " * Scale: note %d, factor %d\n", + printMessage(CMSG_INFO, VERB_DEBUG, " * Scale: note %d, factor %d\n", sp->scale_note, sp->scale_factor); } } @@ -375,7 +375,7 @@ fail: if ((strip_loop == 1) && (sp->modes & (PATCH_SUSTAIN | PATCH_LOOPEN | PATCH_BIDIR | PATCH_BACKWARD))) { - cmsg(CMSG_INFO, VERB_DEBUG, " - Removing loop and/or sustain\n"); + printMessage(CMSG_INFO, VERB_DEBUG, " - Removing loop and/or sustain\n"); if (j == DESC_SIZE) { sp->modes &= ~(PATCH_SUSTAIN | PATCH_LOOPEN | PATCH_BIDIR | PATCH_BACKWARD); @@ -384,7 +384,7 @@ fail: if (strip_envelope == 1) { - cmsg(CMSG_INFO, VERB_DEBUG, " - Removing envelope\n"); + printMessage(CMSG_INFO, VERB_DEBUG, " - Removing envelope\n"); /* [RH] The envelope isn't really removed, but this is the way the standard * Gravis patches get that effect: All rates at maximum, and all offsets at * a constant level. @@ -434,7 +434,7 @@ fail: /* The GUS apparently plays reverse loops by reversing the whole sample. We do the same because the GUS does not SUCK. */ - cmsg(CMSG_WARNING, VERB_NORMAL, "Reverse loop in %s\n", name); + printMessage(CMSG_WARNING, VERB_NORMAL, "Reverse loop in %s\n", name); reverse_data((sample_t *)sp->data, 0, sp->data_length); sp->data[sp->data_length] = sp->data[sp->data_length - 1]; @@ -465,7 +465,7 @@ fail: if (strip_tail == 1) { /* Let's not really, just say we did. */ - cmsg(CMSG_INFO, VERB_DEBUG, " - Stripping tail\n"); + printMessage(CMSG_INFO, VERB_DEBUG, " - Stripping tail\n"); sp->data_length = sp->loop_end; } } @@ -578,7 +578,7 @@ int Renderer::fill_bank(int dr, int b) ToneBank *bank = ((dr) ? instruments->drumset[b] : instruments->tonebank[b]); if (bank == NULL) { - cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "Tried to load instruments in non-existent %s %d\n", (dr) ? "drumset" : "tone bank", b); return 0; @@ -621,14 +621,14 @@ int Renderer::fill_bank(int dr, int b) { if (bank->tone[i].name.length() == 0) { - cmsg(CMSG_WARNING, (b != 0) ? VERB_VERBOSE : VERB_DEBUG, + printMessage(CMSG_WARNING, (b != 0) ? VERB_VERBOSE : VERB_DEBUG, "No instrument mapped to %s %d, program %d%s\n", (dr) ? "drum set" : "tone bank", b, i, (b != 0) ? "" : " - this instrument will not be heard"); } else { - cmsg(CMSG_ERROR, VERB_DEBUG, + printMessage(CMSG_ERROR, VERB_DEBUG, "Couldn't load instrument %s (%s %d, program %d)\n", bank->tone[i].name.c_str(), (dr) ? "drum set" : "tone bank", b, i); diff --git a/libraries/timidity/instrum_sf2.cpp b/libraries/timidity/instrum_sf2.cpp index 8a2ecfa306..b3a2121a06 100644 --- a/libraries/timidity/instrum_sf2.cpp +++ b/libraries/timidity/instrum_sf2.cpp @@ -745,15 +745,15 @@ SFFile *ReadSF2(const char *filename, timidity_file *f) } catch (CIOErr) { - cmsg(CMSG_ERROR, VERB_NORMAL, "Error reading %s: %s\n", filename, strerror(errno)); + printMessage(CMSG_ERROR, VERB_NORMAL, "Error reading %s: %s\n", filename, strerror(errno)); } catch (CBadForm) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s is corrupted.\n", filename); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s is corrupted.\n", filename); } catch (CBadVer) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s is not a SoundFont version 2 file.\n", filename); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s is not a SoundFont version 2 file.\n", filename); } if (sf2 != NULL) { diff --git a/libraries/timidity/playmidi.cpp b/libraries/timidity/playmidi.cpp index 0ab0488efb..4a81bdf529 100644 --- a/libraries/timidity/playmidi.cpp +++ b/libraries/timidity/playmidi.cpp @@ -378,7 +378,7 @@ void Renderer::start_note(int chan, int note, int vel) } if (ip->samples != 1 && ip->sample->type == INST_GUS) { - cmsg(CMSG_WARNING, VERB_VERBOSE, + printMessage(CMSG_WARNING, VERB_VERBOSE, "Strange: percussion instrument with %d samples!", ip->samples); } } diff --git a/libraries/timidity/timidity.cpp b/libraries/timidity/timidity.cpp index 3255de186f..12055c3032 100644 --- a/libraries/timidity/timidity.cpp +++ b/libraries/timidity/timidity.cpp @@ -187,13 +187,13 @@ int Instruments::read_config_file(const char *name) if (rcf_count > 50) { - cmsg(CMSG_ERROR, VERB_NORMAL, "Timidity: Probable source loop in configuration files\n"); + printMessage(CMSG_ERROR, VERB_NORMAL, "Timidity: Probable source loop in configuration files\n"); return (-1); } auto fp = sfreader->open_timidity_file(name); if (!fp) { - cmsg(CMSG_ERROR, VERB_NORMAL, "Timidity: Unable to open config file\n"); + printMessage(CMSG_ERROR, VERB_NORMAL, "Timidity: Unable to open config file\n"); return -1; } @@ -258,7 +258,7 @@ int Instruments::read_config_file(const char *name) * before TiMidity kills the note. This may be useful to implement * later, but I don't see any urgent need for it. */ - //cmsg(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"timeout\" in TiMidity config.\n"); + //printMessage(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"timeout\" in TiMidity config.\n"); } else if (!strcmp(w[0], "copydrumset") /* "copydrumset" drumset */ || !strcmp(w[0], "copybank")) /* "copybank" bank */ @@ -268,7 +268,7 @@ int Instruments::read_config_file(const char *name) * the current drumset or bank. May be useful later, but not a * high priority. */ - //cmsg(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"%s\" in TiMidity config.\n", w[0]); + //printMessage(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"%s\" in TiMidity config.\n", w[0]); } else if (!strcmp(w[0], "undef")) /* "undef" progno */ { @@ -276,7 +276,7 @@ int Instruments::read_config_file(const char *name) * Undefines the tone "progno" of the current tone bank (or * drum set?). Not a high priority. */ - //cmsg(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"undef\" in TiMidity config.\n"); + //printMessage(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"undef\" in TiMidity config.\n"); } else if (!strcmp(w[0], "altassign")) /* "altassign" prog1 prog2 ... */ { @@ -284,7 +284,7 @@ int Instruments::read_config_file(const char *name) * Sets the alternate assign for drum set. Whatever that's * supposed to mean. */ - //cmsg(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"altassign\" in TiMidity config.\n"); + //printMessage(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"altassign\" in TiMidity config.\n"); } else if (!strcmp(w[0], "soundfont")) { @@ -295,7 +295,7 @@ int Instruments::read_config_file(const char *name) */ if (words < 2) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No soundfont given\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No soundfont given\n", name, line); return -2; } if (words > 2 && !strcmp(w[2], "remove")) @@ -310,7 +310,7 @@ int Instruments::read_config_file(const char *name) { if (!(cp = strchr(w[i], '='))) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad soundfont option %s\n", name, line, w[i]); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad soundfont option %s\n", name, line, w[i]); return -2; } } @@ -327,7 +327,7 @@ int Instruments::read_config_file(const char *name) if (words < 3) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error\n", name, line); return -2; } @@ -343,7 +343,7 @@ int Instruments::read_config_file(const char *name) } else { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: font subcommand must be 'order' or 'exclude'\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: font subcommand must be 'order' or 'exclude'\n", name, line); return -2; } if (i < words) @@ -377,7 +377,7 @@ int Instruments::read_config_file(const char *name) * apparently it sets some sort of base offset for tone numbers. * Why anyone would want to do this is beyond me. */ - //cmsg(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"progbase\" in TiMidity config.\n"); + //printMessage(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"progbase\" in TiMidity config.\n"); } else if (!strcmp(w[0], "map")) /* "map" name set1 elem1 set2 elem2 */ { @@ -387,7 +387,7 @@ int Instruments::read_config_file(const char *name) * documentation whatsoever for it, but it looks like it's used * for remapping one instrument to another somehow. */ - //cmsg(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"map\" in TiMidity config.\n"); + //printMessage(CMSG_ERROR, VERB_NORMAL, "FIXME: Implement \"map\" in TiMidity config.\n"); } /* Standard TiMidity config */ @@ -396,7 +396,7 @@ int Instruments::read_config_file(const char *name) { if (words < 2) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No directory given\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No directory given\n", name, line); return -2; } for (i = 1; i < words; i++) @@ -409,7 +409,7 @@ int Instruments::read_config_file(const char *name) { if (words < 2) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No file name given\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No file name given\n", name, line); return -2; } for (i=1; i 127) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Drum set must be between 0 and 127\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Drum set must be between 0 and 127\n", name, line); return -2; } if (drumset[i] == NULL) @@ -451,13 +451,13 @@ int Instruments::read_config_file(const char *name) { if (words < 2) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No bank number given\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No bank number given\n", name, line); return -2; } i = atoi(w[1]); if (i < 0 || i > 127) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Tone bank must be between 0 and 127\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Tone bank must be between 0 and 127\n", name, line); return -2; } if (tonebank[i] == NULL) @@ -470,18 +470,18 @@ int Instruments::read_config_file(const char *name) { if ((words < 2) || (*w[0] < '0' || *w[0] > '9')) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error\n", name, line); return -2; } i = atoi(w[0]); if (i < 0 || i > 127) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Program must be between 0 and 127\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Program must be between 0 and 127\n", name, line); return -2; } if (bank == NULL) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set before assignment\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set before assignment\n", name, line); return -2; } bank->tone[i].note = bank->tone[i].pan = @@ -515,7 +515,7 @@ int Instruments::read_config_file(const char *name) { if (!(cp=strchr(w[j], '='))) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad patch option %s\n", name, line, w[j]); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad patch option %s\n", name, line, w[j]); return -2; } *cp++ = 0; @@ -528,7 +528,7 @@ int Instruments::read_config_file(const char *name) k = atoi(cp); if ((k < 0 || k > 127) || (*cp < '0' || *cp > '9')) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: note must be between 0 and 127\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: note must be between 0 and 127\n", name, line); return -2; } bank->tone[i].note = k; @@ -546,7 +546,7 @@ int Instruments::read_config_file(const char *name) if ((k < 0 || k > 127) || (k == 0 && *cp != '-' && (*cp < '0' || *cp > '9'))) { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: panning must be left, right, " + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: panning must be left, right, " "center, or between -100 and 100\n", name, line); return -2; } @@ -560,7 +560,7 @@ int Instruments::read_config_file(const char *name) bank->tone[i].strip_loop = 0; else { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: keep must be env or loop\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: keep must be env or loop\n", name, line); return -2; } } @@ -574,13 +574,13 @@ int Instruments::read_config_file(const char *name) bank->tone[i].strip_tail = 1; else { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: strip must be env, loop, or tail\n", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: strip must be env, loop, or tail\n", name, line); return -2; } } else { - cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad patch option %s\n", name, line, w[j]); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad patch option %s\n", name, line, w[j]); return -2; } } @@ -821,7 +821,7 @@ static void default_cmsg(int type, int verbosity_level, const char* fmt, ...) } // Allow hosting applications to capture the messages and deal with them themselves. -void (*cmsg)(int type, int verbosity_level, const char* fmt, ...) = default_cmsg; +void (*printMessage)(int type, int verbosity_level, const char* fmt, ...) = default_cmsg; } diff --git a/libraries/timidity/timidity/timidity.h b/libraries/timidity/timidity/timidity.h index 35ba53bfea..6215bd2e02 100644 --- a/libraries/timidity/timidity/timidity.h +++ b/libraries/timidity/timidity/timidity.h @@ -48,7 +48,7 @@ enum VERB_DEBUG }; -extern void (*cmsg)(int type, int verbosity_level, const char *fmt, ...); +extern void (*printMessage)(int type, int verbosity_level, const char *fmt, ...); /* diff --git a/libraries/timidityplus/common.cpp b/libraries/timidityplus/common.cpp index 78b530016c..0f5cdc4f0b 100644 --- a/libraries/timidityplus/common.cpp +++ b/libraries/timidityplus/common.cpp @@ -177,6 +177,6 @@ void default_ctl_cmsg(int type, int verbosity_level, const char* fmt, ...) } // Allow hosting applications to capture the messages and deal with them themselves. -void (*ctl_cmsg)(int type, int verbosity_level, const char* fmt, ...) = default_ctl_cmsg; +void (*printMessage)(int type, int verbosity_level, const char* fmt, ...) = default_ctl_cmsg; } diff --git a/libraries/timidityplus/configfile.cpp b/libraries/timidityplus/configfile.cpp index a3874e4b27..fbb852dd58 100644 --- a/libraries/timidityplus/configfile.cpp +++ b/libraries/timidityplus/configfile.cpp @@ -34,7 +34,7 @@ namespace TimidityPlus #define MAXWORDS 130 #define CHECKERRLIMIT \ if(++errcnt >= 10) { \ - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, \ + printMessage(CMSG_ERROR, VERB_NORMAL, \ "Too many errors... Give up read %s", name); \ reuse_mblock(&varbuf); \ tf_close(tf); return 1; } @@ -192,7 +192,7 @@ static Quantity **config_parse_modulation(const char *name, int line, const char if ((delim = strpbrk(strncpy(buf, p, sizeof buf - 1), ":,")) != NULL) *delim = '\0'; if (*buf != '\0' && (err = string_to_quantity(buf, &mod_list[i][j], qtypes[mod_type * 3 + j])) != NULL) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: %s: parameter %d of item %d: %s (%s)", + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: %s: parameter %d of item %d: %s (%s)", name, line, qtypestr[mod_type], j + 1, i + 1, err, buf); free_ptr_list(mod_list, *num); mod_list = NULL; @@ -257,7 +257,7 @@ int Instruments::set_gus_patchconf_opts(const char *name, int line, char *opts, int k; if (!(cp = strchr(opts, '='))) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad patch option %s", name, line, opts); return 1; } @@ -265,7 +265,7 @@ int Instruments::set_gus_patchconf_opts(const char *name, int line, char *opts, if (!strcmp(opts, "amp")) { k = atoi(cp); if ((k < 0 || k > MAX_AMPLIFICATION) || (*cp < '0' || *cp > '9')) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: amplification must be between 0 and %d", name, line, MAX_AMPLIFICATION); return 1; @@ -275,7 +275,7 @@ int Instruments::set_gus_patchconf_opts(const char *name, int line, char *opts, else if (!strcmp(opts, "note")) { k = atoi(cp); if ((k < 0 || k > 127) || (*cp < '0' || *cp > '9')) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: note must be between 0 and 127", name, line); return 1; @@ -294,7 +294,7 @@ int Instruments::set_gus_patchconf_opts(const char *name, int line, char *opts, k = ((atoi(cp) + 100) * 100) / 157; if ((k < 0 || k > 127) || (k == 0 && *cp != '-' && (*cp < '0' || *cp > '9'))) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: panning must be left, right, " "center, or between -100 and 100", name, line); @@ -315,7 +315,7 @@ int Instruments::set_gus_patchconf_opts(const char *name, int line, char *opts, else if (!strcmp(cp, "loop")) tone->strip_loop = 0; else { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: keep must be env or loop", name, line); return 1; } @@ -328,7 +328,7 @@ int Instruments::set_gus_patchconf_opts(const char *name, int line, char *opts, else if (!strcmp(cp, "tail")) tone->strip_tail = 1; else { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: strip must be env, loop, or tail", name, line); return 1; @@ -391,7 +391,7 @@ int Instruments::set_gus_patchconf_opts(const char *name, int line, char *opts, else if (!strcmp(opts, "qvelf")) /* resonance velocity-follow */ tone->vel_to_resonance = atoi(cp); else { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad patch option %s", name, line, opts); return 1; @@ -429,7 +429,7 @@ int Instruments::set_gus_patchconf(const char *name, int line, ToneBankElement * if (opts[0] == NULL || opts[1] == NULL || opts[2] == NULL || (atoi(opts[1]) == 128 && opts[3] == NULL)) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Syntax error", name, line); return 1; } @@ -465,7 +465,7 @@ int Instruments::set_gus_patchconf(const char *name, int line, ToneBankElement * if (opts[0] == NULL) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Syntax error", name, line); return 1; } @@ -502,12 +502,12 @@ int Instruments::set_patchconf(const char *name, int line, ToneBank *bank, char if (i < 0 || i > 127) { if (dr) - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Drum number must be between " "0 and 127", name, line); else - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Program must be between " "%d and %d", name, line, progbase, 127 + progbase); @@ -515,7 +515,7 @@ int Instruments::set_patchconf(const char *name, int line, ToneBank *bank, char } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); return 1; @@ -628,7 +628,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ if (rcf_count > 50) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "Probable source loop in configuration files"); return READ_CONFIG_RECURSION; } @@ -699,7 +699,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (!isspace(terminator[1]) && terminator[1] != '\0') { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: there must be at least one whitespace between " "string terminator (%c) and the next parameter", name, line, tmp[i]); CHECKERRLIMIT; @@ -734,14 +734,14 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -750,7 +750,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension timeout " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -763,7 +763,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No copydrumset number given", name, line); CHECKERRLIMIT; @@ -772,7 +772,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension copydrumset " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -780,7 +780,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or " "drum set before assignment", name, line); CHECKERRLIMIT; @@ -793,7 +793,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No copybank number given", name, line); CHECKERRLIMIT; @@ -802,7 +802,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension copybank " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -810,7 +810,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or " "drum set before assignment", name, line); CHECKERRLIMIT; @@ -826,35 +826,35 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if ((mapto = mapname2id(w[1], &toisdrum)) == -1) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Invalid map name: %s", name, line, w[1]); CHECKERRLIMIT; continue; } if ((mapfrom = mapname2id(w[2], &fromisdrum)) == -1) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Invalid map name: %s", name, line, w[2]); CHECKERRLIMIT; continue; } if (toisdrum != fromisdrum) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Map type should be matched", name, line); CHECKERRLIMIT; continue; } if (copymap(mapto, mapfrom, toisdrum)) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No free %s available to map", name, line, toisdrum ? "drum set" : "tone bank"); CHECKERRLIMIT; @@ -866,7 +866,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No undef number given", name, line); CHECKERRLIMIT; @@ -875,7 +875,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension undef " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -883,7 +883,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or " "drum set before assignment", name, line); CHECKERRLIMIT; @@ -898,7 +898,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before altassign", name, line); CHECKERRLIMIT; @@ -906,14 +906,14 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ } if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No alternate assignment", name, line); CHECKERRLIMIT; continue; } if (!dr) { - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, + printMessage(CMSG_WARNING, VERB_NORMAL, "%s: line %d: Warning: Not a drumset altassign" " (ignored)", name, line); @@ -927,14 +927,14 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -943,7 +943,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension legato " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -955,14 +955,14 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -971,7 +971,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension damper " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -983,14 +983,14 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -999,7 +999,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension rnddelay " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -1011,13 +1011,13 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -1026,7 +1026,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[2]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension level " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -1046,13 +1046,13 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -1061,7 +1061,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[2]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension reverbsend " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -1081,13 +1081,13 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -1096,7 +1096,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[2]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension chorussend " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -1116,13 +1116,13 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -1131,7 +1131,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[2]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension delaysend " "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -1151,13 +1151,13 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if (!bank) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify tone bank or drum set " "before assignment", name, line); CHECKERRLIMIT; @@ -1166,7 +1166,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[2]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: extension playnote" "must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -1189,7 +1189,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No soundfont file given", name, line); CHECKERRLIMIT; @@ -1208,7 +1208,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ } if (!(cp = strchr(w[j], '='))) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: bad patch option %s", name, line, w[j]); CHECKERRLIMIT; @@ -1220,7 +1220,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (k < 0 || (*cp < '0' || *cp > '9')) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: order must be a digit", name, line); CHECKERRLIMIT; @@ -1232,7 +1232,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (k < 0 || (*cp < '0' || *cp > '9')) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: cutoff must be a digit", name, line); CHECKERRLIMIT; @@ -1244,7 +1244,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (k < 0 || (*cp < '0' || *cp > '9')) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: reso must be a digit", name, line); CHECKERRLIMIT; @@ -1267,7 +1267,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ int bank, preset, keynote; if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: no font command", name, line); CHECKERRLIMIT; continue; @@ -1276,7 +1276,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 3) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No bank/preset/key is given", name, line); CHECKERRLIMIT; @@ -1293,7 +1293,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ keynote = -1; if (exclude_soundfont(bank, preset, keynote)) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No soundfont is given", name, line); CHECKERRLIMIT; @@ -1304,7 +1304,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ int order; if (words < 4) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No order/bank is given", name, line); CHECKERRLIMIT; @@ -1322,7 +1322,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ keynote = -1; if (order_soundfont(bank, preset, keynote, order)) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No soundfont is given", name, line); CHECKERRLIMIT; @@ -1333,7 +1333,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 2 || *w[1] < '0' || *w[1] > '9') { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; @@ -1346,14 +1346,14 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ if (words != 6) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; } if ((arg[0] = mapname2id(w[1], &isdrum)) == -1) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Invalid map name: %s", name, line, w[1]); CHECKERRLIMIT; continue; @@ -1376,7 +1376,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ break; if (i != 5) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Invalid parameter", name, line); CHECKERRLIMIT; continue; @@ -1391,7 +1391,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No directory given", name, line); CHECKERRLIMIT; continue; @@ -1403,7 +1403,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No file name given", name, line); CHECKERRLIMIT; continue; @@ -1433,7 +1433,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words != 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Must specify exactly one patch name", name, line); CHECKERRLIMIT; @@ -1450,7 +1450,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No drum set number given", name, line); CHECKERRLIMIT; continue; @@ -1459,7 +1459,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if ((newmapid = mapname2id(w[1], &isdrum)) == -1 || !isdrum) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Invalid drum set map name: %s", name, line, w[1]); CHECKERRLIMIT; continue; @@ -1472,7 +1472,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]) - progbase; if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Drum set must be between %d and %d", name, line, progbase, progbase + 127); @@ -1484,7 +1484,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = alloc_instrument_map_bank(1, newmapid, i); if (i == -1) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No free drum set available to map", name, line); CHECKERRLIMIT; @@ -1503,7 +1503,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 4 || *w[2] < '0' || *w[2] > '9') { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; @@ -1522,7 +1522,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ if (words < 2) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No bank number given", name, line); CHECKERRLIMIT; continue; @@ -1531,7 +1531,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if ((newmapid = mapname2id(w[1], &isdrum)) == -1 || isdrum) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Invalid bank map name: %s", name, line, w[1]); CHECKERRLIMIT; continue; @@ -1544,7 +1544,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = atoi(w[1]); if (i < 0 || i > 127) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: Tone bank must be between 0 and 127", name, line); CHECKERRLIMIT; @@ -1555,7 +1555,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ i = alloc_instrument_map_bank(0, newmapid, i); if (i == -1) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: No free tone bank available to map", name, line); CHECKERRLIMIT; @@ -1574,7 +1574,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (words < 4 || *w[2] < '0' || *w[2] > '9') { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; @@ -1592,7 +1592,7 @@ int Instruments::read_config_file(const char *name, int self, int allow_missing_ { if (extension_flag) continue; - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: line %d: syntax error", name, line); CHECKERRLIMIT; continue; diff --git a/libraries/timidityplus/instrum.cpp b/libraries/timidityplus/instrum.cpp index ba9f5878e0..b4566a5ba3 100644 --- a/libraries/timidityplus/instrum.cpp +++ b/libraries/timidityplus/instrum.cpp @@ -614,7 +614,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, && tone->fcnum == 0 && tone->resonum == 0) if ((ip = search_instrument_cache(name, panning, amp, note_to_use, strip_loop, strip_envelope, strip_tail)) != NULL) { - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " * Cached"); + printMessage(CMSG_INFO, VERB_DEBUG, " * Cached"); return ip; } /* Open patch file */ @@ -648,7 +648,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, } if (noluck) { - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "Instrument `%s' can't be found.", name); + printMessage(CMSG_INFO, VERB_DEBUG, "Instrument `%s' can't be found.", name); return 0; } /* Read some headers and do cursory sanity checks. There are loads @@ -664,19 +664,19 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, || (memcmp(tmp, "GF1PATCH110\0ID#000002", 22) && memcmp(tmp, "GF1PATCH100\0ID#000002", 22))) { /* don't know what the differences are */ - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "%s: not an instrument", name); + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: not an instrument", name); tf_close(tf); return 0; } /* instruments. To some patch makers, 0 means 1 */ if (tmp[82] != 1 && tmp[82] != 0) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "Can't handle patches with %d instruments", tmp[82]); tf_close(tf); return 0; } if (tmp[151] != 1 && tmp[151] != 0) { /* layers. What's a layer? */ - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "Can't handle instruments with %d layers", tmp[151]); tf_close(tf); return 0; @@ -690,7 +690,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, skip(tf, 7); /* Skip the wave name */ if (tf_read(&fractions, 1, 1, tf) != 1) { fail: - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "Error reading sample %d", i); + printMessage(CMSG_ERROR, VERB_NORMAL, "Error reading sample %d", i); for (j = 0; j < i; j++) free(ip->sample[j].data); free(ip->sample); @@ -729,7 +729,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, READ_LONG(sp->root_freq); skip(tf, 2); /* Why have a "root frequency" and then "tuning"?? */ READ_CHAR(tmp[0]); - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "Rate/Low/Hi/Root = %d/%d/%d/%d", + printMessage(CMSG_INFO, VERB_DEBUG, "Rate/Low/Hi/Root = %d/%d/%d/%d", sp->sample_rate, sp->low_freq, sp->high_freq, sp->root_freq); if (panning == -1) /* 0x07 and 0x08 are both center panning */ @@ -742,13 +742,13 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, if (!tmp[13] || !tmp[14]) { sp->tremolo_sweep_increment = sp->tremolo_phase_increment = 0; sp->tremolo_depth = 0; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " * no tremolo"); + printMessage(CMSG_INFO, VERB_DEBUG, " * no tremolo"); } else { sp->tremolo_sweep_increment = convert_tremolo_sweep(tmp[12]); sp->tremolo_phase_increment = convert_tremolo_rate(tmp[13]); sp->tremolo_depth = tmp[14]; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " * tremolo: sweep %d, phase %d, depth %d", sp->tremolo_sweep_increment, sp->tremolo_phase_increment, sp->tremolo_depth); @@ -756,20 +756,20 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, if (!tmp[16] || !tmp[17]) { sp->vibrato_sweep_increment = sp->vibrato_control_ratio = 0; sp->vibrato_depth = 0; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " * no vibrato"); + printMessage(CMSG_INFO, VERB_DEBUG, " * no vibrato"); } else { sp->vibrato_control_ratio = convert_vibrato_rate(tmp[16]); sp->vibrato_sweep_increment = convert_vibrato_sweep(tmp[15], sp->vibrato_control_ratio); sp->vibrato_depth = tmp[17]; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " * vibrato: sweep %d, ctl %d, depth %d", sp->vibrato_sweep_increment, sp->vibrato_control_ratio, sp->vibrato_depth); } READ_CHAR(sp->modes); - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " * mode: 0x%02x", sp->modes); + printMessage(CMSG_INFO, VERB_DEBUG, " * mode: 0x%02x", sp->modes); READ_SHORT(sp->scale_freq); READ_SHORT(sp->scale_factor); skip(tf, 36); /* skip reserved space */ @@ -787,12 +787,12 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, | MODES_PINGPONG | MODES_REVERSE))) { sp->modes &= ~(MODES_SUSTAIN | MODES_LOOPING | MODES_PINGPONG | MODES_REVERSE); - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " - Removing loop and/or sustain"); } if (strip_envelope == 1) { if (sp->modes & MODES_ENVELOPE) - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " - Removing envelope"); + printMessage(CMSG_INFO, VERB_DEBUG, " - Removing envelope"); sp->modes &= ~MODES_ENVELOPE; } else if (strip_envelope != 0) { @@ -803,7 +803,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, * No envelope needed either... */ sp->modes &= ~(MODES_SUSTAIN | MODES_ENVELOPE); - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " - No loop, removing sustain and envelope"); } else if (!memcmp(tmp, "??????", 6) || tmp[11] >= 100) { @@ -812,7 +812,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, * That's a weird envelope. Take it out. */ sp->modes &= ~MODES_ENVELOPE; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " - Weirdness, removing envelope"); } else if (!(sp->modes & MODES_SUSTAIN)) { @@ -822,7 +822,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, * mostly drums. I think. */ sp->modes &= ~MODES_ENVELOPE; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " - No sustain, removing envelope"); } } @@ -845,7 +845,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, sp->data = (sample_t *)safe_malloc(sp->data_length + 4); sp->data_alloced = 1; if ((j = tf_read(sp->data, 1, sp->data_length, tf)) != (int)sp->data_length) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "Too small this patch length: %d < %d", j, sp->data_length); + printMessage(CMSG_ERROR, VERB_NORMAL, "Too small this patch length: %d < %d", j, sp->data_length); goto fail; } if (!(sp->modes & MODES_16BIT)) { /* convert to 16-bit data */ @@ -890,7 +890,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, sp->loop_end = sp->data_length - t; sp->modes &= ~MODES_REVERSE; sp->modes |= MODES_LOOPING; /* just in case */ - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "Reverse loop in %s", name); + printMessage(CMSG_WARNING, VERB_NORMAL, "Reverse loop in %s", name); } /* If necessary do some anti-aliasing filtering */ if (antialiasing_allowed) @@ -910,7 +910,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, if ((a = abs(tmp[i])) > maxamp) maxamp = a; sp->volume = 32768 / (double)maxamp; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " * volume comp: %f", sp->volume); } /* These are in bytes. Convert into samples. */ @@ -959,7 +959,7 @@ Instrument *Instruments::load_gus_instrument(char *name, ToneBank *bank, int dr, if (strip_tail == 1) { /* Let's not really, just say we did. */ sp->data_length = sp->loop_end; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " - Stripping tail"); + printMessage(CMSG_INFO, VERB_DEBUG, " - Stripping tail"); } } tf_close(tf); @@ -1104,7 +1104,7 @@ int Instruments::fill_bank(int dr, int b, int *rc) if (bank->tone[i].instrument == NULL) { // This would be too annoying on 'warning' level. - ctl_cmsg(CMSG_WARNING, VERB_DEBUG, + printMessage(CMSG_WARNING, VERB_DEBUG, "No instrument mapped to %s %d, program %d%s", dr ? "drum set" : "tone bank", dr ? b + progbase : b, @@ -1144,7 +1144,7 @@ int Instruments::fill_bank(int dr, int b, int *rc) bank->tone[i].instrument = load_instrument(dr, b, i); if (!bank->tone[i].instrument) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "Couldn't load instrument %s " "(%s %d, program %d)", bank->tone[i].name, dr ? "drum set" : "tone bank", @@ -2014,7 +2014,7 @@ Instrument *Instruments::recompute_userdrum(int bank, int prog) copy_tone_bank_element(&drumset[bank]->tone[prog], &drumset[0]->tone[source_note]); } else { - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "Referring user drum set %d, note %d not found - this instrument will not be heard as expected", bank, prog); + printMessage(CMSG_WARNING, VERB_NORMAL, "Referring user drum set %d, note %d not found - this instrument will not be heard as expected", bank, prog); } } return ip; diff --git a/libraries/timidityplus/playmidi.cpp b/libraries/timidityplus/playmidi.cpp index 2db489549b..be1f0a762f 100644 --- a/libraries/timidityplus/playmidi.cpp +++ b/libraries/timidityplus/playmidi.cpp @@ -1830,16 +1830,16 @@ void Player::set_envelope_time(int ch, int val, int stage) #if 0 switch(stage) { case EG_ATTACK: /* Attack */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Attack Time (CH:%d VALUE:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Attack Time (CH:%d VALUE:%d)", ch, val); break; case EG_DECAY: /* Decay */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Decay Time (CH:%d VALUE:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Decay Time (CH:%d VALUE:%d)", ch, val); break; case EG_RELEASE: /* Release */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Release Time (CH:%d VALUE:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Release Time (CH:%d VALUE:%d)", ch, val); break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"? Time (CH:%d VALUE:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"? Time (CH:%d VALUE:%d)", ch, val); } #endif channel[ch].envelope_rate[stage] = val; @@ -2190,7 +2190,7 @@ void Player::note_off(MidiEvent *e) void Player::all_notes_off(int c) { int i, uv = upper_voices; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "All notes off on channel %d", c); + printMessage(CMSG_INFO, VERB_DEBUG, "All notes off on channel %d", c); for(i = 0; i < uv; i++) if (voice[i].status==VOICE_ON && voice[i].channel==c) @@ -2660,7 +2660,7 @@ void Player::add_channel_layer(int to_ch, int from_ch) /* add a channel layer */ UNSET_CHANNELMASK(channel[to_ch].channel_layer, to_ch); SET_CHANNELMASK(channel[to_ch].channel_layer, from_ch); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Channel Layer (CH:%d -> CH:%d)", from_ch, to_ch); + //printMessage(CMSG_INFO,VERB_NOISY,"Channel Layer (CH:%d -> CH:%d)", from_ch, to_ch); } /*! remove all layers for this channel. */ @@ -2703,299 +2703,299 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) if(val > 0x58) {val = 0x58;} else if(val < 0x28) {val = 0x28;} channel[ch].caf.pitch = val - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf Pitch Control (CH:%d %d semitones)", ch, channel[ch].caf.pitch); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf Pitch Control (CH:%d %d semitones)", ch, channel[ch].caf.pitch); break; case 0x01: /* CAf Filter Cutoff Control */ channel[ch].caf.cutoff = (val - 64) * 150; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].caf.cutoff); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].caf.cutoff); break; case 0x02: /* CAf Amplitude Control */ channel[ch].caf.amp = (float)val / 64.0f - 1.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf Amplitude Control (CH:%d %.2f)", ch, channel[ch].caf.amp); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf Amplitude Control (CH:%d %.2f)", ch, channel[ch].caf.amp); break; case 0x03: /* CAf LFO1 Rate Control */ channel[ch].caf.lfo1_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].caf.lfo1_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].caf.lfo1_rate); break; case 0x04: /* CAf LFO1 Pitch Depth */ channel[ch].caf.lfo1_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].caf.lfo1_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].caf.lfo1_pitch_depth); break; case 0x05: /* CAf LFO1 Filter Depth */ channel[ch].caf.lfo1_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].caf.lfo1_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].caf.lfo1_tvf_depth); break; case 0x06: /* CAf LFO1 Amplitude Depth */ channel[ch].caf.lfo1_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].caf.lfo1_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].caf.lfo1_tva_depth); break; case 0x07: /* CAf LFO2 Rate Control */ channel[ch].caf.lfo2_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].caf.lfo2_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].caf.lfo2_rate); break; case 0x08: /* CAf LFO2 Pitch Depth */ channel[ch].caf.lfo2_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].caf.lfo2_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].caf.lfo2_pitch_depth); break; case 0x09: /* CAf LFO2 Filter Depth */ channel[ch].caf.lfo2_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].caf.lfo2_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].caf.lfo2_tvf_depth); break; case 0x0A: /* CAf LFO2 Amplitude Depth */ channel[ch].caf.lfo2_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAf LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].caf.lfo2_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CAf LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].caf.lfo2_tva_depth); break; case 0x0B: /* PAf Pitch Control */ if(val > 0x58) {val = 0x58;} else if(val < 0x28) {val = 0x28;} channel[ch].paf.pitch = val - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf Pitch Control (CH:%d %d semitones)", ch, channel[ch].paf.pitch); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf Pitch Control (CH:%d %d semitones)", ch, channel[ch].paf.pitch); break; case 0x0C: /* PAf Filter Cutoff Control */ channel[ch].paf.cutoff = (val - 64) * 150; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].paf.cutoff); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].paf.cutoff); break; case 0x0D: /* PAf Amplitude Control */ channel[ch].paf.amp = (float)val / 64.0f - 1.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf Amplitude Control (CH:%d %.2f)", ch, channel[ch].paf.amp); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf Amplitude Control (CH:%d %.2f)", ch, channel[ch].paf.amp); break; case 0x0E: /* PAf LFO1 Rate Control */ channel[ch].paf.lfo1_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].paf.lfo1_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].paf.lfo1_rate); break; case 0x0F: /* PAf LFO1 Pitch Depth */ channel[ch].paf.lfo1_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].paf.lfo1_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].paf.lfo1_pitch_depth); break; case 0x10: /* PAf LFO1 Filter Depth */ channel[ch].paf.lfo1_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].paf.lfo1_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].paf.lfo1_tvf_depth); break; case 0x11: /* PAf LFO1 Amplitude Depth */ channel[ch].paf.lfo1_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].paf.lfo1_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].paf.lfo1_tva_depth); break; case 0x12: /* PAf LFO2 Rate Control */ channel[ch].paf.lfo2_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].paf.lfo2_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].paf.lfo2_rate); break; case 0x13: /* PAf LFO2 Pitch Depth */ channel[ch].paf.lfo2_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].paf.lfo2_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].paf.lfo2_pitch_depth); break; case 0x14: /* PAf LFO2 Filter Depth */ channel[ch].paf.lfo2_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].paf.lfo2_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].paf.lfo2_tvf_depth); break; case 0x15: /* PAf LFO2 Amplitude Depth */ channel[ch].paf.lfo2_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"PAf LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].paf.lfo2_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"PAf LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].paf.lfo2_tva_depth); break; case 0x16: /* MOD Pitch Control */ if(val > 0x58) {val = 0x58;} else if(val < 0x28) {val = 0x28;} channel[ch].mod.pitch = val - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD Pitch Control (CH:%d %d semitones)", ch, channel[ch].mod.pitch); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD Pitch Control (CH:%d %d semitones)", ch, channel[ch].mod.pitch); break; case 0x17: /* MOD Filter Cutoff Control */ channel[ch].mod.cutoff = (val - 64) * 150; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].mod.cutoff); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].mod.cutoff); break; case 0x18: /* MOD Amplitude Control */ channel[ch].mod.amp = (float)val / 64.0f - 1.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD Amplitude Control (CH:%d %.2f)", ch, channel[ch].mod.amp); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD Amplitude Control (CH:%d %.2f)", ch, channel[ch].mod.amp); break; case 0x19: /* MOD LFO1 Rate Control */ channel[ch].mod.lfo1_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].mod.lfo1_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].mod.lfo1_rate); break; case 0x1A: /* MOD LFO1 Pitch Depth */ channel[ch].mod.lfo1_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].mod.lfo1_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].mod.lfo1_pitch_depth); break; case 0x1B: /* MOD LFO1 Filter Depth */ channel[ch].mod.lfo1_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].mod.lfo1_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].mod.lfo1_tvf_depth); break; case 0x1C: /* MOD LFO1 Amplitude Depth */ channel[ch].mod.lfo1_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].mod.lfo1_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].mod.lfo1_tva_depth); break; case 0x1D: /* MOD LFO2 Rate Control */ channel[ch].mod.lfo2_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].mod.lfo2_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].mod.lfo2_rate); break; case 0x1E: /* MOD LFO2 Pitch Depth */ channel[ch].mod.lfo2_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].mod.lfo2_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].mod.lfo2_pitch_depth); break; case 0x1F: /* MOD LFO2 Filter Depth */ channel[ch].mod.lfo2_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].mod.lfo2_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].mod.lfo2_tvf_depth); break; case 0x20: /* MOD LFO2 Amplitude Depth */ channel[ch].mod.lfo2_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MOD LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].mod.lfo2_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"MOD LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].mod.lfo2_tva_depth); break; case 0x21: /* BEND Pitch Control */ if(val > 0x58) {val = 0x58;} else if(val < 0x28) {val = 0x28;} channel[ch].bend.pitch = val - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND Pitch Control (CH:%d %d semitones)", ch, channel[ch].bend.pitch); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND Pitch Control (CH:%d %d semitones)", ch, channel[ch].bend.pitch); break; case 0x22: /* BEND Filter Cutoff Control */ channel[ch].bend.cutoff = (val - 64) * 150; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].bend.cutoff); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].bend.cutoff); break; case 0x23: /* BEND Amplitude Control */ channel[ch].bend.amp = (float)val / 64.0f - 1.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND Amplitude Control (CH:%d %.2f)", ch, channel[ch].bend.amp); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND Amplitude Control (CH:%d %.2f)", ch, channel[ch].bend.amp); break; case 0x24: /* BEND LFO1 Rate Control */ channel[ch].bend.lfo1_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].bend.lfo1_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].bend.lfo1_rate); break; case 0x25: /* BEND LFO1 Pitch Depth */ channel[ch].bend.lfo1_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].bend.lfo1_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].bend.lfo1_pitch_depth); break; case 0x26: /* BEND LFO1 Filter Depth */ channel[ch].bend.lfo1_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].bend.lfo1_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].bend.lfo1_tvf_depth); break; case 0x27: /* BEND LFO1 Amplitude Depth */ channel[ch].bend.lfo1_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].bend.lfo1_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].bend.lfo1_tva_depth); break; case 0x28: /* BEND LFO2 Rate Control */ channel[ch].bend.lfo2_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].bend.lfo2_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].bend.lfo2_rate); break; case 0x29: /* BEND LFO2 Pitch Depth */ channel[ch].bend.lfo2_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].bend.lfo2_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].bend.lfo2_pitch_depth); break; case 0x2A: /* BEND LFO2 Filter Depth */ channel[ch].bend.lfo2_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].bend.lfo2_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].bend.lfo2_tvf_depth); break; case 0x2B: /* BEND LFO2 Amplitude Depth */ channel[ch].bend.lfo2_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].bend.lfo2_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].bend.lfo2_tva_depth); break; case 0x2C: /* CC1 Pitch Control */ if(val > 0x58) {val = 0x58;} else if(val < 0x28) {val = 0x28;} channel[ch].cc1.pitch = val - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 Pitch Control (CH:%d %d semitones)", ch, channel[ch].cc1.pitch); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 Pitch Control (CH:%d %d semitones)", ch, channel[ch].cc1.pitch); break; case 0x2D: /* CC1 Filter Cutoff Control */ channel[ch].cc1.cutoff = (val - 64) * 150; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].cc1.cutoff); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].cc1.cutoff); break; case 0x2E: /* CC1 Amplitude Control */ channel[ch].cc1.amp = (float)val / 64.0f - 1.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 Amplitude Control (CH:%d %.2f)", ch, channel[ch].cc1.amp); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 Amplitude Control (CH:%d %.2f)", ch, channel[ch].cc1.amp); break; case 0x2F: /* CC1 LFO1 Rate Control */ channel[ch].cc1.lfo1_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].cc1.lfo1_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].cc1.lfo1_rate); break; case 0x30: /* CC1 LFO1 Pitch Depth */ channel[ch].cc1.lfo1_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].cc1.lfo1_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].cc1.lfo1_pitch_depth); break; case 0x31: /* CC1 LFO1 Filter Depth */ channel[ch].cc1.lfo1_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].cc1.lfo1_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].cc1.lfo1_tvf_depth); break; case 0x32: /* CC1 LFO1 Amplitude Depth */ channel[ch].cc1.lfo1_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].cc1.lfo1_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].cc1.lfo1_tva_depth); break; case 0x33: /* CC1 LFO2 Rate Control */ channel[ch].cc1.lfo2_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].cc1.lfo2_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].cc1.lfo2_rate); break; case 0x34: /* CC1 LFO2 Pitch Depth */ channel[ch].cc1.lfo2_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].cc1.lfo2_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].cc1.lfo2_pitch_depth); break; case 0x35: /* CC1 LFO2 Filter Depth */ channel[ch].cc1.lfo2_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].cc1.lfo2_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].cc1.lfo2_tvf_depth); break; case 0x36: /* CC1 LFO2 Amplitude Depth */ channel[ch].cc1.lfo2_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].cc1.lfo2_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].cc1.lfo2_tva_depth); break; case 0x37: /* CC2 Pitch Control */ if(val > 0x58) {val = 0x58;} else if(val < 0x28) {val = 0x28;} channel[ch].cc2.pitch = val - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 Pitch Control (CH:%d %d semitones)", ch, channel[ch].cc2.pitch); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 Pitch Control (CH:%d %d semitones)", ch, channel[ch].cc2.pitch); break; case 0x38: /* CC2 Filter Cutoff Control */ channel[ch].cc2.cutoff = (val - 64) * 150; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].cc2.cutoff); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 Filter Cutoff Control (CH:%d %d cents)", ch, channel[ch].cc2.cutoff); break; case 0x39: /* CC2 Amplitude Control */ channel[ch].cc2.amp = (float)val / 64.0f - 1.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 Amplitude Control (CH:%d %.2f)", ch, channel[ch].cc2.amp); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 Amplitude Control (CH:%d %.2f)", ch, channel[ch].cc2.amp); break; case 0x3A: /* CC2 LFO1 Rate Control */ channel[ch].cc2.lfo1_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].cc2.lfo1_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 LFO1 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].cc2.lfo1_rate); break; case 0x3B: /* CC2 LFO1 Pitch Depth */ channel[ch].cc2.lfo1_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].cc2.lfo1_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 LFO1 Pitch Depth (CH:%d %d cents)", ch, channel[ch].cc2.lfo1_pitch_depth); break; case 0x3C: /* CC2 LFO1 Filter Depth */ channel[ch].cc2.lfo1_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].cc2.lfo1_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 LFO1 Filter Depth (CH:%d %d cents)", ch, channel[ch].cc2.lfo1_tvf_depth); break; case 0x3D: /* CC2 LFO1 Amplitude Depth */ channel[ch].cc2.lfo1_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].cc2.lfo1_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 LFO1 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].cc2.lfo1_tva_depth); break; case 0x3E: /* CC2 LFO2 Rate Control */ channel[ch].cc2.lfo2_rate = (float)(val - 64) / 6.4f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].cc2.lfo2_rate); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 LFO2 Rate Control (CH:%d %.1f Hz)", ch, channel[ch].cc2.lfo2_rate); break; case 0x3F: /* CC2 LFO2 Pitch Depth */ channel[ch].cc2.lfo2_pitch_depth = conv_lfo_pitch_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].cc2.lfo2_pitch_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 LFO2 Pitch Depth (CH:%d %d cents)", ch, channel[ch].cc2.lfo2_pitch_depth); break; case 0x40: /* CC2 LFO2 Filter Depth */ channel[ch].cc2.lfo2_tvf_depth = conv_lfo_filter_depth(val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].cc2.lfo2_tvf_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 LFO2 Filter Depth (CH:%d %d cents)", ch, channel[ch].cc2.lfo2_tvf_depth); break; case 0x41: /* CC2 LFO2 Amplitude Depth */ channel[ch].cc2.lfo2_tva_depth = (float)val / 127.0f; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].cc2.lfo2_tva_depth); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 LFO2 Amplitude Depth (CH:%d %.2f)", ch, channel[ch].cc2.lfo2_tva_depth); break; case 0x42: /* Note Limit Low */ channel[ch].note_limit_low = val; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Note Limit Low (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Note Limit Low (CH:%d VAL:%d)", ch, val); break; case 0x43: /* Note Limit High */ channel[ch].note_limit_high = val; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Note Limit High (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Note Limit High (CH:%d VAL:%d)", ch, val); break; case 0x44: /* Velocity Limit Low */ channel[ch].vel_limit_low = val; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Velocity Limit Low (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Velocity Limit Low (CH:%d VAL:%d)", ch, val); break; case 0x45: /* Velocity Limit High */ channel[ch].vel_limit_high = val; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Velocity Limit High (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Velocity Limit High (CH:%d VAL:%d)", ch, val); break; case 0x46: /* Rx. Note Off */ if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); set_rx_drum(channel[ch].drums[note], RX_NOTE_OFF, val); - ctl_cmsg(CMSG_INFO, VERB_NOISY, + printMessage(CMSG_INFO, VERB_NOISY, "Drum Instrument Rx. Note Off (CH:%d NOTE:%d VAL:%d)", ch, note, val); break; @@ -3003,92 +3003,92 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); set_rx_drum(channel[ch].drums[note], RX_NOTE_ON, val); - ctl_cmsg(CMSG_INFO, VERB_NOISY, + printMessage(CMSG_INFO, VERB_NOISY, "Drum Instrument Rx. Note On (CH:%d NOTE:%d VAL:%d)", ch, note, val); break; case 0x48: /* Rx. Pitch Bend */ set_rx(ch, RX_PITCH_BEND, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Pitch Bend (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Pitch Bend (CH:%d VAL:%d)", ch, val); break; case 0x49: /* Rx. Channel Pressure */ set_rx(ch, RX_CH_PRESSURE, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Channel Pressure (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Channel Pressure (CH:%d VAL:%d)", ch, val); break; case 0x4A: /* Rx. Program Change */ set_rx(ch, RX_PROGRAM_CHANGE, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Program Change (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Program Change (CH:%d VAL:%d)", ch, val); break; case 0x4B: /* Rx. Control Change */ set_rx(ch, RX_CONTROL_CHANGE, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Control Change (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Control Change (CH:%d VAL:%d)", ch, val); break; case 0x4C: /* Rx. Poly Pressure */ set_rx(ch, RX_POLY_PRESSURE, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Poly Pressure (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Poly Pressure (CH:%d VAL:%d)", ch, val); break; case 0x4D: /* Rx. Note Message */ set_rx(ch, RX_NOTE_MESSAGE, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Note Message (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Note Message (CH:%d VAL:%d)", ch, val); break; case 0x4E: /* Rx. RPN */ set_rx(ch, RX_RPN, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. RPN (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. RPN (CH:%d VAL:%d)", ch, val); break; case 0x4F: /* Rx. NRPN */ set_rx(ch, RX_NRPN, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. NRPN (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. NRPN (CH:%d VAL:%d)", ch, val); break; case 0x50: /* Rx. Modulation */ set_rx(ch, RX_MODULATION, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Modulation (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Modulation (CH:%d VAL:%d)", ch, val); break; case 0x51: /* Rx. Volume */ set_rx(ch, RX_VOLUME, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Volume (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Volume (CH:%d VAL:%d)", ch, val); break; case 0x52: /* Rx. Panpot */ set_rx(ch, RX_PANPOT, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Panpot (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Panpot (CH:%d VAL:%d)", ch, val); break; case 0x53: /* Rx. Expression */ set_rx(ch, RX_EXPRESSION, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Expression (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Expression (CH:%d VAL:%d)", ch, val); break; case 0x54: /* Rx. Hold1 */ set_rx(ch, RX_HOLD1, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Hold1 (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Hold1 (CH:%d VAL:%d)", ch, val); break; case 0x55: /* Rx. Portamento */ set_rx(ch, RX_PORTAMENTO, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Portamento (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Portamento (CH:%d VAL:%d)", ch, val); break; case 0x56: /* Rx. Sostenuto */ set_rx(ch, RX_SOSTENUTO, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Sostenuto (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Sostenuto (CH:%d VAL:%d)", ch, val); break; case 0x57: /* Rx. Soft */ set_rx(ch, RX_SOFT, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Soft (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Soft (CH:%d VAL:%d)", ch, val); break; case 0x58: /* Rx. Bank Select */ set_rx(ch, RX_BANK_SELECT, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Bank Select (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Bank Select (CH:%d VAL:%d)", ch, val); break; case 0x59: /* Rx. Bank Select LSB */ set_rx(ch, RX_BANK_SELECT_LSB, val); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Rx. Bank Select LSB (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Rx. Bank Select LSB (CH:%d VAL:%d)", ch, val); break; case 0x60: /* Reverb Type (GM2) */ if (val > 8) {val = 8;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Type (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Type (%d)", val); reverb->set_reverb_macro_gm2(val); reverb->recompute_reverb_status_gs(); reverb->init_reverb(); break; case 0x61: /* Chorus Type (GM2) */ if (val > 5) {val = 5;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Type (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Type (%d)", val); reverb->set_chorus_macro_gs(val); reverb->recompute_chorus_status_gs(); reverb->init_ch_chorus(); @@ -3129,14 +3129,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x05: /* Reverb Macro */ if (val > 7) {val = 7;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Macro (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Macro (%d)",val); reverb->set_reverb_macro_gs(val); reverb->recompute_reverb_status_gs(); reverb->init_reverb(); break; case 0x06: /* Reverb Character */ if (val > 7) {val = 7;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Character (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Character (%d)",val); if (reverb->reverb_status_gs.character != val) { reverb->reverb_status_gs.character = val; reverb->recompute_reverb_status_gs(); @@ -3145,14 +3145,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x07: /* Reverb Pre-LPF */ if (val > 7) {val = 7;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Pre-LPF (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Pre-LPF (%d)",val); if(reverb->reverb_status_gs.pre_lpf != val) { reverb->reverb_status_gs.pre_lpf = val; reverb->recompute_reverb_status_gs(); } break; case 0x08: /* Reverb Level */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Level (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Level (%d)",val); if(reverb->reverb_status_gs.level != val) { reverb->reverb_status_gs.level = val; reverb->recompute_reverb_status_gs(); @@ -3160,7 +3160,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x09: /* Reverb Time */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Time (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Time (%d)",val); if(reverb->reverb_status_gs.time != val) { reverb->reverb_status_gs.time = val; reverb->recompute_reverb_status_gs(); @@ -3168,7 +3168,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x0A: /* Reverb Delay Feedback */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Delay Feedback (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Delay Feedback (%d)",val); if(reverb->reverb_status_gs.delay_feedback != val) { reverb->reverb_status_gs.delay_feedback = val; reverb->recompute_reverb_status_gs(); @@ -3176,7 +3176,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x0C: /* Reverb Predelay Time */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Predelay Time (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Predelay Time (%d)",val); if(reverb->reverb_status_gs.pre_delay_time != val) { reverb->reverb_status_gs.pre_delay_time = val; reverb->recompute_reverb_status_gs(); @@ -3185,21 +3185,21 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x0D: /* Chorus Macro */ if (val > 7) {val = 7;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Macro (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Macro (%d)",val); reverb->set_chorus_macro_gs(val); reverb->recompute_chorus_status_gs(); reverb->init_ch_chorus(); break; case 0x0E: /* Chorus Pre-LPF */ if (val > 7) {val = 7;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Pre-LPF (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Pre-LPF (%d)",val); if (reverb->chorus_status_gs.pre_lpf != val) { reverb->chorus_status_gs.pre_lpf = val; reverb->recompute_chorus_status_gs(); } break; case 0x0F: /* Chorus Level */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Level (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Level (%d)",val); if (reverb->chorus_status_gs.level != val) { reverb->chorus_status_gs.level = val; reverb->recompute_chorus_status_gs(); @@ -3207,7 +3207,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x10: /* Chorus Feedback */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Feedback (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Feedback (%d)",val); if (reverb->chorus_status_gs.feedback != val) { reverb->chorus_status_gs.feedback = val; reverb->recompute_chorus_status_gs(); @@ -3215,7 +3215,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x11: /* Chorus Delay */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Delay (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Delay (%d)",val); if (reverb->chorus_status_gs.delay != val) { reverb->chorus_status_gs.delay = val; reverb->recompute_chorus_status_gs(); @@ -3223,7 +3223,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x12: /* Chorus Rate */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Rate (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Rate (%d)",val); if (reverb->chorus_status_gs.rate != val) { reverb->chorus_status_gs.rate = val; reverb->recompute_chorus_status_gs(); @@ -3231,7 +3231,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x13: /* Chorus Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Depth (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Depth (%d)",val); if (reverb->chorus_status_gs.depth != val) { reverb->chorus_status_gs.depth = val; reverb->recompute_chorus_status_gs(); @@ -3239,7 +3239,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x14: /* Chorus Send Level to Reverb */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Send Level to Reverb (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Send Level to Reverb (%d)",val); if (reverb->chorus_status_gs.send_reverb != val) { reverb->chorus_status_gs.send_reverb = val; reverb->recompute_chorus_status_gs(); @@ -3247,7 +3247,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x15: /* Chorus Send Level to Delay */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Send Level to Delay (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Send Level to Delay (%d)",val); if (reverb->chorus_status_gs.send_delay != val) { reverb->chorus_status_gs.send_delay = val; reverb->recompute_chorus_status_gs(); @@ -3256,14 +3256,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x16: /* Delay Macro */ if (val > 7) {val = 7;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Macro (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Macro (%d)",val); reverb->set_delay_macro_gs(val); reverb->recompute_delay_status_gs(); reverb->init_ch_delay(); break; case 0x17: /* Delay Pre-LPF */ if (val > 7) {val = 7;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Pre-LPF (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Pre-LPF (%d)",val); val &= 0x7; if (reverb->delay_status_gs.pre_lpf != val) { reverb->delay_status_gs.pre_lpf = val; @@ -3271,7 +3271,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x18: /* Delay Time Center */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Time Center (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Time Center (%d)",val); if (reverb->delay_status_gs.time_c != val) { reverb->delay_status_gs.time_c = val; reverb->recompute_delay_status_gs(); @@ -3279,7 +3279,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x19: /* Delay Time Ratio Left */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Time Ratio Left (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Time Ratio Left (%d)",val); if (val == 0) {val = 1;} if (reverb->delay_status_gs.time_l != val) { reverb->delay_status_gs.time_l = val; @@ -3288,7 +3288,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x1A: /* Delay Time Ratio Right */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Time Ratio Right (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Time Ratio Right (%d)",val); if (val == 0) {val = 1;} if (reverb->delay_status_gs.time_r != val) { reverb->delay_status_gs.time_r = val; @@ -3297,7 +3297,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x1B: /* Delay Level Center */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Level Center (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Level Center (%d)",val); if (reverb->delay_status_gs.level_center != val) { reverb->delay_status_gs.level_center = val; reverb->recompute_delay_status_gs(); @@ -3305,7 +3305,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x1C: /* Delay Level Left */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Level Left (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Level Left (%d)",val); if (reverb->delay_status_gs.level_left != val) { reverb->delay_status_gs.level_left = val; reverb->recompute_delay_status_gs(); @@ -3313,7 +3313,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x1D: /* Delay Level Right */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Level Right (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Level Right (%d)",val); if (reverb->delay_status_gs.level_right != val) { reverb->delay_status_gs.level_right = val; reverb->recompute_delay_status_gs(); @@ -3321,7 +3321,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x1E: /* Delay Level */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Level (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Level (%d)",val); if (reverb->delay_status_gs.level != val) { reverb->delay_status_gs.level = val; reverb->recompute_delay_status_gs(); @@ -3329,7 +3329,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x1F: /* Delay Feedback */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Feedback (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Feedback (%d)",val); if (reverb->delay_status_gs.feedback != val) { reverb->delay_status_gs.feedback = val; reverb->recompute_delay_status_gs(); @@ -3337,7 +3337,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) } break; case 0x20: /* Delay Send Level to Reverb */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Send Level to Reverb (%d)",val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Send Level to Reverb (%d)",val); if (reverb->delay_status_gs.send_reverb != val) { reverb->delay_status_gs.send_reverb = val; reverb->recompute_delay_status_gs(); @@ -3346,37 +3346,37 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x21: /* Velocity Sense Depth */ channel[ch].velocity_sense_depth = val; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Velocity Sense Depth (CH:%d VAL:%d)",ch,val); + //printMessage(CMSG_INFO,VERB_NOISY,"Velocity Sense Depth (CH:%d VAL:%d)",ch,val); break; case 0x22: /* Velocity Sense Offset */ channel[ch].velocity_sense_offset = val; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Velocity Sense Offset (CH:%d VAL:%d)",ch,val); + //printMessage(CMSG_INFO,VERB_NOISY,"Velocity Sense Offset (CH:%d VAL:%d)",ch,val); break; case 0x23: /* Insertion Effect ON/OFF */ if(!opt_insertion_effect) {break;} if(channel[ch].insertion_effect != val) { - //if(val) {//ctl_cmsg(CMSG_INFO,VERB_NOISY,"EFX ON (CH:%d)",ch);} - //else {//ctl_cmsg(CMSG_INFO,VERB_NOISY,"EFX OFF (CH:%d)",ch);} + //if(val) {//printMessage(CMSG_INFO,VERB_NOISY,"EFX ON (CH:%d)",ch);} + //else {//printMessage(CMSG_INFO,VERB_NOISY,"EFX OFF (CH:%d)",ch);} } channel[ch].insertion_effect = val; break; case 0x24: /* Assign Mode */ channel[ch].assign_mode = val; if(val == 0) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Assign Mode: Single (CH:%d)",ch); + //printMessage(CMSG_INFO,VERB_NOISY,"Assign Mode: Single (CH:%d)",ch); } else if(val == 1) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Assign Mode: Limited-Multi (CH:%d)",ch); + //printMessage(CMSG_INFO,VERB_NOISY,"Assign Mode: Limited-Multi (CH:%d)",ch); } else if(val == 2) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Assign Mode: Full-Multi (CH:%d)",ch); + //printMessage(CMSG_INFO,VERB_NOISY,"Assign Mode: Full-Multi (CH:%d)",ch); } break; case 0x25: /* TONE MAP-0 NUMBER */ channel[ch].tone_map0_number = val; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Tone Map-0 Number (CH:%d VAL:%d)",ch,val); + //printMessage(CMSG_INFO,VERB_NOISY,"Tone Map-0 Number (CH:%d VAL:%d)",ch,val); break; case 0x26: /* Pitch Offset Fine */ channel[ch].pitch_offset_fine = (double)((((int32_t)val << 4) | (int32_t)val) - 0x80) / 10.0; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Pitch Offset Fine (CH:%d %3fHz)",ch,channel[ch].pitch_offset_fine); + //printMessage(CMSG_INFO,VERB_NOISY,"Pitch Offset Fine (CH:%d %3fHz)",ch,channel[ch].pitch_offset_fine); break; case 0x27: /* Insertion Effect Parameter */ if(!opt_insertion_effect) {break;} @@ -3529,7 +3529,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); channel[ch].drums[note]->play_note = val; - ctl_cmsg(CMSG_INFO, VERB_NOISY, + printMessage(CMSG_INFO, VERB_NOISY, "Drum Instrument Play Note (CH:%d NOTE:%d VAL:%d)", ch, note, channel[ch].drums[note]->play_note); channel[ch].pitchfactor = 0; @@ -3548,14 +3548,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) { case 0x00: /* Insertion Effect Type MSB */ if (reverb->insertion_effect_xg[note].type_msb != val) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Insertion Effect Type MSB (%d %02X)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Insertion Effect Type MSB (%d %02X)", note, val); reverb->insertion_effect_xg[note].type_msb = val; reverb->realloc_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x01: /* Insertion Effect Type LSB */ if (reverb->insertion_effect_xg[note].type_lsb != val) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Insertion Effect Type LSB (%d %02X)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Insertion Effect Type LSB (%d %02X)", note, val); reverb->insertion_effect_xg[note].type_lsb = val; reverb->realloc_effect_xg(&reverb->insertion_effect_xg[note]); } @@ -3572,63 +3572,63 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x0B: if (reverb->insertion_effect_xg[note].use_msb) {break;} temp = b - 0x02; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Insertion Effect Parameter %d (%d %d)", temp + 1, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Insertion Effect Parameter %d (%d %d)", temp + 1, note, val); if (reverb->insertion_effect_xg[note].param_lsb[temp] != val) { reverb->insertion_effect_xg[note].param_lsb[temp] = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x0C: /* Insertion Effect Part */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Insertion Effect Part (%d %d)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Insertion Effect Part (%d %d)", note, val); if (reverb->insertion_effect_xg[note].part != val) { reverb->insertion_effect_xg[note].part = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x0D: /* MW Insertion Control Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MW Insertion Control Depth (%d %d)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"MW Insertion Control Depth (%d %d)", note, val); if (reverb->insertion_effect_xg[note].mw_depth != val) { reverb->insertion_effect_xg[note].mw_depth = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x0E: /* BEND Insertion Control Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND Insertion Control Depth (%d %d)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND Insertion Control Depth (%d %d)", note, val); if (reverb->insertion_effect_xg[note].bend_depth != val) { reverb->insertion_effect_xg[note].bend_depth = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x0F: /* CAT Insertion Control Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAT Insertion Control Depth (%d %d)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"CAT Insertion Control Depth (%d %d)", note, val); if (reverb->insertion_effect_xg[note].cat_depth != val) { reverb->insertion_effect_xg[note].cat_depth = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x10: /* AC1 Insertion Control Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"AC1 Insertion Control Depth (%d %d)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"AC1 Insertion Control Depth (%d %d)", note, val); if (reverb->insertion_effect_xg[note].ac1_depth != val) { reverb->insertion_effect_xg[note].ac1_depth = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x11: /* AC2 Insertion Control Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"AC2 Insertion Control Depth (%d %d)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"AC2 Insertion Control Depth (%d %d)", note, val); if (reverb->insertion_effect_xg[note].ac2_depth != val) { reverb->insertion_effect_xg[note].ac2_depth = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x12: /* CBC1 Insertion Control Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CBC1 Insertion Control Depth (%d %d)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"CBC1 Insertion Control Depth (%d %d)", note, val); if (reverb->insertion_effect_xg[note].cbc1_depth != val) { reverb->insertion_effect_xg[note].cbc1_depth = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); } break; case 0x13: /* CBC2 Insertion Control Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CBC2 Insertion Control Depth (%d %d)", note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"CBC2 Insertion Control Depth (%d %d)", note, val); if (reverb->insertion_effect_xg[note].cbc2_depth != val) { reverb->insertion_effect_xg[note].cbc2_depth = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); @@ -3641,7 +3641,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x24: case 0x25: temp = b - 0x20 + 10; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Insertion Effect Parameter %d (%d %d)", temp + 1, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Insertion Effect Parameter %d (%d %d)", temp + 1, note, val); if (reverb->insertion_effect_xg[note].param_lsb[temp] != val) { reverb->insertion_effect_xg[note].param_lsb[temp] = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); @@ -3659,7 +3659,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x42: if (!reverb->insertion_effect_xg[note].use_msb) {break;} temp = (b - 0x30) / 2; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Insertion Effect Parameter %d MSB (%d %d)", temp + 1, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Insertion Effect Parameter %d MSB (%d %d)", temp + 1, note, val); if (reverb->insertion_effect_xg[note].param_msb[temp] != val) { reverb->insertion_effect_xg[note].param_msb[temp] = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); @@ -3677,7 +3677,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x43: if (!reverb->insertion_effect_xg[note].use_msb) {break;} temp = (b - 0x31) / 2; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Insertion Effect Parameter %d LSB (%d %d)", temp + 1, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Insertion Effect Parameter %d LSB (%d %d)", temp + 1, note, val); if (reverb->insertion_effect_xg[note].param_lsb[temp] != val) { reverb->insertion_effect_xg[note].param_lsb[temp] = val; reverb->recompute_effect_xg(&reverb->insertion_effect_xg[note]); @@ -3692,14 +3692,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) { case 0x00: /* Reverb Type MSB */ if (reverb->reverb_status_xg.type_msb != val) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Type MSB (%02X)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Type MSB (%02X)", val); reverb->reverb_status_xg.type_msb = val; reverb->realloc_effect_xg(&reverb->reverb_status_xg); } break; case 0x01: /* Reverb Type LSB */ if (reverb->reverb_status_xg.type_lsb != val) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Type LSB (%02X)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Type LSB (%02X)", val); reverb->reverb_status_xg.type_lsb = val; reverb->realloc_effect_xg(&reverb->reverb_status_xg); } @@ -3714,7 +3714,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x09: case 0x0A: case 0x0B: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Parameter %d (%d)", b - 0x02 + 1, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Parameter %d (%d)", b - 0x02 + 1, val); if (reverb->reverb_status_xg.param_lsb[b - 0x02] != val) { reverb->reverb_status_xg.param_lsb[b - 0x02] = val; reverb->recompute_effect_xg(&reverb->reverb_status_xg); @@ -3722,13 +3722,13 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x0C: /* Reverb Return */ #if 0 /* XG specific reverb is not currently implemented */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Return (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Return (%d)", val); if (reverb->reverb_status_xg.ret != val) { reverb->reverb_status_xg.ret = val; reverb->recompute_effect_xg(&reverb->reverb_status_xg); } #else /* use GS reverb instead */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Return (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Return (%d)", val); if (reverb->reverb_status_gs.level != val) { reverb->reverb_status_gs.level = val; reverb->recompute_reverb_status_gs(); @@ -3737,7 +3737,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) #endif break; case 0x0D: /* Reverb Pan */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Pan (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Pan (%d)", val); if (reverb->reverb_status_xg.pan != val) { reverb->reverb_status_xg.pan = val; reverb->recompute_effect_xg(&reverb->reverb_status_xg); @@ -3750,7 +3750,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x14: case 0x15: temp = b - 0x10 + 10; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Reverb Parameter %d (%d)", temp + 1, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Reverb Parameter %d (%d)", temp + 1, val); if (reverb->reverb_status_xg.param_lsb[temp] != val) { reverb->reverb_status_xg.param_lsb[temp] = val; reverb->recompute_effect_xg(&reverb->reverb_status_xg); @@ -3758,14 +3758,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x20: /* Chorus Type MSB */ if (reverb->chorus_status_xg.type_msb != val) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Type MSB (%02X)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Type MSB (%02X)", val); reverb->chorus_status_xg.type_msb = val; reverb->realloc_effect_xg(&reverb->chorus_status_xg); } break; case 0x21: /* Chorus Type LSB */ if (reverb->chorus_status_xg.type_lsb != val) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Type LSB (%02X)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Type LSB (%02X)", val); reverb->chorus_status_xg.type_lsb = val; reverb->realloc_effect_xg(&reverb->chorus_status_xg); } @@ -3780,7 +3780,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x29: case 0x2A: case 0x2B: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Parameter %d (%d)", b - 0x22 + 1, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Parameter %d (%d)", b - 0x22 + 1, val); if (reverb->chorus_status_xg.param_lsb[b - 0x22] != val) { reverb->chorus_status_xg.param_lsb[b - 0x22] = val; reverb->recompute_effect_xg(&reverb->chorus_status_xg); @@ -3788,13 +3788,13 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x2C: /* Chorus Return */ #if 0 /* XG specific chorus is not currently implemented */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Return (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Return (%d)", val); if (reverb->chorus_status_xg.ret != val) { reverb->chorus_status_xg.ret = val; reverb->recompute_effect_xg(&reverb->chorus_status_xg); } #else /* use GS chorus instead */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Return (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Return (%d)", val); if (reverb->chorus_status_gs.level != val) { reverb->chorus_status_gs.level = val; reverb->recompute_chorus_status_gs(); @@ -3803,14 +3803,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) #endif break; case 0x2D: /* Chorus Pan */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Pan (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Pan (%d)", val); if (reverb->chorus_status_xg.pan != val) { reverb->chorus_status_xg.pan = val; reverb->recompute_effect_xg(&reverb->chorus_status_xg); } break; case 0x2E: /* Send Chorus To Reverb */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Send Chorus To Reverb (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Send Chorus To Reverb (%d)", val); if (reverb->chorus_status_xg.send_reverb != val) { reverb->chorus_status_xg.send_reverb = val; reverb->recompute_effect_xg(&reverb->chorus_status_xg); @@ -3823,7 +3823,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x34: case 0x35: temp = b - 0x30 + 10; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Parameter %d (%d)", temp + 1, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Parameter %d (%d)", temp + 1, val); if (reverb->chorus_status_xg.param_lsb[temp] != val) { reverb->chorus_status_xg.param_lsb[temp] = val; reverb->recompute_effect_xg(&reverb->chorus_status_xg); @@ -3832,7 +3832,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x40: /* Variation Type MSB */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} if (reverb->variation_effect_xg[note].type_msb != val) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Type MSB (%02X)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Type MSB (%02X)", val); reverb->variation_effect_xg[note].type_msb = val; reverb->realloc_effect_xg(&reverb->variation_effect_xg[note]); } @@ -3840,7 +3840,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x41: /* Variation Type LSB */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} if (reverb->variation_effect_xg[note].type_lsb != val) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Type LSB (%02X)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Type LSB (%02X)", val); reverb->variation_effect_xg[note].type_lsb = val; reverb->realloc_effect_xg(&reverb->variation_effect_xg[note]); } @@ -3857,7 +3857,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x54: if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} temp = (b - 0x42) / 2; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Parameter %d MSB (%d)", temp, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Parameter %d MSB (%d)", temp, val); if (reverb->variation_effect_xg[note].param_msb[temp] != val) { reverb->variation_effect_xg[note].param_msb[temp] = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3875,7 +3875,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x55: if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} temp = (b - 0x43) / 2; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Parameter %d LSB (%d)", temp, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Parameter %d LSB (%d)", temp, val); if (reverb->variation_effect_xg[note].param_lsb[temp] != val) { reverb->variation_effect_xg[note].param_lsb[temp] = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3883,7 +3883,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x56: /* Variation Return */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Return (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Return (%d)", val); if (reverb->variation_effect_xg[note].ret != val) { reverb->variation_effect_xg[note].ret = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3891,7 +3891,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x57: /* Variation Pan */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Pan (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Pan (%d)", val); if (reverb->variation_effect_xg[note].pan != val) { reverb->variation_effect_xg[note].pan = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3899,7 +3899,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x58: /* Send Variation To Reverb */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Send Variation To Reverb (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Send Variation To Reverb (%d)", val); if (reverb->variation_effect_xg[note].send_reverb != val) { reverb->variation_effect_xg[note].send_reverb = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3907,7 +3907,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x59: /* Send Variation To Chorus */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Send Variation To Chorus (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Send Variation To Chorus (%d)", val); if (reverb->variation_effect_xg[note].send_chorus != val) { reverb->variation_effect_xg[note].send_chorus = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3915,7 +3915,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x5A: /* Variation Connection */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Connection (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Connection (%d)", val); if (reverb->variation_effect_xg[note].connection != val) { reverb->variation_effect_xg[note].connection = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3923,7 +3923,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x5B: /* Variation Part */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Part (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Part (%d)", val); if (reverb->variation_effect_xg[note].part != val) { reverb->variation_effect_xg[note].part = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3931,7 +3931,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x5C: /* MW Variation Control Depth */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"MW Variation Control Depth (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"MW Variation Control Depth (%d)", val); if (reverb->variation_effect_xg[note].mw_depth != val) { reverb->variation_effect_xg[note].mw_depth = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3939,7 +3939,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x5D: /* BEND Variation Control Depth */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"BEND Variation Control Depth (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"BEND Variation Control Depth (%d)", val); if (reverb->variation_effect_xg[note].bend_depth != val) { reverb->variation_effect_xg[note].bend_depth = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3947,7 +3947,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x5E: /* CAT Variation Control Depth */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CAT Variation Control Depth (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"CAT Variation Control Depth (%d)", val); if (reverb->variation_effect_xg[note].cat_depth != val) { reverb->variation_effect_xg[note].cat_depth = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3955,7 +3955,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x5F: /* AC1 Variation Control Depth */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"AC1 Variation Control Depth (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"AC1 Variation Control Depth (%d)", val); if (reverb->variation_effect_xg[note].ac1_depth != val) { reverb->variation_effect_xg[note].ac1_depth = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3963,7 +3963,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x60: /* AC2 Variation Control Depth */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"AC2 Variation Control Depth (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"AC2 Variation Control Depth (%d)", val); if (reverb->variation_effect_xg[note].ac2_depth != val) { reverb->variation_effect_xg[note].ac2_depth = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3971,7 +3971,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x61: /* CBC1 Variation Control Depth */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CBC1 Variation Control Depth (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"CBC1 Variation Control Depth (%d)", val); if (reverb->variation_effect_xg[note].cbc1_depth != val) { reverb->variation_effect_xg[note].cbc1_depth = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3979,7 +3979,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) break; case 0x62: /* CBC2 Variation Control Depth */ if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CBC2 Variation Control Depth (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"CBC2 Variation Control Depth (%d)", val); if (reverb->variation_effect_xg[note].cbc2_depth != val) { reverb->variation_effect_xg[note].cbc2_depth = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -3993,7 +3993,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x75: temp = b - 0x70 + 10; if (note >= XG_VARIATION_EFFECT_NUM || note < 0) {break;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Parameter %d (%d)", temp + 1, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Parameter %d (%d)", temp + 1, val); if (reverb->variation_effect_xg[note].param_lsb[temp] != val) { reverb->variation_effect_xg[note].param_lsb[temp] = val; reverb->recompute_effect_xg(&reverb->variation_effect_xg[note]); @@ -4007,7 +4007,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) { case 0x00: /* EQ type */ if(opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ type (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ type (%d)", val); reverb->multi_eq_xg.type = val; reverb->set_multi_eq_type_xg(val); reverb->recompute_multi_eq_xg(); @@ -4017,7 +4017,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) if(opt_eq_control) { if(val > 0x4C) {val = 0x4C;} else if(val < 0x34) {val = 0x34;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ gain1 (%d dB)", val - 0x40); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ gain1 (%d dB)", val - 0x40); reverb->multi_eq_xg.gain1 = val; reverb->recompute_multi_eq_xg(); } @@ -4025,21 +4025,21 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x02: /* EQ frequency1 */ if(opt_eq_control) { if(val > 60) {val = 60;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ frequency1 (%d Hz)", (int32_t)eq_freq_table_xg[val]); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ frequency1 (%d Hz)", (int32_t)eq_freq_table_xg[val]); reverb->multi_eq_xg.freq1 = val; reverb->recompute_multi_eq_xg(); } break; case 0x03: /* EQ Q1 */ if(opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ Q1 (%f)", (double)val / 10.0); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ Q1 (%f)", (double)val / 10.0); reverb->multi_eq_xg.q1 = val; reverb->recompute_multi_eq_xg(); } break; case 0x04: /* EQ shape1 */ if(opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ shape1 (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ shape1 (%d)", val); reverb->multi_eq_xg.shape1 = val; reverb->recompute_multi_eq_xg(); } @@ -4048,7 +4048,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) if(opt_eq_control) { if(val > 0x4C) {val = 0x4C;} else if(val < 0x34) {val = 0x34;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ gain2 (%d dB)", val - 0x40); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ gain2 (%d dB)", val - 0x40); reverb->multi_eq_xg.gain2 = val; reverb->recompute_multi_eq_xg(); } @@ -4056,14 +4056,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x06: /* EQ frequency2 */ if(opt_eq_control) { if(val > 60) {val = 60;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ frequency2 (%d Hz)", (int32_t)eq_freq_table_xg[val]); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ frequency2 (%d Hz)", (int32_t)eq_freq_table_xg[val]); reverb->multi_eq_xg.freq2 = val; reverb->recompute_multi_eq_xg(); } break; case 0x07: /* EQ Q2 */ if(opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ Q2 (%f)", (double)val / 10.0); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ Q2 (%f)", (double)val / 10.0); reverb->multi_eq_xg.q2 = val; reverb->recompute_multi_eq_xg(); } @@ -4072,7 +4072,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) if(opt_eq_control) { if(val > 0x4C) {val = 0x4C;} else if(val < 0x34) {val = 0x34;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ gain3 (%d dB)", val - 0x40); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ gain3 (%d dB)", val - 0x40); reverb->multi_eq_xg.gain3 = val; reverb->recompute_multi_eq_xg(); } @@ -4080,14 +4080,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x0A: /* EQ frequency3 */ if(opt_eq_control) { if(val > 60) {val = 60;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ frequency3 (%d Hz)", (int32_t)eq_freq_table_xg[val]); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ frequency3 (%d Hz)", (int32_t)eq_freq_table_xg[val]); reverb->multi_eq_xg.freq3 = val; reverb->recompute_multi_eq_xg(); } break; case 0x0B: /* EQ Q3 */ if(opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ Q3 (%f)", (double)val / 10.0); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ Q3 (%f)", (double)val / 10.0); reverb->multi_eq_xg.q3 = val; reverb->recompute_multi_eq_xg(); } @@ -4096,7 +4096,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) if(opt_eq_control) { if(val > 0x4C) {val = 0x4C;} else if(val < 0x34) {val = 0x34;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ gain4 (%d dB)", val - 0x40); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ gain4 (%d dB)", val - 0x40); reverb->multi_eq_xg.gain4 = val; reverb->recompute_multi_eq_xg(); } @@ -4104,14 +4104,14 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x0E: /* EQ frequency4 */ if(opt_eq_control) { if(val > 60) {val = 60;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ frequency4 (%d Hz)", (int32_t)eq_freq_table_xg[val]); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ frequency4 (%d Hz)", (int32_t)eq_freq_table_xg[val]); reverb->multi_eq_xg.freq4 = val; reverb->recompute_multi_eq_xg(); } break; case 0x0F: /* EQ Q4 */ if(opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ Q4 (%f)", (double)val / 10.0); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ Q4 (%f)", (double)val / 10.0); reverb->multi_eq_xg.q4 = val; reverb->recompute_multi_eq_xg(); } @@ -4120,7 +4120,7 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) if(opt_eq_control) { if(val > 0x4C) {val = 0x4C;} else if(val < 0x34) {val = 0x34;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ gain5 (%d dB)", val - 0x40); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ gain5 (%d dB)", val - 0x40); reverb->multi_eq_xg.gain5 = val; reverb->recompute_multi_eq_xg(); } @@ -4128,21 +4128,21 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x12: /* EQ frequency5 */ if(opt_eq_control) { if(val > 60) {val = 60;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ frequency5 (%d Hz)", (int32_t)eq_freq_table_xg[val]); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ frequency5 (%d Hz)", (int32_t)eq_freq_table_xg[val]); reverb->multi_eq_xg.freq5 = val; reverb->recompute_multi_eq_xg(); } break; case 0x13: /* EQ Q5 */ if(opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ Q5 (%f)", (double)val / 10.0); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ Q5 (%f)", (double)val / 10.0); reverb->multi_eq_xg.q5 = val; reverb->recompute_multi_eq_xg(); } break; case 0x14: /* EQ shape5 */ if(opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ shape5 (%d)", val); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ shape5 (%d)", val); reverb->multi_eq_xg.shape5 = val; reverb->recompute_multi_eq_xg(); } @@ -4168,17 +4168,17 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x06: /* Same Note Number Key On Assign */ if(val == 0) { channel[ch].assign_mode = 0; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Same Note Number Key On Assign: Single (CH:%d)",ch); + //printMessage(CMSG_INFO,VERB_NOISY,"Same Note Number Key On Assign: Single (CH:%d)",ch); } else if(val == 1) { channel[ch].assign_mode = 2; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Same Note Number Key On Assign: Multi (CH:%d)",ch); + //printMessage(CMSG_INFO,VERB_NOISY,"Same Note Number Key On Assign: Multi (CH:%d)",ch); } else if(val == 2) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Same Note Number Key On Assign: Inst is not supported. (CH:%d)",ch); + //printMessage(CMSG_INFO,VERB_NOISY,"Same Note Number Key On Assign: Inst is not supported. (CH:%d)",ch); } break; case 0x11: /* Dry Level */ channel[ch].dry_level = val; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Dry Level (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Dry Level (CH:%d VAL:%d)", ch, val); break; } } else if ((note & 0xF0) == 0x30) { /* Drum Setup */ @@ -4188,13 +4188,13 @@ void Player::process_sysex_event(int ev, int ch, int val, int b) case 0x0E: /* EG Decay1 */ if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument EG Decay1 (CH:%d NOTE:%d VAL:%d)", ch, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Drum Instrument EG Decay1 (CH:%d NOTE:%d VAL:%d)", ch, note, val); channel[ch].drums[note]->drum_envelope_rate[EG_DECAY1] = val; break; case 0x0F: /* EG Decay2 */ if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument EG Decay2 (CH:%d NOTE:%d VAL:%d)", ch, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Drum Instrument EG Decay2 (CH:%d NOTE:%d VAL:%d)", ch, note, val); channel[ch].drums[note]->drum_envelope_rate[EG_DECAY2] = val; break; default: @@ -4318,7 +4318,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) switch (addr) { case NRPN_ADDR_0108: /* Vibrato Rate */ if (op_nrpn_vibrato) { - //ctl_cmsg(CMSG_INFO, VERB_NOISY, "Vibrato Rate (CH:%d VAL:%d)", ch, val - 64); + //printMessage(CMSG_INFO, VERB_NOISY, "Vibrato Rate (CH:%d VAL:%d)", ch, val - 64); channel[ch].vibrato_ratio = gs_cnv_vib_rate(val); } if (update_now) @@ -4326,7 +4326,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) break; case NRPN_ADDR_0109: /* Vibrato Depth */ if (op_nrpn_vibrato) { - //ctl_cmsg(CMSG_INFO, VERB_NOISY, "Vibrato Depth (CH:%d VAL:%d)", ch, val - 64); + //printMessage(CMSG_INFO, VERB_NOISY, "Vibrato Depth (CH:%d VAL:%d)", ch, val - 64); channel[ch].vibrato_depth = gs_cnv_vib_depth(val); } if (update_now) @@ -4334,7 +4334,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) break; case NRPN_ADDR_010A: /* Vibrato Delay */ if (op_nrpn_vibrato) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Vibrato Delay (CH:%d VAL:%d)", ch, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Vibrato Delay (CH:%d VAL:%d)", ch, val); channel[ch].vibrato_delay = gs_cnv_vib_delay(val); } if (update_now) @@ -4342,26 +4342,26 @@ void Player::update_rpn_map(int ch, int addr, int update_now) break; case NRPN_ADDR_0120: /* Filter Cutoff Frequency */ if (timidity_lpf_def) { - //ctl_cmsg(CMSG_INFO, VERB_NOISY, "Filter Cutoff (CH:%d VAL:%d)", ch, val - 64); + //printMessage(CMSG_INFO, VERB_NOISY, "Filter Cutoff (CH:%d VAL:%d)", ch, val - 64); channel[ch].param_cutoff_freq = val - 64; } break; case NRPN_ADDR_0121: /* Filter Resonance */ if (timidity_lpf_def) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Filter Resonance (CH:%d VAL:%d)", ch, val - 64); + //printMessage(CMSG_INFO,VERB_NOISY,"Filter Resonance (CH:%d VAL:%d)", ch, val - 64); channel[ch].param_resonance = val - 64; } break; case NRPN_ADDR_0130: /* EQ BASS */ if (opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ BASS (CH:%d %.2f dB)", ch, 0.19 * (double)(val - 0x40)); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ BASS (CH:%d %.2f dB)", ch, 0.19 * (double)(val - 0x40)); channel[ch].eq_xg.bass = val; recompute_part_eq_xg(&(channel[ch].eq_xg)); } break; case NRPN_ADDR_0131: /* EQ TREBLE */ if (opt_eq_control) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ TREBLE (CH:%d %.2f dB)", ch, 0.19 * (double)(val - 0x40)); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ TREBLE (CH:%d %.2f dB)", ch, 0.19 * (double)(val - 0x40)); channel[ch].eq_xg.treble = val; recompute_part_eq_xg(&(channel[ch].eq_xg)); } @@ -4370,7 +4370,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) if (opt_eq_control) { if(val < 4) {val = 4;} else if(val > 40) {val = 40;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ BASS frequency (CH:%d %d Hz)", ch, (int32_t)eq_freq_table_xg[val]); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ BASS frequency (CH:%d %d Hz)", ch, (int32_t)eq_freq_table_xg[val]); channel[ch].eq_xg.bass_freq = val; recompute_part_eq_xg(&(channel[ch].eq_xg)); } @@ -4379,7 +4379,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) if (opt_eq_control) { if(val < 28) {val = 28;} else if(val > 58) {val = 58;} - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"EQ TREBLE frequency (CH:%d %d Hz)", ch, (int32_t)eq_freq_table_xg[val]); + //printMessage(CMSG_INFO,VERB_NOISY,"EQ TREBLE frequency (CH:%d %d Hz)", ch, (int32_t)eq_freq_table_xg[val]); channel[ch].eq_xg.treble_freq = val; recompute_part_eq_xg(&(channel[ch].eq_xg)); } @@ -4398,7 +4398,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) note = channel[ch].lastlrpn; if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument Filter Cutoff (CH:%d NOTE:%d VAL:%d)", ch, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Drum Instrument Filter Cutoff (CH:%d NOTE:%d VAL:%d)", ch, note, val); channel[ch].drums[note]->drum_cutoff_freq = val - 64; break; case NRPN_ADDR_1500: /* Drum Filter Resonance (XG) */ @@ -4406,7 +4406,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) note = channel[ch].lastlrpn; if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument Filter Resonance (CH:%d NOTE:%d VAL:%d)", ch, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Drum Instrument Filter Resonance (CH:%d NOTE:%d VAL:%d)", ch, note, val); channel[ch].drums[note]->drum_resonance = val - 64; break; case NRPN_ADDR_1600: /* Drum EG Attack Time (XG) */ @@ -4417,7 +4417,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); val -= 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument Attack Time (CH:%d NOTE:%d VAL:%d)", ch, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Drum Instrument Attack Time (CH:%d NOTE:%d VAL:%d)", ch, note, val); channel[ch].drums[note]->drum_envelope_rate[EG_ATTACK] = val; } break; @@ -4429,7 +4429,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); val -= 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument Decay Time (CH:%d NOTE:%d VAL:%d)", ch, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Drum Instrument Decay Time (CH:%d NOTE:%d VAL:%d)", ch, note, val); channel[ch].drums[note]->drum_envelope_rate[EG_DECAY1] = channel[ch].drums[note]->drum_envelope_rate[EG_DECAY2] = val; } @@ -4440,7 +4440,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); channel[ch].drums[note]->coarse = val - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument Pitch Coarse (CH:%d NOTE:%d VAL:%d)", ch, note, channel[ch].drums[note]->coarse); + //printMessage(CMSG_INFO,VERB_NOISY,"Drum Instrument Pitch Coarse (CH:%d NOTE:%d VAL:%d)", ch, note, channel[ch].drums[note]->coarse); channel[ch].pitchfactor = 0; break; case NRPN_ADDR_1900: /* Fine Pitch of Drum (XG) */ @@ -4449,7 +4449,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); channel[ch].drums[note]->fine = val - 64; - ctl_cmsg(CMSG_INFO, VERB_NOISY, "Drum Instrument Pitch Fine (CH:%d NOTE:%d VAL:%d)", ch, note, channel[ch].drums[note]->fine); + printMessage(CMSG_INFO, VERB_NOISY, "Drum Instrument Pitch Fine (CH:%d NOTE:%d VAL:%d)", ch, note, channel[ch].drums[note]->fine); channel[ch].pitchfactor = 0; break; case NRPN_ADDR_1A00: /* Level of Drum */ @@ -4457,7 +4457,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) note = channel[ch].lastlrpn; if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument TVA Level (CH:%d NOTE:%d VAL:%d)", ch, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Drum Instrument TVA Level (CH:%d NOTE:%d VAL:%d)", ch, note, val); channel[ch].drums[note]->drum_level = calc_drum_tva_level(ch, note, val); break; @@ -4480,7 +4480,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) note = channel[ch].lastlrpn; if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); - ctl_cmsg(CMSG_INFO, VERB_NOISY, "Reverb Send Level of Drum (CH:%d NOTE:%d VALUE:%d)", ch, note, val); + printMessage(CMSG_INFO, VERB_NOISY, "Reverb Send Level of Drum (CH:%d NOTE:%d VALUE:%d)", ch, note, val); if (channel[ch].drums[note]->reverb_level != val) { channel[ch].drum_effect_flag = 0; } @@ -4491,7 +4491,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) note = channel[ch].lastlrpn; if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); - ctl_cmsg(CMSG_INFO, VERB_NOISY, "Chorus Send Level of Drum (CH:%d NOTE:%d VALUE:%d)", ch, note, val); + printMessage(CMSG_INFO, VERB_NOISY, "Chorus Send Level of Drum (CH:%d NOTE:%d VALUE:%d)", ch, note, val); if (channel[ch].drums[note]->chorus_level != val) { channel[ch].drum_effect_flag = 0; } @@ -4503,7 +4503,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) note = channel[ch].lastlrpn; if (channel[ch].drums[note] == NULL) play_midi_setup_drums(ch, note); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Send Level of Drum (CH:%d NOTE:%d VALUE:%d)", ch, note, val); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Send Level of Drum (CH:%d NOTE:%d VALUE:%d)", ch, note, val); if (channel[ch].drums[note]->delay_level != val) { channel[ch].drum_effect_flag = 0; } @@ -4534,22 +4534,22 @@ void Player::update_rpn_map(int ch, int addr, int update_now) play_midi_setup_drums(ch, note); break; case RPN_ADDR_0000: /* Pitch bend sensitivity */ - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "Pitch Bend Sensitivity (CH:%d VALUE:%d)", ch, val); + printMessage(CMSG_INFO, VERB_DEBUG, "Pitch Bend Sensitivity (CH:%d VALUE:%d)", ch, val); /* for mod2mid.c, arpeggio */ if (channel[ch].rpnmap[RPN_ADDR_0000] > 24) channel[ch].rpnmap[RPN_ADDR_0000] = 24; channel[ch].pitchfactor = 0; break; case RPN_ADDR_0001: /* Master Fine Tuning */ - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "Master Fine Tuning (CH:%d VALUE:%d)", ch, val); + printMessage(CMSG_INFO, VERB_DEBUG, "Master Fine Tuning (CH:%d VALUE:%d)", ch, val); channel[ch].pitchfactor = 0; break; case RPN_ADDR_0002: /* Master Coarse Tuning */ - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "Master Coarse Tuning (CH:%d VALUE:%d)", ch, val); + printMessage(CMSG_INFO, VERB_DEBUG, "Master Coarse Tuning (CH:%d VALUE:%d)", ch, val); channel[ch].pitchfactor = 0; break; case RPN_ADDR_0003: /* Tuning Program Select */ - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "Tuning Program Select (CH:%d VALUE:%d)", ch, val); + printMessage(CMSG_INFO, VERB_DEBUG, "Tuning Program Select (CH:%d VALUE:%d)", ch, val); for (i = 0; i < upper_voices; i++) if (voice[i].status != VOICE_FREE) { voice[i].temper_instant = 1; @@ -4557,7 +4557,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) } break; case RPN_ADDR_0004: /* Tuning Bank Select */ - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "Tuning Bank Select (CH:%d VALUE:%d)", ch, val); + printMessage(CMSG_INFO, VERB_DEBUG, "Tuning Bank Select (CH:%d VALUE:%d)", ch, val); for (i = 0; i < upper_voices; i++) if (voice[i].status != VOICE_FREE) { voice[i].temper_instant = 1; @@ -4566,7 +4566,7 @@ void Player::update_rpn_map(int ch, int addr, int update_now) break; case RPN_ADDR_0005: /* GM2: Modulation Depth Range */ channel[ch].mod.lfo1_pitch_depth = (((int32_t)channel[ch].rpnmap[RPN_ADDR_0005] << 7) | channel[ch].rpnmap_lsb[RPN_ADDR_0005]) * 100 / 128; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Modulation Depth Range (CH:%d VALUE:%d)", ch, channel[ch].rpnmap[RPN_ADDR_0005]); + //printMessage(CMSG_INFO,VERB_NOISY,"Modulation Depth Range (CH:%d VALUE:%d)", ch, channel[ch].rpnmap[RPN_ADDR_0005]); break; case RPN_ADDR_7F7F: /* RPN reset */ channel[ch].rpn_7f7f_flag = 1; @@ -5257,21 +5257,21 @@ int Player::play_event(MidiEvent *ev) case ME_SOFT_PEDAL: if (timidity_lpf_def) { channel[ch].soft_pedal = ev->a; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Soft Pedal (CH:%d VAL:%d)", ch, channel[ch].soft_pedal); + //printMessage(CMSG_INFO,VERB_NOISY,"Soft Pedal (CH:%d VAL:%d)", ch, channel[ch].soft_pedal); } break; case ME_HARMONIC_CONTENT: if (timidity_lpf_def) { channel[ch].param_resonance = ev->a - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Harmonic Content (CH:%d VAL:%d)", ch, channel[ch].param_resonance); + //printMessage(CMSG_INFO,VERB_NOISY,"Harmonic Content (CH:%d VAL:%d)", ch, channel[ch].param_resonance); } break; case ME_BRIGHTNESS: if (timidity_lpf_def) { channel[ch].param_cutoff_freq = ev->a - 64; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Brightness (CH:%d VAL:%d)", ch, channel[ch].param_cutoff_freq); + //printMessage(CMSG_INFO,VERB_NOISY,"Brightness (CH:%d VAL:%d)", ch, channel[ch].param_cutoff_freq); } break; @@ -5312,13 +5312,13 @@ int Player::play_event(MidiEvent *ev) channel[ch].chorus_level = -timidity_chorus; } if (ev->a) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Chorus Send (CH:%d LEVEL:%d)", ch, ev->a); + //printMessage(CMSG_INFO,VERB_NOISY,"Chorus Send (CH:%d LEVEL:%d)", ch, ev->a); } } break; case ME_TREMOLO_EFFECT: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Tremolo Send (CH:%d LEVEL:%d)", ch, ev->a); + //printMessage(CMSG_INFO,VERB_NOISY,"Tremolo Send (CH:%d LEVEL:%d)", ch, ev->a); break; case ME_CELESTE_EFFECT: @@ -5326,10 +5326,10 @@ int Player::play_event(MidiEvent *ev) if (ISDRUMCHANNEL(ch) && channel[ch].delay_level != ev->a) { channel[ch].drum_effect_flag = 0; } channel[ch].delay_level = ev->a; if (play_system_mode == XG_SYSTEM_MODE) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Variation Send (CH:%d LEVEL:%d)", ch, ev->a); + //printMessage(CMSG_INFO,VERB_NOISY,"Variation Send (CH:%d LEVEL:%d)", ch, ev->a); } else { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Delay Send (CH:%d LEVEL:%d)", ch, ev->a); + //printMessage(CMSG_INFO,VERB_NOISY,"Delay Send (CH:%d LEVEL:%d)", ch, ev->a); } } break; @@ -5345,7 +5345,7 @@ int Player::play_event(MidiEvent *ev) break; case ME_PHASER_EFFECT: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Phaser Send (CH:%d LEVEL:%d)", ch, ev->a); + //printMessage(CMSG_INFO,VERB_NOISY,"Phaser Send (CH:%d LEVEL:%d)", ch, ev->a); break; case ME_RPN_INC: diff --git a/libraries/timidityplus/quantity.cpp b/libraries/timidityplus/quantity.cpp index a6628a2fc3..1060c73ffd 100644 --- a/libraries/timidityplus/quantity.cpp +++ b/libraries/timidityplus/quantity.cpp @@ -212,7 +212,7 @@ static int GetQuantityHints(uint16_t type, QuantityHint *units) REGISTER_TYPE_INT("ms", VIBRATO_SWEEP_MS); END_QUANTITY_TYPE; default: - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "Internal parameter error (%d)", type); + printMessage(CMSG_ERROR, VERB_NORMAL, "Internal parameter error (%d)", type); return 0; } return 1; @@ -284,7 +284,7 @@ static int GetQuantityConvertProc(const Quantity *quantity, QuantityConvertProc } unit++; } - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, "Internal parameter error"); + printMessage(CMSG_ERROR, VERB_NORMAL, "Internal parameter error"); return -1; } diff --git a/libraries/timidityplus/readmidic.cpp b/libraries/timidityplus/readmidic.cpp index eb1caf11ad..8bd454322c 100644 --- a/libraries/timidityplus/readmidic.cpp +++ b/libraries/timidityplus/readmidic.cpp @@ -49,7 +49,7 @@ static int set_xg_reverb_type(int msb, int lsb) (msb >= 0x05 && msb <= 0x0F) || (msb >= 0x14)) /* NO EFFECT */ { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"XG Set Reverb Type (NO EFFECT %d %d)", msb, lsb); + //printMessage(CMSG_INFO,VERB_NOISY,"XG Set Reverb Type (NO EFFECT %d %d)", msb, lsb); return -1; } @@ -91,7 +91,7 @@ static int set_xg_reverb_type(int msb, int lsb) if (lsb == 0x02 && msb == 0x02) type = 2; /* Room 3 */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"XG Set Reverb Type (%d)", type); + //printMessage(CMSG_INFO,VERB_NOISY,"XG Set Reverb Type (%d)", type); return type; } @@ -105,7 +105,7 @@ static int set_xg_chorus_type(int msb, int lsb) (msb >= 0x45 && msb <= 0x47) || (msb >= 0x49)) /* NO EFFECT */ { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"XG Set Chorus Type (NO EFFECT %d %d)", msb, lsb); + //printMessage(CMSG_INFO,VERB_NOISY,"XG Set Chorus Type (NO EFFECT %d %d)", msb, lsb); return -1; } @@ -167,7 +167,7 @@ static int set_xg_chorus_type(int msb, int lsb) } } - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"XG Set Chorus Type (%d)", type); + //printMessage(CMSG_INFO,VERB_NOISY,"XG Set Chorus Type (%d)", type); return type; } @@ -487,7 +487,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE for (ent = addlow; body <= body_end; body++, ent++) { switch (ent) { case 0x00: /* Element Reserve */ - /* //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Element Reserve is not supported. (CH:%d VAL:%d)", p, *body); */ + /* //printMessage(CMSG_INFO,VERB_NOISY,"Element Reserve is not supported. (CH:%d VAL:%d)", p, *body); */ break; case 0x01: /* bank select MSB */ @@ -873,7 +873,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE break; case 0x59: /* AC1 Controller Number */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"AC1 Controller Number is not supported. (CH:%d VAL:%d)", p, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"AC1 Controller Number is not supported. (CH:%d VAL:%d)", p, *body); break; case 0x5A: /* AC1 Pitch Control */ @@ -907,7 +907,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE break; case 0x60: /* AC2 Controller Number */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"AC2 Controller Number is not supported. (CH:%d VAL:%d)", p, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"AC2 Controller Number is not supported. (CH:%d VAL:%d)", p, *body); break; case 0x61: /* AC2 Pitch Control */ @@ -949,19 +949,19 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events++; case 0x69: /* Pitch EG Initial Level */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Pitch EG Initial Level is not supported. (CH:%d VAL:%d)", p, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Pitch EG Initial Level is not supported. (CH:%d VAL:%d)", p, *body); break; case 0x6A: /* Pitch EG Attack Time */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Pitch EG Attack Time is not supported. (CH:%d VAL:%d)", p, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Pitch EG Attack Time is not supported. (CH:%d VAL:%d)", p, *body); break; case 0x6B: /* Pitch EG Release Level */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Pitch EG Release Level is not supported. (CH:%d VAL:%d)", p, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Pitch EG Release Level is not supported. (CH:%d VAL:%d)", p, *body); break; case 0x6C: /* Pitch EG Release Time */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Pitch EG Release Time is not supported. (CH:%d VAL:%d)", p, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Pitch EG Release Time is not supported. (CH:%d VAL:%d)", p, *body); break; case 0x6D: /* Velocity Limit Low */ @@ -975,11 +975,11 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE break; case 0x70: /* Bend Pitch Low Control */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Bend Pitch Low Control is not supported. (CH:%d VAL:%d)", p, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Bend Pitch Low Control is not supported. (CH:%d VAL:%d)", p, *body); break; case 0x71: /* Filter EG Depth */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Filter EG Depth is not supported. (CH:%d VAL:%d)", p, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Filter EG Depth is not supported. (CH:%d VAL:%d)", p, *body); break; case 0x72: /* EQ BASS */ @@ -1011,7 +1011,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported XG Bulk Dump SysEx. (ADDR:%02X %02X %02X VAL:%02X)", addhigh, addlow, ent, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported XG Bulk Dump SysEx. (ADDR:%02X %02X %02X VAL:%02X)", addhigh, addlow, ent, *body); continue; break; } @@ -1076,7 +1076,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events += 3; break; case 0x03: /* Alternate Group */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Alternate Group is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Alternate Group is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); break; case 0x04: /* Pan */ SETMIDIEVENT(evm[num_events], 0, ME_NRPN_MSB, dp, 0x1C, SYSEX_TAG); @@ -1103,7 +1103,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events += 3; break; case 0x08: /* Key Assign */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Key Assign is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Key Assign is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); break; case 0x09: /* Rcv Note Off */ SETMIDIEVENT(evm[num_events], 0, ME_SYSEX_MSB, dp, note, 0); @@ -1166,16 +1166,16 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events += 3; break; case 0x50: /* High Pass Filter Cutoff Frequency */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"High Pass Filter Cutoff Frequency is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"High Pass Filter Cutoff Frequency is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); break; case 0x60: /* Velocity Pitch Sense */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Velocity Pitch Sense is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Velocity Pitch Sense is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); break; case 0x61: /* Velocity LPF Cutoff Sense */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Velocity LPF Cutoff Sense is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Velocity LPF Cutoff Sense is not supported. (CH:%d NOTE:%d VAL:%d)", dp, note, *body); break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported XG Bulk Dump SysEx. (ADDR:%02X %02X %02X VAL:%02X)", addhigh, addmid, ent, *body); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported XG Bulk Dump SysEx. (ADDR:%02X %02X %02X VAL:%02X)", addhigh, addmid, ent, *body); break; } } @@ -1208,7 +1208,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE checksum += val[i]; } if (((128 - (checksum & 0x7F)) & 0x7F) != val[gslen - 1]) { - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"GS SysEx: Checksum Error."); + //printMessage(CMSG_INFO,VERB_NOISY,"GS SysEx: Checksum Error."); return num_events; } @@ -1371,10 +1371,10 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events++; break; case 0x1F: /* CC1 Controller Number */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC1 Controller Number is not supported. (CH:%d VAL:%d)", p, val[7]); + //printMessage(CMSG_INFO,VERB_NOISY,"CC1 Controller Number is not supported. (CH:%d VAL:%d)", p, val[7]); break; case 0x20: /* CC2 Controller Number */ - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"CC2 Controller Number is not supported. (CH:%d VAL:%d)", p, val[7]); + //printMessage(CMSG_INFO,VERB_NOISY,"CC2 Controller Number is not supported. (CH:%d VAL:%d)", p, val[7]); break; case 0x21: /* Chorus Send Level */ SETMIDIEVENT(evm[0], 0, ME_CHORUS_EFFECT, p, val[7], SYSEX_TAG); @@ -1459,7 +1459,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events += 12; break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); break; } } @@ -1733,7 +1733,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events++; break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); break; } } @@ -1850,7 +1850,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events++; break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); break; } } @@ -1873,7 +1873,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events++; break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); break; } } @@ -1997,7 +1997,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events++; break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); break; } } @@ -2020,7 +2020,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events++; break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); break; } } @@ -2073,7 +2073,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events += 3; break; default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); break; } break; @@ -2148,7 +2148,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE break; #endif default: - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); + //printMessage(CMSG_INFO,VERB_NOISY,"Unsupported GS SysEx. (ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]); break; } break; @@ -2165,7 +2165,7 @@ int SysexConvert::parse_sysex_event_multi(const uint8_t *val, int32_t len, MidiE num_events++; break; default: - /* ctl_cmsg(CMSG_INFO,VERB_NOISY, "Unsupported GS SysEx. " + /* printMessage(CMSG_INFO,VERB_NOISY, "Unsupported GS SysEx. " "(ADDR:%02X %02X %02X VAL:%02X %02X)", addr_h, addr_m, addr_l, val[7], val[8]);*/ break; @@ -2639,15 +2639,15 @@ int SysexConvert::parse_sysex_event(const uint8_t *val, int32_t len, MidiEvent * case 0x09: /* General MIDI Message */ /* GM System Enable/Disable */ if (val[3] == 1) { - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "SysEx: GM System On"); + printMessage(CMSG_INFO, VERB_DEBUG, "SysEx: GM System On"); SETMIDIEVENT(*ev, 0, ME_RESET, 0, GM_SYSTEM_MODE, 0); } else if (val[3] == 3) { - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "SysEx: GM2 System On"); + printMessage(CMSG_INFO, VERB_DEBUG, "SysEx: GM2 System On"); SETMIDIEVENT(*ev, 0, ME_RESET, 0, GM2_SYSTEM_MODE, 0); } else { - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "SysEx: GM System Off"); + printMessage(CMSG_INFO, VERB_DEBUG, "SysEx: GM System Off"); SETMIDIEVENT(*ev, 0, ME_RESET, 0, DEFAULT_SYSTEM_MODE, 0); } return 1; diff --git a/libraries/timidityplus/resample.cpp b/libraries/timidityplus/resample.cpp index 5638dec07a..c27e9d8d13 100644 --- a/libraries/timidityplus/resample.cpp +++ b/libraries/timidityplus/resample.cpp @@ -918,7 +918,7 @@ void pre_resample(Sample * sp) if ((int64_t)sp->data_length * a >= 0x7fffffffL) { /* Too large to compute */ - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " *** Can't pre-resampling for note %d", + printMessage(CMSG_INFO, VERB_DEBUG, " *** Can't pre-resampling for note %d", sp->note_to_use); return; } @@ -929,7 +929,7 @@ void pre_resample(Sample * sp) if ((double)newlen + incr >= 0x7fffffffL) { /* Too large to compute */ - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " *** Can't pre-resampling for note %d", + printMessage(CMSG_INFO, VERB_DEBUG, " *** Can't pre-resampling for note %d", sp->note_to_use); return; } diff --git a/libraries/timidityplus/reverb.cpp b/libraries/timidityplus/reverb.cpp index 69b6f2959b..1426c95d74 100644 --- a/libraries/timidityplus/reverb.cpp +++ b/libraries/timidityplus/reverb.cpp @@ -2121,7 +2121,7 @@ void Reverb::alloc_effect(EffectList *ef) ef->info = safe_malloc(ef->engine->info_size); memset(ef->info, 0, ef->engine->info_size); -/* //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Effect Engine: %s", ef->engine->name); */ +/* //printMessage(CMSG_INFO,VERB_NOISY,"Effect Engine: %s", ef->engine->name); */ } /*! allocate new effect item and add it into the tail of effect list. @@ -4154,7 +4154,7 @@ void Reverb::set_effect_param_xg(struct effect_xg_t *st, int type_msb, int type_ for (j = 0; j < 10; j++) { st->param_msb[j] = effect_parameter_xg[i].param_msb[j]; } - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"XG EFX: %s", effect_parameter_xg[i].name); + //printMessage(CMSG_INFO,VERB_NOISY,"XG EFX: %s", effect_parameter_xg[i].name); return; } } @@ -4168,7 +4168,7 @@ void Reverb::set_effect_param_xg(struct effect_xg_t *st, int type_msb, int type_ for (j = 0; j < 10; j++) { st->param_msb[j] = effect_parameter_xg[i].param_msb[j]; } - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"XG EFX: %s", effect_parameter_xg[i].name); + //printMessage(CMSG_INFO,VERB_NOISY,"XG EFX: %s", effect_parameter_xg[i].name); return; } } @@ -4347,7 +4347,7 @@ void Reverb::set_effect_param_gs(struct insertion_effect_gs_t *st, int msb, int for (j = 0; j < 20; j++) { st->parameter[j] = effect_parameter_gs[i].param[j]; } - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"GS EFX: %s", effect_parameter_gs[i].name); + //printMessage(CMSG_INFO,VERB_NOISY,"GS EFX: %s", effect_parameter_gs[i].name); break; } } diff --git a/libraries/timidityplus/sffile.cpp b/libraries/timidityplus/sffile.cpp index 9596516810..7fadad3e7c 100644 --- a/libraries/timidityplus/sffile.cpp +++ b/libraries/timidityplus/sffile.cpp @@ -157,14 +157,14 @@ int Instruments::load_soundfont(SFInfo *sf, struct timidity_file *fd) /* check RIFF file header */ READCHUNK(&chunk, fd); if (chunkid(chunk.id) != RIFF_ID) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: *** not a RIFF file", fd->filename.c_str()); return -1; } /* check file id */ READID(chunk.id, fd); if (chunkid(chunk.id) != SFBK_ID) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "%s: *** not a SoundFont file", fd->filename.c_str()); return -1; } @@ -177,7 +177,7 @@ int Instruments::load_soundfont(SFInfo *sf, struct timidity_file *fd) break; } else { - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "%s: *** illegal id in level 0: %4.4s %4d", fd->filename.c_str(), chunk.id, chunk.size); + printMessage(CMSG_WARNING, VERB_NORMAL, "%s: *** illegal id in level 0: %4.4s %4d", fd->filename.c_str(), chunk.id, chunk.size); FSKIP(chunk.size, fd); // Not aborting here will inevitably crash. return -1; @@ -278,7 +278,7 @@ int Instruments::process_list(int size, SFInfo *sf, struct timidity_file *fd) /* read the following id string */ READID(chunk.id, fd); size -= 4; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "%c%c%c%c:", + printMessage(CMSG_INFO, VERB_DEBUG, "%c%c%c%c:", chunk.id[0], chunk.id[1], chunk.id[2], chunk.id[3]); switch (chunkid(chunk.id)) { case INFO_ID: @@ -288,7 +288,7 @@ int Instruments::process_list(int size, SFInfo *sf, struct timidity_file *fd) case PDTA_ID: return process_pdta(size, sf, fd); default: - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "%s: *** illegal id in level 1: %4.4s", fd->filename.c_str(), chunk.id); + printMessage(CMSG_WARNING, VERB_NORMAL, "%s: *** illegal id in level 1: %4.4s", fd->filename.c_str(), chunk.id); FSKIP(size, fd); /* skip it */ return 0; } @@ -313,14 +313,14 @@ int Instruments::process_info(int size, SFInfo *sf, struct timidity_file *fd) return -1; size -= 8; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " %c%c%c%c:", + printMessage(CMSG_INFO, VERB_DEBUG, " %c%c%c%c:", chunk.id[0], chunk.id[1], chunk.id[2], chunk.id[3]); switch (chunkid(chunk.id)) { case IFIL_ID: /* soundfont file version */ READW(&sf->version, fd); READW(&sf->minorversion, fd); - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " version %d, minor %d", sf->version, sf->minorversion); break; @@ -329,7 +329,7 @@ int Instruments::process_info(int size, SFInfo *sf, struct timidity_file *fd) sf->sf_name = (char*)safe_malloc(chunk.size + 1); tf_read(sf->sf_name, 1, chunk.size, fd); sf->sf_name[chunk.size] = 0; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " name %s", sf->sf_name); break; @@ -357,7 +357,7 @@ int Instruments::process_sdta(int size, SFInfo *sf, struct timidity_file *fd) return -1; size -= 8; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " %c%c%c%c:", + printMessage(CMSG_INFO, VERB_DEBUG, " %c%c%c%c:", chunk.id[0], chunk.id[1], chunk.id[2], chunk.id[3]); switch (chunkid(chunk.id)) { case SNAM_ID: @@ -394,7 +394,7 @@ int Instruments::process_pdta(int size, SFInfo *sf, struct timidity_file *fd) return -1; size -= 8; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, " %c%c%c%c:", + printMessage(CMSG_INFO, VERB_DEBUG, " %c%c%c%c:", chunk.id[0], chunk.id[1], chunk.id[2], chunk.id[3]); switch (chunkid(chunk.id)) { case PHDR_ID: @@ -438,7 +438,7 @@ void Instruments::load_sample_names(int size, SFInfo *sf, struct timidity_file * { int i, nsamples; if (sf->version > 1) { - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "%s: *** version 2 has obsolete format??",fd->filename.c_str()); + printMessage(CMSG_WARNING, VERB_NORMAL, "%s: *** version 2 has obsolete format??",fd->filename.c_str()); FSKIP(size, fd); return; } @@ -450,7 +450,7 @@ void Instruments::load_sample_names(int size, SFInfo *sf, struct timidity_file * sf->sample = NEW(SFSampleInfo, sf->nsamples); } else if (sf->nsamples != nsamples) { - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "%s: *** different # of samples ?? (%d : %d)\n",fd->filename.c_str(), sf->nsamples, nsamples); + printMessage(CMSG_WARNING, VERB_NORMAL, "%s: *** different # of samples ?? (%d : %d)\n",fd->filename.c_str(), sf->nsamples, nsamples); FSKIP(size, fd); return; } @@ -504,7 +504,7 @@ void Instruments::load_inst_header(int size, SFInfo *sf, struct timidity_file *f sf->inst[i].hdr.nlayers = 0; sf->inst[i].hdr.layer = NULL; - ctl_cmsg(CMSG_INFO, VERB_DEBUG, + printMessage(CMSG_INFO, VERB_DEBUG, " InstHdr %d (%s) bagNdx=%d", i, sf->inst[i].hdr.name, sf->inst[i].hdr.bagNdx); } @@ -617,7 +617,7 @@ void Instruments::convert_layers(SFInfo *sf) if (prbags.bag == NULL || prbags.gen == NULL || inbags.bag == NULL || inbags.gen == NULL) { - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "%s: *** illegal bags / gens", sf->sf_name); + printMessage(CMSG_WARNING, VERB_NORMAL, "%s: *** illegal bags / gens", sf->sf_name); return; } @@ -645,7 +645,7 @@ void Instruments::generate_layers(SFHeader *hdr, SFHeader *next, SFBags *bags) hdr->nlayers = next->bagNdx - hdr->bagNdx; if (hdr->nlayers < 0) { - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "%s: illegal layer numbers %d", "", hdr->nlayers); + printMessage(CMSG_WARNING, VERB_NORMAL, "%s: illegal layer numbers %d", "", hdr->nlayers); return; } if (hdr->nlayers == 0) @@ -656,7 +656,7 @@ void Instruments::generate_layers(SFHeader *hdr, SFHeader *next, SFBags *bags) int genNdx = bags->bag[i]; layp->nlists = bags->bag[i + 1] - genNdx; if (layp->nlists < 0) { - ctl_cmsg(CMSG_WARNING, VERB_NORMAL, "%s: illegal list numbers %d", "", layp->nlists); + printMessage(CMSG_WARNING, VERB_NORMAL, "%s: illegal list numbers %d", "", layp->nlists); return; } layp->list = (SFGenRec*)safe_malloc(sizeof(SFGenRec) * layp->nlists); diff --git a/libraries/timidityplus/smplfile.cpp b/libraries/timidityplus/smplfile.cpp index b482796dbf..e3b96650b4 100644 --- a/libraries/timidityplus/smplfile.cpp +++ b/libraries/timidityplus/smplfile.cpp @@ -317,7 +317,7 @@ int Instruments::import_wave_load(char *sample_file, Instrument *inst) tf_close(tf); return 1; } - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Loading WAV: %s", sample_file); + //printMessage(CMSG_INFO,VERB_NOISY,"Loading WAV: %s", sample_file); state = chunk_flags = 0; type_index = 4, type_size = 8; for(;;) { @@ -349,7 +349,7 @@ int Instruments::import_wave_load(char *sample_file, Instrument *inst) frames = chunk_size / format.wBlockAlign; inst->samples = samples = format.wChannels; inst->sample = (Sample *)safe_malloc(sizeof(Sample) * samples); - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Format: %d-bits %dHz %dch, %d frames", format.wBitsPerSample, format.dwSamplesPerSec, samples, frames); + //printMessage(CMSG_INFO,VERB_NOISY,"Format: %d-bits %dHz %dch, %d frames", format.wBitsPerSample, format.dwSamplesPerSec, samples, frames); initialize_sample(inst, frames, format.wBitsPerSample, format.dwSamplesPerSec); /* load waveform data */ for(i = 0; i < samples; i++) @@ -439,7 +439,7 @@ static int read_WAVFormatChunk(struct timidity_file *tf, WAVFormatChunk *fmt, in goto fail; return 1; fail: - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read format chunk"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read format chunk"); return 0; } @@ -485,13 +485,13 @@ static int read_WAVSamplerChunk(struct timidity_file *tf, WAVSamplerChunk *smpl, } } if (psize != cbSamplerData) - ctl_cmsg(CMSG_WARNING, VERB_NOISY, "Bad sampler chunk length"); + printMessage(CMSG_WARNING, VERB_NOISY, "Bad sampler chunk length"); if (tf_seek(tf, psize, SEEK_CUR) == -1) goto fail; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Sampler: %dns/frame, note=%d, loops=%d", smpl->dwSamplePeriod, smpl->dwMIDIUnityNote, loopCount); + //printMessage(CMSG_INFO,VERB_NOISY,"Sampler: %dns/frame, note=%d, loops=%d", smpl->dwSamplePeriod, smpl->dwMIDIUnityNote, loopCount); return 1; fail: - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read sampler chunk"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read sampler chunk"); return 0; } @@ -508,12 +508,12 @@ static int read_WAVInstrumentChunk(struct timidity_file *tf, GeneralInstrumentIn READ_CHAR(inst->highNote); READ_CHAR(inst->lowVelocity); READ_CHAR(inst->highVelocity); - ctl_cmsg(CMSG_INFO, VERB_VERBOSE, "Instrument: note=%d (%d-%d), gain=%ddb, velocity=%d-%d", + printMessage(CMSG_INFO, VERB_VERBOSE, "Instrument: note=%d (%d-%d), gain=%ddb, velocity=%d-%d", inst->baseNote, inst->lowNote, inst->highNote, inst->gain, inst->lowVelocity, inst->highVelocity); return 1; fail: - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read instrument chunk"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read instrument chunk"); return 0; } @@ -601,7 +601,7 @@ int Instruments::import_aiff_load(char *sample_file, Instrument *inst) return 1; } compressed = buf[8 + 3] == 'C'; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Loading AIFF: %s", sample_file); + //printMessage(CMSG_INFO,VERB_NOISY,"Loading AIFF: %s", sample_file); type_index = 4, type_size = 8; chunk_flags = 0; sound.inst = inst; @@ -748,7 +748,7 @@ int Instruments::import_aiff_load(char *sample_file, Instrument *inst) goto fail; comm->sampleRate = ConvertFromIeeeExtended(sampleRate); csize -= 8 + 10; - //ctl_cmsg(CMSG_INFO,VERB_NOISY,"Format: %d-bits %dHz %dch, %d frames", comm->sampleSize, (int)comm->sampleRate, comm->numChannels, comm->numSampleFrames); + //printMessage(CMSG_INFO,VERB_NOISY,"Format: %d-bits %dHz %dch, %d frames", comm->sampleSize, (int)comm->sampleRate, comm->numChannels, comm->numSampleFrames); if (compressed) { READ_LONG_BE(compressionType); @@ -761,7 +761,7 @@ int Instruments::import_aiff_load(char *sample_file, Instrument *inst) if (tf_read(compressionName, compressionNameLength, 1, tf) != 1) goto fail; compressionName[compressionNameLength] = '\0'; - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "AIFF-C unknown compression type: %s", compressionName); + printMessage(CMSG_WARNING, VERB_VERBOSE, "AIFF-C unknown compression type: %s", compressionName); goto fail; } csize -= 4; @@ -771,7 +771,7 @@ int Instruments::import_aiff_load(char *sample_file, Instrument *inst) goto fail; return 1; fail: - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read common chunk"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read common chunk"); return 0; } @@ -805,7 +805,7 @@ int Instruments::read_AIFFSoundDataChunk(struct timidity_file *tf, AIFFSoundData return read_AIFFSoundData(tf, sound->inst, sound->common); } fail: - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read sound data chunk"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read sound data chunk"); return 0; } @@ -830,7 +830,7 @@ int Instruments::read_AIFFSoundData(struct timidity_file *tf, Instrument *inst, goto fail; return 1; fail: - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read sound data"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read sound data"); return 0; } @@ -841,7 +841,7 @@ static int read_AIFFInstumentChunk(struct timidity_file *tf, GeneralInstrumentIn if (csize != 20) { - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Bad instrument chunk length"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Bad instrument chunk length"); if (tf_seek(tf, csize, SEEK_CUR) == -1) goto fail; return 1; @@ -858,12 +858,12 @@ static int read_AIFFInstumentChunk(struct timidity_file *tf, GeneralInstrumentIn READ_SHORT_BE(loop->endID); if (tf_seek(tf, 2 + 2 + 2, SEEK_CUR) == -1) /* release loop */ goto fail; - ctl_cmsg(CMSG_INFO, VERB_VERBOSE, "Instrument: note=%d (%d-%d), gain=%ddb, velocity=%d-%d", + printMessage(CMSG_INFO, VERB_VERBOSE, "Instrument: note=%d (%d-%d), gain=%ddb, velocity=%d-%d", inst->baseNote, inst->lowNote, inst->highNote, inst->gain, inst->lowVelocity, inst->highVelocity); return 1; fail: - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read instrument chunk"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read instrument chunk"); return 0; } @@ -879,7 +879,7 @@ static int read_AIFFMarkerChunk(struct timidity_file *tf, AIFFMarkerData **marke READ_SHORT_BE(markerCount) if (csize != 2 + markerCount * (2 + 4)) { - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Bad marker chunk length"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Bad marker chunk length"); if (tf_seek(tf, csize, SEEK_CUR) == -1) goto fail; return 1; @@ -899,7 +899,7 @@ static int read_AIFFMarkerChunk(struct timidity_file *tf, AIFFMarkerData **marke fail: if (m != NULL) free(m); - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read marker chunk"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read marker chunk"); return 0; } @@ -1020,7 +1020,7 @@ static int read_sample_data(int32_t flags, struct timidity_file *tf, int bits, i } return 1; fail: - ctl_cmsg(CMSG_WARNING, VERB_VERBOSE, "Unable to read sample data"); + printMessage(CMSG_WARNING, VERB_VERBOSE, "Unable to read sample data"); return 0; } diff --git a/libraries/timidityplus/sndfont.cpp b/libraries/timidityplus/sndfont.cpp index 62ea2f6e67..60e577c524 100644 --- a/libraries/timidityplus/sndfont.cpp +++ b/libraries/timidityplus/sndfont.cpp @@ -261,7 +261,7 @@ void Instruments::init_sf(SFInsts *rec) int i; if ((rec->tf = open_file(rec->fname, sfreader)) == NULL) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "Can't open soundfont file %s", rec->fname); end_soundfont(rec); return; @@ -359,7 +359,7 @@ Instrument *Instruments::try_load_soundfont(SFInsts *rec, int order, int bank,in return NULL; if ((rec->tf = open_file(rec->fname, sfreader)) == NULL) { - ctl_cmsg(CMSG_ERROR, VERB_NORMAL, + printMessage(CMSG_ERROR, VERB_NORMAL, "Can't open soundfont file %s", rec->fname); end_soundfont(rec); return NULL; @@ -924,7 +924,7 @@ int Instruments::make_patch(SFInfo *sf, int pridx, LayerTable *tbl) if(sample->sampletype & SF_SAMPLETYPE_ROM) /* is ROM sample? */ { - ctl_cmsg(CMSG_INFO, VERB_DEBUG, "preset %d is ROM sample: 0x%x", + printMessage(CMSG_INFO, VERB_DEBUG, "preset %d is ROM sample: 0x%x", pridx, sample->sampletype); return AWE_RET_SKIP; } @@ -1209,7 +1209,7 @@ void Instruments::set_init_info(SFInfo *sf, SampleList *vp, LayerTable *tbl) if(tbl->set[SF_keynum]) vp->v.note_to_use = (int)tbl->val[SF_keynum]; if(tbl->set[SF_velocity] && (int)tbl->val[SF_velocity] != 0) { - ctl_cmsg(CMSG_INFO,VERB_DEBUG,"error: fixed-velocity is not supported."); + printMessage(CMSG_INFO,VERB_DEBUG,"error: fixed-velocity is not supported."); } vp->v.sample_type = sample->sampletype; @@ -1263,7 +1263,7 @@ void Instruments::set_init_info(SFInfo *sf, SampleList *vp, LayerTable *tbl) } else if(sample->sampletype == SF_SAMPLETYPE_LEFT) { /* leftSample = 4 */ vp->v.panning = 0; } else if(sample->sampletype == SF_SAMPLETYPE_LINKED) { /* linkedSample = 8 */ - ctl_cmsg(CMSG_ERROR,VERB_NOISY,"error: linkedSample is not supported."); + printMessage(CMSG_ERROR,VERB_NOISY,"error: linkedSample is not supported."); } memset(vp->v.envelope_keyf, 0, sizeof(vp->v.envelope_keyf)); diff --git a/libraries/timidityplus/timiditypp/controls.h b/libraries/timidityplus/timiditypp/controls.h index b7279c201f..f8ccefaed0 100644 --- a/libraries/timidityplus/timiditypp/controls.h +++ b/libraries/timidityplus/timiditypp/controls.h @@ -52,7 +52,7 @@ inline bool RC_IS_SKIP_FILE(int rc) } -extern void (*ctl_cmsg)(int type, int verbosity_level, const char* fmt, ...); +extern void (*printMessage)(int type, int verbosity_level, const char* fmt, ...); } diff --git a/libraries/wildmidi/wildmidi/wildmidi_lib.h b/libraries/wildmidi/wildmidi/wildmidi_lib.h index d4d5fcfbf5..4737bafbee 100644 --- a/libraries/wildmidi/wildmidi/wildmidi_lib.h +++ b/libraries/wildmidi/wildmidi/wildmidi_lib.h @@ -135,6 +135,8 @@ private: struct _mdi *Init_MDI(); unsigned long int get_inc(struct _mdi *mdi, struct _note *nte); }; + +extern void (*wm_error_func)(const char *wmfmt, va_list args); } #endif /* WILDMIDI_LIB_H */ diff --git a/src/sound/mididevices/music_timidity_mididevice.cpp b/src/sound/mididevices/music_timidity_mididevice.cpp index fbc87d1378..c5a9749fa4 100644 --- a/src/sound/mididevices/music_timidity_mididevice.cpp +++ b/src/sound/mididevices/music_timidity_mididevice.cpp @@ -231,7 +231,7 @@ TimidityMIDIDevice::TimidityMIDIDevice(const char *args, int samplerate) : SoftSynthMIDIDevice(samplerate, 11025, 65535) { LoadConfig(args); - Timidity::cmsg = gzdoom_ctl_cmsg; + Timidity::printMessage = gzdoom_ctl_cmsg; Renderer = new Timidity::Renderer((float)SampleRate, midi_voices, instruments); } diff --git a/src/sound/mididevices/music_timiditypp_mididevice.cpp b/src/sound/mididevices/music_timiditypp_mididevice.cpp index 066694a523..c07373733c 100644 --- a/src/sound/mididevices/music_timiditypp_mididevice.cpp +++ b/src/sound/mididevices/music_timiditypp_mididevice.cpp @@ -274,7 +274,7 @@ TimidityPPMIDIDevice::TimidityPPMIDIDevice(const char *args, int samplerate) delete instruments; instruments = nullptr; } - TimidityPlus::ctl_cmsg = gzdoom_ctl_cmsg; + TimidityPlus::printMessage = gzdoom_ctl_cmsg; TimidityPlus::set_playback_rate(SampleRate); if (instruments == nullptr) diff --git a/src/sound/mididevices/music_wildmidi_mididevice.cpp b/src/sound/mididevices/music_wildmidi_mididevice.cpp index ffa569dc87..ab88d2b9fa 100644 --- a/src/sound/mididevices/music_wildmidi_mididevice.cpp +++ b/src/sound/mididevices/music_wildmidi_mididevice.cpp @@ -38,6 +38,9 @@ #include "doomerrors.h" #include "i_soundfont.h" +#include "c_console.h" +#include "v_text.h" + // MACROS ------------------------------------------------------------------ // TYPES ------------------------------------------------------------------- @@ -111,6 +114,12 @@ void WildMidi_Shutdown() // CODE -------------------------------------------------------------------- +static void gzdoom_error_func(const char* wmfmt, va_list args) +{ + Printf(TEXTCOLOR_RED); + VPrintf(PRINT_HIGH, wmfmt, args); +} + //========================================================================== // // WildMIDIDevice Constructor @@ -121,6 +130,7 @@ WildMIDIDevice::WildMIDIDevice(const char *args, int samplerate) :SoftSynthMIDIDevice(samplerate <= 0? wildmidi_frequency : samplerate, 11025, 65535) { Renderer = NULL; + WildMidi::wm_error_func = gzdoom_error_func; if (args == NULL || *args == 0) args = wildmidi_config;