Commit Graph

2239 Commits

Author SHA1 Message Date
saker
2f7a6558a1 clang-tidy: Apply modernize-loop-convert everywhere (#6481)
Co-authored-by: allejok96 <allejok96@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2022-09-27 09:27:35 +01:00
Johannes Lorenz
3cc5ec7282 Add check-namespace script (#6438)
This also fixes a lot of code files to be conforming to the script.

Co-authored-by: allejok96 <allejok96@gmail.com>
2022-08-30 02:19:07 +02:00
Craig Raslawski
17f597695b Fix wrong cursor for selected resizeable clips in song editor (#5996)
Fixes #879.
2022-08-28 12:09:52 +09:00
saker
b451e40b51 clang-tidy: Apply modernize-use-using everywhere (#6453) 2022-07-07 10:54:34 +02:00
Dominic Clark
6c3e148fbb Make VST sync always-on and non-global (#6418) 2022-07-04 17:03:17 +01:00
Alex
9705c31773 Transpose midi clips in song editor (#6409)
* Transpose midi clips in song editor

* Fix undo stupidity

* Check boundries when transposing clips

and move transpose function to NoteVector

* Avoid update if nothing has changed

* Make getNoteBounds a separate function

* Rename getNoteBounds to boundsForNotes

* bool operator instead of optional + qobject_cast

* Revert "bool operator instead of optional + qobject_cast"

This reverts commit 98c56a96cf.

* qobject_cast and nullopt
2022-07-04 10:16:22 +09:00
Levin Oehlmann
c075ba93fb clang-tidy: Run modernize-use-emplace everywhere (#6451)
... to avoid constructing and copying temp objects
2022-06-26 08:54:59 +02:00
Levin Oehlmann
28ec71f91a clang-tidy: Apply modernize-use-equals-default everywhere (#6450) 2022-06-26 08:48:24 +02:00
Levin Oehlmann
e72d9d46b8 Add missing gui:: prefixes to types in AudioSoundIo (#6447)
Fixup of #6174 .
2022-06-25 00:53:01 +02:00
Levin Oehlmann
773310384b clang-tidy: Apply modernize-redundant-void-arg everywhere (#6446) 2022-06-23 21:27:23 +02:00
sakertooth
420769a32d Fix Qt Deprecations (#6386)
Co-authored-by: Kevin Zander <veratil@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2022-06-23 20:28:04 +02:00
Dominic Clark
96df9b006c Clean up macros a bit (#6444)
* Prefix `STRINGIFY` and `STR` macros with `LMMS_`

* Fix include guard macro names

* Remove unused macros
2022-06-23 12:20:05 +01:00
Levin Oehlmann
5904b249c0 clang-tidy: Apply modernize-use-override everywhere (#6439)
... to mark overriding functions `override` instead of `virtual`.
2022-06-19 23:03:55 +02:00
Levin Oehlmann
7227c89847 Namespace lmms (#6174)
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.

Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .

Co-authored-by: allejok96 <allejok96@gmail.com>
2022-06-19 20:08:46 +02:00
Shmuel H
371f7f506d AudioEngine: Introduce RequestChangesGuard: a RAII verion of
requestChangeInModel.

Deprecate direct calls to requestChangeInModel.
2022-06-18 15:41:47 +09:00
Dominic Clark
2c8ffd0f16 Refactor shared memory (#6404) 2022-05-28 13:10:45 +01:00
Dominic Clark
0dcf909129 Kill orphaned subprocesses on crash (#6366)
Co-authored-by: Lukas W <lukaswhl@gmail.com>
2022-04-20 17:15:33 +01:00
Spekular
b4317edd43 Make loop markers snap to same increments as clips (#6313)
* Make loop markers snap to same increments as clips

* Fix snap size when loop points meet

* Switch to signal-slot based communication for proportional snap changes

* Move end if user clicks at exact center of loop

* Changes from reviews

* More detailed comment

* Properly handle zero length loop when ctrl is held

* More compact selection of action, m_loopPos ordering

* More robust sort
2022-04-18 17:25:15 +02:00
Alex
33b44ec9c7 Disable tooltips through event filter (#6192)
* Control tooltip visibility using an event filter

...removing the need for a ToolTip helper class

* Remove whitespace
2022-04-15 14:04:52 +02:00
Johannes Lorenz
f6bad88ad3 Fix casing of filenames and code in plugins/ (#6350)
No functional changes! No changes to savefiles/presets!

Fixes casing of everything that is currently lowercase but should
be uppercase.

Fixes also some other plugin strings, especially:

* opl2 -> OpulenZ (see 289887f4fc)
* calf -> veal (see ae291e0709)
* ladspa_effect -> LadspaEffect (see 9c9372f0c8)
* remove flp_import (see 2d1813fb64)
2022-04-03 13:26:12 +02:00
Johannes Lorenz
54bee2272e Rename LedCheckbox to LedCheckBox in filenames
Justification: The class is named `LedCheckBox`, and other files follow
the casing of the classes, too.
2022-03-26 11:37:25 +01:00
Dominic Clark
4dc04a612a Split RemotePlugin.h into separate files (#6322) 2022-03-22 21:40:16 +00:00
Hyunjin Song
80a6672da4 Fix build due to missing includes
Fixes build errors introduced in
7db3fa94a1
2022-03-09 11:53:17 +09:00
akimaze
a08e7f9029 Native linux VST support (#6048)
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2022-03-02 18:47:54 +00:00
Johannes Lorenz
7db3fa94a1 Improve includes (#6320)
* Update ringbuffer submodule to fix includes

* Remove cyclic includes

* Remove Qt include prefixes

* Include C++ versions of C headers

E.g.: assert.h -> cassert

* Move CLIP_BORDER_WIDTH into ClipView

This allows to remove includes to TrackView.h in ClipView cpp files.

* Elliminate useless includes

This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):

```
include-what-you-use;
    -Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
    -Xiwyu;--keep=*/xmmintrin.h;
    -Xiwyu;--keep=*/lmmsconfig.h;
    -Xiwyu;--keep=*/weak_libjack.h;
    -Xiwyu;--keep=*/sys/*;
    -Xiwyu;--keep=*/debug.h;
    -Xiwyu;--keep=*/SDL/*;
    -Xiwyu;--keep=*/alsa/*;
    -Xiwyu;--keep=*/FL/x.h;
    -Xiwyu;--keep=*/MidiApple.h;
    -Xiwyu;--keep=*/MidiWinMM.h;
    -Xiwyu;--keep=*/AudioSoundIo.h
```

* Fixup: Remove empty #if-#ifdef pairs

* Remove LMMS_HAVE_STD(LIB|INT)_H
2022-03-02 13:30:43 +01:00
Alex
f56fc68b66 Rename TCO and BB to clip and pattern in save files (#6309)
... and clarify how PatternTrack cloning works

- pattern -> midiclip
- automationpattern -> automationclip
- *tco -> *clip
- bb* -> pattern*
- bbtrackcontainer -> patternstore
2022-02-14 21:12:11 +01:00
Alex
dc73911391 Rename Beat/Bassline to Pattern (#6284)
- BB* -> Pattern*
- BBTrackContainer -> PatternStore
- BBTrackContainerView -> PatternEditor
- BBEditor -> PatternEditorWindow

Does not touch save files
2022-02-13 09:03:37 +01:00
Alex
40f4d51078 Do not constantly repaint all clips during selection in song editor (#6303) 2022-02-11 00:27:28 +01:00
Alexandre Almeida
7fe2152938 Fix broken data file upgrade (#6279)
Fixes issues introduced in previous commit (55d361fb65),
which affected loading, saving and drag-dropping of clips.
2022-01-15 22:19:34 +01:00
Alexandre Almeida
55d361fb65 Rename TCO and related to Clip (#6226)
This PR renames

    TCO -> Clip
    Pattern -> MidiClip
    *TCO and *TCOView -> *Clip and *ClipView

The savefiles are not yet modified by this PR.
2022-01-14 05:45:21 +01:00
Yashraj Shinde
bf323d2024 Rename FxMixer to Mixer (#6239)
... as decided in #6089 and #5592.

This PR replaces every occurrence of "FX" where "Mixer Channel" is meant.
2022-01-09 08:15:23 +01:00
Lior Merkel
98786dd84f Make preset saving oblivious to mute/solo/muteBeforeSolo states (#6214) 2021-12-27 11:23:19 +09:00
Raine M. Ekman
6a716fa5fd Extend denormal protection through DAZ flag to all capable CPUs (#6167) 2021-11-25 14:44:42 +09:00
Alexandre Almeida
eee1a81ff3 Rename "mixer" to "audioengine" on lmmsrc.xml (#6181) 2021-11-20 21:43:32 +01:00
Alexandre Almeida
47cddcba75 Split InstrumentTrack (#6176)
Split InstrumentTrackView and InstrumentTrackWindow off of InstrumentTrack
2021-10-02 05:40:01 +02:00
Johannes Lorenz
745dec673d Add missing cstddef include 2021-10-01 22:55:58 +02:00
Levin Oehlmann
f742710758 Macro cleanup (#6095)
Summary:

* `NULL` -> `nullptr`
* `gui` -> Function `getGUI()`
* `pluginFactory` -> Function `getPluginFactory()`
* `assert` (redefinition) -> using `NDEBUG` instead, which standard `assert` respects.
* `powf` (C stdlib symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `exp10` (nonstandard function symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `PATH_DEV_DSP` -> File-scope QString of identical name and value.
* `VST_SNC_SHM_KEY_FILE` -> constexpr char* with identical name and value.
* `MM_ALLOC` and `MM_FREE` -> Functions with identical name and implementation.
* `INVAL`, `OUTVAL`, etc. for automation nodes -> Functions with identical names and implementations.
* BandLimitedWave.h: All integer constant macros replaced with constexpr ints of same name and value.
* `FAST_RAND_MAX` -> constexpr int of same name and value.
* `QSTR_TO_STDSTR` -> Function with identical name and equivalent implementation.
* `CCONST` -> constexpr function template with identical name and implementation.
* `F_OPEN_UTF8` -> Function with identical name and equivalent implementation.
* `LADSPA_PATH_SEPARATOR` -> constexpr char with identical name and value.
* `UI_CTRL_KEY` -> constexpr char* with identical name and value.
* `ALIGN_SIZE` -> Renamed to `LMMS_ALIGN_SIZE` and converted from a macro to a constexpr size_t.
* `JACK_MIDI_BUFFER_MAX` -> constexpr size_t with identical name and value.
* versioninfo.h: `PLATFORM`, `MACHINE` and `COMPILER_VERSION` -> prefixed with `LMMS_BUILDCONF_` and converted from macros to constexpr char* literals.
* Header guard _OSCILLOSCOPE -> renamed to OSCILLOSCOPE_H
* Header guard _TIME_DISPLAY_WIDGET -> renamed to TIME_DISPLAY_WIDGET_H
* C-style typecasts in DrumSynth.cpp have been replaced with `static_cast`.
* constexpr numerical constants are initialized with assignment notation instead of curly brace intializers.
* In portsmf, `Alg_seq::operator[]` will throw an exception instead of returning null if the operator index is out of range.

Additionally, in many places, global constants that were declared as `const T foo = bar;` were changed from const to constexpr, leaving them const and making them potentially evaluable at compile time.

Some macros that only appeared in single source files and were unused in those files have been removed entirely.
2021-09-30 18:01:27 +02:00
Alex
96369405b4 Color submenu, undoable colors, renaming signals (#6165)
* TCO coloring: submenu, randomize, undoable, renaming signals/slots

* Track coloring: submenu, undoable, renaming signals/slots

* FX color submenu

* Set modified on color change

* Use lambda to update TCOView after track color change

* More renaming, fix memory leak

Co-authored by DomClark
2021-09-24 21:53:25 +02:00
Tres Finocchiaro
131b273894 Fix compilation on macOS aarch64 (#6152)
* Fix compilation on macOS aarch64
- Bumps rpmalloc submodule to fix assembly compilation, fix `rpmalloc_thread_finalize()` API change
- Adds aarch64 "/opt" Homebrew prefix (reuse `APPLE_PREFIX`)
* Add detection for non-Intel architectures
2021-09-22 09:28:16 -04:00
Johannes Lorenz
8a9a2fae62 Compile LMMS using C++17
This replaces `set(CMAKE_CXX_STANDARD 14)` by `set(CMAKE_CXX_STANDARD 17)`
wherever it is required.

Additionally:

* raise `CMAKE_MINIMUM_REQUIRED(VERSION ...)` to `3.8` (the minimum
  that supports C++17)
* `stdshims.h` is now unused and thus removed
2021-09-17 18:23:01 +02:00
Hussam al-Homsi
e3044575bc Default to FLAC compression level 5 (#6052) 2021-09-15 17:50:49 +01:00
Alexandre Almeida
770d2498b5 Rename Mixer to AudioEngine (#6127) 2021-09-12 01:00:21 +02:00
Martin Pavelek
e07861ced3 Support for alternative tunings and keyboard mappings (#5522)
Co-authored-by: Kevin Zander <veratil@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
Co-authored-by: Martin <martin@sigma.he29.net>
2021-09-09 18:49:24 +01:00
Levin Oehlmann
0abbd6cb79 Remove 'using namespace std;' from some headers (#6076) 2021-07-23 19:16:51 +02:00
Martin Pavelek
6f8c6dba82 Alias-free oscillators (#5826)
Add a band-limited, alias-free wavetable oscillator option to the
`Oscillator` class. Use it by default for Triple Oscillator.

Savefiles which do not have this feature enabled (e.g. old
savefiles) will be loaded without this feature to keep the sound
consistent.

Original author: @curlymorphic.
Fixed: @he29-net.
2021-07-04 13:14:59 +02:00
Spekular
c71e408a82 Preserve FX channel when replacing track (#5957)
* Preserve FX channel when replacing track

* Add comment
2021-06-21 23:19:06 +02:00
Hyunjin Song
5b2570def5 Revert "Fix validPattern to check if hasAutomation as well (#5124)" (#6041)
This reverts commit e37f3793f3.
2021-06-06 11:27:58 +09:00
David CARLIER
e9f264e37f Gui editors: Use float for zoom precision (#6008)
This fixes build errors with casts.
2021-05-15 17:17:40 +02:00
Spekular
ca059446c3 Don't draw BB editor inside Song Editor (#5988)
* Don't draw BB editor inside Song Editor

Currently, a small BB editor is drawn inside the Song Editor at high zoom levels. As discussed in #3060 this is unintuitive and appears broken (I've seen several other reports of this as a bug). This PR removes this behavior.

* Make removal optional
2021-04-23 18:31:03 +02:00
Martin Pavelek
f288137c22 MIDI range MKII (extracted from microtonal PR) (#5868)
* Update MIDI range to match MIDI specification

Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
Co-authored-by: Kevin Zander <veratil@gmail.com>
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Spekular <Spekular@users.noreply.github.com>
2021-04-21 00:29:47 -05:00