Many, many years ago (93a456c), high quality mode was merely disabled after it was noted that it can be problematic rather than being completely removed. Remove it from the codebase so we can get rid of some code and clean things up a bit.
* Don't auto-quantize notes when recording MIDI input.
* Add midi:autoquantize to config file and a widget to set it in the MIDI settings.
* Quantize notes during recording if midi:autoquantize is enabled.
* Apply suggestions from code review: Formatting
Style formatting
Co-authored-by: saker <sakertooth@gmail.com>
* Cache the auto quantization setting in a PianoRoll member variable, and update it on ConfigManager::valueChanged()
* Apply suggestions from code review: Formatting & temp variable
One formatting change, and reusing an existing variable instead of introducting a new local one.
Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
* Update src/gui/modals/SetupDialog.cpp
Good catch.
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
* Fix logic bug in PianoRoll's midi/autoquantize value observer.
* Use '!' instead of 'not' to please MSVC.
* autoquantize: Add an explicit check for consistency with the rest of the PR, and give the setting a default value in SetupDialog constructor.
* Integrate MIDI auto-quantize checkbox into the resizable layout, and add a tool tip.
---------
Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
This displays a warning dialog if the users requests unusual
buffersizes:
- buffersizes less than 32
- buffersizes which are not a (natural number) power of 2
This commit also replaces some `setGeometry` stuff by `QBoxLayout`.
Remove the temporary class `AudioDeviceSetupGroupWidget` and move its
functionality into `AudioDeviceSetupWidget`. This means to let
`AudioDeviceSetupWidget` inherit from `QGroupBox` instead of
`TabWidget`.
Adjust all inheriting classes accordingly. Adjust usages in SetupDialog.
The result should be that even the cases for `LMMS_HAVE_SOUNDIO` and
`LMMS_HAVE_SNDIO` should compile again. Although their layout might look
weird.
Adjust the dialogs of most audio driver settings dialogs by showing them
in a QGroupBox and adjusting their layouts. All dialogs now use
`QFormLayout` to layout their labels and input widgets.
Technical details
------------------
Introduce `AudioDeviceSetupGroupWidget` which is intended to
functionally replace `AudioDeviceSetupWidget` in the long run. This is
likely a temporary replacement in the sense that
`AudioDeviceSetupGroupWidget` will be renamed to
`AudioDeviceSetupWidget` once the latter has been replaced everywhere.
Both classes are very similar and the only difference is that the former
inherits from `QGroupBox` instead of `TabWidget`.
Adjust the using of AswMap so that it is now defined as a map from
`QString` to `AudioDeviceSetupGroupWidget`.
Use `QFormLayout` to layout the widgets of the setup dialogs instead of
hard coding geometries and placement.
TODOs
------
Adjust the widgets for the SoundIO and SndIo cases. These will be a bit
more effort as they are not compiled on my machine.
Adjust the plugins group to also use a QGroupBox and QCheckBoxes. This
finishes the "Performance" page and also finally enables the removal of
the local variables `XDelta` and `YDelta` as well as the lambda
`addLedCheckBox`.
Other changes
--------------
Add a TODO to some unused code for some advanced setting.
Fix layout of the main widget and the buttons widget. Remove an
erroneous ",1" after a statement.
Make the setup dialog resizable and use widgets that dynamically adjust
to the font size set by the user.
Current status of the tabs:
* General: Done
* Performance: Plugins group needs adjustments
* Audio: Individual settings dialogs need adjustments
* MIDI: Not started yet
* Paths: Done
The "Autosave" and "Buffer size" tabs have been slightly redesigned so
that the revert/reset button is next to the slider.
Technical details
------------------
Setting a fixed size has been removed from the setup dialog so that it
can be resized.
The settings widget (`settings_w`) now has a layout to which the sub
dialogs are added. This is done so that the layout sizes are propagated
upwards, i.e. all widgets along the chain now have a layout so that size
hints are determined correctly.
Instances of `TabWidget` are replaced with instances of `QGroupBox`.
Each group box has a layout to which its children, e.g. check boxes, are
added. These group boxes are then added to the layouts of their parents.
Doing so also removes the need to count how many instances have been
added and calculations on where to put the children.
Instances of `LedCheckBox` are replaced with instances of `QCheckBox`.
This is done in the new helper lambda `addCheckBox`. It's very similar
to the previously used `addLedCheckBox` but creates a `QCheckBox`
instead of a `LedCheckBox`. It returns the created `QCheckBox` as a
result. If a layout is provided the created check box is also added to
the layout before it is returned.
The helper lambda `addPathEntry` has been adjusted to create a
`QGroupBox` and to put all its children in a layout.
The helper method `labelWidget` has been adjusted to not set the font
size of the label.
The method `TabBar::addTab` had to be extended with a new default
parameter which controls if the added widget is fixed to the size of
it's parent or not. In the case of the setup dialog we do not want this.
So far the method is only used by the setup dialog and the
`LadspaBrowser` class. So once the `LadspaBrowser` has been made
resizable the default parameter can be removed again and treated as
always being set to false.
Add `QCheckBox` to the `style.css` so that it does not get a green font
due to the palette magic that's done.
* Add confirm removal on mixer channels
Add confirm removal popup when the user calls the action "remove channel" on a mixer channel that is in use (receives audio from other channel or track). Set a config variable to keep track if the user don't want to be asked again. Adding a scroll on settings-general tab because there weren't enough space on the area.
* Core Mixer function channel in use
New core Mixer function to check if a given channel is in use (receives audio)
---------
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: saker <sakertooth@Gmail.com>
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.
Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .
Co-authored-by: allejok96 <allejok96@gmail.com>
* Update ringbuffer submodule to fix includes
* Remove cyclic includes
* Remove Qt include prefixes
* Include C++ versions of C headers
E.g.: assert.h -> cassert
* Move CLIP_BORDER_WIDTH into ClipView
This allows to remove includes to TrackView.h in ClipView cpp files.
* Elliminate useless includes
This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):
```
include-what-you-use;
-Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
-Xiwyu;--keep=*/xmmintrin.h;
-Xiwyu;--keep=*/lmmsconfig.h;
-Xiwyu;--keep=*/weak_libjack.h;
-Xiwyu;--keep=*/sys/*;
-Xiwyu;--keep=*/debug.h;
-Xiwyu;--keep=*/SDL/*;
-Xiwyu;--keep=*/alsa/*;
-Xiwyu;--keep=*/FL/x.h;
-Xiwyu;--keep=*/MidiApple.h;
-Xiwyu;--keep=*/MidiWinMM.h;
-Xiwyu;--keep=*/AudioSoundIo.h
```
* Fixup: Remove empty #if-#ifdef pairs
* Remove LMMS_HAVE_STD(LIB|INT)_H
* Added messagebox when user tries to delete track
* Code review refactorings
* Update Track.h
* Changed message box title to "Confirm removal"
* Merge changes from master
* Add option to disable warning
* Default to showing warning if no config found
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Spekular <Spekular@users.noreply.github.com>
* Changes the toggleSolo method
- Changes the toggleSolo method so it doesn't mute automation tracks (keeps their original state)
* Stop restoring Automation Track's mute values
- Since Automation Tracks are not affected by enabling solo on other tracks, there's no need (and it's even counter intuitive) to restore their previous mute value.
- Reduces a line by using "else if".
* Saves two lines merging 2 conditionals in 1
* Adds the new solo behavior as a new LED button
To allow the user choosing between the old solo behavior and the new one, a new LED button was added which will be used to enable the solo keeping the automation tracks states, while the red LED will enable the solo with the current behavior.
Changes to the code:
- Added a purple LED image that will be used on the new button.
- Increased the default width of the widget that holds the mute and solo buttons so the third one fits.
- Changed the positioning of the LEDs on both the standard and compact track modes to accomodate them.
- Added a new model called m_soloAutomationsModel, which is connected to the new LED button (m_soloAutomationsBtn). This will dictate the behavior of the toggleSolo method.
- The red LED calls the toggleSolo method as before. The purple LED will change the m_soloAutomationsModel value and toggle the red LED, which will then call toggleSolo. But since the value of m_soloAutomationsModel will be different, the new behavior will be used on the method.
* Revert "Adds the new solo behavior as a new LED button"
This reverts commit fdbc8b2712.
After consulting fellow users and devs about this change to the PR, it was decided that adding a third button for the new solo behavior was not the best approach. This reverts the commit so we go back to just changing the solo behavior. Later an option can be added on LMMS settings to choose between the old and new behaviors.
* Adds an option to use the legacy solo behavior
This commit adds an option on LMMS settings (saved to the config file) to go back to the legacy behavior of the track solo button. The option can be found on Settings>General>"Use solo legacy behavior"
Changes to the code:
- Since there's a change to the configuration file, an upgrade method was created (upgrade_1_3_0) to add the value to the config XML if it isn't already present (safety check).
- An attribute is added to the DOM structure of the app configuration under the "app" tag, called "sololegacybehavior", which can be either 0 or 1.
- Changes were made to include/SetupDialog.h, include/ConfigManager.h and src/core/ConfigManager.cpp to implement this new configuration option.
- The toggleSolo method was changed to behave according to the value of the "sololegacybehavior" configuration.
* Changes the description of the solo setting
Changes the description of the solo setting on the Setup Dialog from "Use solo legacy behavior" to "Mute automation tracks during solo" since the latter is more descriptive and new users wouldn't be confused about what the legacy behavior was.
* Merges "if"s and "if-else"s where possible
A conditional could be merged by using the "||" logical operator and there was a "if" nested inside an "else" that could be merged into a single "if-else".
Very small code format change (keeping code block curly braces in separate lines).
* Uses default value instead of upgrading ConfigFile
Instead of using an upgrade method on the ConfigManager class to set a value to the sololegacybehavior parameter, we now use a default value on every call to ConfigManager::value that requests it.
* Removes repetitive method call
To make the loop more efficient, a local variable was created to hold the behavior of the solo selected in the setup dialog, instead of calling the ConfigManager::value method repeated times.
Observation:
Since no code was added/removed from ConfigManager.cpp, it was restored to its original state. There's however a TAB character in a blank line on line 145, which was there at the beginning of this PR but removed during it. It was written again in this commit to remove ConfigManager.cpp from the "Files changed" list.
* Saves one line of code and adds a comment
Moved AudioDevice::setupWidget into its own class AudioDeviceSetupWidget
which logically should belong to the GUI (unfortunately the include
structure does not make this obvious).
For the ALSA driver there is an implementation AudioAlsaSetupWidget
which provides a combo box for selection of the card and device.
All other driver widgets have been changed to inherit from
AudioAlsaSetupWidget but have not been changed otherwise.
SetupDialog has been adjusted to keep a map of AudioAlsaSetupWidgets
now.
Wrapped the path selection widgets in a Scroll Area, to allow for
the addition of addition paths.
Where multipue paths are allowed the icon has been changed to refect this.
Reordered the list.