Commit Graph

22 Commits

Author SHA1 Message Date
saker
9a0add49fb Core Refactor: Replace `QVector with std::vector` (#6477)
* 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>
2023-08-22 12:08:56 +09:00
Dalton Messmer
2c6d88f799 Add GUARD_H closing comments 2023-01-05 17:58:49 -05:00
Dalton Messmer
fe6df8dbaf Add namespace prefix to include guards 2023-01-02 19:51:32 -05:00
saker
b451e40b51 clang-tidy: Apply modernize-use-using everywhere (#6453) 2022-07-07 10:54:34 +02: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
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
Alexandre Almeida
770d2498b5 Rename Mixer to AudioEngine (#6127) 2021-09-12 01:00:21 +02:00
IanCaio
fbea78945b Fix bug introduced by #5657 (#5982)
* Fix bug introduced by #5657

	There was a bug introduced by #5657 where reloading a project
and playing it could cause a Segmentation Fault crash. After some
debugging, @DomClark tracked the issue to be likely a use-after-free
being caused by m_oldAutomatedValues not being cleared when the project
was loaded again.
	This commit adds a line to clear the m_oldAutomatedValues map on
Song::clearProject(), which is called from Song::loadProject().
	Now, instead of using a Signal/Slot connection to move the
control of the models back to the controllers, every time the song is
processing the automations, the control of the models that were
processed in the last cycle are moved back to the controller. The same
is done under Song::stop(), so the last cycle models control is moved
back to the controller.
	That removes the need to have a pointer to the controlled model
in the controller object.
	Adds mixer model change request to avoid race condition.

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2021-04-21 00:26:29 -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
Andrés
372fe3bdcf Play automation pattern when midi controller connected (#5657)
* Play automation pattern when midi controller connected

* empty line removed

* Improved for clarity

* removed midi specific controller logic

* formatting changes

* comments added

Co-authored-by: IanCaio <iancaio_dev@hotmail.com>

Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
2021-03-26 20:40:38 -03:00
David CARLIER
dac59a5fa0 C++11 inheritance updates
Add `override` and remove `virtual` where applicable
2019-10-31 20:05:33 +01:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Lukas W
8e8879f735 Merge stable-1.1
Conflicts:
	include/ConfigManager.h
	include/MidiTime.h
	include/string_pair_drag.h
	src/gui/string_pair_drag.cpp
	src/gui/widgets/rubberband.cpp
2014-11-10 19:26:59 +01:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Vesa
44f1d3df85 Initial implementation of sample-exact models and controllers
Also featuring a very efficient buffer-based system for transporting sample-exact control data
Also interpolation for automations
The native Amplifier is a reference implementation for taking advantage of sample-exact data and is currently
the only one that does so, it can be used to test things out, and as documentation/example for implementing the
same elsewhere
2014-05-30 18:22:36 +03:00
Johannes Lorenz
2b8e5c3992 Logscales, merged. 2014-04-09 12:31:21 +02:00
Tobias Doerffel
cd08109847 InstrumentTrack: do not try to load "libconnection.so" in compat code
In compat code of InstrumentTrack::loadTrackSpecificSettings() also
check for nodeName being equal to ControllerConnection::classNodeName().
This avoids trying to load the non-existing instrument "connection".
In master branch this has been fixed ugly in commit 22c877d4 before,
however implement a cleaner solution which is also suitable for
backporting.

Closes #3021259.
(cherry picked from commit 65311ef2b4)
2010-08-15 14:00:11 +02:00
Tobias Doerffel
f4dbb2ff5c sed: s/( void )/(), s/FALSE/false/, s/TRUE/true
Replaced remaining occurences of old constants and superfluous "void"
on empty argument list of functions.
(cherry picked from commit 166701f9f3)
2009-08-25 01:42:20 +02:00
Tobias Doerffel
1d5cb23385 File and class renames part 1
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:

391 files changed, 25400 insertions(+), 25598 deletions(-)

Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.

Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
(cherry picked from commit 8c9a9dd14c)
2009-08-25 01:30:41 +02:00
Paul Giblock
5138ed6722 Rename all Controller-family classes to new style
Adjust capitialization on all Controller-related classes to new
standards and update all calling code
(cherry picked from commit f1d60958f0)
2009-08-09 00:29:16 +02:00