Commit Graph

7860 Commits

Author SHA1 Message Date
sakertooth
1f932d3d6f Refactor play functionality (again)
The responsibility of resampling the buffer
and moving the frame index is now in Sample::play, allowing the removal
of both playSampleRangeLoop and playSampleRangePingPong.
2023-09-25 20:27:17 -04:00
sakertooth
a5a01cf47b Remove m_buffer asserts 2023-09-25 15:28:21 -04:00
sakertooth
f5615b4059 Fix heap-use-after-free in Track::loadSettings 2023-09-08 14:07:17 -04:00
sakertooth
d5bf069624 Merge remote-tracking branch 'upstream/master' into refactor-samplebuffer 2023-09-08 13:43:47 -04:00
saker
b353cbea82 Add options to enable sanitizers (#6840)
* Add options to enable sanitizers

* Specify them as debugging options

* Apply suggestions made by Dom

* Fix linking issues
There were linking issues, most likely because we were
applying the sanitizer flags to unnecessary targets that
are part of the build. Now, we only focus on adding the
compiler flags to lmmsobjs as a PUBLIC dependency,
and selectively choose what targets we need to apply
the linker flags to as PRIVATE dependencies.

* Add UBSan

* Add status messages

* Remove GNU as supported compiler for MSan

* Revert to using add_<compile|link>_options again

* Fix sanitizer linkage within veal and cmt libraries
I suspect that our sanitizer flags were removed for these two CMake
targets. Instead of setting the properties directly, we call
target_compile_options and target_link_options
instead.

* Remove TODO comment

* Revert "Fix sanitizer linkage within veal and cmt libraries"

This reverts commit b04dce8d8c.

* Use CMAKE_<LANG>_FLAGS_<CONFIG> and apply fixes

* Remove quotes

* Add support for additional flags

* Disable vptr for UBSan

* Print "Debug using" in status for clarity

* Wrap ${supported_compilers} and ${status_flag} in quotes

* Replace semicolons with spaces in additional_flags

* Remove platform check for no-undefined flag
The platform check was added as an attempt
to make this branch compile with the veal
and cmt libraries. However, it seems to work
without it, so the problem must've been something
else occuring in these files.

* Undo change to FP exceptions status message

* Use spaces instead of tabs

* Remove -no-undefined flag for cmt and veal libraries
2023-09-08 11:49:43 -04:00
consolegrl
10f1b21fb7 fixes #4049: Off-grid nodes not draggable (#6852)
The quantPos arg of AutomationClip::setDragValue causes the node time
to be quantized before its looked up in the timeMap iterator.
This results in the node not being found and a new one being created
inside the setDragValue function even though we had found one.
Simply setting it to true causes this bug, simply setting it to false
causes a new node to be created off grid/not snapped. So the fix
is to quantize the position for the lookup only if we haven't found an
existing node under the cursor.
2023-09-07 22:19:56 -04:00
Lost Robot
b7196337a4 Fix Compressor arithmetic exception in Debug mode (#6854) 2023-09-07 11:43:23 -07:00
sakertooth
98c73b348a Merge remote-tracking branch 'upstream/master' into refactor-samplebuffer 2023-09-04 19:38:44 -04:00
Martin Pavelek
de062d6c54 Show detailed CPU load information in a tool-tip (#5970)
* Profiler rework

* Workaround for GCC bug

* Rollback QFile removal

* Use enum instead of a plain index to describe detailed stats

* Use the GCC workaround code for all compilers to avoid redundancy

* Update and fix comments

* Implement suggestions from review

* Split AudioEngine::renderNextBuffer() into separate functions, fix old formatting

* Remove QFile include

* Revert formatting changes

* Apply suggestion from review (remove unnecessary template parameter)

* Revert more formatting changes

* Convert DetailType to enum class

* DetailType enum class improvements suggested in review

* Use std::atomic for m_detailLoad

* RAII-style profiler probes

* Apply suggestions from code review

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

* Fix namespace comment

* Improve CPU load widget precision and use floats for load computations

* Atomic m_cpuLoad

* Add custom step size support for CPULoadWidget

* Apply suggestions from review (convert the profiler probe into a nested class, other small changes)

* Do not limit stored load averages to 100%

---------

Co-authored-by: sakertooth <sakertooth@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2023-09-04 19:33:42 -04:00
Rossmaxx
fa05ce20b8 Replace corrupted default samples with fixed ones. (#6752)
* pulled from upstream

* replaced broken sample files

* Revert "pulled from upstream"

This reverts commit 76967b5cc4.

* fixed shortened samples

* will this fix exprtk submodule?

This reverts commit 76967b5cc4.
2023-09-03 21:59:29 -04:00
Dalton Messmer
0768f5ad2f Fix a few memory issues found with ASan (#6843)
* Fix LADSPA effects memory leak

* Fix buffer overflow in PianoView

* Avoid using invalid iterators in AutomationClip

* Fix memory leaks in SimpleTextFloat

* Handle potential case where QMap::lowerBound(...) returns end iterator

* Implement suggestions from review
2023-09-03 17:29:31 -04:00
sakertooth
5ac915971b Revert "Remove use of shared ownership for Sample"
This reverts commit 1d452331d1.
In some cases, you can infact do away with shared ownership
on Sample if there are no writes being made to either of them,
but to make sure changes are reflected to the object in cases
where writes do happen, they should work with the same one.
2023-09-01 14:25:46 -04:00
sakertooth
b1516ea40e Update ClipView::remove comment 2023-08-31 19:42:08 -04:00
sakertooth
d68bd6f12a Revert only formatting changes 2023-08-31 14:46:02 -04:00
sakertooth
6f79621c30 Use requestChangesGuard in ClipView::remove
Fixes data race when deleting SampleClip
2023-08-31 14:41:48 -04:00
Martin Pavelek
e1d3ecb184 Microtuner UI update (#6206)
* Replace deprecated sprintf() function

* Update microtuner-related UI (add more clues explaining how to use it)

* Simpler wording in the tooltips for "apply" buttons

* Post-merge fix of a forward declaration

* Rename Misc tab to Tuning and transposition; move Microtuner config dialog to Edit menu and make it also available from instrument tab

* Enable word wrap on "MIDI unsupported" label

* Remove forgotten new unnecessary includes

* Rename InstrumentMiscView to InstrumentTuningView in locales
2023-08-31 19:21:26 +02:00
Dalton Messmer
8a94fb3681 Fix std::vector refactor mistake (#6836)
* Use std::vector const reference instead of copying

* Add assertions

* Simplification
2023-08-31 12:55:02 -04:00
sakertooth
2b6166fc4e Enforce std::atomic_load for users of std::shared_ptr<const SampleBuffer> 2023-08-31 11:42:34 -04:00
sakertooth
48b545bcdf Use ArrayVector in Sample 2023-08-31 11:24:47 -04:00
Andrés
005ee47d43 pitch wheel recording in the detune pattern (#6297) 2023-08-31 17:17:00 +02:00
sakertooth
8c834aa1f7 Merge remote-tracking branch 'upstream/master' into refactor-samplebuffer 2023-08-31 11:13:36 -04:00
sakertooth
1d452331d1 Remove use of shared ownership for Sample
Sample does not need to be wrapped around a std::shared_ptr.
This was to work with the audio thread, but the audio thread
can instead have their own Sample separate from the UI's Sample,
so changes to the UI's Sample would not leave the audio worker thread
using freed data if it had pointed to it.
2023-08-31 10:24:57 -04:00
Dominic Clark
4804ab6785 Support per-note detuning and panning with Sf2 Player (#6602)
* Add `ArrayVector` class template and tests

* Fix counting of failed test suites

* Support detuning and panning with Sf2 Player

* Restrict panning to supported FluidSynth versions

* Fix data array cast type

* Fix tests for Qt<5.10 and correct mistaken test

* DIsplay warning for FluidSynth < 2

* Remove unnecessary clamp

* Update include guard name
2023-08-31 07:12:00 -04:00
Dominic Clark
3263bfd555 Fix generator expression in strip command (#6762)
* Fix generator expression in strip command

* Add TODO comment for CMake 3.19
2023-08-30 21:01:15 -04:00
MrTopom
fcdf4c0568 Showing Knob value on mouse over (#6835)
* Showing Knob value on mouse over

* Correcting minors source code issues

* Correcting double QTimer include

* Removing blank lines

* Removing space and add one

* Update src/gui/widgets/SimpleTextFloat.cpp

Co-authored-by: saker <sakertooth@gmail.com>

* Correcting QTimer

* Remove a parameter that has the default value

---------

Co-authored-by: saker <sakertooth@gmail.com>
2023-08-29 15:32:11 -04:00
sakertooth
9583fcfd48 Adjust assert expressions in Sample 2023-08-29 14:36:46 -04:00
saker
1e6a66f4ac Add mixer LCD channels for Instrument & Sample tracks (#6831)
* Add mixer channel LCD to SampleTrackView

* Increase sizes to compensate for LCD box
The DEFAULT_SETTINGS_WIDGET_WIDTH and
DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT
were both increased by +32 pixels. TRACK_OP_WIDTH
 and TRACK_OP_WIDTH_COMPACT were then changed
 relative to that increase.

* Use Qt layout in SampleTrackView

* Add mixer channel LCD to InstrumentTrackView

* Move LCD box to the right of the track label

* Revert changes to TRACK_OP_WIDTH and TRACK_OP_WIDTH_COMPACT
2023-08-28 13:14:19 -04:00
sakertooth
cb42f0a396 Add cassert include within Sample 2023-08-28 06:38:56 -04:00
sakertooth
622405e3ed Add asserts to Sample 2023-08-28 03:21:21 -04:00
sakertooth
d7f9f593f0 Check if audio file is empty before loading 2023-08-28 03:07:06 -04:00
sakertooth
dbf32148c2 Revert accidental change on SamplePlayHandle L.111 2023-08-28 00:53:14 -04:00
sakertooth
d16b77e198 Use std::atomic_load for most calls to Oscillator::userWaveSample 2023-08-28 00:47:47 -04:00
sakertooth
3688073075 Include memory header in EnvelopeAndLfoParameters 2023-08-28 00:08:44 -04:00
sakertooth
6a53a1005a Use atomic_load within SampleClip::sample 2023-08-28 00:06:14 -04:00
sakertooth
2b378742e2 Include memory header in Oscillator 2023-08-27 23:55:50 -04:00
sakertooth
12fe2b9419 Include memory header in TripleOscillator 2023-08-27 23:37:32 -04:00
sakertooth
53728ce70f Remove old SampleBuffer 2023-08-27 23:31:36 -04:00
sakertooth
0017f66629 Integrate changes into AudioFileProcessor 2023-08-27 23:12:11 -04:00
sakertooth
aca875b0e4 Reduce indirection to sample buffer from Sample 2023-08-27 20:43:00 -04:00
sakertooth
25bb7abbb7 Integrate changes into Patman 2023-08-27 20:33:42 -04:00
sakertooth
6bf4483b95 Remove SampleBuffer include from SampleClipView 2023-08-27 20:27:15 -04:00
sakertooth
253ce15416 Integrate changes into Graph 2023-08-27 20:24:38 -04:00
sakertooth
d3ecea38f3 Integrate changes into SampleClip/SamplePlayHandle 2023-08-27 20:21:08 -04:00
sakertooth
7245b1abc4 Integrate changes into Oscillator 2023-08-27 19:34:16 -04:00
sakertooth
e01b1fca45 Integrate changes into AudioSampleRecorder 2023-08-27 18:01:56 -04:00
sakertooth
51bd371067 Add SampleLoader 2023-08-27 17:57:33 -04:00
sakertooth
aeef0f8a88 Add Sample 2023-08-27 17:16:14 -04:00
sakertooth
49e8852c1c Add refactored SampleBuffer 2023-08-27 17:12:52 -04:00
MrTopom
e2fd288ae7 Change the title for SideBarWidgets to be vertically centered related… (#6833)
* Change the title for SideBarWidgets to be vertically centered related to icon and with no underlining

* Update src/gui/SideBarWidget.cpp

Co-authored-by: saker <sakertooth@gmail.com>

---------

Co-authored-by: saker <sakertooth@gmail.com>
2023-08-27 14:11:41 -04:00
Michael Gregorius
0e93f1332b Merge pull request #6832 from michaelgregorius/6828-FixBaseNoteAutomationFix
Fix the base note automation fix (#6828)
2023-08-27 18:42:05 +02:00