From c375ab993e3eb4c04e5407580c03891d3c30baf8 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sun, 24 Jan 2021 21:40:00 +0300 Subject: Added an ability to disable auto-arpeggio Backported from libOPNMIDI --- utils/midiplay/adlmidiplay.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'utils/midiplay') diff --git a/utils/midiplay/adlmidiplay.cpp b/utils/midiplay/adlmidiplay.cpp index 211a762..e6e75aa 100644 --- a/utils/midiplay/adlmidiplay.cpp +++ b/utils/midiplay/adlmidiplay.cpp @@ -403,6 +403,7 @@ int main(int argc, char **argv) " will be combined into one\n" " --solo Selects a solo track to play\n" " --only Selects a subset of tracks to play\n" + " -na Disable the auto-arpeggio\n" #ifndef HARDWARE_OPL3 " -fp Enables full-panning stereo support\n" " --emu-nuked Uses Nuked OPL3 v 1.8 emulator\n" @@ -483,6 +484,7 @@ int main(int argc, char **argv) bool recordWave = false; int loopEnabled = 1; #endif + int autoArpeggioEnabled = 1; #ifndef HARDWARE_OPL3 int emulator = ADLMIDI_EMU_NUKED; @@ -540,6 +542,8 @@ int main(int argc, char **argv) else if(!std::strcmp("-nl", argv[2])) loopEnabled = 0; //Enable loop #endif + else if(!std::strcmp("-na", argv[2])) + autoArpeggioEnabled = 0; //Enable auto-arpeggio #ifndef HARDWARE_OPL3 else if(!std::strcmp("--emu-nuked", argv[2])) @@ -639,6 +643,8 @@ int main(int argc, char **argv) adl_setLoopEnabled(myDevice, recordWave ? 0 : loopEnabled); #endif + adl_setAutoArpeggio(myDevice, autoArpeggioEnabled); + #ifdef DEBUG_TRACE_ALL_EVENTS //Hook all MIDI events are ticking while generating an output buffer if(!recordWave) @@ -842,6 +848,8 @@ int main(int argc, char **argv) std::fprintf(stdout, "\n"); } + std::fprintf(stdout, " - Automatic arpeggion is turned %s\n", autoArpeggioEnabled ? "ON" : "OFF"); + std::fprintf(stdout, " - File [%s] opened!\n", musPath.c_str()); flushout(stdout); -- cgit v1.2.3