* Add fast fma functions
* Use fast fma functions
* Add fast pow function
* Use fast pow function
* Fix build
* Remove fastFma
* Avoid UB in fastPow
On GCC with -O1 or -O2 optimizations, this new implementation generates
identical assembly to the old union-based implementation
* changed font sizes to better values
* rename gui_templates.h to FontHelper.h
* replace hardcoded values with constants
* make knob labels use small font
* code review from michael
* more consolidation
* Fix text problem in Vectorscope
Fix a problem with cutoff text in Vectorscope. During the constructor
call of `LedCheckBox` the method `LedCheckBox::onTextUpdated` is
triggered which sets a fixed size that fits the pixmap and the text.
After instantiating the two instances in `VecControlsDialog` the
constructor then set a minimum size which overrode the fixed size that
was previously set. This then led to text that was cutoff.
---------
Co-authored-by: Michael Gregorius <michael.gregorius.git@arcor.de>
* Move common effect processing code to wrapper method
- Introduce `processImpl` and `sleepImpl` methods, and adapt each effect
plugin to use them
- Use double for RMS out sum in Compressor and LOMM
- Run `checkGate` for GranularPitchShifterEffect
- Minor changes to LadspaEffect
- Remove dynamic allocations and VLAs from VstEffect's process method
- Some minor style/formatting fixes
* Fix VstEffect regression
* GranularPitchShifterEffect should not call `checkGate`
* Apply suggestions from code review
Co-authored-by: saker <sakertooth@gmail.com>
* Follow naming convention for local variables
* Add `MAXIMUM_BUFFER_SIZE` and use it in VstEffect
* Revert "GranularPitchShifterEffect should not call `checkGate`"
This reverts commit 67526f0ffe.
* VstEffect: Simplify setting "Don't Run" state
* Rename `sleepImpl` to `processBypassedImpl`
* Use `MAXIMUM_BUFFER_SIZE` in SetupDialog
* Pass `outSum` as out parameter; Fix LadspaEffect mutex
* Move outSum calculations to wrapper method
* Fix Linux build
* Oops
* Apply suggestions from code review
Co-authored-by: Johannes Lorenz <1042576+JohannesLorenz@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: saker <sakertooth@gmail.com>
---------
Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: Johannes Lorenz <1042576+JohannesLorenz@users.noreply.github.com>
This problem seem to arise due to casting _n->framesLeft() and _n->offset() from an unsigned type (size_t) to a signed type (int). The fix is to use size_t as the type for std::max across the board.
* Fix: unnecessary space in Update EqControlsDialog.cpp
Fix: unnecessary space in Update EqControlsDialog.cpp
Greetings,
Gootector
* Style fix from Ross
---------
Co-authored-by: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com>
* simplified fraction and absfraction functions
* removed unused fastSqrt() and fastPow()
functions
* unused absMin() and absMax()
* move roundAt to math header
* Code review from saker
Co-authored-by: saker <sakertooth@gmail.com>
* use std::trunc()
* fixup after fixing merge conflicts
* remove unused fastFma and fastFmal functions.
* remove lmms_basics include, not needed
* use signedPowf from lmms_math in NES
* removed fastRand function, unused
* remove unused sinc function
* cleanup signedPowf
* code review
* further simplify random number math
* removed static from lmms_math file
---------
Co-authored-by: saker <sakertooth@gmail.com>
Ensure that no MIDI information (connected inputs, outputs, etc.) is
stored in presets. This main fix can be found in
`InstrumentTrack::saveTrackSpecificSettings` where the state of the
MIDI ports are now only saved if we are not in preset mode.
The remaining changes are concered with a refactoring of the code
that's related to saving and loading presets.
The refactoring mainly revolves around the removal of the member
`m_simpleSerializingMode` and the method `setSimpleSerializing` in
`Track`.
This is accomplished by introducing two new methods `saveTrack` and
`loadTrack`. These methods have a similar interface to `saveSettings`
and `loadSettings` but they additionally contain a boolean which
indicates if a preset is saved/loaded or a whole track. Both new
methods contain the previous code of `saveSettings` and `loadSettings`.
The latter two now only delegate to the new methods assuming that the
full track is to be stored/loaded if called via the overridden methods
`saveSettings` and `loadSettings`.
The methods `savePreset` and `loadPreset` are added as well. They call
`saveTrack` and `loadTrack` with the preset boolean set to `true`.
These methods are now used by all places in the code where presets are
saved or loaded which makes the code more readable. Clients also do not
need to know any implementation details of `Track`, e.g. like having to
call `setSimpleSerializing`.
Adjust `saveTrackSpecificSettings` so that it also passes information
of whether a preset or a whole track is stored. This leads to changes
in the interfaces of `AutomationTrack`, `InstrumentTrack`,
`PatternTrack` and `SampleTrack`. Only the implementation of
`InstrumentTrack` uses the new information though.
Remove the fallback code in `CMakeLists.txt`. Keep the message that's shown when SDL is wanted but not found. Remove the specific `LMMS_HAVE_SDL2` define.
Just print "OK" if SDL is found.
Remove several ifdefs which check for SDL2 or SDL1. Remove all code related to SDL1.
* Enable configuration of input device for SDL
Up to now the SDL audio driver attempted to use the default recording
device. This might not be what users want or expect, especially since the
actually used device is not visible anywhere. So if recording does not
work for the users they have no way to find out what's wrong.
Extend the settings screen of the SDL driver with a combo box that allows
to select the input device to be used. Store the selected device name in
a new attribute called "inputdevice" in the "audiosdl" section of the
configuration file.
Use the information from the configuration when attempting to inialize
the input device. Fall back to the default device if that does not work.
(cherry picked from commit 33139b9f4c)
* Provide a setting for system default input
Provide the setting "[System Default]" which instructs the SDL driver to
use the default device of the system as the input device. In the
configuration file this option is represented as an empty string. This
should play well with the current existing configuration of the users.
(cherry picked from commit 29c43c2bb6)
* Configuration of output device for SDL
Let users configure the output device that's used by the SDL driver.
Code-wise the implementation is very similar to the input device
configuration.
Use a `QComboBox` instead of a `QLineEdit` for `m_device` and rename it
to `m_playbackDeviceComboBox`.
Rename `s_defaultInputDevice` to `s_systemDefaultDevice` because it is
used in the context of playback and input devices.
(cherry picked from commit 1ab45e4994)
* Ensure label visibility
Make sure that labels are always shown by setting the row wrap policy of
the form layout to wrap long rows.
(cherry picked from commit a123d0e3cb)
* Rename "Device"
Rename "Device" to "Playback device" to make clear what the setting
refers to.
(cherry picked from commit 1f0cda4983)
* Remove repeated strings
Introduce const expressions to get rid of repeated strings with a risk
of typos.
(cherry picked from commit f9ea9705b8)
* Apply some more changes
Apply some more changes that have been made to `AudioSdl` in the
recording branch.
* Conditional ternary operator
Also use a conditional ternary operator for the input device setup.
* Methods for population of combo boxes
Move the population of the input and playback device combo boxes into
the methods `populatePlaybackDeviceComboBox` and
`populateInputDeviceComboBox`.
* Sort devices in combo box
Sort the devices names alphabetically in the input and playback combo
boxes. The default devices is always shown as the first entry.
* Code review fixes
Use `AudioDeviceSetupWidget` instead of `QObject` to translate "[System
Default]".
Fix copy/paste error in comment.
* Simplify some constexpr statements
* Fix#5851: Implement `EffectRackView::sizeHint()`
This fixes `EffectRackView` to have a permanent size hint instead of
resizing the widget once in `InstrumentTrackWindow`. The size hint tells
the `InstrumentTrackWindow` to not increase with a growing number of
effects in the `EffectRackView`.
* remove typeInfo struct from lmms_basics.h
* Code review
Co-authored-by: saker <sakertooth@gmail.com>
* converted epsilon to a constant
* renamed to approximatelyEqual and moved to top
---------
Co-authored-by: saker <sakertooth@gmail.com>
Introduce a method which checks if a file that's loaded has the LADSPA
controls saved in an old format that was written with a version before
commit e99efd541a.
The method is run at the end so that problems in all file versions are
detected. If a real upgrade was to be implemented it would have to run
between `DataFile::upgrade_0_4_0_rc2` and `DataFile::upgrade_1_0_99`.
See #5738 for more details.
If a problematic file is encountered a warning dialog that provides the number of affected LADSPA plugins is shown.
* Initial Commit
* Refactor code and add new icons
* Fix logical error
* Add smooth scrolling to Song Editor
* Remove unused variable
* Fix scrolling speed and scrollbar width
* Remove QDebug and re-add a newline I deleted in an unrelated file
* Forgot to add files to commit
* Remove unused variable
* Fix Styling
* Fix Styling Again
* Fix Styling Again
* Fix Styling Again
* Add icons for classic theme
* Accidentally committed varying scroll speed with zoom -- removing
* Change abs to std::abs
Co-authored-by: saker <sakertooth@gmail.com>
* Change qMax to std::max and use static_cast
Co-authored-by: saker <sakertooth@gmail.com>
* Simplify stepped auto scrolling
Co-authored-by: saker <sakertooth@gmail.com>
* Remove unnecessary parentheses
* Remove return statement causing the play head line to stop
* Add specific tooltips to auto scrolling button states
* Remove `== true` from SongEditor.cpp
Co-authored-by: saker <sakertooth@gmail.com>
* Make tooltips translatable
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
* Fix zooming position calculation
* Rename bars to ticks
* Fix rubberband rect size
---------
Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>