Commit Graph

26 Commits

Author SHA1 Message Date
saker
5b366cfe3c Revert "Switch to libsamplerate's callback API in Sample (#7361)" (#7410)
This reverts commit 2f5f12aaae.
2024-08-04 11:01:26 -04:00
saker
2f5f12aaae Switch to libsamplerate's callback API in Sample (#7361) 2024-07-24 18:50:47 -04:00
Dominic Clark
851c884f58 Re-enable disabled GCC warnings where possible (#7379) 2024-07-21 22:34:34 +01:00
saker
1420a1f7e8 Define fpp_t and f_cnt_t to be of size_t (#7363)
Defines `fpp_t` and `f_cnt_t` to be of `size_t` within `lmms_basics.h`.  Most of the codebase used `fpp_t` to represent the size of an array of sample frames, which is incorrect, given that `fpp_t` was only 16 bits when sizes greater than 32767 are very possible. `f_cnt_t` was defined as `size_t` as well for consistency.

---------

Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
2024-07-09 06:27:33 -04:00
Michael Gregorius
286e62adf5 Simplify sample frame operations (make it a class) (#7156)
* Remove the struct StereoSample

Remove the struct `StereoSample`. Let `AudioEngine::getPeakValues` return a `sampleFrame` instead.

Adjust the calls in `Mixer`  and `Oscilloscope`.

* Simplify AudioEngine::getPeakValues

* Remove surroundSampleFrame

Some code assumes that `surroundSampleFrame` is interchangeable with `sampleFrame`. Thus, if the line `#define LMMS_DISABLE_SURROUND` is commented out in `lmms_basics.h` then the code does not compile anymore because `surroundSampleFrame` now is defined to be an array with four values instead of two. There also does not seem to be any support for surround sound (four channels instead of two) in the application. The faders and mixers do not seem to support more that two channels and the instruments and effects all expect a `sampleFrame`, i.e. stereo channels. It therefore makes sense to remove the "feature" because it also hinders the improvement of `sampleFrame`, e.g. by making it a class with some convenience methods that act on `sampleFrame` instances.

All occurrences of `surroundSampleFrame` are replaced with `sampleFrame`.

The version of `BufferManager::clear` that takes a `surroundSampleFrame` is removed completely.

The define `SURROUND_CHANNELS` is removed. All its occurrences are replaced with `DEFAULT_CHANNELS`.

Most of the audio devices classes, i.e. classes that inherit from `AudioDevice`, now clamp the configuration parameter between two values of `DEFAULT_CHANNELS`. This can be improved/streamlined later.

`BYTES_PER_SURROUND_FRAME` has been removed as it was not used anywhere anyway.

* Make sampleFrame a class

Make `sampleFrame` a class with several convenience methods. As a first step and demonstration adjust the follow methods to make use of the new functionality:
* `AudioEngine::getPeakValues`: Much more concise now.
* `lmms::MixHelpers::sanitize`: Better structure, better readable, less dereferencing and juggling with indices.
* `AddOp`, `AddMultipliedOp`, `multiply`: Make use of operators. Might become superfluous in the future.

* More operators and methods for sampleFrame

Add some more operators and methods to `sampleFrame`:
* Constructor which initializes both channels from a single sample value
* Assignment operator from a single sample value
* Addition/multiplication operators
* Scalar product

Adjust some more plugins to the new functionality of `sampleFrame`.

* Adjust DelayEffect to methods in sampleFrame

* Use composition instead of inheritance

Using inheritance was the quickest way to enable adding methods to `sampleFrame` without having to reimpement much of `std::array`s interface.

This is changed with this commit. The array is now a member of `sampleFrame` and the interface is extended with the necessary methods `data` and the index operator.

An `average` method was added so that no iterators need to be implemented (see changes in `SampleWaveform.cpp`).

* Apply suggestions from code review

Apply Veratil's suggestions from the code review

Co-authored-by: Kevin Zander <veratil@gmail.com>

* Fix warnings: zeroing non-trivial type

Fix several warnings of the following form:

Warnung: »void* memset(void*, int, size_t)« Säubern eines Objekts von nichttrivialem Typ »class lmms::sampleFrame«; use assignment or value-initialization instead [-Wclass-memaccess]

* Remove unnecessary reinterpret_casts

Remove some unnecessary reinterpret_casts with regards to `sampleFrame` buffers.

`PlayHandle::m_playHandleBuffer` already is a `sampleFrame*` and does not need a reinterpret_cast anymore.

In `LadspaEffect::processAudioBuffer` the `QVarLengthArray` is now directly initialized as an array of `sampleFrame` instances.

I guess in both places the `sampleFrame` previously was a `surroundSampleFrame` which has been removed.

* Clean up zeroSampleFrames code

* Fix warnings in RemotePlugin

Fix some warnings related to calls to `memcpy` in conjunction with`sampleFrame` which is now a class.

Add the helper functions `copyToSampleFrames` and `copyFromSampleFrames` and use them. The first function copies data from a `float` buffer into a `sampleFrame` buffer and the second copies vice versa.

* Rename "sampleFrame" to "SampleFrame"

Uppercase the name of `sampleFrame` so that it uses UpperCamelCase convention.

* Move SampleFrame into its own file

Move the class `SampleFrame` into its own class and remove it from `lmms_basics.h`.

Add forward includes to all headers where possible or include the `SampleFrame` header if it's not just referenced but used.

Add include to all cpp files where necessary.

It's a bit surprising that the `SampleFrame` header does not need to be included much more often in the implementation/cpp files. This is an indicator that it seems to be included via an include chain that at one point includes one of the headers where an include instead of a forward declaration had to be added in this commit.

* Return reference for += and *=

Return a reference for the compound assignment operators `+=` and `-=`.

* Explicit float constructor

Make the  constructor that takes a `float` explicit.

Remove the assignment operator that takes a `float`. Clients must use the
explicit `float` constructor and assign the result.

Adjust the code in "BitInvader" accordingly.

* Use std::fill in zeroSampleFrames

* Use zeroSampleFrames in sanitize

* Replace max with absMax

Replace `SampleFrame::max` with `SampleFrame::absMax`.

Use `absMax` in `DelayEffect::processAudioBuffer`. This should also fix
a buggy implementation of the peak computation.

Add the function `getAbsPeakValues`. It  computes the absolute peak
values for a buffer.

Remove `AudioEngine::getPeakValues`. It's not really the business of the
audio engine. Let `Mixer` and `Oscilloscope` use `getAbsPeakValues`.

* Replace scalarProduct

Replace the rather mathematical method `scalarProduct` with
`sumOfSquaredAmplitudes`. It was always called on itself anyway.

* Remove comment/TODO

* Simplify sanitize

Simplify the `sanitize` function by getting rid of the `bool found` and
by zeroing the buffer as soon as a problem is found.

* Put pointer symbols next to type

* Code review adjustments

* Remove "#pragme once"
* Adjust name of include guard
* Remove superfluous includes (leftovers from previous code changes)

---------

Co-authored-by: Kevin Zander <veratil@gmail.com>
2024-06-30 20:21:19 +02:00
saker
9b6e33aa5c Remove global oversampling (#7228)
Oversampling can have many different effects to the audio signal such as latency, phase issues, clipping, smearing, etc, so this should really be an option on a per-plugin basis, not globally across all of LMMS (which, in some places, shouldn't really need to oversample at all but were oversampled anyways).
2024-05-05 04:37:43 -04:00
Michael Gregorius
8e8f68552f Disentangle and clean the classes of the Audio File Processor (#7069)
## Extract views
Extract the classes `AudioFileProcessorWaveView` and `AudioFileProcessorView` into their own files.

Reformat the new classes by removing unnecessary whitespace and underscores. Add spaces to if-statements.

Cleanup the includes.

## Remove friend relationship
Remove the friend relationship between `AudioFileProcessor` and `AudioFileProcessorView`.

Introduce getters for entities that the view is interested in.
2024-01-21 12:25:00 +01:00
saker
b53f2b4f54 Fix AFP playback indicator not shown when dragging and dropping samples (#7064)
The issue occurred because `AudioFileProcessorWaveView::updateSampleRange` was not being called in `AudioFileProcessorWaveView::dropEvent`.
2024-01-13 22:12:24 -05:00
saker
b67c53ad29 Fix sliding of waveform when drawing sample in reverse (#7063) 2024-01-13 21:05:18 -05:00
saker
ce722dd6b6 Refactor `SampleBuffer` (#6610)
* Add refactored SampleBuffer

* Add Sample

* Add SampleLoader

* Integrate changes into AudioSampleRecorder

* Integrate changes into Oscillator

* Integrate changes into SampleClip/SamplePlayHandle

* Integrate changes into Graph

* Remove SampleBuffer include from SampleClipView

* Integrate changes into Patman

* Reduce indirection to sample buffer from Sample

* Integrate changes into AudioFileProcessor

* Remove old SampleBuffer

* Include memory header in TripleOscillator

* Include memory header in Oscillator

* Use atomic_load within SampleClip::sample

* Include memory header in EnvelopeAndLfoParameters

* Use std::atomic_load for most calls to Oscillator::userWaveSample

* Revert accidental change on SamplePlayHandle L.111

* Check if audio file is empty before loading

* Add asserts to Sample

* Add cassert include within Sample

* Adjust assert expressions in Sample

* 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.

* Use ArrayVector in Sample

* Enforce std::atomic_load for users of std::shared_ptr<const SampleBuffer>

* Use requestChangesGuard in ClipView::remove
Fixes data race when deleting SampleClip

* Revert only formatting changes

* Update ClipView::remove comment

* 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.

* Fix heap-use-after-free in Track::loadSettings

* Remove m_buffer asserts

* 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.

* Change copyright

* Cast processingSampleRate to float
Fixes division by zero error

* Update include/SampleLoader.h

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Update include/SampleLoader.h

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Format SampleLoader.h

* Remove SampleBuffer.h include in SampleRecordHandle.h

* Update src/core/Oscillator.cpp

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Use typeInfo<float> for float equality comparison

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Use std::min in Sample::visualize

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Move in result to m_data

* Use if block in playSampleRange

* Pass in unique_ptr to SampleClip::setSampleBuffer

* Return const QString& from SampleBuffer::audioFile

* Do not pass in unique_ptr by r-value reference

* Use isEmpty() within SampleClipView::updateSample

* Remove use of atomic_store and atomic_load

* Remove ArrayVector comment

* Use array specialization for unique_ptr when managing DrumSynth data
Also made it so that we don't create result
before checking if we failed to decode the file,
potentially saving us an allocation.

* Don't manually delete Clip if it has a Track

* Clean up generateAntiAliasUserWaveTable function
Also, make it so that we actually call this function
when necessary in TripleOscillator.

* Set user wave, even when value is empty
If the value or file is empty, I think showing a
error popup here is ideal.

* Remove whitespace in EnvelopeAndLfoParameters.cpp L#121

* Fix error in c5f7ccba49
We still have to delete the Clip's, or else we would just be eating
up memory. But we should first make sure that the Track's no longer
see this Clip in their m_clips vector. This has to happen
as it's own operation because we have to wait for the audio thread(s)
first. This would ensure that Track's do not create
PlayHandle's that would refer to a Clip that is currently
being destroyed. After that, then we call deleteLater on the Clip.

* Convert std::shared_ptr<Sample> to Sample
This conversion does not apply to Patman as there seems to be issues
with it causing heap-use-after-free issues, such as with
PatmanInstrument::unloadCurrentPatch

* Fix segfault when closing LMMS
Song should be deleted before AudioEngine.

* Construct buffer through SampleLoader in FileBrowser's previewFileItem function
+ Remove const qualification in SamplePlayHandle(const QString&)
constructor for m_sample

* Move guard out of removeClip and deleteClips
+ Revert commit 1769ed517d since
this would fix it anyway
(we don't try to lock the engine to
delete the global automation track when closing LMMS now)

* Simplify the switch in play function for loopMode

* Add SampleDecoder

* Add LMMS_HAVE_OGGVORBIS comment

* Fix unused variable error

* Include unordered_map

* Simplify SampleDecoder
Instead of using the extension (which could be wrong) for the file,
we simply loop through all the decoders available. First sndfile because
it covers a lot of formats, then the ogg decoder for the few cases where sndfile
would not work for certain audio codecs, and then the DrumSynth decoder.

* Attempt to fix Mac builds

* Attempt to fix Mac builds take 2

* Add vector include to SampleDecoder

* Add TODO comment about shared ownership with clips

Calls to ClipView::remove may occur at any point, which can cause
a problem when the Track is using the clip about to be removed.
A suitable solution would be to use shared ownership between the Track
and ClipView for the clip. Track's can then simply remove the shared
pointer in their m_clips vector, and ClipView can call reset on the
shared pointer on calls to ClipView::remove.

* Adjust TODO comment
Disregard the shared ownership idea. Since we would be modifying
the collection of Clip's in Track when removing the Clip, the Track
could be iterating said collection while this happens,
causing a bug. In this case, we do actually
want a synchronization mechanism.

However, I didn't mention another separate issue in the TODO comment
that should've been addressed: ~Clip should not be responsible for
actually removing the itself from it's Track. With calls to removeClip,
one would expect that to already occur.

* Remove Sample::playbackSize
Inside SampleClip::sampleLength, we should be using Sample::sampleSize
instead.

* Fix issues involving length of Sample's
SampleClip::sampleLength should be passing the Sample's sample rate to
Engine::framesPerTick.

I also changed sampleDuration to return a std::chrono::milliseconds
instead of an int so that the callers know what time interval
is being used.

* Simplify if condition in src/gui/FileBrowser.cpp

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Simplify if condition in src/core/SampleBuffer.cpp

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Update style in include/Oscillator.h

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Format src/core/SampleDecoder.cpp

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Set the sample rate to be that of the AudioEngine by default

I also removed some checks involving the state of the SampleBuffer.
These functions should expect a valid SampleBuffer each time.
This helps to simplify things since we don't have to validate it
in each function.

* Set single-argument constructors in Sample and SampleBuffer to be explicit

* Do not make a copy when reading result from the decoder

* Add constructor to pass in vector of sampleFrame's directly

* Do a pass by value and move in SampleBuffer.cpp

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Pass vector by value in SampleBuffer.h

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Make Sample(std::shared_ptr) constructor explicit

* Properly draw sample waveform when reversed

* Collect sample not found errors when loading project

Also return empty buffers when trying to load
either an empty file or empty Base64 string

* Use std::make_unique<SampleBuffer> in SampleLoader

* Fix loop modes

* Limit sample duration to [start, end] and not the entire buffer

* Use structured binding to access buffer

* Check if GUI exists before displaying error

* Make Base64 constructor pass in the string instead

* Remove use of QByteArray::fromBase64Encoding

* Inline simple functions in SampleBuffer

* Dynamically include supported audio file types

* Remove redundant inline specifier

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Translate file types

* Cache calls to SampleDecoder::supportedAudioTypes

* Fix translations in SampleLoader (again)
Also ensure that all the file types are listed first.
Also simplified the generation of the list a bit.

* Store static local variable for supported audio types instead of in the header

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>

* Clamp frame index depending on loop mode

* Inline member functions of PlaybackState

* Do not collect errors in SampleLoader when loading projects

Also fix conflicts with surrounding codebase

* Default construct shared pointers to SampleBuffer

* Simplify and optimize Sample::visulaize()

* Remove redundant gui:: prefix

* Rearrange Sample::visualize after optimizations by DanielKauss

* Apply amplification when visualizing sample waveforms

* Set default min and max values to 1 and -1

* Treat waveform as mono signal when visualizing

* Ensure visualization works when framesPerPixel < 1

* Simplify Sample::visualize a bit more

* Fix CPU lag in Sample by using atomics (with relaxed ordering)

Changing any of the frame markers originally took a writer
lock on a mutex.

The problem is that Sample::play took a reader lock first before
executing. Because Sample::play has to wait on the writer, this
created a lot of lag and raised the CPU meter. The solution
would to be to use atomics instead.

* Fix errors from merge

* Fix broken LFO controller functionality

The shared_ptr should have been taken by reference.

* Remove TODO

* Update EnvelopeAndLfoView.cpp

Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>

* Update src/gui/clips/SampleClipView.cpp

Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>

* Update plugins/SlicerT/SlicerT.cpp

Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>

* Update plugins/SlicerT/SlicerT.cpp

Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>

* Store shortest relative path in SampleBuffer

* Tie up a few loose ends

* Use sample_rate_t when storing sample rate in SampleBuffer

* Add missing named requirement functions and aliases

* Use sampledata attribute when loading from Base64 in AFP

* Remove initializer for m_userWave in the constructor

* Do not use trailing return syntax when return is void

* Move decoder functionality into unnamed namespace

* Remove redundant gui:: prefix

* Use PathUtil::toAbsolute to simplify code in SampleLoader::openAudioFile

* Fix translations in SampleLoader::openAudioFile

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

* Fix formatting for ternary operator

* Remove redundant inlines

* Resolve UB when decoding from Base64 data in SampleBuffer

* Fix up SampleClip constructors

* Add AudioResampler, a wrapper class around libsamplerate

The wrapper has only been applied to Sample::PlaybackState for now.
AudioResampler should be used by other classes in the future that do
resampling with libsamplerate.

* Move buffer when moving and simplify assignment functions in Sample

* Move Sample::visualize out of Sample and into the GUI namespace

* Initialize supportedAudioTypes in static lambda

* Return shared pointer from SampleLoader

* Create and use static empty SampleBuffer by default

* Fix header guard in SampleWaveform.h

* Remove use of src_clone
CI seems to have an old version of libsamplerate and does not have this method.

* Include memory header in SampleBuffer.h

* Remove mutex and shared_mutex includes in Sample.h

* Attempt to fix string operand error within AudioResampler

* Include string header in AudioResampler.cpp

* Add LMMS_EXPORT for SampleWaveform class declaration

* Add LMMS_EXPORT for AudioResampler class declaration

* Enforce returning std::shared_ptr<const SampleBuffer>

* Restrict the size of the memcpy to the destination size, not the source size

* Do not make resample const

AudioResampler::resample, while seemingly not changing the data of the resampler, still alters its internal state and therefore should not be const.
This is because libsamplerate manages state when
resampling.

* Initialize data.end_of_input

* Add trailing new lines

* Simplify AudioResampler interface

* Fix header guard prefix to LMMS_GUI instead of LMMS

* Remove Sample::resampleSampleRange

---------

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
Co-authored-by: Daniel Kauss <daniel.kauss.serna@gmail.com>
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
Co-authored-by: DomClark <mrdomclark@gmail.com>
2023-12-25 07:07:11 -05:00
szeli1
67ce167775 Fix AudioFileProcessor reverse bug (#6958) 2023-11-25 17:24:05 -05:00
saker
aa050ae0b7 Fix memory leaks (#6879)
* Replace knobFModel with std::vector

* Create QPixmap's on the stack

* Assign parent for QGraphicsScene
A call to QGraphicsView::setScene does not make
the view take ownership of the scene.

* Do not allocate QList on the heap

* Use static QPixmap's
The QPixmap's need to be created within the constructor, and not outside
where they are defined, since it can't find them otherwise.
I'm not too sure why.

* Clear m_vi2->knobFModel in destructor

* Use local static QPixmap's

* Do not allocate QPixmap with new in AudioFileProcessor

* Do not allocate QPixmap with new in Nes

* Do not allocate QPixmap with new in Organic

* Do not allocate QPixmap with new in SaControlsDialog

* Do not allocate QPixmap with new in Vestige

* Do not allocate QPixmap with new for FileBrowser

* Do not allocate QPixmap with new in MixerLine

* Do not allocate QPixmap with new in SendButtonIndicator

* Do not allocate QPixmap with new in AutomationClipView

* Do not allocate QPixmap with new in MidiClipView

* Do not allocate QPixmap with new in AutomationEditor

* Do not allocate QPixmap with new in PianoRoll

* Do not allocate QPixmap with new in TimeLineWidget

* Do not allocate QPixmap with new in EnvelopeAndLfoView

* Do not allocate QPixmap with new in PianoView

* Do not allocate QPixmap with new in ComboBox

* Do not allocate QPixmap with new in Fader

* Do not allocate QPixmap with new for LcdWidget

* Do not allocate QPixmap with new for LedCheckbox

* Use m_ as prefix for members

* Use uniform initialization
I already started using uniform initialization for the QPixmap changes
for some reason, so I'm finishing that up.

* Uniform initiaization

* And then he realized he was making copies...

* Do not call QPixmap copy constructor

* Do not call QPixmap copy constructor in SaControlsDialog

* Do not make pixmap's static for Lcd's and Led's

* Initialize pixmaps in-class

* Fix few mistakes and formatting
2023-11-19 00:44:15 -05:00
Lost Robot
fccbe5d517 Add MP3 import (#6750) 2023-11-01 15:37:56 -07:00
Dominic Clark
d9ce7d8d4c Use remaining sample duration for AFP beat length (#6872) 2023-10-06 21:23:50 +01:00
Michael Gregorius
d3d710e0ad Remove identical calls to InstrumentTrack::processAudioBuffer
Remove identical calls to `InstrumentTrack::processAudioBuffer` which appear in the overridden implementations of `Instrument::play` and `Instrument::playNotes`. Instead the call to `processAudioBuffer` has been moved into `InstrumentPlayHandle::play` and `InstrumentTrack::playNote`. These two methods call the aforementioned methods of `Instrument`. Especially in the case of `InstrumentTrack::playNote` the previous implementation resulted in some unncessary "ping pong" where `InstrumentTrack` called a method on an `Instrument` which then in turn called a method on `InstrumentTrack`. And this was done in almost every instrument.

In `InstrumentTrack::playNote` an additional check was added which only calls `processAudioBuffer` if the buffer is not `nullptr`. The reason is that under certain circumstances `PlayHandle::doProcessing` calls the `play` method by explicitly passing a `nullptr` as the buffer. This behavior was added with commit 7bc97f5d5b. Because it is unknown if this was done for some side effects the code was adjusted so that it behaves identical in this case.

Move the complex implementation for `InstrumentPlayHandle::play` and `InstrumentPlayHandle::isFromTrack` into the cpp file and optimize the includes.
2023-09-14 23:12:22 +02:00
Dominic Clark
f10277715f Classier enums (#6760) 2023-08-24 19:16:02 +01:00
Dalton Messmer
5cbf2c5287 Fix LMMS plugin issues (#6670)
* Fix Organic automated harmonic parameter loading

* Fix Kicker automated end distortion parameter loading

* Fix AudioFileProcessor automated interpolation parameter loading

* Fix Vibed automated volume parameter loading

* Improve coding style/formatting

* Fix #6671

* Fix Vibed memory leaks

* Refactor Vibed instrument

* Fix build

* Try to fix build again

* Revert previous commit

* Replace more raw pointers with smart pointers

* Remove unused files

* Minor changes

* Update plugins/Vibed/Vibed.cpp

Co-authored-by: Kevin Zander <veratil@gmail.com>

* Implement suggestions from review

* Minor changes

* Only check plugin data pointer

* Refactor NineButtonSelector

* Fix memory leaks during heavy tempo automation

* Fix build

* Use s_stringCount

* Replace some vectors with arrays

* Use array instead of switch

* Allow compiler to generate move assignment operator

* Fix loading of old automated detune values

* Fix member variable names

* Address review comments

---------

Co-authored-by: Kevin Zander <veratil@gmail.com>
2023-08-22 12:07:09 +09:00
Hyunjin Song
bf00a675cc Fix broken "Display playback cursor in AudioFileProcessor" (#6601)
Adds missing `lmms` namespace for `f_cnt_t` to qRegisterMetaType.
2023-01-01 18:53:30 +09:00
saker
0b27497be2 clang-tidy: Apply modernize-use-auto everywhere (#6480)
Note: clang-tidy was run with `--format-style=file`.
2022-09-14 19:27:53 +02:00
Hussam al-Homsi
a6e6afb0ee Make AFP include the last sample frame (#6399) 2022-07-05 11:19:56 +09:00
Levin Oehlmann
28ec71f91a clang-tidy: Apply modernize-use-equals-default everywhere (#6450) 2022-06-26 08:48:24 +02:00
Levin Oehlmann
773310384b clang-tidy: Apply modernize-redundant-void-arg everywhere (#6446) 2022-06-23 21:27:23 +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
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
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