Commit Graph

50 Commits

Author SHA1 Message Date
saker
a53e5ba2f6 Remove high quality mode from codebase (#7219)
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.
2024-04-27 07:59:02 -04:00
Levin Oehlmann
1f5f28fd8a Don't auto-quantize notes when recording MIDI input (#6714)
* 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>
2024-04-08 19:17:26 -04:00
Spekular
4eba656bd3 New loop marker shortcuts, attempt 2 (#6382)
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2023-12-25 16:26:35 +00:00
Michael Gregorius
85310e75d3 Order of includes and forward declarations
Fix the alphabetical order of all includes and forward declarations.
2023-10-01 09:57:13 +02:00
Michael Gregorius
339ee6d1e9 Merge remote-tracking branch 'upstream/master' into 2510-SetupDialogWithLayouts-MasterMerge
Merge master to integrate the changes of:
* f10277715f: Classier enums
* 7aca8ae726: SetupDialog: Warn of unusual buffersizes
* 8fb9c3e6a2: Fix warnings in Clang build (#6893)

Solved conflicts in:
* src/gui/modals/SetupDialog.cpp
2023-10-01 09:40:42 +02:00
Johannes Lorenz
7aca8ae726 SetupDialog: Warn of unusual buffersizes
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`.
2023-09-24 17:36:59 +02:00
Dominic Clark
f10277715f Classier enums (#6760) 2023-08-24 19:16:02 +01:00
Michael Gregorius
9282e6c91b Remove temporary AudioDeviceSetupGroupWidget
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.
2023-07-25 18:03:18 +02:00
Michael Gregorius
b53290344b Adjust most audio driver settings dialogs
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.
2023-07-22 22:55:02 +02:00
Michael Gregorius
c5c459f54f Adjust Plugins group/tab
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.
2023-07-16 20:02:11 +02:00
Michael Gregorius
4908bfe1a6 Scalable Setup Dialog
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.
2023-07-16 14:11:24 +02:00
superpaik
d551938cbd Add confirm removal on mixer channels (#6691)
* 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>
2023-05-10 20:14:24 +09:00
Dalton Messmer
2c6d88f799 Add GUARD_H closing comments 2023-01-05 17:58:49 -05:00
Dalton Messmer
fe6df8dbaf Add namespace prefix to include guards 2023-01-02 19:51:32 -05:00
saker
b451e40b51 clang-tidy: Apply modernize-use-using everywhere (#6453) 2022-07-07 10:54:34 +02:00
Dominic Clark
6c3e148fbb Make VST sync always-on and non-global (#6418) 2022-07-04 17:03:17 +01:00
Levin Oehlmann
5904b249c0 clang-tidy: Apply modernize-use-override everywhere (#6439)
... to mark overriding functions `override` instead of `virtual`.
2022-06-19 23:03:55 +02:00
Levin Oehlmann
7227c89847 Namespace lmms (#6174)
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>
2022-06-19 20:08:46 +02:00
Johannes Lorenz
54bee2272e Rename LedCheckbox to LedCheckBox in filenames
Justification: The class is named `LedCheckBox`, and other files follow
the casing of the classes, too.
2022-03-26 11:37:25 +01:00
Johannes Lorenz
7db3fa94a1 Improve includes (#6320)
* 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
2022-03-02 13:30:43 +01:00
fschuelke
8d9c7347ba Added message box prompt when user tries to delete track (#5274)
* 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>
2021-04-03 21:18:27 +02:00
Spekular
ed9abe58c6 Add option to continue sidebar previews when mouse released (#5787)
* Add option to continue sidebar previews when mouse released

* Cancel non-sample previews regardless of setting
2020-11-24 21:49:54 +01:00
IanCaio
639f3a49a3 Changes the behavior of "solo" so it doesn't mute Automation Tracks (#5547)
* 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
2020-08-01 20:03:23 +02:00
Luna Nooteboom
5d7e6720e1 Automatically assign a midi input device to the selected track (#5499) 2020-06-21 11:17:05 +09:00
Kevin Zander
1a6f4c1104 Add option to move SideBar to right side of window (#5114) 2020-05-05 11:46:25 +09:00
David CARLIER
dac59a5fa0 C++11 inheritance updates
Add `override` and remove `virtual` where applicable
2019-10-31 20:05:33 +01:00
Hussam al-Homsi
84d1091100 Rewrite the setup dialog (#3820) 2019-09-05 20:32:17 -04:00
Hyunjin Song
7984bb9db6 Merge branch 'stable-1.2'
# Conflicts:
#	.travis.yml
#	.travis/linux..script.sh
#	.travis/linux.win.download.sh
#	.travis/linux.win32.script.sh
#	.travis/linux.win64.script.sh
#	.travis/osx..script.sh
#	include/VstSyncController.h
#	plugins/audio_file_processor/audio_file_processor.cpp
#	plugins/zynaddsubfx/zynaddsubfx
#	plugins/zynaddsubfx/zynaddsubfx/src/Misc/Bank.cpp
#	plugins/zynaddsubfx/zynaddsubfx/src/Misc/Bank.h
#	src/gui/SetupDialog.cpp
#	src/gui/editors/SongEditor.cpp
2019-03-26 09:53:33 +09:00
Dominic Clark
17f6235500 Add VST always-on-top config option 2019-03-14 09:44:48 +09:00
Hyunjin Song
231a8407e8 Merge branch 'stable-1.2'
# Conflicts:
#	.travis.yml
#	.travis/linux..script.sh
#	.travis/linux.win32.script.sh
#	.travis/linux.win64.script.sh
#	.travis/osx..install.sh
#	.travis/osx..script.sh
#	data/locale/en.ts
#	data/locale/id.ts
#	include/Graph.h
#	include/VstSyncController.h
#	include/lmms_math.h
#	plugins/vst_base/RemoteVstPlugin.cpp
#	src/core/RemotePlugin.cpp
#	src/core/Song.cpp
#	src/core/Track.cpp
#	src/gui/SubWindow.cpp
#	src/gui/widgets/Graph.cpp
2019-02-24 20:45:52 +09:00
Javier Serrano Polo
b28d405240 Disable built-in NaN handler through hidden setting (#4787)
* Disable built-in NaN handler through hidden setting

* Reuse code
2019-01-31 23:12:45 +01:00
Hussam al-Homsi
6d46bd473f Remove "What's This?" and update tooltips (#4128) 2018-06-06 01:50:11 +03:00
Lukas W
6839746344 VstEmbed: Allow selecting method at runtime 2017-11-06 11:17:10 +01:00
Oskar Wallgren
901fea51d0 Auto-save - Fix double negations and some cleanup 2017-02-13 22:19:01 +01:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Oskar Wallgren
c54171ba48 Option to allow auto save while playing (#3088)
* Option to allow auto save while playing
2017-02-01 17:05:32 +01:00
Umcaruje
c9618961d6 dBV is actually mislabeled dBFS (#3095)
* Relabel "dBV" to "dBFS" in function names and GUI
* Write a ConfigManager upgrade for older versions
2016-11-06 22:44:18 -05:00
Javier Serrano Polo
17e977dc2b Removed FLP configuration 2016-07-19 02:29:55 +02:00
Oskar Wallgren
cfb2c7201f Auto save timer setting 2016-03-02 07:25:19 +01:00
Oskar Wallgren
dff7e3e4bb Open last active project. 2015-09-15 15:04:48 -04:00
Colin Wallace
697aebc056 Consolidate midi config widgets & move them out of the core 2015-09-05 11:38:29 -07:00
Michael Gregorius
79cae31b5b Some refactoring to enable signals in audio driver setup dialogs
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.
2015-06-26 17:14:47 +02:00
Dave French
d9995f5548 Add default path for SF2
added a default path for sf
create folder
add folder to setup dialog
sf player now uses this location
2015-03-27 12:45:40 +00:00
Dave French
2271af81c4 Added a Gig directory to user lmms folder
Added option to set gig folder in setup dialog
Gig player now opens at this location
2015-03-27 12:45:40 +00:00
Dave French
8dfa2cf7d0 Reorganised the paths dialog
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.
2015-03-27 12:45:40 +00:00
Lukas W
0d06ce7cdc Merge pull request #1497 from DanWin/language
Add choose language option
2015-01-12 00:15:32 +01:00
Daniel Winzen
74bd58162e Make saving of .bak files configurable 2015-01-03 13:53:49 +01:00
Daniel Winzen
41b756776f Add choose language option 2014-12-25 20:54:18 +01:00
Lukas W
95798da9d0 Rename a lot of classes
* aboutDialog -> AboutDialog
* bbEditor -> BBEditor
* exportProjectDialog -> ExportProjectDialog
* setupDialog -> SetupDialog
* stringPairDrag -> StringPairDrag
2014-11-26 10:39:02 +01:00
Lukas W
7d4f179b4b Rename a lot of files
* about_dialog -> AboutDialog
* bb_editor -> BBEditor
* export_project_dialog -> ExportProjectDialog
* setup_dialog -> SetupDialog
* string_pair_drag -> StringPairDrag
2014-11-26 10:27:25 +01:00