Commit Graph

2196 Commits

Author SHA1 Message Date
Martin Pavelek
13e55101f0 Improve spectrum analyzer performance by caching most used computations (#6003) 2022-01-06 12:09:46 +09:00
SeleDreams
7f666e8071 Fixed issue of build when fpermissive isn't enabled due to an issue of higher pointer size 2021-12-27 10:56:59 -06:00
Ray Redondo
7e2ccc13d6 Run dos2unix (#6198) 2021-12-14 23:13:13 +01:00
JGHFunRun
99d887610d Fix a bug where the BPM is modulo'd by 256 on MIDI export (#6215)
Also fixes code formatting of the relevant function.
2021-11-09 14:53:31 +09:00
Alexandre Almeida
47cddcba75 Split InstrumentTrack (#6176)
Split InstrumentTrackView and InstrumentTrackWindow off of InstrumentTrack
2021-10-02 05:40:01 +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
32b454fbec Speed up SF2 loading (#6075)
* Speed up sf2 loading by removing redundant code

* Comment

* Skip pointless call to loadFile

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>

* Rename updateSampleRate to reloadSynth

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2021-09-25 12:18:29 +02:00
Johannes Lorenz
e0298891e4 clang-format: Prepare plugin descriptor init'ers 2021-09-22 22:46:12 +02: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
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
Dominic Clark
ace502f1a5 Eliminate deprecated register keyword (#6133) 2021-08-18 14:42:30 +01:00
Levin Oehlmann
da54109995 Update exprtk submodule to 93a9f44 2021-08-15 15:03:23 +02: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
cyber-bridge
f8d7fa3b87 Expose Carla parameters for automation (#5846)
A new button called "Params" is added to the Carla instrument window; on press
it will open a new sub-window where Carla parameters can be found, ready for
connecting to a automation-track or controller. The exposed parameters in the
sub-window can be filtered by text and there is the ability to display only
parameters that are connected to a automation-track or controller. When there
are multiple plugins loaded inside Carla, the combo-box inside the (LMMS)
parameters sub-window can be used to switch between parameters of a specific
plugin (Carla).

Notes:

 - Available when compiled with Carla version 2.1 and up.
 - Currently Carla (2.1) will expose a maximum of 110 parameters.
 - The param window state isn't stored yet in a LMMS project, this is still
   TODO.
 - Connected paramters will NOT instantly disappear when they are disconnected
   with the "Show only knobs with a connection" filter enabled. See
   https://github.com/LMMS/lmms/pull/5846#issuecomment-762666428
2021-06-30 19:59:54 +02:00
Tres Finocchiaro
fd36713314 Bump swh submodule (#6040)
Closes #5909
2021-06-04 10:35:20 -04:00
Lost Robot
89f0a98e3d Fix interaction between compressor input gain and audition (#5999) 2021-04-27 20:41:23 -06: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
Johannes Lorenz
2f17c0da2b Fix/improve includes/fwd decls
Preparation for clang-format. It will shuffle the includes, and this
preparation will prevent errors from that step.
2021-04-04 08:36:00 +02:00
Lost Robot
7ac627da65 Fix Qt deprecated mousewheel delta() functions (#5974)
* Replace deprecated mousewheel delta() function
2021-04-03 14:10:02 -06:00
Lost Robot
3dcae02d86 Upgrade the Flanger effect (#5873)
Updates QuadratureLfo and moves to include/

Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dave French <dave.french3@googlemail.com>
2021-03-25 09:34:43 +09:00
Lost Robot
459948f8cd Add Compressor effect to LMMS (#5458)
* Add Compressor effect
2021-03-10 23:17:32 -07:00
Thomas Mueller
4107bc02b9 Double check for correct normalization 2021-01-23 14:03:37 +01:00
Oskar Wallgren
04d696a1e9 Fix possible noise when normalizing bitinvader 2021-01-23 14:03:25 +01:00
Deena
24761a4f77 Fix the unit of Bitcrush Output clip level from % to dBFS 2021-01-02 11:53:44 +09:00
Kevin Zander
118d63bada Change abs to std::abs (#5831)
This prevents GCC 6 from raising an ambiguous call error.
2020-12-07 22:42:05 +01:00
Alexandre Almeida
b701e82e3b Split Track.cpp and Track.h (#5806) (Fixes #5592) 2020-12-04 02:47:16 +01:00
Alexandre Almeida
6e081265ba Rename MidiTime to TimePos (#5684)
Fixes #4866
2020-11-29 19:46:13 +01:00
Oskar Wallgren
ee7175be75 Bitinvader - Fix saving with automation and division by 0 (#5805)
* Prevent division by 0 in bitInvader::normalize().
* Save and load whole wavetable on save/load and also clear wavetable
before loading a new one.

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
Co-authored-by: Spekular <Spekularr@gmail.com>
Co-authored-by: thmueller64 <64359888+thmueller64@users.noreply.github.com>
2020-11-27 16:42:23 +01:00
dj-pixus
f26296037a Fixed Stereo Matrix icon (#5792) 2020-11-18 21:28:13 +01:00
IanCaio
e2bb606341 Fixes createTCO method on some classes (#5699)
* Fixes createTCO method on some classes

	Classes that inherit from "Track", also inherit the createTCO method. That method takes a MidiTime position as an argument, but except on the class SampleTrack that argument was ignored. That lead to unnecessary calls to TCO->movePosition after creating a TCO in many parts of the codebase (making the argument completely redundant) and even to a bug on the BBEditor, caused by a call to createTCO that expected the position to be set on the constructor (see issue #5673).

	That PR adds code to move the TCO to the appropriate position inside the constructor of the classes that didn't have it, fixes the code style on the SampleTrack createTCO method and removes the now unneeded calls to movePosition from source files on src/ and plugins/. On Track::loadSettings there was a call to saveJournallingState(false) followed immediately by restoreJournallingState() which was deleted because it's redundant (probably a left over from copying the code from pasteSelection?).

* Fix code style issues

	Fixes code style issues on some files (except for ones where the current statements already had a different code style. In those the used code style was kept for consistency).

* Fixes more code style issues

* Fixes code style issues on the parameter name

	Fixes code style issue on the parameter name of createTCO, where _pos was supposed to be just pos. The existing code had the old style and I ended up replicating it on the other methods.

* Code style fixes

	Fixes code style in the changed lines.

* Fixes bug with dragging to negative positions

	There was a bug (already present before this PR) where dragging
a selection before MidiTime 0 would result in some TCOs being placed on
negative positions. This PR fixes this bug by applying the following
changes:

	1) TrackContentObject::movePosition now moves the TCO to
positions equal or above 0 only.
	2) Because of the previous change, I removed the line that
calculated the max value between 0 and the new position on
TrackContentObjectView::mouseMoveEvent when dragging a single TCO (and
added a line updating the value to the real new position of the TCO so
the label displays the position correctly).
	3) Unrelated to this bug, but removed an unnecessary call to
TrackContentWidget::changePosition on the left resize of sample TCOs
because it will already be called when movePosition triggers the
positionChanged signal.
	4) Added some logic to the TrackContentWidget::pasteSelection
method to find the left most TCO being pasted and make sure that the
offset is corrected so it doesn't end up on a negative position (similar
to the logic for the MoveSelection action).
	5) Removed another line that calculated the max between 0 and
the new position on Track::removeBar since it's now safe to call
movePosition with negative values.

* Uses std::max instead of a conditional statement

	As suggested by Spekular, we use std::max instead of a
conditional statement to correct the value of offset if it positions a
TCO on a negative position.
2020-11-07 13:54:04 +01:00
Tres Finocchiaro
afd037eaec Add CMT Submodule (#5755)
Switch ladspa CMT plugins to submodule
2020-11-01 00:37:38 -04:00
Dominic Clark
615d36b08b Support LV2 with MSVC (#5730) 2020-10-31 13:28:18 +00:00
Tres Finocchiaro
dc78b15a03 Add Windows JACK support (#5716)
Add Windows JACK support
Also adds JACK as a submodule
2020-10-30 16:57:20 -04:00
Tres Finocchiaro
9d104b2205 Switch Sid to submodule (#5724)
Also refactors to TitleCase, uses newer SID namespace
2020-10-30 13:34:15 -04:00
Tres Finocchiaro
c23c1b79d5 Add Carla support for Windows (#5713) 2020-10-29 01:06:34 -04:00
Johannes Lorenz
8b2902c27a Enable Lv2 Atom ports
All Atom ports are now being created and connected. Currently only MIDI
input ports are supplied with data.

Major contribution to #562 ("lv2 support").
2020-10-20 10:36:22 +02:00
Johannes Lorenz
9db671c7ae Refactor writing MIDI events to buffers
This moves out the code from the carla plugin into the core, because
this code will be re-used for Lv2 MIDI handling soon.
2020-10-17 20:56:05 +02:00
IanCaio
b64fe8e7c0 Refactor Clipboard methods (#5627)
* Moves mimeType from StringPairDrag to Clipboard

* Simplifies decodeKey and decodeValue methods

* Adds method to copy a string to clipboard

* Adds method to copy a string pair to the Clipboard

* Adds convenience methods to Clipboard.h to retrieve the QMimeData from the clipboard and checking whether a particular mime type format is present on it

* Uses only the TCOV copy/paste methods on the song editor
To keep consistency on the behavior of the TCOV copy and paste operations, we now only use the TCOV::copy() and TCOV::paste() methods for copying both individual and multiple TCOs.

* Removes obsolete TrackContentObject::cut() and merge copy() and paste() methods to single function TrackContentObject::copyStateTo()

* Adds Clipboard::getString method to get data for particular mime type

* Makes AutomatableModelView.cpp use the Clipboard class instead of calling Qt clipboard directly
2020-10-10 15:17:25 +09:00
Firepal
892aec318d Specify DirectConnection for a few plugins (#5695) 2020-10-08 14:42:34 +01:00
Johannes Lorenz
16db33f2bf Use STL version of std::make_shared now
As all is compiled with C++14 now, no need to use `std::make_shared`
from stdshims.h now.
2020-10-04 15:25:41 +02:00
Johannes Lorenz
7e986a8323 Compile LMMS using C++14
This replaces `set(CMAKE_CXX_STANDARD 14)` by `set(CMAKE_CXX_STANDARD 11)`
wherever it is required. Wherever it is superseded by parental
`CMakeLists.txt`, this command is now removed.
2020-10-04 15:25:41 +02:00
thmueller64
89b13280de LB302: Use consistent cutoff frequency on mulitple sample rates (#5618) 2020-10-03 14:05:55 +09:00
Johannes Lorenz
6546857d21 Move or remove unused slots 2020-09-24 17:59:07 +02:00
Johannes Lorenz
6d160fd773 basics: Change sampleFrame to use std::array (#5536)
... in order to make standard containers be able to store it. Required for
#5532 (#4899) and the recording PR.

This includes:

* removing the `LocklessRingBuffer<sampleFrame>` specialization
* passing samplerame in `StereoDelay::tick` as a reference

Additional cleanups:

* removing already unused typedef `sampleFrameA`
* add some `const_cast` to make code more readable
2020-09-21 09:04:44 +02:00
Veratil
9eb787c9e8 Update MIDI loading and parsing
portsmf fixes:
* Fix allegro warnings as errors
* Fix msvc missing max. Use MAX macro instead
2020-09-12 23:39:07 -05:00
Veratil
76a182bb95 Update portsmf to latest r234 commit 2020-09-12 23:39:07 -05:00
Dat Ng
3d8b31039f Qt deprecation fix (#5619)
Qt6 TODO: Orientation check by comparing angleDelta().x() and y() won't make sense
because the direction is arbitrary in Qt 6.
2020-09-13 11:09:46 +09:00
Dominic Clark
5efb3a19cb Fix use of translation functions (#5629) 2020-08-30 19:27:17 +01:00