Currently, auto-resize is always disabled on mouse move event while the "move" action type is active.
Consequently, it is easy to accidentally disable auto-resize by mistake by simply clicking too close to the clip's edges.
The proposed changes are straightforward: add checks to ensure that an actual resize is taking place before disabling auto-resize.
Perform float->int conversion using std::round() in castValue<int>() calls, and fix castValue<bool> template specialization previously ignored by C++ compiler.
The Tempo imported from sample MIDI file is read as 39.999 as float, which was reported as 39 BPM in user interface before the patch.
- Only install the necessary Qt6 components on macOS (reduces macOS job times by a couple minutes)
- Update all actions to their latest version (resolves some Node 20 deprecation warnings)
- Fix ccache usage on Linux and MinGW (was using wrong cache path due to a typo in the documentation)
- Bump the number of CPU cores used for builds
- Map each instrument track to a different incremental MIDI channel (except for channel 10 which is reserved for drums)
- Support Sf2 Player and Gig Player patches
- Major refactoring
- Allow instruments to provide their MIDI bank/program
- Add std::filesystem::path/string conversion utilities + unit tests
- Remove Qt usage from MidiExport
- Support bank select events in MidiExport and MidiImport
- Rework endian_handling.h, adding polyfill for std::byteswap
- Remove extraneous patch automation tracks
- Fix initial playback after MIDI import
---------
Co-authored-by: Gustavo Chicato <gustavo.chicato@usp.br>
Fixes non-ASCII soundfont file paths on Windows caused by FluidSynth switching to UTF-8 file paths in version 2.2.0 without us adjusting our usage of their API.
Also bumps the minimum supported FluidSynth version from 1.1.7 (which released in September 2017) to 2.2.0 (which released in March 2021). This allows us to remove a lot of conditionally compiled code that we no longer use in any of our builds.
Fixes#8504
- Updates Doxyfile for Doxygen 1.18.0 and minifies Doxyfile
- Use PROJECT_LOGO & PROJECT_ICON in Doxyfile
- Add custom Doxygen CSS
- Move documentation comments in first-party code from source files to
their corresponding headers, where applicable
- Resolves nearly all Doxygen warnings in first-party code
- Remove unused INPUTDIRS from doc/CMakeLists.txt
- Use CMake's DOXYGEN_ADD_DOCS() instead of a custom doc target
- Bump portsmf submodule to get upstream Doxygen fixes
- Only autorun Doxygen CI for master branch
- Skip Doxygen CI if Github Pages aren't enabled
ALSA or JACK should be preferred on Linux systems. OpenBSD ports maintainers have deliberately disabled it for years in favor of the native sndio backend. FreeBSD has access to sndio, ALSA, PortAudio, etc. which are better supported. All other platforms don't support it.
Removes layout constraints when child is hidden, reapplies when child is shown.
This reverts commit 9f714038a8.
Outside of not even compiling, this was speculative to begin with and
AFAIK doesn't actually address the issue if done right. Also needs
more checking in order to properly work with maximized subwindows.
Remove the call to `Clip::changeLength` from
`TrackContentWidget::changePosition` as it results in bad performance,
especially when the Song Editor is in auto-scroll mode and the position
is changed very often.
The call in question has set the clip to the length that it already has
which in turn resulted in lots of needless calls to `Song::updateLength`.
It also should not be necessary to update a clip length if all that we
do is change the position of the `TrackContentWidget`.
Remove code that sets clip positions to a negative value when outside the
viewport. This fixes a visual bug on both native Wayland and XWayland
where resizing the song editor window to increase the window width
causes any clips that come into the viewport to be temporarily invisible.
Also fix the connection between `TrackContainerView` and `TrackContentWidget`,
remove a duplicate connection, and fix the corresponding `disconnect()` call.
---------
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
- sys/types.h: LMMS_HAVE_SYS_TYPES_H is never referenced
- sys/time.h: LMMS_HAVE_SYS_TIME_H is never referenced
- locale.h: This header is a mandatory part of the C standard library
This PR aims to address #7766 by making it possible to ctrl-drag on the TrackGrip (the patterned part on the very left edge of a track), to copy them, rather than having to carefully aim your mouse around the large settings/mute/solo buttons to copy a track.
Fixes a crash when opening the Automation Editor with invalid ghost notes (or more specifically, when the editor draws the ghost notes). Setting ghost notes in the Automation Editor with a MIDI clip (but not a sample clip) sets a pointer to it, but deleting the clip or loading a new project makes the pointer invalid without setting to a null pointer.
When #7854 was merged, the line for setting the default zoom of the piano roll was copy-pasted to also set the default vertical zoom and quantization. That way if no previous default had been saved, it would default to 100% horizontal zoom, 100% vertical zoom, and 1/16 quantization (which was the default behavior before the PR).
Unfortunately, the variable in expression it used to find the correct index of "100%" or "1/16" in the list was not correctly updated after copy-pasting, which caused the wrong defaults to be set. For example, in the vertical zoom dropdown, "100%" is index 2, but in the horizontal zoom, it's index 3. This caused the default vertical zoom to be 150%, not 100%. Likewise, since the horizontal zoom list doesn't contain "1/16", the quantization defaulted to index 0, which was "Note Lock".
This PR fixes those issues by correcting the variables names in those two lines.
Bumps the minimum x86_64 microarchitecture level for nightly builds from x86_64-v1 (which includes up to SSE2) to x86_64-v2 (which includes up to SSE4.2) and similarly bumps the arm64 microarchitecture target for nightly builds depending on the OS. This is done using new CMake options that control the target microarchitecture level. Also fixes the symbol visibility when compiling with GCC or Clang.
Both of these changes have the potential for performance improvements, and will also let us write conditionally-enabled SIMD code targeting newer microarchitectures with better capabilities than the compiler baseline of SSE2/NEON.
Changes:
- Adds `TARGET_UARCH` and `TARGET_UARCH_FLAGS` CMake options for setting the target CPU microarchitecture
- Allows LMMS builds to target newer CPUs, letting the compiler make use of instruction set extensions like SSE4.2 or POPCNT
- The options for `TARGET_UARCH` are: "none", "official", "custom", and "native"
- These options mean:
- "none": No microarchitecture level is set. Uses the compiler default (i.e. x86_64-v1).
- "official": Targets the baseline microarchitecture level of official LMMS releases (On x86_64, this is x86_64-v2, which was agreed upon as a new baseline on Discord. The arm64 baseline differs depending on the target OS).
- "custom": Targets the microarchitecture specified by `TARGET_UARCH_FLAGS`.
- "native": Targets the highest microarchitecture level supported by the build machine.
- If no option is provided, it defaults to "native" so local builds are highly optimized by default
- All automated builds explicitly use "official"
- Choosing "none" has the same effect as prior to this PR
- Added a CMake function called `determine_msvc_native_arch` which provides a workaround for the lack of a `/arch:native` flag in MSVC. This function has been tested on x86_64, but not on arm64 since we don't support MSVC on arm64 yet.
- Changes symbol visibility when using GCC/Clang from default (where all symbols are exported from shared library or executable) to hidden (where only symbols marked with LMMS_EXPORT are exported)
- Matches the behavior on Windows
- According to GCC's documentation, doing this "very substantially improves load times of your DSO (Dynamic Shared Object)", "lets the optimiser produce better code", and "reduces the size of your DSO by 5-20%". In actuality, our AppImage size shrunk from 155 MB to 154.3 MB, so the size improvements are not very significant, though there may still be performance benefits.
After #7946 was merged, when starting up LMMS compiled with -DWANT_DEBUG_FPE=ON, it crashes because it divides by zero. This PR adds a check to prevent that.
Disables the 'Paste' option in the context menu in the Song Editor and
Pattern Editor when there is no suitable clipboard content to paste.
This was originally intended to fix an issue where clips couldn't be
pasted between tracks in the Pattern Editor, but that seems to have
resolved itself.
Previously, the sensitivity of the tangent editing in the automation editor was hardcoded so that it would change the internal value by the number of pixels the mouse moved up (with a bit of scaling based on the x position too). This is not correct, since it does not respect the zoom of the editor or the min/max values relative to the window size.
This PR adds the correct scaling constant to the tanget value to convert pixels to levels. The automation editor already had the right constant as a member variable, m_y_delta, but it would only update when using the hardcoded zoom levels, so I reworked it to also work for auto zoom.
---------
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
Co-authored-by: Fawn <rubiefawn@gmail.com>
- Resolves#8406 by fixing a sndio backend regression introduced in #7568
- Sets `Qt[5-6]_DIR` and `Qt[5-6]Test_DIR` automatically for OpenBSD, similar to how this is handled for macOS
- Add `$LOCALBASE` and `$X11BASE` to include and link paths when compiling for OpenBSD
- Explicitly disable several features by default when compiling for OpenBSD, as is done in the ports tree