* Clarify VST support to VST2 in README
Updated VST support mention from VST(i) to VST2 in features section for clarity.
* Update README.md
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
* mention LV2 support
---------
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
Refactors the PortAudio backend to fix issues with DirectSound and MME crackling and not loading properly, as well as to improve code quality and maintainability.
---------
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
Fixes#8200. Scrolling to change velocity/panning can affect unselected notes if hovering over them in the bottom section of the piano roll. This PR addresses that.
This refactors the export dialog to no longer use the export_project.ui file and moves it into standard C++ Qt code. This also brings minor changes to the dialog, such as horizontal labels instead of vertical ones.
* reimplement getter and setter of FloatModelEditorBase::m_volumeKnob to avoid undo checkpoint creation
* convert FloatModelEditorBase::m_volumeKnob from BoolModel to bool
* clean up
* remove unnecessary inline keywords and fix formatting
---------
Co-authored-by: Sotonye Atemie <sakertooth@gmail.com>
Fixes#8190
When #7454 was merged, I added a check before emitting playbackPositionJumped to only emit when the song was playing, to prevent LFOs from being reset when the user dragged the timeline while the song was paused. However, I used Song::isPlaying(), which only returns true when the song is not exporting. This caused sample clips to not be updated when the playback position jumped back every loop, which means they just kept playing, ignoring the loop. To fix this, I have changed it to use m_playing, which is true for both exporting and normal playing.
Removes `SampleLoader`. File dialog functions were moved into `FileDialog`. Creation functions were moved into `SampleBuffer`.
---------
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
This PR modifies how the Detuning tool works in the piano roll to let the user modify the automation curve right on the notes. This is actually fairly simple, as automation clips already contain the functions for dragging and removing points like in the Automation Editor. So essentially all that's being done is calculating the relative pos of the mouse to the nearest note, and setting the drag value in the automation clip to that position and key.
You can still access the old automation editor version by shift-click
messmerd asked if the code could be made general for any future note parameter besides detuning, in preparation for CLAP per-note parameter automation. I have refactored the relevant functions to accept an enum type for the kind of note parameter, although currently only detuning is supported.
---------
Co-authored-by: Sotonye Atemie <sakertooth@gmail.com>
Co-authored-by: Sotonye Atemie <satemiej@gmail.com>
Co-authored-by: szeli1 <143485814+szeli1@users.noreply.github.com>
Fixes#8182
When #7454 was merged, the frameOffset variable inside Song::PlayPos which kept track of the actual frame position which the song was playing at relative to the last tick, was moved to Timeline. In the process, the type was inadvertently changed from float to f_cnt_t.
This caused the frame offset to be truncated ever time it was updated in Song::processNextBuffer, causing the song playback to slowly drift back ever so slightly, just a handful of frames every bar. This caused any new sample clips spawned to be created slightly late, becoming out of sync with any existing playing samples.
This PR fixes the issue by reverting the frameOffset variable type to be float again, allowing it to track sub-sample offsets over time.
Fixes#8138
Essentially, when playing beat notes in the pattern editor, technically, they have an internal length of 0. However, when the NotePlayHandle is created and recieves that value of 0, it realizes it's supposed to be a beat note, so it asks the instrument track what the default length of note should be. For most instruments, that defaults to whatever the length of the envelope is (no matter whether the envelope is enabled or not. Is that a good system? I don't know.) However, AudioFileProcessor does it custom and returns the length of its sample in frames.
However, the frame count it returned did not take into account that the sample rate of lmms could be different from the sample rate of the sample. This PR fixes that issue by multiplying by the correct sample rate ratio.
Closes#7869
This PR aims to fix linking bugs and it aims to make linking code faster. In the future I would like to replace controller and automation code with linked models, so it is essential for this feature to work as efficiently as possible.
Before this PR:
- AutomatableModels store a list of AutomatableModels that they are linked to.
- setValue() and other functions make recursive calls to themself resulting in the #7869 crash.
- Each AutomatableModel can unlink from other AutomatableModels, unlinking is the inverse operation to linking.
After this PR:
- AutomatableModels store a pointer to an other AutomatableModel making a linked list. The end is connected to the first element resulting in a "ring".
- setValue() and others are now recursion free, the code runs for every linked model, more efficiently than before.
- Each AutomatableModel can NOT unlink form other AutomatableModels, unlinking is NOT the inverse operation to linking. AutomatableModels can unlink themself from the linked list, they can not unlink themself from single models.
---------
Co-authored-by: allejok96 <allejok96@gmail.com>
The TrackContentWidgets in the pattern editor rely on the positionChanged signal to be sent when the pattern index changes so that they know when to update. This signal was removed in #7454, but this PR puts it back.
Previously, this PR simply added a new signal to the Timeline class and had it emitted by the TimeLineWidget class in order to solve #7351.
However, as messmerd pointed out in his review comments, that was quite a hacky solution, and ideally the positionChanged signal would be solely managed by the backend Timeline class, while the frontend TimeLineWidget class would connect to those signals, instead of the other way around.
This PR is no longer a simple bugfix, but instead a refactoring of the Timeline/TimeLineWidget signal/slots.
Changes
- The positionChanged signal and updatePosition slot were removed from TimeLineWidget and moved to Timeline.
- Removed PlayPos, and instead store the timeline position in a TimePos along with a separate frame offset counter variable. The functions to set the ticks/timepos in Timeline emit the positionChanged signal. (Also, may emit positionJumped signal if the ticks were forcefully set--see below)
- The pos() method and PlayPos m_pos were removed from TimeLineWidget;
- The constructor for TimeLineWidget no longer requires a PlayPos reference.
- Since each TimeLineWidget stores a reference to its Timeline, a new method was added, timeline(), for other classes to access it.
- Removed array of PlayPos'es in Song. Now each Timeline holds their respective TimePos.
- Song's methods for getPlayPos were changed to return the TimePos of the respective Timeline. The non-const versions of the methods were removed because Timeline does not expose its TimePos to write.
- All of the places where Timelines are used were updated, along with their calls to access/modify the PlayPos. For example, occurrences of m_timeline->pos() were replaced with m_timeline->timeline()->pos(), and calls to m_timeline->pos().setTicks(ticks) were changed to m_timeline->timeline()->setTicks(ticks).
- ALSO: Removed m_elapsedMilliseconds, m_elapsedBars, and m_elapsedTicks from Song. The elapsed milliseconds is now handled individually by each Timeline.
- NEW: The m_jumped variable has been removed from Timeline. Now jumped events emit Timeline::positionJumped automatically whenever the ticks are forcefully set. This means it is no longer necessary to call timeline->setJumped(true) or timeline->setFrameOffset(0) whenever the playhead position is forcefully set. Many places in the codebase were already missing these calls, so this may fix some unknown bugs.
---------
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: Alex <allejok96@gmail.com>
* Fix Shift+Space corrupting playback state when used on stopped editors
Shift+Space (togglePause) was allowing state corruption by modifying
m_playing and m_paused without checking m_playMode. This created an
impossible state where m_playing=true while m_playMode=None, causing
the regular Space key to stop working.
Added a guard to ensure togglePause() only operates when something is
actually playing (m_playMode != PlayMode::None). This prevents the
corrupted state and maintains proper play/pause/stop behavior.
Fixes#8036
---------
Co-authored-by: regulus79 <117475203+regulus79@users.noreply.github.com>
Fixes#8152
Revert PianoRoll closing when empty (caused issues with detached windows)
Remove TextFloat warning when there are no instruments/multiple clips (showed up when reloading project)
(Keep clip creation for empty projects)
Add an icon and updated message in empty PianoRoll.
Mark PianoRollWindow invalid when there is no clip, making buttons impossible to click
---------
Co-authored-by: Fawn <rubiefawn@gmail.com>
Previously, loading a new sample in an AFP instance with reverse enabled would desync the button from the model, such that the button would indicate the sample was reversed despite the new sample not actually being reversed.
This commit fixes this behavior so that samples loaded into an AFP instance with reverse enabled are actually reversed.
This fixes a regression in commit f44aa3e that caused OGG exports to not flush any remaining data properly when finalizing the export, leading to truncated outputs with a different duration.
---------
Co-authored-by: Sotonye Atemie <sakertooth@gmail.com>
Clang was incorrectly displayed as 'GCC Clang' because __GNUC__ is
defined by Clang for compatibility. Reordered preprocessor checks in
versioninfo.h to test for __clang__ before __GNUC__.
Fixes#8120
This bug was noticed when testing out #7559, but the PR had been open for over a year, so it was decided to merge it and fix it in this one.
Basically, when adding or removing a track, the TrackContainer sends out signals such as trackAdded or trackRemoved which PatternClipView uses to know when to update.
However, it does not send out a signal when a track has been moved.
This is because for some reason, it's done by the GUI TrackContainerView instead of the core TrackContainer.
This PR changes that by moving the core code to the core where it probably belongs, adding an appropriate trackMoved signal to TrackContainer, and connecting that to PatternClipView to update properly.
---------
Co-authored-by: Fawn <rubiefawn@gmail.com>
This PR changes the way PatternClips are drawn in include a simple "beat preivew," where each note in any non-empty instrument tracks within the pattern are drawn as short little rectangles on the ClipView. SampleClips and AutomationClips within patterns are not currently supported.
The height of the note boxes changes depending on how many tracks there are in the pattern, and how many of them actually have notes (empty tracks are only drawn half as tall).
There is also some padding at the top and bottom along with a little bit of spacing between each note, both vertically and horizontally. This can be edited in the css, along with the note color.
---------
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
Co-authored-by: Fawn <rubiefawn@gmail.com>
Previously, the autoscroll state of the song editor and piano roll (continuous, stepped, none) was not saved. This can be an issue for users who want to permanently set their autoscroll settings, without having to change them every time they start up LMMS.
This PR adds an option in the settings window to change the default autoscroll state.
Correct the button initialization order so mixer channels show the proper mute and solo states when they first appear. This applies to channels loaded from a project and channels created during the session, ensuring the UI reflects the actual underlying state properly.
* Centralize standard LMMS plugin logo
Previously, every single plugin would have its own copy of this image.
Now, these plugins pull it from the theme. I'm not sure it's valuable
for this to be themeable, but AFAIK it's the place all the other
non-plugin resources are stored, so that's where it goes for now.
Fixes an issue where quantizing notes in a midi clip with auto-resize disabled would cause the length to be reset, in cases where there is only a single note in the clip. This was due to how quantization removes and re-adds each note, so for a moment, the clip would be empty, thus treated as a beat clip. Beat clips were mistakenly always automatically resized no matter whether auto-resize was enabled or not. This PR fixes that by only auto-resizing beat clips when they have auto-resize enabled.
Co-authored-by: Fawn <rubiefawn@gmail.com>
---------
Co-authored-by: Fawn <rubiefawn@gmail.com>
* SVG-ify arrow buttons
These buttons are used in the instrument window, Vestige, and VST
effects. Separate versions of the arrow icons are used for the classic
theme.
* Fix some unrelated SVG formatting and metadata
* Revert accidental change to classic border radius
* Add some XML stuff back to appease Github
LMMS renders these SVGs just fine, but apparently the removal of the
XML declaration completely breaks Github's ability to render the image,
so I am adding these back for the sake of those who want to actually
look at the diff on the website lmao
* Attempt to fix Github SVG previews again (`xmlns`)
* Fix crossover eq band mute button icon size
You may ask, "what does this have to do with the arrow buttons?" and you
would be right to assume this is unrelated. However, I'm already
touching the relevant lines of the stylesheet so I may as well sneak it
in there.
* Add missing metadata to fader_knob.svg
And fix mixed indentation in headphones.svg
* Add missing `xmlns` to fader_knob.svg
GRADIENTS!!!!!!!!!!!!
* Fix classic theme arrow buttons
The originals were right angle chevrons
* Remove unused getters
The culprit was the little text warning under the instrument tuning view informing the user that MIDI-based instruments do not support the microtuner. The entire instrument window was expanding horizontally to accommodate this. This commit solves this by setting the width of the other tabs to be no wider than the instrument they belong to.
- Display a message when a user attempts to open the piano roll in a project with no MIDI clips instead of opening a non-functional piano roll.
- Create a MIDI clip in the first instrument track when the piano roll is opened in an empty project.
* Rebase against master
Co-authored-by: michaelgregorius <michael.gregorius.git@arcor.de>
Co-authored-by: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com>
* Fix Qt6 DMG on Apple (#7240)
- Fix linking issues with Qt Framework files
- Fix qmake detection
* Fixes after rebase
* Fix embed.cpp compilation
Fix implicit conversion from int when using QString.arg(...)
* Fix Qt6 signature change for nativeEventFilter (#7254)
* Adds win32EventFilter a wrapper for nativeEventFilter on Windows
* win32EventFilter is currently used to intercept top-level Window events (currently, to avoid VSTs setting transparency of the parent application)
* fix broken signal slot connections (#7274)
QComboBox activated() replaced with textActivated() since Qt 5.14
* Enabled VSTs on Qt 6 (#7273)
* enabled VST support for Qt 6 builds
* Note : Embedding on QT6 will be buggy on linux as a result of using qt embedding, which unfortunately is a qt bug which hasn't been resolved.
* 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
* Fix compilation
* Fix MSVC builds
* fix nullptr deref in AudioFileProcessor (qt6 branch) (#7532)
* ensured mouse event != nullptr before deref
* separation of concerns: AFP WaveView updateCursor
extract check to pointerCloseToStartEndOrLoop()
* marked some function parameters as const
* Remove Core5Compat usage
* Fix bad merge
* Fixes after rebase
* Simplify QTX_WRAP_CPP call
* Remove comments that are obvious to a developer
* Whitespace
* Try using Qt 6 for MSVC CI
I chose Qt 6.5 because it's the last Qt LTS release with declared
support for Visual Studio 2019. Once we upgrade to Visual Studio 2022,
we could upgrade Qt as well.
* Fix MSVC build
Also fixes two memory leaks in MidiWinMM
* Fix GuiApplication on MSVC
* Fix interpolateInRgb
* Try building with patched Calf
* Fix submodule
* Fix OpulenZ build
* Try to fix zyn
* Fix comment
* Ty to fix zyn (again)
* Ty to fix RemotePluginBase
* Revert "Ty to fix RemotePluginBase"
This reverts commit 92dac44ffb11e19d1d5a21d9155369f017bd59e9.
* Update plugins/ZynAddSubFx/CMakeLists.txt
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
* Fix vertical & horizontal scroll wheel in SongEditor
* AppImage: Fix finding of Qt6 libs
* Fix implicit QString --> QFileInfo conversion
* Point submodule to lmms
* Fix multiple deprecation warnings
* Fix for Clang compiler
* Build with latest Qt LTS version now that we use MSVC 2022
* Update jurplel/install-qt-action to v4.3.0
* Bump minimum Qt6 version for MSVC
* Fix incorrect Qt version checks
Some comparisons were using ">" rather than ">="
* `QSize()` != `QSize(0, 0)`
* Fix more deprecation warnings
* Fix style
* Simplify Spectrum Analyzer mouse events
The Qt bug that used to be present appears to have been fixed, so the
workaround can be removed
* Minor changes
* Fix deprecated QCheckBox signal
* Fix setContent helper functions
* Remove QMultiMap usage from ControlLayout
* Remove SIGNAL and SLOT macros
* Revert TrackView.cpp changes
* Remove Q_DISABLE_MOVE usage since it does not seem to be available in Qt6
---------
Co-authored-by: michaelgregorius <michael.gregorius.git@arcor.de>
Co-authored-by: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com>
Co-authored-by: BoredGuy1 <66702733+BoredGuy1@users.noreply.github.com>
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Lisa Magdalena Riedler <git@riedler.wien>
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
PathUtil: Serialization and Formatting
* Serialize all operations to use / instead of platform specific paths.
* Formatting changes for consistency.
* Reorder functions, add serialization enforcement to the other two functions.