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.
* Create PathUtils
* Replace old SampleBuffer calls
* Fix automatic track names
* Fix things
* Remove accidental duplicate file
* Add includes
* More incldues
* PhysSong's code review + style
* Fix vestige loading?
Seems more reasonable to convert from relative on load and to relative on save than vice versa.
* Typo fix
* More Bases
* Enable more bases
* Add missing semicolons in prefixes
* Nicer sample track tooltip
* Use correct directories
"userXDir" gives the default dir for ladspa, sf2, and gig. "xDir" gives the user dir.
* Make relative to both default and custom locations
Part 1
* Make relative to both default and custom locations
Part 2
* Typofix
* Typofix
* Fix upgrade function after base renaming
* Fix Tests
* Update tests/src/core/RelativePathsTest.cpp
Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>
* Choose UserXBase over DefaultXBase if identical
toShortestRelative sticks with the first base found if two bases give the same path length. By placing UserXBase Bases before DefaultXBase Bases in the relativeBases vector, toShortestRelative will prioritize them.
* Ensure baseLocation always has trailing slash
Otherwise, a user configuring a path without one will break things.
* Move loc declaration out of switch
* Semicolon
* Apply suggestions from code review...
* Include PathUtil and sort includes
* More granular includes
* Apply suggestions from code review
Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>
* Update include/PathUtil.h
* Leave empty paths alone
* Fix stupid merge
* Really fix merge. Hopefully
* Switch Base from enum to class enum
* Don't pass Base by reference
* Use QStringLiteral for static QString allocation in basePrefix method
* Make VST loading more similar to previous implementation
* Fix tests after enum change
* Attempt to fix VST loading, nicer name for sample clips
* Fix last review comment
Don't append a "/" that will be removed by cleanPath later
* Apply suggestions from code review
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
* Move m_key member of Effect into Plugin
* Pass key to Instrument ctors and instantiaters
* Add pluginKeys to all plugin selector widgets, and let them pass the keys
when instantiating the instruments; or, if the keys must be passed over
threads, pass the keys to the Engine using `Engine::setDndPluginKey()`
* As instrument plugin libraries now also need to get their key passed, their
second argument, which was always the same as the first, is now used to pass
the sub plugin keys. This affects *all* instrument plugins.
* Plugin.h: Add more virtuals to `SubPluginFeatures` in order to draw logos
and images into instrument selector widgets
* LadspaSubPluginFeatures: Implement the `displayName` virtual because the
new behaviour to resolve displayNames is to first look at the
SubPluginFeatures, which, without override, returns the superior plugin's
name (Plugin.cpp)
Additional:
* PluginFactory.h: Allow setting up search paths without discovering plugins
yet
* Plugin.h: Add full documentation (should be checked)
* Remove bin2res, use Qt's resource system
* Use QDir search paths and QImageReader in getIconPixmap
* Don't include "embed.cpp" in plugins
* getIconPixmap: Use QPixmapCache, use QPixmap::fromImageReader
* Require CMake 2.8.9
* Fix ReverbSC embed usage
I removed code in a previous commit that deleted ended samples since
that sometimes caused issues when the samples had loop points. However,
removing the code caused issues with the release samples. Thus, now it
removes ended samples only if they are release samples. Otherwise, the
keyup event and ADSR handle ending the note.
Previously if you release a C4 then all C4 notes would be released. Now
it stores the pointer to the plugin data which is unique for each key
press and determines which to release based on the matching pointers.
Now it'll honor the loop regions specified in the file and it'll
properly use the fine tuning for the samples if specified. Also,
modified the exponential decay code again since it was glitching at the
end of some notes for some reason.
Now if a Gig file provides a few samples per octave, it'll change the
pitch of the sample specified for a note instead of just assuming it is
the right pitch.
Also, fixed issue where if attack length was zero the note would never
sound.
Moving the code to detect the sample rates of the currently used samples
after the code deleting notes seemed to fix these glitches. Also, fixed a
few ADSR issues that could have resulted in clipping in the attack or
glitching after the release.
When providing extra frames, libsamplerate stores the extras internally
and outputs them in the next period. But, when it has enough internally
to output a whole period, it just outputs the internal buffer while not
using any more input frames. Now I provide some extra frames, check to
see how many frames we used actually used, and update the sample
positions and ADSR accordingly.