Commit Graph

2437 Commits

Author SHA1 Message Date
Hyunjin Song
f54ac456dd Remove leftover of mingw-std-threads 2024-10-03 20:34:08 +09:00
Hyunjin Song
7782954e6e Fix namespace 2024-10-03 20:33:08 +09:00
Hyunjin Song
47e6a3090a Merge branch 'master' into refac/memory 2024-10-03 17:05:29 +09:00
Dalton Messmer
121d608c3a Reintroduce fast math functions (#7495)
* 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
2024-10-01 14:35:15 -04:00
saker
860749a8a1 Reformat MixerChannelView classes (#7431) 2024-09-30 19:32:21 -04:00
Rossmaxx
729593c022 Fix hardcoded fonts scaling issues (#7493)
* 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>
2024-09-28 13:18:02 +05:30
Hyunjin Song
ac5b3f07d7 Revert irrelevant changes 2024-09-21 21:58:05 +09:00
Dalton Messmer
18252088ba Refactor Effect processing (#7484)
* 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>
2024-09-20 20:00:36 -04:00
saker
1d7ed16dc9 Make the send button and receive arrow occupy the same space in mixer channels (#7503) 2024-09-19 12:53:40 -04:00
DanielKauss
7d35d4225e SlicerT UI update (#7453)
* Update SlicerT UI

* Style review

Co-authored-by: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com>

* Style fixes

---------

Co-authored-by: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com>
2024-09-17 11:35:01 +05:30
saker
d703f39153 Process metronome every MIDI tick (#7483) 2024-09-04 12:58:36 -04:00
Rossmaxx
a992019626 Cleanup lmms_math.h (#7382)
* 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>
2024-08-28 12:48:56 +05:30
Michael Gregorius
88ee83bb4a Do not save MIDI connections in presets (#7445)
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.
2024-08-20 19:50:39 +02:00
Alex
58ce9b476a Fix track handles dissapearing (#6338) 2024-08-16 22:20:39 +05:30
szeli1
bda1a9c37e Add input dialog to the mixer channel LCD spin box (#7399)
Co-authored-by: saker <sakertooth@gmail.com>
2024-08-11 11:14:43 -04:00
Michael Gregorius
d8e4d8c115 Remove support for SDL1 (#7443)
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.
2024-08-11 12:20:02 +02:00
Michael Gregorius
74c73e5848 SDL driver's input and output device configuration via combo box (#7421)
* 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
2024-08-10 22:33:52 +02:00
Johannes Lorenz
44a8b038f5 Fix #5851: Implement EffectRackView::sizeHint() (#7428)
* 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`.
2024-08-10 09:00:06 +05:30
Rossmaxx
828cefb4ea Remove typeInfo struct from lmms_basics.h (#7380)
* 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>
2024-08-07 07:33:10 +05:30
saker
5b366cfe3c Revert "Switch to libsamplerate's callback API in Sample (#7361)" (#7410)
This reverts commit 2f5f12aaae.
2024-08-04 11:01:26 -04:00
Michael Gregorius
b7548b7b7a Warn about LADSPA problems (#7267)
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.
2024-08-04 15:30:42 +02:00
regulus79
ce17c95636 Add Continuous Auto-Scrolling (#7396)
* 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>
2024-08-04 10:30:42 +02:00
Johannes Lorenz
1c865843f7 Lv2: Improve plugin description (#7357) 2024-07-28 15:55:41 +02:00
Michael Gregorius
592da1cac7 Fix include of array in BasicFilters.h (#7398)
Fix a missing include of `array` in `BasicFilters.h`.
2024-07-27 18:02:05 +05:30
saker
2f5f12aaae Switch to libsamplerate's callback API in Sample (#7361) 2024-07-24 18:50:47 -04:00
Dominic Clark
851c884f58 Re-enable disabled GCC warnings where possible (#7379) 2024-07-21 22:34:34 +01:00
Rossmaxx
12632e6b5e Remove BufferManager::clear (#7378) 2024-07-13 17:01:31 -04:00
saker
1420a1f7e8 Define fpp_t and f_cnt_t to be of size_t (#7363)
Defines `fpp_t` and `f_cnt_t` to be of `size_t` within `lmms_basics.h`.  Most of the codebase used `fpp_t` to represent the size of an array of sample frames, which is incorrect, given that `fpp_t` was only 16 bits when sizes greater than 32767 are very possible. `f_cnt_t` was defined as `size_t` as well for consistency.

---------

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2024-07-09 06:27:33 -04:00
Johannes Lorenz
f2c815b214 Remove term "blacklist" (#7365)
About the PR:

* We use "blocked" as an abstract term, when there may be different reasons
* If there is a concrete reason, we use a more concrete word like "unstable"
  or "not useful"
* Double negations like "don't block" or "block unstable" are avoided

Besides this, this PR

* Lets `Lv2Manager` hide the full `std::set` of plugin URIs
* Fixes occurences of "BuffersizeLessThan32" - it is less or equal
* Moves `enableBlockedPlugins` from Engine to `ConfigManager`
2024-07-08 23:02:49 +02:00
saker
538572a3c5 Change fpp_t usage in SampleFrame to use size_t instead (#7362) 2024-07-02 12:02:34 -04:00
Andrew Wiltshire
fb5268ebae Adds "Show Hidden Content" checkbox (#7309)
* Adds "Show Hidden Content Dialogue"

* Update FileBrowser.cpp

* Automatically rearrange layout to fit check boxes

* check if files are hidden in a cross platform manner

* put the hidden files checkbox below the user and factory check boxes at all times

* removed layout rearrangement code

* moved checkbox code to FileBrowser

* Removed unused include

* Cleanup in FileBrowser

Move the method `addContentCheckBox` to the other private methods.
Remove the method parameters because it can use the members.

Remove the conditional when adding the "Hidden content" checkbox because
it was always true.

---------

Co-authored-by: Michael Gregorius <michael.gregorius.git@arcor.de>
2024-06-30 22:23:19 +02:00
FyiurAmron
edf6bf8dfe Remove mingw-std-threads from 3rd party deps and use native libs/headers instead (#7283)
* Remove mingw-std-threads from 3rd party deps

 and use native libs/headers instead

* switch MinGW to POSIX in CI
2024-06-30 15:49:06 -04:00
saker
13a05b99d3 Use recursive mutex for requestChangeInModel/doneChangeInModel (#7359)
* Make model change mutex recursive

* Initialize s_renderingThread
2024-06-30 14:54:20 -04:00
Michael Gregorius
286e62adf5 Simplify sample frame operations (make it a class) (#7156)
* Remove the struct StereoSample

Remove the struct `StereoSample`. Let `AudioEngine::getPeakValues` return a `sampleFrame` instead.

Adjust the calls in `Mixer`  and `Oscilloscope`.

* Simplify AudioEngine::getPeakValues

* Remove surroundSampleFrame

Some code assumes that `surroundSampleFrame` is interchangeable with `sampleFrame`. Thus, if the line `#define LMMS_DISABLE_SURROUND` is commented out in `lmms_basics.h` then the code does not compile anymore because `surroundSampleFrame` now is defined to be an array with four values instead of two. There also does not seem to be any support for surround sound (four channels instead of two) in the application. The faders and mixers do not seem to support more that two channels and the instruments and effects all expect a `sampleFrame`, i.e. stereo channels. It therefore makes sense to remove the "feature" because it also hinders the improvement of `sampleFrame`, e.g. by making it a class with some convenience methods that act on `sampleFrame` instances.

All occurrences of `surroundSampleFrame` are replaced with `sampleFrame`.

The version of `BufferManager::clear` that takes a `surroundSampleFrame` is removed completely.

The define `SURROUND_CHANNELS` is removed. All its occurrences are replaced with `DEFAULT_CHANNELS`.

Most of the audio devices classes, i.e. classes that inherit from `AudioDevice`, now clamp the configuration parameter between two values of `DEFAULT_CHANNELS`. This can be improved/streamlined later.

`BYTES_PER_SURROUND_FRAME` has been removed as it was not used anywhere anyway.

* Make sampleFrame a class

Make `sampleFrame` a class with several convenience methods. As a first step and demonstration adjust the follow methods to make use of the new functionality:
* `AudioEngine::getPeakValues`: Much more concise now.
* `lmms::MixHelpers::sanitize`: Better structure, better readable, less dereferencing and juggling with indices.
* `AddOp`, `AddMultipliedOp`, `multiply`: Make use of operators. Might become superfluous in the future.

* More operators and methods for sampleFrame

Add some more operators and methods to `sampleFrame`:
* Constructor which initializes both channels from a single sample value
* Assignment operator from a single sample value
* Addition/multiplication operators
* Scalar product

Adjust some more plugins to the new functionality of `sampleFrame`.

* Adjust DelayEffect to methods in sampleFrame

* Use composition instead of inheritance

Using inheritance was the quickest way to enable adding methods to `sampleFrame` without having to reimpement much of `std::array`s interface.

This is changed with this commit. The array is now a member of `sampleFrame` and the interface is extended with the necessary methods `data` and the index operator.

An `average` method was added so that no iterators need to be implemented (see changes in `SampleWaveform.cpp`).

* Apply suggestions from code review

Apply Veratil's suggestions from the code review

Co-authored-by: Kevin Zander <veratil@gmail.com>

* Fix warnings: zeroing non-trivial type

Fix several warnings of the following form:

Warnung: »void* memset(void*, int, size_t)« Säubern eines Objekts von nichttrivialem Typ »class lmms::sampleFrame«; use assignment or value-initialization instead [-Wclass-memaccess]

* Remove unnecessary reinterpret_casts

Remove some unnecessary reinterpret_casts with regards to `sampleFrame` buffers.

`PlayHandle::m_playHandleBuffer` already is a `sampleFrame*` and does not need a reinterpret_cast anymore.

In `LadspaEffect::processAudioBuffer` the `QVarLengthArray` is now directly initialized as an array of `sampleFrame` instances.

I guess in both places the `sampleFrame` previously was a `surroundSampleFrame` which has been removed.

* Clean up zeroSampleFrames code

* Fix warnings in RemotePlugin

Fix some warnings related to calls to `memcpy` in conjunction with`sampleFrame` which is now a class.

Add the helper functions `copyToSampleFrames` and `copyFromSampleFrames` and use them. The first function copies data from a `float` buffer into a `sampleFrame` buffer and the second copies vice versa.

* Rename "sampleFrame" to "SampleFrame"

Uppercase the name of `sampleFrame` so that it uses UpperCamelCase convention.

* Move SampleFrame into its own file

Move the class `SampleFrame` into its own class and remove it from `lmms_basics.h`.

Add forward includes to all headers where possible or include the `SampleFrame` header if it's not just referenced but used.

Add include to all cpp files where necessary.

It's a bit surprising that the `SampleFrame` header does not need to be included much more often in the implementation/cpp files. This is an indicator that it seems to be included via an include chain that at one point includes one of the headers where an include instead of a forward declaration had to be added in this commit.

* Return reference for += and *=

Return a reference for the compound assignment operators `+=` and `-=`.

* Explicit float constructor

Make the  constructor that takes a `float` explicit.

Remove the assignment operator that takes a `float`. Clients must use the
explicit `float` constructor and assign the result.

Adjust the code in "BitInvader" accordingly.

* Use std::fill in zeroSampleFrames

* Use zeroSampleFrames in sanitize

* Replace max with absMax

Replace `SampleFrame::max` with `SampleFrame::absMax`.

Use `absMax` in `DelayEffect::processAudioBuffer`. This should also fix
a buggy implementation of the peak computation.

Add the function `getAbsPeakValues`. It  computes the absolute peak
values for a buffer.

Remove `AudioEngine::getPeakValues`. It's not really the business of the
audio engine. Let `Mixer` and `Oscilloscope` use `getAbsPeakValues`.

* Replace scalarProduct

Replace the rather mathematical method `scalarProduct` with
`sumOfSquaredAmplitudes`. It was always called on itself anyway.

* Remove comment/TODO

* Simplify sanitize

Simplify the `sanitize` function by getting rid of the `bool found` and
by zeroing the buffer as soon as a problem is found.

* Put pointer symbols next to type

* Code review adjustments

* Remove "#pragme once"
* Adjust name of include guard
* Remove superfluous includes (leftovers from previous code changes)

---------

Co-authored-by: Kevin Zander <veratil@gmail.com>
2024-06-30 20:21:19 +02:00
Lost Robot
6634cec127 Add Granular Pitch Shifter effect (#7328) 2024-06-26 11:00:27 +05:30
Rossmaxx
aaca5fbd0e Remove MemoryHelper (#7335)
* remove memory helper and replace alignedMalloc with stl version

* it's aligned_alloc

* forgot about destructor

* switch to unique pointers

Co-authored-by: saker <sakertooth@gmail.com>

* compile fix

---------

Co-authored-by: saker <sakertooth@gmail.com>
2024-06-24 21:22:19 +05:30
Monospace-V
26646c653c Style format DrumSynth (#7189)
Co-authored-by: saker <sakertooth@gmail.com>
2024-06-22 10:38:01 +05:30
Dominic Clark
e76a99ee76 Suppress warnings in third-party code (#7319) 2024-06-17 22:48:04 +01:00
saker
01ffa95578 Use src_set_ratio to fix artifacts within Sample playback (#7321) 2024-06-15 18:34:10 -04:00
Michael Gregorius
beedbc18a6 Add support for "factorysample:" prefix / Fix "bassloopes" typo (#7236)
## Add support for "factorysample:" prefix
Add support to upgrade files with `src` tags that are prefixed with "factorysample:".

## Fix "bassloopes" typo
Fix projects that still reference files with the typo "bassloopes" in their name.

The upgrade is implemented in its own method because it is unrelated to the BPM renaming even if it is technically very similar in its solution.

Introduce the helper method `mapSrcAttributeInElementsWithResources` which replaces the `src` attribute in elements with resources (samples and AFP) if it can be found in a map.
2024-06-14 16:22:39 +02:00
Lost Robot
b1ee626633 Fix noise generator (#7318)
This noise generator doesn't work properly when multiple noise sources are being generated simultaneously.
2024-06-13 15:18:36 -07:00
Michael Gregorius
042f8ac325 Add peak indicators (#7295)
Add peak indicators to the mixer strips. They show the maximum peak value
that was observed and can be reset by clicking on them.

## Implementation details
The implementation works via a signal/slot mechanism. The `Fader` class
has a new signal `peakChanged` which reports peak values as
amplifications. A new class `PeakIndicator` is added which has a slot
`updatePeak` which is connected to the new signal in `Fader`.

The `PeakIndicator` inherits from `QLabel` and mainly deals with updating
the label text from the current peak value.

Add a `PeakIndicator` instance to `MixerChannelView`. Add a `reset`
method to `MixerChannelView` so that the mixer channel can be reset on
the loading of new projects, etc. The current implementation resets the
peak indicator back to -inf dbFS. The `reset` method is called in
`MixerView::clear`.

Remove the clamping in `Fader::setPeak` so that all peaks are reported.
Emit the new signal if the peak changes.
2024-06-01 12:09:47 +02:00
saker
bfeb781dc0 Redesign file browser searching (#7130) 2024-05-29 21:46:58 -04:00
Rossmaxx
b803e92d63 Add menu option and hotkeys to move controllers/effects (#7139)
* added controller rack modules

* remove this-> from setFocusPolicy() and obsolete comment

Co-authored-by: saker <sakertooth@gmail.com>

* Use std::swap

Co-authored-by: saker <sakertooth@gmail.com>

* some more cleanup

Co-authored-by: saker <sakertooth@gmail.com>

* Replace slots with function pointers

Co-authored-by: saker <sakertooth@gmail.com>

* Apply fixes

---------

Co-authored-by: ejaaskel <esa.jaaskela@suomi24.fi>
Co-authored-by: saker <sakertooth@gmail.com>
2024-05-23 17:38:47 +05:30
BoredGuy1
a527427abf Changed bar lines to follow snap size (#7034)
* Added lines in between bars
* Changed bar lines to follow snap size
* Changed default zoom and quantization value
* Added constants for line widths
* Added QSS configuration for new grid line colors
* Tied line widths to QSS properties
* Changed default quantization to 1/4
* Removed clear() from destructor model
* Removed destructor in ComboBoxModel.h
* Changed member set/get functions to pass by value
* Updated signal connection with newer syntax
2024-05-20 12:37:18 +02:00
wujekbrezniew
ca109f94f4 Migrate to new LV2 header paths (#6990) 2024-05-19 14:39:20 +01:00
Dominic Clark
95e5f97150 Revamp resource embedding (#7241) 2024-05-12 17:38:14 +01:00
saker
9b6e33aa5c Remove global oversampling (#7228)
Oversampling can have many different effects to the audio signal such as latency, phase issues, clipping, smearing, etc, so this should really be an option on a per-plugin basis, not globally across all of LMMS (which, in some places, shouldn't really need to oversample at all but were oversampled anyways).
2024-05-05 04:37:43 -04:00
Michael Gregorius
9bdc8adf33 Inform effects about changes in enabled model (#7237)
Add the virtual method `Effect::onEnabledChanged` which can be overridden by effects so that they can react to state changes with regards to being enabled or bypassed. The call of this methods is connected to state changes of the enabled model in the constructor of `Effect`.

Implement the method in `DualFilterEffect` by resetting the history of the two filters. This is done to prevent pops that have been reported in #4612.
2024-05-05 10:05:22 +02:00
Michael Gregorius
bb6a77aa0f Only set sample clips for valid files (#7224)
Check if a non-empty buffer was loaded and only set the sample clip if that's the case.

## Other changes

Move setting the song to modified towards the core in the context of `SampleClip`. Previously the `SampleClipView` did this but it's none of it's business.

Introduce `SampleClip::changeLengthToSampleLength` which changes the length of the clip to the length of the sample. This was also previously done by the view which is again the wrong place to do the necessary calculations. An unnecessary `static_cast` was removed while carrying over the code.

Add the method `SampleClip::hasSampleFileLoaded` which checks if the loaded sample corresponds to a given file name.

Fix code formatting.
2024-04-29 19:22:37 +02:00