Introduce a new version of the LADSPA control dialog which uses "bar controllers" and arranges them in a grid layout. Long parameter names are elided long if needed. The new dialog is implemented in the class `LadspaMatrixControlDialog`.
Note: it is still possible to reactivate the old dialog as it has not been removed yet. You can do so in `plugins/LadspaEffect/LadspaControls.h` by replacing the implementation of `createView()` with the following:
```
gui::EffectControlDialog* createView() override
{
return new gui::LadspaControlDialog( this );
}
```
Introduce the new base class `FloatModelEditorBase`. It serves as the base widget for widgets that manipulate a float model and provides some base functionalities like context menus, edit dialogs, mouse handling, etc. Currently `BarModelEditor` and `Knob` inherit from `FloatModelEditorBase`. Therefore lots of code was moved from `Knob` to `FloatModelEditorBase`.
`BarModelEditor` supports style sheets. See the changes in style.css for the available options and their usage.
Extend `LedCheckBox` so that it adds support to render the text with the default font in the default size. The class now supports two modes:
* Legacy mode
* Non-legacy mode
Legacy mode is the default and renders the LedCheckBox as before. The font is set to 7 pixels and all the text is rendered with a shadow.
Non-legacy mode uses the current font to render the text. The text is rendered without a shadow and the pixmap is centered vertically to the left side of the text. Non-legacy mode is currently only used in the context of the matrix LADSPA dialog. Toggle options are rendered using it as well as the "Link Channels" button.
Add `TempoSyncBarModelEditor` which adds a tempo sync option to a `BarModelEditor`. Please note that the code was mostly copied and adjusted from the `TempoSyncKnob` class. It was not attempted yet to unify some of the code because with the current design it seems to be a road to "inheritance hell". A better solution might be to refactor the code so that it becomes more composable.
What follows are the individual commit messages of the 64 commits that have been squashed into a single merge commit.
* First version of a new dynamic LADSPA control dialog
The new dialog shows the LADSPA controls in a matrix layout. Each row
corresponds to a LADSPA parameter. Each parameter can have several
channels which can be linked. Each channel has its own row of controls.
The class LadspaMatrixControlView was added by copying and modifying
LadspaControlView to get rid of the link buttons which are associated
with some controls and some labels.
* Remove trailing whitespaces
* Merge fix
* Use the new connect syntax
* Remove empty destructors
* Use override keyword
* Reformat a bit
* Use nullptr
* Use range-based loops
* Add BarModelEditor and improve layouts
Add the new class `BarModelEditor` which is intended to become a new way
to adjust values of float models.
Simplify the layout in `LadspaMatrixControlDialog` by removing some
nested layouts. Remove the "Parameters" column.
Adjust `LadspaMatrixControlView` to implement the following changes:
* Show the name of the control next to toggle buttons (`LedCheckBox`).
* Use the new `BarModelEditor` for integer and float types.
* SHow the name of the control next to time based parameters that use
`TempoSyncKnob`.
The names are shown so that the "Parameters" column can be removed.
Technical details
------------------
The class `LadspaMatrixControlDialog` now creates a widget that contains
the matrix layout with the controls. This widget is then added to a
scroll area. The layout is populated in the new method
`arrangeControls`.
Add some helper methods to `LadspaMatrixControlDialog` which retrieve
the `LadspaControls` instance and the number of channels.
Add the implementation of `BarModelEditor` to `src/gui/CMakeLists.txt`.
TODOs
------
Extract common code out of the `Knob` class so that it can be reused by
`BarModelEditor`.
* Use factory to create LADSPA control widgets
Replace the class `LadspaMatrixControlView` with the factory class
`LadspaWidgetFactory`. The former was a widget that wrapped the widget
representation of a LADSPA control in yet another widget with a layout.
The factory simply returns the configured widget so that it can be
incorporated directly in layouts or other widgets.
Adjust `LadspaMatrixControlDialog` so that it uses the
`LadspaWidgetFactory` instead of the `LadspaMatrixControlView`.
* Initial version of FloatModelEditorBase
Create an initial version of `FloatModelEditorBase`. It is intended to
become the base widget for all widgets that manipulate a float model and
provides some base functionalities like context menus, edit dialogs,
mouse handling, etc.
The initial version is a copy of `Knob`. The enum and its values have
been suffixed with "Temp" as they will be removed later anyway. Same
applies for the function `convertPixmapToGrayScaleTemp`.
* Remove Knob related code from FloatModelEditorBase
First removal of Knob related code from FloatModelEditorBase.
* Remove setHtmlLabel
* Remove enum for knob types
* Remove label related code
Remove setLabel and the members m_label and m_isHtmlLabel.
* Remove several Qt properties
* Remove angle related members and methods
* Remove unused members and includes
* Clean up includes
* Make BarModelEditor inherit from FloatModelEditorBase
Make `BarModelEditor` inherit from `FloatModelEditorBase` so that it
inherits all shared functionality. Currently the class mostly implements
size related methods and overrides the paint method.
* Move LadspaWidgetFactory to LadspaEffect
Move the class `LadspaWidgetFactory` to the project LadspaEffect to make
it hopefully compile with mingw32 and mingw64.
Interestingly the code compiled and worked under Linux and MacOS.
* Code adjustments after scripted checks
Add an include guard and an additional `#pragme once`. Add comments to
closing namespace scopes.
* Export BarModelEditor
Export BarModelEditor so that for example the LadspaEffect project/
plugin can use it.
* Improve rendering of bar model editor
Increase the margin from 2 to 3 so that we have a more prominent border
around the filled area.
Fix a problem in the rendering code which led to situations where the
bar was drawn to the left of the start position for small values.
Return a more exact minimum size hint.
* Elide long parameter names
Elide long parameter names if needed.
* Enable horizontal direction of manipulation
Extend `FloatModelEditorBase` so that it also allows manipulation of the
values when the mouse is moved in horizontal directions. The default is
to use the vertical direction.
Make use of this new feature in `BarModelEditor` which now reacts to
horizontal movements when changing values.
* Represent enum parameters using the bar widget
The implementation of the current LADSPA dialog in master uses knobs to
represent enum parameters. Therefore it should also work with the new
bar widget.
This gets rid of many labels with the parameter name followed by
"(unsupported)".
* Remove TODO in LadspaWidgetFactory
* Render text of LedCheckBox with default font
Extend LedCheckBox so that it adds support to render the text with the
default font in the default size. The class now supports two modes:
* Legacy mode
* Non-legacy mode
Legacy mode is the default and renders the LedCheckBox as before. The
font is set to 7 pixels and all the text is rendered with a shadow.
Non-legacy mode uses the current font to render the text. The text is
rendered without a shadow and the pixmap is centered vertically to the
left side of the text.
The non-legacy mode is currently only used in the context of the matrix
LADSPA dialog. Toggle options are rendered using it as well as the "Link
Channels" button.
* Use "yellow" LEDs for bool parameters
Use "yellow" LEDs (which are actually blue) for dynamically added bool
parameters so that the dialog is consistent with regards to the LED
colors. The "Link Channels" button also uses a "yellow" LED.
* Fix Qt5 builds
Fix the Qt5 builds which do not know horizontalAdvance as a member of
FontMetrics.
Also refactor LedCheckBox::onTextUpdated to make it more compact.
* Style sheets for BarModelEditor
Add style sheets options for BarModelEditor. See the changes in
style.css for the available options and their usage.
The members that can be manipulated by the style sheet options are
initialized accoriding to the palette so that the BarModelEditor should
also render something useful if no style is set.
Adjust the paintEvent method to use the style sheet brushes and colors.
* Layout optimizations
Set the vertical scroll bar to always show so that the controls do not
move around if the scroll bar is hidden or shown.
Set the margin of the grid layout to 0 so that the whole dialog becomes
tighter.
* Get rid of initial scroll bars
Make sure that the widget is shown without a scrollbar whenever possible
using the following rules.
If the widget fits on the workspace we use the height of the widget as
the minimum size of the scroll area. This will ensure that the scrollbar
is not shown initially (and never will be).
If the widget is larger than the workspace then we want it to mostly
cover the workspace. In that case the minimum height is set to 90 % of
the workspace.
* Switch to a green theme
Switch to a green theme to better match the default theme.
* Adjust classic theme
Adjust the classic theme so that it renders the bars in a legible way.
* Fixes for CodeFactor
Remove virtual keyword from methods that are marked as override.
Remove whitespaces that make CodeFactor unhappy. One of these fixes
includes moving the implementation of
LadspaMatrixControlDialog::isResizable into the cpp file.
* CodeFactor is still unhappy
Remove a blank line after the constructor.
* Center align time based controls
Align time based controls, i.e. knobs, in the center.
The implementation defeats the purpose of the widget factory a bit but
it makes the design look nicer.
* Fix build
Fix the build by adjusting the enums. I added the changes while writing
the commit message for the merge commit but they did not make it.
* Attempt at CodeFactor warning
Try to make the last CodeFactor warning disappear.
* Add bar controller with tempo sync option
Add `TempoSyncBarModelEditor` which adds a tempo sync option to a `BarModelEditor`. Please note that the code was mostly copied and adjusted from the `TempoSyncKnob` class. It was not attempted yet to unify some of the code because with the current design it seems to be a road to "inheritance hell". A better solution might be to refactor the code so that it is more composable.
Another option might be to move the tempo sync functionality into a class like `FloatModelEditorBase`. Although this would not be a 100% right place either because `TempoSyncKnobModel` inherits from `FloatModel`. In that case we'd have specialized code in a generic base class.
Adjust `LadspaWidgetFactory` so that it now returns an instance of a `TempoSyncBarModelEditor` instead of a `TempoSyncKnob`.
Remove the extra layout code from `LadspaMatrixControlDialog.cpp` as most things are bar editors now.
Adjust `TempoSyncKnobModel` so we do not have to make `TempoSyncBarModelEditor` a friend of it.
* Another attempt to please CodeFactor
Have another attempt to fix CodeFactor's complaints about `LadspaMatrixControlDialog.h`.
* Coding conventions, blanks and blank lines
Remove lots of unnecessary white space. Remove blank lines. Remove leading underscores from parameters.
Remove line breaks in `TempoSyncBarModelEditor.cpp` to make the code more readable. Remove repeated method calls by introducing local variables.
* Break down complex method
Break down the complex method `TempoSyncBarModelEditor::updateDescAndIcon` by delegating to the new methods `updateTextDescription` and `updateIcon`.
* Another attempt to please CodeFactor
Another attempt to fix `LadspaMatrixControlDialog.h` to please CodeFactor.
* Work on TODOs
The TODO "Assumes that all processors are equal..." has been turned into a comment when we start iterating over the channels. If the channels are not of the same structure this would likely also have been a problem in the old implementation.
The TODO "Use a factory..." has been removed as this is already done.
The include of `FloatModelEditorBase.h` in LadspaWidgetFactory has been removed.
* Modifier keys for mouse wheel adjustments
Integrate the changes of commit 7000afb2ea into `FloatModelEditorBase`.
This commit added modifier keys for mouse wheel adjustments to the `Knob` class. The port to `FloatModelEditorBase` results in the bar control now also supporting different scales of adjustments that can be switched with the Shift, Ctrl and Alt keys.
* Show current value on mouse over
Integrate the changes of commit fcdf4c0568 into `FloatModelEditorBase`. This commit lets users show the current value of a float model when the mouse is moved over the control.
* Make Knob inherit from FloatModelEditorBase
Make `Knob` inherit from `FloatModelEditorBase`. This is mostly a continuation for the changes introduced with commit c63d86f.
The idea is that `FloatModelEditorBase` contains the underlying functionality and logic to deal with float models. `Knob` and other classes then only override the presentation aspects. This way `Knob` and `BarModelEditor` can share the same functionality but can differ in how they present the data.
Technical details
------------------
Remove all methods that are already defined in `FloatModelEditorBase` from `Knob`. These are all methods that are defined in the same way in `FloatModelEditorBase`. The method `paintEvent` is not removed because it is overridden by `Knob` as it has its own presentation.
Remove forward declaration of `QPixmap` from `FloatModelEditorBase` as it was not used. Remove unused function `convertPixmapToGrayScaleTemp` from `FloatModelEditorBase`.
* Cleanup includes in Knob class
* Code style changes in FloatModelEditorBase
`FloatModelEditorBase` is a new class/file. Therefore we can do some extensive code cleanup on the code that was initially copied from `Knob`.
Adjust whitespace for methods and some if-statements. Remove underscores from parameter names. Use only two blank lines between method definitions.
* Cleanup include for FloatModelEditorBase
* Show effect name as title of dialog
Add the effect name as the title in the content of the window. This improves the structure of the dialog as it is now clearer from the content itself to which effect the controls belong to.
This duplicates the information from the window title. However, the window title is rather small and the larger font in the content makes it easier to find an effect in a set of opened dialogs.
* Revert "Show effect name as title of dialog"
This reverts commit 8ce0d366d0.
* Fix problem with LedCheckBox in grid layout
The LedCheckBox does not play nice when being used in a grid layout as it disables the resizing behavior of every column it appears in.
The solution is to wrap it into the layout of a parent widget that knows how to behave.
* Reduce minimum width of BarModelEditor
Reduce the minimum width of `BarModelEditor` from 200 to 50.
---------
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
This PR makes changes in the submodule `zynaddsubfx`. It affects its
submodule `instruments`:
* updates the URL to use github (since SF is less reliable)
* changes the protocl from SSH to HTTPS (see
https://stackoverflow.com/a/50299434)
* does not change the submodule's commit ID
You must now run
```
git submodule sync --recursive
```
once to reflect this change.
* Fix warnings "QPainterPath::lineTo Invalid coordinates" on console when loading the effect or changing
some paramenters, by not "drawing" the EQ curve when there is no EQ band active.
* Fix warnings on console "QPainterPath::lineTo Invalid coordinates" when EQ is processing a sound, because
in this function log10f generates a pole error when freq is 0, returning and invalid x value pixel
* Update plugins/Eq/EqCurve.cpp
---------
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Fix issue with knob range
* Randomness for BandedWG
* Implement Tubular Bells ADSR
* LFO - update values on change while playing
* coding style
* Vibrato Gain - update
* fixed cmakelists conditions
* Fixed the order messup.
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
---------
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
* Mallets - Add random knob function
Implement randomness for the instrument. When Random is applied, Hardness and Position of instrument 1 - 9, or Modulator and Crossfade on instrument 10 (Tubular Bells), are nudged on every note to liven up the sound. With the modulated knobs placed at their center values, Random at max will select from the full range of possible values.
Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
Remove identical calls to `InstrumentTrack::processAudioBuffer` which appear in the overridden implementations of `Instrument::play` and `Instrument::playNotes`. Instead the call to `processAudioBuffer` has been moved into `InstrumentPlayHandle::play` and `InstrumentTrack::playNote`. These two methods call the aforementioned methods of `Instrument`. Especially in the case of `InstrumentTrack::playNote` the previous implementation resulted in some unncessary "ping pong" where `InstrumentTrack` called a method on an `Instrument` which then in turn called a method on `InstrumentTrack`. And this was done in almost every instrument.
In `InstrumentTrack::playNote` an additional check was added which only calls `processAudioBuffer` if the buffer is not `nullptr`. The reason is that under certain circumstances `PlayHandle::doProcessing` calls the `play` method by explicitly passing a `nullptr` as the buffer. This behavior was added with commit 7bc97f5d5b. Because it is unknown if this was done for some side effects the code was adjusted so that it behaves identical in this case.
Move the complex implementation for `InstrumentPlayHandle::play` and `InstrumentPlayHandle::isFromTrack` into the cpp file and optimize the includes.
* Add options to enable sanitizers
* Specify them as debugging options
* Apply suggestions made by Dom
* Fix linking issues
There were linking issues, most likely because we were
applying the sanitizer flags to unnecessary targets that
are part of the build. Now, we only focus on adding the
compiler flags to lmmsobjs as a PUBLIC dependency,
and selectively choose what targets we need to apply
the linker flags to as PRIVATE dependencies.
* Add UBSan
* Add status messages
* Remove GNU as supported compiler for MSan
* Revert to using add_<compile|link>_options again
* Fix sanitizer linkage within veal and cmt libraries
I suspect that our sanitizer flags were removed for these two CMake
targets. Instead of setting the properties directly, we call
target_compile_options and target_link_options
instead.
* Remove TODO comment
* Revert "Fix sanitizer linkage within veal and cmt libraries"
This reverts commit b04dce8d8c.
* Use CMAKE_<LANG>_FLAGS_<CONFIG> and apply fixes
* Remove quotes
* Add support for additional flags
* Disable vptr for UBSan
* Print "Debug using" in status for clarity
* Wrap ${supported_compilers} and ${status_flag} in quotes
* Replace semicolons with spaces in additional_flags
* Remove platform check for no-undefined flag
The platform check was added as an attempt
to make this branch compile with the veal
and cmt libraries. However, it seems to work
without it, so the problem must've been something
else occuring in these files.
* Undo change to FP exceptions status message
* Use spaces instead of tabs
* Remove -no-undefined flag for cmt and veal libraries
* Fix LADSPA effects memory leak
* Fix buffer overflow in PianoView
* Avoid using invalid iterators in AutomationClip
* Fix memory leaks in SimpleTextFloat
* Handle potential case where QMap::lowerBound(...) returns end iterator
* Implement suggestions from review
* Add `ArrayVector` class template and tests
* Fix counting of failed test suites
* Support detuning and panning with Sf2 Player
* Restrict panning to supported FluidSynth versions
* Fix data array cast type
* Fix tests for Qt<5.10 and correct mistaken test
* DIsplay warning for FluidSynth < 2
* Remove unnecessary clamp
* Update include guard name
* Add Tap Tempo Feature (#6375)
Resolves#5181
* Update formatting, use namespaces, etc.
* Use Qt Designer .ui file to handle the UI
Thanks to irrenhaus for the idea
Also added a few buttons I will add functionality for
* Play metronome sound when tapped
* Improve stabilization speed by comparing differences in length between intervals
To improve the speed at which the BPM counter stabilizes at a
certain number, we now compare the differences in length between
the last two taps and the most recent two taps and reset the counter
if the threshold is passed.
I made it so that a difference of 500 ms resets the counter.
* Remove duplicate m_ui
An artifact from my battle with Git and merge conflicts..
* Format TapTempoUi header file
* Add lmms namespace in UI file
* Remove taptempo.ui XML file
Not needed
* Add LMMS_EXPORT to SamplePlayHandle
* Use std::chrono::duration<double, std::milli> for intervals
Co-authored-by: irrenhaus3 <irrenhaus3@gmail.com>
* Use alias for steady_clock
Co-authored-by: irrenhaus3 <irrenhaus3@gmail.com>
* Speed up convergence by accounting for recent intervals
This uses a combination of keeping track of a more accurate BPM,
while also using a BPM difference threshold to move towards the true BPM
more quickly.
After three taps, a "recent interval" is calculated, which is similar
to the latest interval, but less fluctuating since it accounts for
three taps instead of one. This allows for comparing between
the BPM on the display with the recent BPM more closely.
We then compare the difference in magnitude of both BPM's
with the threshold. If the threshold is passed, the counter gets reset.
* Remove semicolon from "QOBJECT;" in plugins/TapTempo/TapTempo.h
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
* Add newline between using alias and constructor
* Cleanup header files
* Add // namespace lmms::gui comment
* Rename header guards in plugins/TapTempo/TapTempo.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Rename header guards in plugins/TapTempo/TapTempo.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Rename header guards in plugins/TapTempo/TapTempoUi.h
Will merge this file with ``TapTempoView`` soon.
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Rename header guards in plugins/TapTempo/TapTempoUi.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Update plugins/TapTempo/TapTempo.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Replace virtual with override in plugins/TapTempo/TapTempo.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Merge UI file into TapTempoView
* Pass TapTempo* directly into constructor in plugins/TapTempo/TapTempoView.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Update style in plugins/TapTempo/TapTempoView.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Add parameter name for keyPressEvent function in plugins/TapTempo/TapTempoView.h
Also reorder the function declarations to match the order in the source file.
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Remove dynamic_cast to TapTempo* in plugins/TapTempo/TapTempoView.cpp
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Restrict C linkage to only lmms_plugin_main and plugin descriptor
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Simplify algorithm
* Update labels when calling closeEvent
* Add reset button
* Adjust layout
* Format document
* Only allow the tap button to gain focus
* Use icon provided by LMMS
* Add sync button and adjust formatting
* Make the metronome downbeat the first beat
Also simplify code
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Round BPM values when syncing with project tempo
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Change Plugin::Tool to Plugin::Type::Tool
---------
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
* Replace QVector with std::vector in AudioEngine
* Replace QVector with std::vector in AudioEngineWorkerThread
* Replace QVector with std::vector in AudioJack
* Replace QVector with std::vector in AutomatableModel
* Replace QVector with std::vector in AutomationClip
* Replace QVector with std::vector in AutomationEditor
* Replace QVector with std::vector in ConfigManager
* Replace QVector with std::vector in Controller
* Replace QVector with std::vector in ControllerConnection
* Replace QVector with std::vector in EffectChain
* Replace QVector with std::vector in EnvelopeAndLfoParameters
* Replace QVector with std::vector in InstrumentFunctions
* Replace QVector with std::vector in MidiClient
* Replace QVector with std::vector in Mixer
* Replace QVector with std::vector in Note
* Replace QVector with std::vector in PeakController
* Replace QVector with std::vector in PianoRoll
* Replace QVector with std::vector in PluginFactory
* Replace QVector with std::vector in RenderManager
* Replace QVector with std::vector in StepRecorder
* Replace QVector with std::vector in Track
* Replace QVector with std::vector in TrackContainer
* Replace QVector with std::vector in Song
* Adapt QVector to std::vector changes in ControllerConnectionDialog
* Phase 2: Use std::abs in panning.h
Without this, the QVector changes will make the code not compile.
* Phase 2: Replace QVector with std::vector in PeakControllerEffect
* Phase 2: Replace QVector with std::vector in AutomatableModel
* Phase 2: Replace QVector with std::vector in AutomationClip
* Phase 2: Replace QVector with std::vector in ControllerConnection
* Phase 2: Replace QVector with std::vector in EffectChain
* Phase 2: Replace QVector with std::vector in Mixer
* Phase 2: Replace QVector with std::vector in PeakController
* Phase 2: Replace QVector with std::vector in RenderManager
* Phase 2: Replace QVector with std::vector in Song
* Phase 2: Replace QVector with std::vector in StepRecorder
* Phase 2: Replace QVector with std::vector in Track
* Phase 2: Replace QVector with std::vector in TrackContainer
* Phase 2: Adapt QVector changes in EffectRackView
* Phase 2: Adapt QVector changes in AutomationClipView
* Phase 2: Adapt QVector changes in ClipView
* Phase 2: Adapt QVector changes in AutomationEditor
* Phase 2: Adapt QVector changes in PianoRoll
* Phase 2: Adapt QVector changes in TrackContainerView
* Phase 2: Adapt QVector changes in TrackContentWidget
* Phase 2: Adapt QVector changes in InstrumentTrack
* Phase 2: Adapt QVector changes in MidiClip
* Phase 2: Adapt QVector changes in SampleTrack
* Fix segmentation fault in ConfigManager::value
* Fix unintended faulty std::vector insert in AutomationClip::resolveAllIDs
* Resolve trailing whitespace in src/core/StepRecorder.cpp
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
* Use std::next and std::prev in EffectChain::moveUp/moveDown
* Introduce static "combineAllTracks" function in AutomationClip
* Adjust variable name in Song::automatedValuesAt
* Adjust removal of long step notes in StepRecorder::removeNotesReleasedForTooLong
* Iterate over m_chords by const reference in src/core/InstrumentFunctions.cpp
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
* Fix StepRecorder::removeNotesReleasedForTooLong again
* Combine the ConfigManager::value overloads using std::optional
* Revise StepRecorder::removeNotesReleasedForTooLong
* Remove redundant std::optional in ConfigManager::value
* Remove trailing whitespace in ConfigManager::value
* Fix: Prevent incorrect use of std::distance when element not found
* Chore: Remove trailing whitespace in edited files
* Only set the id attribute if the controller was found
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
* Remove extra indents from 84b8fe8a559855ed263b74cc582eab3655250c5f
* Fix compilation issues
* Add LMMS_ prefix for header guard in Track.h
* Undo changes made to MixerView::deleteUnusedChannels
* Simplify code to handle failure of finding tracks
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
* Split ternary operator into separate if statement
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
* Undo changes to indentation in MixerRoute
* Do general clean-up
Some of the changes made:
+ Use auto where benefical
+ Fix bug in AutomatableModel::globalAutomationValueAt (for loop should be looping over clips variable, not clipsInRange)
+ Undo out of focus whitespace changes
* Always assign to m_steps regardless if clip is found or not
Even when the clip is not found (i.e., currentClip is -1), m_steps still
gets assigned to.
* Insert at the end of tracks vector in src/core/Mixer.cpp
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
* Insert at the end of tracks vector in src/core/Mixer.cpp (2)
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
* Remove redundant template parameter
* Use std::array for zoomLevels
---------
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
* Fixed issue #5734 (FreeBoy Division by zero).
Added comments and used more descriptive variable names for noise
channel initialization block.
Also indented the nested for loop to improve code clarity.
The reasons for doing this can be found in this answer:
https://softwareengineering.stackexchange.com/a/362796
* Better initial div_ratio guess
Allows us to skip r = 0 and a conditional in the loop below.
---------
Co-authored-by: Spekular <Spekular@users.noreply.github.com>
Fix the uninitialized variable pCurPreset by setting it to nullptr.
Please note that it looks as if the nullptr is now being passed to the
function fluid_sfont_iteration_next_wrapper. However, the function does
not use the parameter anyway and then the variable is set to the result
of that function.
* Add <QHash> to PluginFactory.h
* Handle one more deprecated QTextStream::endl
* Replace QLayout::setMargin with setContentsMargins
* Replace Qt::MidButton with Qt::MiddleButton
* Replace QPalette::Background with QPalette::Window
* Fix deprecation warnings in LcdFloatSpinBox