diff --git a/contrib/midi/mutes-test.midi b/contrib/midi/mutes-test.midi index d4a605e3..c9e77c27 100644 Binary files a/contrib/midi/mutes-test.midi and b/contrib/midi/mutes-test.midi differ diff --git a/data/linux/qseq66.usr b/data/linux/qseq66.usr index 1fa2a176..f55bf408 100644 --- a/data/linux/qseq66.usr +++ b/data/linux/qseq66.usr @@ -1,19 +1,18 @@ -# Seq66 0.97.2 user ('usr') configuration file +# Seq66 0.99.3 user ('usr') configuration file # # /home/usr/.config/seq66/qseq66.usr -# Written 2021-12-03 07:49:33 +# Written 2023-04-17 19:12:53 # -# 'usr' file. Edit it and place it in $HOME/.config/seq66. It allows -# aliases (alternate names) to each MIDI bus/port, channel, and -# control code, per channel. It has options not present in Seq24. +# 'usr' file. Edit it and place it in ~/.config/seq66. It allows naming each +# MIDI bus/port, channel, and control code. [Seq66] config-type = "usr" -version = 9 +version = 10 -# [comments] holds user documentation for this file. The first empty, -# hash-commented, or tag line ends the comment. +# [comments] holds user documentation for this file. The first empty, hash- +# commented, or tag line ends the comment. [comments] @@ -26,19 +25,17 @@ look empty with a space. # 1. Define instruments and their control-code names, as applicable. # 2. Define MIDI busses, names, and the instruments on each channel. # -# In these definitions, channels are counted from 0-15, not 1-16. -# Instruments not set here are set to -1 and are GM (General MIDI). -# These labels are shown in MIDI Clocks, Inputs, the pattern editor -# buss, channel, and event drop-downs. To disable entries, set -# counts to 0. +# Channels are counted from 0-15, not 1-16. Instruments not set here are set +# to -1 and are GM (General MIDI). These labels are shown in MIDI Clocks, +# Inputs, the pattern editor buss, channel, and event drop-downs. To disable +# entries, set counts to 0. [user-midi-bus-definitions] 0 # number of user-defined MIDI busses -# In these MIDI instrument definitions, active controller numbers -# (i.e. supported by the instrument) are paired with the (optional) -# name of the controller supported. +# In these MIDI instrument definitions, active (supported by the instrument) +# controller numbers are paired with the (optional) name of the controller. [user-instrument-definitions] @@ -46,13 +43,13 @@ look empty with a space. # [user-interface-settings] # -# Configures some user-interface elements. Many became obsolete and -# were removed in version 5 of this file. Also see [user-ui-tweaks]. -# The grid holds Qt buttons. For styling, use Qt themes/style-sheets. +# Configures some user-interface elements. Obsolete ones were removed in +# version 5 of this file. Also see [user-ui-tweaks]. The grid holds Qt push- +# buttons. For styling, use Qt themes/style-sheets. # -# 'swap-coordinates' swaps numbering so pattern numbers vary fastest -# by column instead of (legacy) rows. This setting applies to the live -# grid, mute-group buttons, and set-buttons. +# 'swap-coordinates' swaps numbering so pattern numbers vary fastest by column +# instead of rows. This setting applies to the live grid, mute-group buttons, +# and set-buttons. # # 'mainwnd-rows' and 'mainwnd-columns' (option '-o sets=RxC') specify # rows/columns in the main grid. R ranges from 4 to 8, C from 4 to 12. @@ -60,32 +57,33 @@ look empty with a space. # # 'mainwnd-spacing' is for grid buttons; from 0 to 16, default = 2. # -# 'default-zoom' is the initial zoom for the piano rolls. From 1 to -# 512, defaults = 2. Larger PPQNs require larger zoom to look good. -# Seq66 adapts the zoom to the PPQN if set to 0. The unit of zoom is -# ticks/pixel. +# 'default-zoom' is the initial zoom for piano rolls. From 1 to 512, default +# = 2. Larger PPQNs require larger zoom to look good. Seq66 adapts the zoom to +# the PPQN if set to 0. The unit of zoom is ticks/pixel. # -# 'global-seq-feature' specifies if the key, scale, and background -# pattern are applied to all patterns, or separately to each. These -# These values are stored in the MIDI file, either in the global -# SeqSpec (if true) or in each track (if false). +# 'global-seq-feature' applies the key, scale, and background pattern to all +# patterns versus separately to each. If all, these values are stored in the +# MIDI file in the global SeqSpec versus in each track. # -# 'progress-bar-thick specifies a thicker progress bar. Default is 1 -# pixel; thick is 2 pixels if set to true. Also makes the progress box +# 'progress-bar-thick specifies a thicker progress bar. Default is 1 pixel; +# thick is 2 pixels if set to true. Also makes the progress box border # border 2 pixels, and the slot font bold. # -# 'inverse-colors' (option -K/--inverse) specifies use of an inverse -# color palette. Palettes are for Seq66 drawing areas, not for the -# Qt theme. Normal/inverse palettes are changed via a 'palette' file. +# 'inverse-colors' (option -K/--inverse) specifies use of an inverse color +# palette. Palettes are for Seq66 drawing areas, not for Qt widgets. +# Normal/inverse palettes can be reconfigured via a 'palette' file. # # 'dark-theme' specifies that are dark theme is active. # -# 'window-redraw-rate' specifies the base window redraw rate for all -# windows. From 10 to 100; default = 40 ms (25 ms for Windows). +# 'window-redraw-rate' specifies the base window redraw rate for all windows. +# From 10 to 100; default = 40 ms (25 ms for Windows). # -# Window-scale (option '-o scale=m.n[xp.q]') specifies scaling the -# main window at startup. Defaults to 1.0 x 1.0. If between 0.5 and -# 3.0, it changes the size of the main window proportionately. +# Window-scale (option '-o scale=m.n[xp.q]') specifies scaling the main +# window at startup. Defaults to 1.0 x 1.0. If between 0.5 and 3.0, it +# changes the size of the main window proportionately. +# +# 'enable-learn-confirmation' can be set to false to disable the prompt that +# the mute-group learn action succeeded. Can be annoying. [user-interface-settings] @@ -101,10 +99,11 @@ dark-theme = false window-redraw-rate = 40 window-scale = 1 window-scale-y = 1 +enable-learn-confirmation = false -# Seq66 separates file PPQN from the Seq66 PPQN. 'default-ppqn' -# specifies the Seq66 PPQN, from 32 to 19200, default = 192. -# 'use-file-ppqn' (recommended) indicates to use file PPQN. +# Seq66 separates file PPQN from the Seq66 PPQN. 'default-ppqn' specifies the +# Seq66 PPQN, from 32 to 19200, default = 192. 'use-file-ppqn' (recommended) +# indicates to use file PPQN. [user-midi-ppqn] @@ -128,23 +127,17 @@ use-file-ppqn = true # 'bpm-minimum': 0.0 127.0 # 'bpm-maximum': 0.0 127.0 # -# 'convert-to-smf-1' controls if SMF 0 files are split into SMF 1 -# track when read. -# -# 'buss-override' sets the output port for all patterns, for testing -# or convenience. Don't save the MIDI file unless you want to save -# the buss value! -# -# 'velocity-override' when adding notes in the pattern editor is set -# via the 'Vol' button. -1 ('Free'), preserves incoming velocity. -# +# 'convert-to-smf-1' controls if SMF 0 files are split into SMF 1 when read. +# 'buss-override' sets the output port for all patterns, for testing, etc. +# This value will be saved if you save the MIDI file!!! +# 'velocity-override' controls adding notes in the pattern editor; see the +# 'Vol' button. -1 ('Free'), preserves incoming velocity. # 'bpm-precision' (spinner and MIDI control) is 0, 1, or 2. -# 'bpm-step-increment' affects the spinner and MIDI control. For 1 -# decimal point, 0.1 is good. For 2, 0.01 is good, 0.05 is faster. -# Set 'bpm-page-increment' larger than the step-increment; used with -# the Page-Up/Page-Down keys in the spinner. BPM minimum/maximum sets -# the range in tempo graphing; defaults to 0.0 to 127.0. Decrease it -# for a magnified view of tempo. +# 'bpm-step-increment' affects the spinner and MIDI control. For 1 decimal, +# 0.1 is good. For 2, 0.01 is good, 0.05 is faster. Set 'bpm-page-increment' +# larger than the step-increment; used with the Page-Up/Page-Down keys in the +# spinner. BPM minimum/maximum sets the range in tempo graphing; defaults to +# 0.0 to 127.0. Decrease it for a magnified view of tempo. [user-midi-settings] @@ -162,29 +155,42 @@ bpm-maximum = 600 # [user-options] # -# These settings specify -o or --option switch values. -# 'daemonize' is used in seq66cli to indicate the application should -# be run as a service. 'log' specifies a log-file that gets output to -# standard output/error. For no log-file, use "". This option -# also works from the command line: '-o log=filename.log'. The name -# here is used for the no-name '-o log' option. +# These settings specify -o or --option switch values. 'daemonize' is used +# in seq66cli to indicate the application should run as a service. 'log' +# specifies a log-file that gets output to standard output/error. For no +# log-file, use "". This option also works from the command line: +# '-o log=filename.log'. [user-options] daemonize = false log = "/home/user/.config/seq66/seq66.log" +pdf-viewer = "" +browser = "" # [user-ui-tweaks] # -# key-height specifies the initial height (before vertical zoom) of -# pattern editor keys. Defaults to 10 pixels, ranges from 6 to 32. +# key-height specifies the initial height (before vertical zoom) of pattern +# editor keys. Defaults to 10 pixels, ranges from 6 to 32. # # key-view specifies the default for showing labels for each key: # 'octave-letters' (default), 'even_letters', 'all-letters', # 'even-numbers', and 'all-numbers'. # -# note-resume, if active, causes notes-in-progress to be resumed when -# the pattern is toggled back on. +# note-resume causes notes-in-progress to resume when the pattern toggles on. +# +# If specified, a style-sheet (e.g. 'qseq66.qss') is applied at startup. +# Normally just a base-name, it can contain a file-path to provide a style +# usable in many other applications. +# +# A fingerprint is a condensation of note events in a long track, to reduce +# the time drawing the pattern in the buttons. Ranges from 32 (default) to +# 128. 0 = don't use a fingerprint. +# +# progress-box-width and -height settings change the scaled size of the +# progress box in the live-grid buttons. Width ranges from 0.50 to 1.0, and +# the height from 0.10 to 1.0. If either is 'default', defaults (0.8 x 0.3) +# are used. progress-box-shown controls if the boxes are shown at all. # # If specified, a style-sheet (e.g. 'qseq66.qss') is applied at # startup. Normally just a base-name, it can contain a file-path @@ -213,21 +219,22 @@ key-view = octave-letters note-resume = false style-sheet-active = false style-sheet = "flat-rounded.qss" -fingerprint-size = 128 +fingerprint-size = 32 progress-box-width = 0.8 -progress-box-height = 0.4 +progress-box-height = 0.3 +progress-box-shown = true progress-note-min = 0 progress-note-max = 127 lock-main-window = false # [user-session] # -# The session manager to use, if any. The 'session' value is 'none' -# (default), 'nsm' (Non/New Session Manager), or 'jack'. 'url' can be -# be set to the value set by nsmd when run by command-line. Set 'url' -# only if running nsmd stand-alone; use the --osc-port number. Seq66 -# detects if started in an NSM environment, though. The visibility -# flag is used only by NSM to restore visibility. +# The session manager to use, if any. 'session' is 'none' (default), 'nsm' +# (Non/New Session Manager), or 'jack'. 'url' can be set to the value set by +# nsmd when run by command-line. Set 'url' if running nsmd stand-alone; use +# the --osc-port number. Seq66 detects if started in NSM. The visibility flag +# is used only by NSM to restore visibility. 'copy-config' indicates if the +# existing home configuration is copied to a new NSM session. [user-session] @@ -237,12 +244,12 @@ visibility = true # [new-pattern-editor] # -# Setup values for play/recording when a new pattern is opened. -# A new pattern means that the loop has the default name 'Untitled' -# and no events. These values save time during a live recording -# session. The valid values for record-style are 'merge' (default), -# 'overwrite', 'expand', and 'one-shot'. The 'wrap-around' value, if -# true, allows recorded notes to wrap around to the pattern start. +# Setup values for play/recording when a new pattern is opened. A new pattern +# means that the loop has the default name 'Untitled' and no events. These +# values save time during a live recording session. The valid values for +# record-style are 'merge' (default), 'overwrite', 'expand', and 'one-shot'. +# 'wrap-around', if true, allows recorded notes to wrap around to the +# pattern start. [new-pattern-editor] diff --git a/doc/latex/tex/configuration.tex b/doc/latex/tex/configuration.tex index 54b3bb77..c1bdc1b1 100644 --- a/doc/latex/tex/configuration.tex +++ b/doc/latex/tex/configuration.tex @@ -6,7 +6,7 @@ % \library Documents % \author Chris Ahlstrom % \date 2021-01-18 -% \update 2023-04-05 +% \update 2023-04-17 % \version $Revision$ % \license $XPC_GPL_LICENSE$ % @@ -1393,6 +1393,7 @@ \subsubsection{'usr' File / User Interface Settings} window-redraw-rate = 40 window-scale = 1 window-scale-y = 1 + enable-learn-confirmation = true \end{verbatim} \texttt{swap-coordinates} allows for an alternate mapping of pattern diff --git a/libseq66/include/cfg/usrsettings.hpp b/libseq66/include/cfg/usrsettings.hpp index 6a949e49..db54baab 100644 --- a/libseq66/include/cfg/usrsettings.hpp +++ b/libseq66/include/cfg/usrsettings.hpp @@ -28,7 +28,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-09-22 - * \updates 2023-03-22 + * \updates 2023-04-17 * \license GNU GPLv2 or above * * This module defines the following categories of "global" variables that @@ -959,6 +959,13 @@ class usrsettings final : public basesettings gridmode m_grid_mode; + /** + * If true (the default), then a prompt is shown (in the GUI) when + * a mute-group learn operation succeeds. + */ + + bool m_enable_learn_confirmation; + public: usrsettings (); @@ -1739,6 +1746,16 @@ class usrsettings final : public basesettings std::string grid_mode_label (gridmode gm = gridmode::max) const; + bool enable_learn_confirmation () const + { + return m_enable_learn_confirmation; + } + + void enable_learn_confirmation (bool flag) + { + m_enable_learn_confirmation = flag; + } + public: // used in main application module and the usrfile class void progress_note_min_max (int vmin, int vmax); diff --git a/libseq66/src/cfg/usrfile.cpp b/libseq66/src/cfg/usrfile.cpp index 543d4d2e..ab023ad5 100644 --- a/libseq66/src/cfg/usrfile.cpp +++ b/libseq66/src/cfg/usrfile.cpp @@ -26,7 +26,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2018-11-23 - * \updates 2023-03-27 + * \updates 2023-04-17 * \license GNU GPLv2 or above * * Note that the parse function has some code that is not yet enabled. @@ -297,6 +297,11 @@ usrfile::parse () double scale = get_float(file, tag, "window-scale"); double scaley = get_float(file, tag, "window-scale-y"); usr().window_scale(scale, scaley, true); /* x & y the same */ + flag = get_boolean + ( + file, tag, "enable-learn-confirmation", 0, true + ); + usr().enable_learn_confirmation(flag); } usr().normalize(); /* recalculate */ @@ -714,6 +719,9 @@ usrfile::write () "# Window-scale (option '-o scale=m.n[xp.q]') specifies scaling the main\n" "# window at startup. Defaults to 1.0 x 1.0. If between 0.5 and 3.0, it\n" "# changes the size of the main window proportionately.\n" +"#\n" +"# 'enable-learn-confirmation' can be set to false to disable the prompt that\n" +"# the mute-group learn action succeeded. Can be annoying.\n" "\n[user-interface-settings]\n\n" ; write_boolean(file, "swap-coordinates", usr().swap_coordinates()); @@ -728,6 +736,10 @@ usrfile::write () write_integer(file, "window-redraw-rate", usr().window_redraw_rate()); write_float(file, "window-scale", usr().window_scale()); write_float(file, "window-scale-y", usr().window_scale_y()); + write_boolean + ( + file, "enable-learn-confirmation", usr().enable_learn_confirmation() + ); /* * [user-midi-ppqn] diff --git a/libseq66/src/cfg/usrsettings.cpp b/libseq66/src/cfg/usrsettings.cpp index d15931c5..68972a59 100644 --- a/libseq66/src/cfg/usrsettings.cpp +++ b/libseq66/src/cfg/usrsettings.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-09-23 - * \updates 2023-03-27 + * \updates 2023-04-17 * \license GNU GPLv2 or above * * Note that this module also sets the remaining legacy global variables, so @@ -400,7 +400,8 @@ usrsettings::usrsettings () : m_new_pattern_wraparound (false), m_record_mode (recordmode::normal), m_grid_record_style (recordstyle::merge), - m_grid_mode (gridmode::loop) + m_grid_mode (gridmode::loop), + m_enable_learn_confirmation (true) { // Empty body; it's no use to call normalize() here, see set_defaults(). } @@ -494,6 +495,7 @@ usrsettings::set_defaults () m_record_mode = recordmode::normal; m_grid_record_style = recordstyle::merge; m_grid_mode = gridmode::loop; + m_enable_learn_confirmation = true; normalize(); /* recalculate derived values */ } diff --git a/seq_qt5/src/qsmainwnd.cpp b/seq_qt5/src/qsmainwnd.cpp index f8c09324..e24a2884 100644 --- a/seq_qt5/src/qsmainwnd.cpp +++ b/seq_qt5/src/qsmainwnd.cpp @@ -3655,12 +3655,15 @@ qsmainwnd::on_group_learn_complete (const keystroke & k, bool good) std::ostringstream os; if (good) { - os - << "MIDI mute-group learn success, mute-group key '" << k.name() - << "' (code = " << int(k.key()) - << " [0x" << std::hex << std::setw(2) << unsigned(k.key()) - << "]) mapped." - ; + if (usr().enable_learn_confirmation()) + { + os + << "MIDI mute-group learn success, mute-group key '" << k.name() + << "' (code = " << int(k.key()) + << " [0x" << std::hex << std::setw(2) << unsigned(k.key()) + << "]) mapped." + ; + } } else {