diff --git a/README.md b/README.md index db2a8dc..1d7061a 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,40 @@ USAGE: mt32-pi-ctl [OPTIONS] OPTIONS: -p "[CLIENT]:[PORT]" : The ALSA MIDI client and port address to output to (*MANDATORY*). ``` -To find out which client/port to use, you can run `aconnect -l` to list available devices. +To find out which client/port to use, you can run `aplaymidi -l` or `aconnect -l` to list available devices. + +Since 1.0.1, the Linux version of `mt32-pi-ctl` also comes with an intelligent bash completion script +that will smartly autocomplete (long) options, romsets, filenames and, if `aplaymidi` is in your +PATH, even available MIDI ports. + +Examples: +``` +$ mt32-pi-ctl -p +14:0 28:0 +``` +``` +$ mt32-pi-ctl -p 28:0 --mt +--mt32 --mt32-reset --mt32-rstereo --mt32-txt +``` +``` +$ mt32-pi-ctl -p 28:0 --romset +cm32l new old +``` +For this to work mt32-pi-ctl must be in your PATH, e.g. in `/usr/local/bin` and the +bash completion script must be in a special completion script directory or sourced +by `.bashrc`. + +On modern Debian/Ubuntu systems, install the script using +``` +sudo cp bash_completion/mt32-pi-ctl.bash /usr/share/bash-completion/completions/mt32-pi-ctl +``` +On other or older distros it may need to go to `/etc/bash_completion.d/mt32-pi-ctl` instead. + +Alternatively you can add the line +``` +source /path/to/mt32-pi-ctl.bash +``` +to your `.bashrc`. After installing, you may need to relogin or reboot. #### Windows-specific options @@ -98,6 +131,7 @@ OPTIONS: -g/--fluidsynth: Switch mt32-pi to FluidSynth mode. -b/--romset [old, new, cm32l]: Switch MT-32 romset. -s/--soundfont [NUMBER]: Set FluidSynth SoundFont. + -S/--mt32-rstereo [0, 1]: Enable/disable MT-32 reversed stereo. --mt32-reset: Send an MT-32 reset SysEx message. --gm-reset: Send a GM reset SysEx message. --gs-reset: Send a GS reset SysEx message. diff --git a/amiga_bin/mt32-pi-ctl b/amiga_bin/mt32-pi-ctl index c7669cf..a673edf 100755 Binary files a/amiga_bin/mt32-pi-ctl and b/amiga_bin/mt32-pi-ctl differ diff --git a/amiga_bin/mt32-pi-ctl.readme b/amiga_bin/mt32-pi-ctl.readme index 8287e34..b7f2e71 100644 --- a/amiga_bin/mt32-pi-ctl.readme +++ b/amiga_bin/mt32-pi-ctl.readme @@ -1,4 +1,4 @@ -#### mt32-pi-ctl AmigaOS ReadMe #### +#### mt32-pi-ctl 1.0.1 AmigaOS ReadMe #### mt32-pi-ctl is a control program for the mt32-pi MIDI synthesizer. @@ -28,6 +28,7 @@ OPTIONS: -g/--fluidsynth: Switch mt32-pi to FluidSynth mode. -b/--romset [old, new, cm32l]: Switch MT-32 romset. -s/--soundfont [NUMBER]: Set FluidSynth SoundFont. + -S/--mt32-rstereo [0, 1]: Enable/disable MT-32 reversed stereo. --mt32-reset: Send an MT-32 reset SysEx message. --gm-reset: Send a GM reset SysEx message. --gs-reset: Send a GS reset SysEx message. diff --git a/amiga_src/version.c b/amiga_src/version.c index b3e4c96..64fbf1a 100644 --- a/amiga_src/version.c +++ b/amiga_src/version.c @@ -1 +1 @@ -const char* mt32_pi_ctl_version = "\0$VER: mt32-pi-ctl 1.0.0 (10.02.2021)"; +const char* mt32_pi_ctl_version = "\0$VER: mt32-pi-ctl 1.0.1 (12.08.2021)"; diff --git a/atari_bin/MT32-PI.TTP b/atari_bin/MT32-PI.TTP index d5f8067..bac6738 100755 Binary files a/atari_bin/MT32-PI.TTP and b/atari_bin/MT32-PI.TTP differ diff --git a/atari_bin/MT32-PI.TXT b/atari_bin/MT32-PI.TXT index fc4b1ac..c643af1 100644 --- a/atari_bin/MT32-PI.TXT +++ b/atari_bin/MT32-PI.TXT @@ -1,4 +1,4 @@ -#### MT32-PI.TTP (Atari ST) ReadMe #### +#### MT32-PI.TTP 1.0.1 Atari ST ReadMe #### MT32-PI.TTP is a control program for the mt32-pi MIDI synthesizer. @@ -26,6 +26,7 @@ OPTIONS: -g/--fluidsynth: Switch mt32-pi to FluidSynth mode. -b/--romset [old, new, cm32l]: Switch MT-32 romset. -s/--soundfont [NUMBER]: Set FluidSynth SoundFont. + -S/--mt32-rstereo [0, 1]: Enable/disable MT-32 reversed stereo. --mt32-reset: Send an MT-32 reset SysEx message. --gm-reset: Send a GM reset SysEx message. --gs-reset: Send a GS reset SysEx message. diff --git a/dos_bin/MT32-PI.EXE b/dos_bin/MT32-PI.EXE index c5333fc..2626ba7 100644 Binary files a/dos_bin/MT32-PI.EXE and b/dos_bin/MT32-PI.EXE differ diff --git a/dos_bin/MT32-PI.TXT b/dos_bin/MT32-PI.TXT index df2007f..596a5fe 100644 --- a/dos_bin/MT32-PI.TXT +++ b/dos_bin/MT32-PI.TXT @@ -1,4 +1,4 @@ -#### MT32-PI.EXE ReadMe #### +#### MT32-PI.EXE 1.0.1 DOS ReadMe #### MT32-PI.EXE is a control program for the mt32-pi MIDI synthesizer. @@ -22,6 +22,7 @@ OPTIONS: -g/--fluidsynth: Switch mt32-pi to FluidSynth mode. -b/--romset [old, new, cm32l]: Switch MT-32 romset. -s/--soundfont [NUMBER]: Set FluidSynth SoundFont. + -S/--mt32-rstereo [0, 1]: Enable/disable MT-32 reversed stereo. --mt32-reset: Send an MT-32 reset SysEx message. --gm-reset: Send a GM reset SysEx message. --gs-reset: Send a GS reset SysEx message. diff --git a/linux_src/bash_completion/mt32-pi-ctl.bash b/linux_src/bash_completion/mt32-pi-ctl.bash new file mode 100644 index 0000000..0dbbb60 --- /dev/null +++ b/linux_src/bash_completion/mt32-pi-ctl.bash @@ -0,0 +1,48 @@ +# mt32-pi-ctl bash completion script +_mt32-pi-ctl() { + local cur prev opts + compopt +o default + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="--help + --verbose + --reboot + --mt32 + --fluidsynth + --romset + --soundfont + --mt32-rstereo + --mt32-reset + --gm-reset + --gs-reset + --mt32-txt + --sc55-txt + --sc55-bmp + --sc55-btxt + --negative + --midi + --syx" + + if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]]; then + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + fi + + case "${prev}" in + -b|--romset) + local romsets="old new cm32l" + COMPREPLY=( $(compgen -W "${romsets}" -- ${cur}) ) + ;; + -Y|--syx|-P|--sc55-bmp) + compopt -o default + ;; + -p) + COMPREPLY=() + if command -v aplaymidi > /dev/null 2>&1; then + local midiports=$(aplaymidi -l | awk 'NR>1 { print $1 }' ORS=' ') + COMPREPLY=( $(compgen -W "${midiports}" -- ${cur}) ) + fi + esac +} +complete -F _mt32-pi-ctl mt32-pi-ctl diff --git a/linux_src/mt32-pi-ctl.readme b/linux_src/mt32-pi-ctl.readme index 429c84d..c4e075d 100644 --- a/linux_src/mt32-pi-ctl.readme +++ b/linux_src/mt32-pi-ctl.readme @@ -1,4 +1,4 @@ -#### mt32-pi-ctl Linux ReadMe #### +#### mt32-pi-ctl 1.0.1 Linux ReadMe #### mt32-pi-ctl is a control program for the mt32-pi MIDI synthesizer. @@ -22,6 +22,7 @@ OPTIONS: -g/--fluidsynth: Switch mt32-pi to FluidSynth mode. -b/--romset [old, new, cm32l]: Switch MT-32 romset. -s/--soundfont [NUMBER]: Set FluidSynth SoundFont. + -S/--mt32-rstereo [0, 1]: Enable/disable MT-32 reversed stereo. --mt32-reset: Send an MT-32 reset SysEx message. --gm-reset: Send a GM reset SysEx message. --gs-reset: Send a GS reset SysEx message. @@ -36,6 +37,37 @@ OPTIONS: You may specify multiple options, i.e. mt32-pi-ctl -m -t "Hello, World!" will first send the MT-32 mode command and then the screen text. +### bash completion #### + +Since version 1.0.1, the Linux version of mt32-pi-ctl also comes with an intelligent +bash completion script that will smartly autocomplete (long) options, romsets, filenames +and, if aplaymidi is in your PATH, even available MIDI ports. + +Examples: + + $ mt32-pi-ctl -p + 14:0 28:0 + + $ mt32-pi-ctl -p 28:0 --mt + --mt32 --mt32-reset --mt32-rstereo --mt32-txt + + $ mt32-pi-ctl -p 28:0 --romset + cm32l new old + +For this to work mt32-pi-ctl must be in your PATH, e.g. in /usr/local/bin and the bash +completion script must be in a special completion script directory or sourced by .bashrc. + +On modern Debian/Ubuntu systems, install the script using + + # cp bash_completion/mt32-pi-ctl.bash /usr/share/bash-completion/completions/mt32-pi-ctl + +On other or older distros it may need to go to /etc/bash_completion.d/mt32-pi-ctl instead. + +Alternatively you can add the line + + source /path/to/mt32-pi-ctl.bash + +to your .bashrc. After installing, you may need to relogin or reboot #### BSD-License #### diff --git a/win32_bin/mt32-pi-ctl.exe b/win32_bin/mt32-pi-ctl.exe index 3553a73..50cf580 100755 Binary files a/win32_bin/mt32-pi-ctl.exe and b/win32_bin/mt32-pi-ctl.exe differ diff --git a/win32_bin/mt32-pi-ctl.txt b/win32_bin/mt32-pi-ctl.txt index e5d9008..c3b24b3 100644 --- a/win32_bin/mt32-pi-ctl.txt +++ b/win32_bin/mt32-pi-ctl.txt @@ -1,4 +1,4 @@ -#### mt32-pi-ctl.exe ReadMe #### +#### mt32-pi-ctl.exe 1.0.1 Windows ReadMe #### MT32-PI.EXE is a Win32 CLI control program for the mt32-pi MIDI synthesizer. @@ -23,6 +23,7 @@ OPTIONS: -g/--fluidsynth: Switch mt32-pi to FluidSynth mode. -b/--romset [old, new, cm32l]: Switch MT-32 romset. -s/--soundfont [NUMBER]: Set FluidSynth SoundFont. + -S/--mt32-rstereo [0, 1]: Enable/disable MT-32 reversed stereo. --mt32-reset: Send an MT-32 reset SysEx message. --gm-reset: Send a GM reset SysEx message. --gs-reset: Send a GS reset SysEx message.