Commit Graph

2208 Commits

Author SHA1 Message Date
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
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
Spekular
45d73921e2 Split Sample Track classes into separate files (#5987) 2021-04-16 23:00:41 +02:00
Spekular
eb08d79282 Split Pattern classes into separate files (#5986) 2021-04-16 15:52:33 +02:00
Spekular
eb14db54bc Split BB Track classes into separate files (#5985) 2021-04-16 12:45:06 +02:00
Spekular
760e746514 Split AutomationTrack and AutomationTrackView into separate files (#5983)
Also fixes a newline in AutomationTrackView that codefactor complained about.
2021-04-15 19:38:15 +02: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
fschuelke
8d9c7347ba Added message box prompt when user tries to delete track (#5274)
* Added messagebox when user tries to delete track

* Code review refactorings

* Update Track.h

* Changed message box title to "Confirm removal"

* Merge changes from master

* Add option to disable warning

* Default to showing warning if no config found

Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Spekular <Spekular@users.noreply.github.com>
2021-04-03 21:18:27 +02:00
IanCaio
c50ff0663d Fixes bug in the AutomationPattern copy-ctor (#5968)
On the AutomationPattern copy constructor, the automation nodes
were copied from the origin pattern but their "owner pattern" pointers
weren't updated.
	Thanks Dom for finding and reporting this bug.
2021-04-02 19:04:07 -03:00
IanCaio
e16dca389e Adds support for local paths and project bundles (#5735)
* Adds a baseDir for the local path

	Adds a new Base for paths called "local:", which will translate to the dir where the currently opened project file is at. In the future this will allow us to make project bundles and make it easier to export and transfer projects to other people without breaking the paths to samples, presets, plugins and others.

* Starts implementing the makeBundle functionality

	For now, to make a bundle LMMS has to be run through CLI with the makeBundle/--makeBundle command, followed by an input file and an output file ('lmms --makeBundle input.mmp output.mmp'). DataFile::writeBundle() is then called. For now, it only saves the mmp/mmpz file normally and also creates a "resources" folder if it doesn't exists. Later it will also manipulate the DataFile so all paths are local and copy all files to the resources folder.

TODO:
	-Remove warnings.
	-Implement the logic to manipulate the DataFile and copy files.

* Starts implementing logic to go through resources

	Starts implementing the logic that will go through all the resources of the project file and add them to the bundle. We use a std::map of QString to std::vector<QString>: The first string is the DOM element tagname that is going to be searched for. The vector of strings holds all attributes this element can have that accesses resources. For now we just print those to the screen.

* Adds logic to copy files and update the project

	The raw logic for creating the bundle is finished. It now copies the resource files and update the project to use "local:" paths to the new file now.
	Now it's a matter of organizing things and adding safety checks for file operation errors basically.

* Makes the writeBundle method more organized

	Improves comments and debugging warnings to make the writeBundle a bit more organized for review.

* Adds a project bundle folder

	Adds a project bundle folder, inside which the bundles will be created. Instead of receiving an output project file name, the makeBundle command now receives a bundle name that will be used as the name of the bundle's folder.
	Uses a typedef for the std::map with the tags and attributes with resources.

TODO:
	- Fix the local: prefix so it works when we don't have the project file open (for CLI usage, or find another way to deal with it).
	- Sanitize the bundle name.
	- Allow overwriting bundles?

* Handles local paths when a project isn't open

	The PathUtil base prefix conversion for "local:" uses the loaded song file name. When we are running the makebundle command from the CLI there isn't a loaded project, so those prefixes aren't converted properly. Now, when there isn't a project open PathUtil will return "local:" again when it tries to convert this base prefix. DataFile can then check if the base prefix is still there, and if it is it knows the conversion wasn't possible, so it does the conversion itself. To do that, a member called m_fileName was added to DataFile, which will hold the file being manipulated if that's where the DataFile originated from, and the local path can be retrieved from it.

* Sanitizes the bundle name

	The bundle name is now sanitized. Since it's going to be used as a folder name, we need to keep the user from giving invalid folder names as a bundle's name. The rules for the name are:
	1) It must start with a word character (either a digit or letter)
	2) It can be followed by any number of letters, digits, whitespaces or hyphens
	3) It must end with a word character (either a digit or letter)

	A Regexp is used to check for the name validity.

* Moves away from projectbundle folder concept

	This commit regresses some functionality. Project bundles will be saved just as any other project, except they will also have the resources folder. It will be up to the user to organize the bundles on their own folders. It's currently not allowed to save a bundle on a folder where there's one already though (if there's a resources folder already). Later it might be allowed to overwrite bundles in that case.
	The projectbundles folder was dropped. The user can save project bundles anywhere in the system.
	The DataFile::writeBundle was removed. It's functionality was merged into the DataFile::writeFile method, by adding a boolean on the parameters defining whether it should be saved with resources. The logic of copying the resource files and changing the paths inside the project DataFile was moved to DataFile::copyResources, making the methods a little bit less dense.

* Adds an option to save project as bundle

	The "Save As" dialog now has an option to save project as a project bundle (with resources), which will save the file as a bundle.

Known bug:
	- Because the "local:" base prefix is translated to the filename from the Engine::getSong(), it breaks when Song::guiSaveProjectAs is called, because that method changes the project name before saving. Urgent fix!

* Fix local: prefix saving bug

	There was a bug where "local:" prefixes weren't resolved properly during saving because Song::guiSaveProjectAs() changed the project name to the destiny file name before saving. This resulted in the local paths using the destination file as a reference. Both Song::guiSaveProject() and Song::guiSaveProjectAs() were rewritten, and now they only rename the project after it's saved.

* Adds a warning message box

	When the user tries to save a project bundle on a folder that already has a project bundle (contains a resources folder) a message box pops up telling the user it's not permitted and that another path should be chosen.

* Removes unused header

	Forgot to remove <QRegExp> header when I removed the code that used it.

* Removes Vestige plugins bundling

	For safety reasons, remove the possibility to bundle VSTs loaded
through vestige. Also runs a safety check during the project being
loaded (Song::loadProject) to check if either Vestige plugins or effect
plugins are using local paths, and abort the project load if so. That is
to avoid malicious code being run because of bad DLLs being shipped with
a project file.

* Extracts code from loadProject to another method

	Extracts code that checks if a DataFile contains local paths to
plugins to another method inside DataFile.

* Removes debug warnings

	Removes warnings previously used for debugging. Improves a
warning message on PathUtil.

* Fixes small bug with error logging

	Fixes small bug, where a QMessageBox was being used to prompt an
error without checking if the gui is loaded first. Now we check for the
GUI and if we are in CLI mode we use a QTextStream instead.

* Saves the bundle in a newly created folder

	Now a folder with the project name is created inside which the
bundle will be saved. This makes the process more convenient.
	Some save errors that previously only triggered qWarnings now
trigger message boxes to warn the user of what happened (using a lambda
function that either shows message boxes or trigger qWarnings depending
whether a gui is present).
	Makes it so saving a bundle doesn't change the loaded project
path, that way the user won't be able to accidentally "Save" over a
bundle which should not be done for now.

* Enhances the name conflict workaround

	Now, instead of replacing the resource names with meaningless
numbers, the bundle save will just append a counter to the end of
filenames that have been repeated.

* Starts addressing Johannes review

* Adds makebundle action to bash completion file

	Adds the bash completion code for the made bundle action.

* Improves safety check on project files

	Now, instead of checking certain XML tags for local paths,
DataFile::hasLocalPlugin() will return true if ANY tag that isn't on the
RESOURCE_ELEMENTS list contains an attribute that starts with "local:".
	The method is now recursive so it can go through all XML tags
during this check.

* Addresses Spekular change request

	Uses basePrefix(Base::LocalDir) instead of "local:" on the
return of unresolved local paths.

* Makes hasLocalPlugins method const

* Replaces literal uses of "local:"

	Instead of using "local:" we are now retrieving the base prefix
from PathUtil, so if we change the prefix on the future we don't need to
replace every mention to it as well.

* Fix some comments on the header and cpp file

* Changes variable on PathUtil to const

	Changes the retrieved pointer to the song object to a const
pointer.

* Leave doxygen comment on CPP file only

	There was 2 doxygen comments for the same method, on the header
and CPP file. The latter was kept since it goes into more details about
the functionality of the method.

* Fix doxygen comment @param

	Fixes the doxygen comment from hasLocalPlugin().

* Remove assert statements

	Some assert statements were being done wrong and are probably
even unnecessary for that piece of code, so they were removed.

* Skips local paths when looking for shortest path

	PathUtil::toShortestRelative() was including the local paths on
the candidate paths, which could lead to a unallowed resource (i.e.:
vst plugin) to be assigned a local path even on a regular save.
	The local paths are now skipped when looking for the shortest
relative path, since they should only be used by the bundle save on the
allowed resources.

* Address Spekular's review

	Changes some of the PathUtil methods to allow a boolean pointer
to be used to return the status of the method, setting it to false if it
failed somewhere.
	Also adds a parameter to toShortestRelative to either allow or
forbid local paths in the search for the shortest relative path.

* Replaces "ok" with "error"
2021-04-02 17:12:16 +02:00
IanCaio
3ab86fa381 Automation Node fine tuning with double-click (Rewrites #5292) (#5923)
Co-authored-by: tecknixia <50790262+tecknixia@users.noreply.github.com>
2021-03-27 23:32:51 -03: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
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
cyber-bridge
4a99904ff6 Feature: Pattern import/export (#5891)
* Init

* Suggested changes by @IanCaio, thanks!

* Selecting one file to import is enough.

* Explicit use of TimePos in favour of int where expected, as suggested.

* Make pattern import/export future proof with using DataFile instead of custom code to read/write the pattern file.

* Remove unused/duplicate imports

* Make import/export dialogs file-ext filter consistent.

Co-authored-by: CYBERDEViL <cyberdevil@notabug.org>
2021-03-21 11:40:12 -03:00
Spekular
5ad034ade3 Use MEMBER, not WRITE for mouseHotspot Q_PROPERTYs (#5955)
* Use MEMBER, not WRITE for mouseHotspot Q_PROPERTYs

* Remove now-useless setMouseHotspot methods
2021-03-19 14:22:42 +01:00
Alex
0967ffbc3a Enhanced quantize in PianoRoll (#5946)
* Button with menu has split highlight

* Add menu with more action to quantize button

* Style changes

* Fix CSS length-zero-no-unit warning

* Add combo button to classic theme
2021-03-16 17:42:08 +01:00
Martin Pavelek
17ea61676f Add LcdFloatSpinBox (extracted from microtonal PR) (#5865)
* Add changes extracted from microtonal PR

* Apply suggestions from code review

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

* Apply suggestions from code review

(adding oneliner spaces)

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

* Update src/gui/widgets/LcdFloatSpinBox.cpp

Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>

* Apply suggestions from code review

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

* Implement suggestions from review

* Reorder constructor parameters, remove old code for cursor movement and hiding from Lcd*SpinBoxes

* Apply suggestions from code review

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

* Fix right margin width in seamless mode

* Add explanation to border drawing code

Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2021-03-15 14:06:48 -03:00
Spekular
8acb9222fd Knife Tool for Sample Clips (Again) (#5524)
* Rebase BaraMGB's Knife
Co-authored-by: Steffen Baranowsky <BaraMGB@freenet.de>

* Draw marker

* Refactoring and shift mode

* Allow resizing

* Add Icon

* Fix stuck marker on RMB, remove unnecessary cast

* Remove redundant line, more const

* Fix

* Review fixes

* Only perform split logic for SampleTCO

* Add unquantizedModHeld function

* missed one

* Don't use copy/paste

* Don't use copy/paste

* More git troubles

* Fix undo

* git dammit

* Cleaner solution?

* Set cursor, add copy assignment to SampleBuffer

* Add TODO comment

* Make it build

* Fixes from review

* Make splitTCO virtual

* Make splitTCO more generic

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

* Prevent resizing of MIDI clips in knife mode

* Fix move/resize and rework box select via ctrl

* Apply suggestions from code review.

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

* Don't show inaccurate/useless/empty text float in knife mode

* Addresses Github review

	- Fixes a typo where QWidget::mousePressEvent was being called
inside mouseReleaseEvent.
	- Avoids unnecessarily disabling journalling on the Split
action, since it doesn't require it.

* Revert format changes in Track

* Revert format changes in Track.h

* Revert formatting changes in Track.cpp

Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
2021-03-12 22:49:54 +01:00
rghvdberg
ea295c4ee8 Pianoroll: nudge/snap while dragging notes (#5848)
* pianoroll: nudge/snap while dragging notes

combobox for switching behavior
old behavior (nudge) is default

* snap note start or note end to nearest grid line

* fix member variable name

* change default width of pianoroll

* remove trailing white space

* use mouse position instead of m_draggednote

* Uses enum instead of text for GridMode selection

	To avoid problems with translations breaking the conditional,
PianoRoll::changeSnapMode now uses the value of the ComboBox model,
casted to the GridMode enum instead of the text.

* Fixes last code style issues

	A few code style issues were left, those are fixed in this
commit.

* Removes forgotten comma on enum

	Since the last enum value was commented out, there's an
unnecessary comma left that was removed.

* Rewrites some of the grid logic

	Separates Nudge logic and Snap logic more explicitly.
	Avoids recalculation of mouse conversion to time line ticks.
	Disables shift resizing for Snap mode.
	Removes unnecessary range checks.
	Fixes bug with note key boundary checks (which is present in master).

* Make noteOffset an int instead of TimePos

Co-authored-by: Ian Caio <iancaio_dev@hotmail.com>
2021-03-05 09:38:33 -03:00
Alex
5d366ef06f 4 new note modification tools (#5857)
* Add new note length modification tools

* "Last" instead of "latest"

* Code formatting

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

* Fix sort

* Fix incorrect cut of last note

* Fix Fill not stretching last note to end

* Fill from end positions

* Rename limitNoteLengths

* Compare with non-selected notes when filling

* Style changes by IanCaio + bugfix

* break instead of continue

Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
2021-03-05 09:31:27 -03:00
IanCaio
e880e3cb2a Changes AutomationPattern to use nodes instead of raw float values (#5712) 2021-02-28 06:48:15 -03:00
cyber-bridge
05de59c085 Feature: PianoRoll Knife (#5845)
* Initial PianoRoll razor feature

* Restore PianoRoll edit mode after focusOut and in razor mode.

* Show changes directly after cut.

* Fix hanging note after adjusting vol/pan with razor action.

* Extract the split action to a separate method

	This PR addresses some suggestions from a review, the most
important ones being:
	- Extracting the note split action to a separate method, called
Pattern::splitNotes
	- Removing getMouseTickPos method
	- Adding a variable that holds the current razor position and a
method to update it (quantizing if CTRL is not pressed)
	- Using [this] to capture "this" on the lambda function instead
of [=], since the latter doesn't work as intended from C++20 forward
	- Fixing some code style and adding comments

* Removes an extra call to noteUnderMouse

	By removing "&& noteUnderMouse()" from the mousePressEvent
conditional, we avoid an extra call to noteUnderMouse. The only
difference in the behavior of the tool is that now clicking on a place
that doesn't have a note will exit Razor mode.

* Style change suggested by @russiankumar

* Cancel razor action on SHIFT release.

* Make razor cut-line (color) themable.

* Add razor cut-line color to classic theme style.css

* Rename razor to knife.

* Change pixmap from razor to knife (from https://github.com/LMMS/lmms/pull/5524)

* Remove SHIFT behavior.

* Change knife shortcut to SHIFT+K

Co-authored-by: CYBERDEViL <cyberdevil@notabug.org>
Co-authored-by: Ian Caio <iancaio_dev@hotmail.com>
2021-02-26 17:17:16 +05:30
liushuyu
ed4df52d86 Support HTML markup for knob labels (#3134)
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2021-01-28 15:27:13 +09:00
Alexandre Almeida
e900576dbd FifoBuffer adjustments (#5803) 2021-01-23 13:52:36 +01:00
Oskar Wallgren
d769459764 Arpeggiator - Note repeats (#5784)
Co-authored-by: Kevin Zander <veratil@gmail.com>
Co-authored-by: IanCaio <iancaio_dev@hotmail.com>
2021-01-01 14:43:46 +01:00
Spekular
bf7c87de7e Fix rule of three for SampleBuffer, SampleTCO (#5727)
* Automatic formatting changes

* Add copy constructor and assignemnt to SampleBuffer

* Add copy constructor to SampleTCO

* Delete SampleTCO copy assignment, initial work on SampleBuffer swap method

* SampleBuffer: Finish(?) swap and use it for copy assignment, lock for read in copy constructor

* Don't forget to unlock in copy assignment!

* Formatting changes

* Lock ordering in swap

* Fix leak and constness

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

* Fix multiplication style, ensure lock is held when necessary

... by switching from an initializer list to manual assignments.

* Fixes from review

* Avoid more undefined behavior

* Update src/tracks/SampleTrack.cpp

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2020-12-29 23:01:41 +01:00
IanCaio
3d7d0051f3 Adds feature to merge Instrument Track patterns (#5700) 2020-12-12 11:33:45 -03:00
Alexandre Almeida
28ee260e28 Mixer refactor (#4894)
Co-authored-by: Kevin Zander <veratil@gmail.com>
2020-12-11 10:46:03 +09:00
Alexandre Almeida
040fb48867 Update code style for BBTrackContainer (#5812) 2020-12-08 00:25:00 +01:00
Johannes Lorenz
2f66449092 Implement Lv2 Options (#5761)
Implement `LV2_OPTIONS__options` feature and some buf-size properties.

The code currently assumes that the LMMS buffersize never changes, which
is currently true in the LMMS code base.
2020-12-08 00:12:04 +01:00
IanCaio
cd2366a21c Fix style on "SampleBuffer.cpp" and "SampleBuffer.h" (#5791)
Fix code style issues in the `SampleBuffer` class.

Remove strange comments around "not an Ogg Vorbis file"
warning.
2020-12-07 23:09:34 +01:00
IanCaio
53a733ba66 Fixes bug where clicking on the Activity Indicator doesn't play a note (#5824) 2020-12-07 17:11:41 -03:00