Commit Graph

83 Commits

Author SHA1 Message Date
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
Johannes Lorenz
e0298891e4 clang-format: Prepare plugin descriptor init'ers 2021-09-22 22:46:12 +02:00
Alexandre Almeida
770d2498b5 Rename Mixer to AudioEngine (#6127) 2021-09-12 01:00:21 +02:00
Firepal
892aec318d Specify DirectConnection for a few plugins (#5695) 2020-10-08 14:42:34 +01:00
Dominic Clark
5efb3a19cb Fix use of translation functions (#5629) 2020-08-30 19:27:17 +01:00
DigArtRoks
9ed41c4927 Fix for Icons and comboboxes mismatch in arpeggiator in Instrument Editor #5494 (#5623)
* Fix for Icons and comboboxes mismatch in arpeggiator in Instrument Editor #5494
(https://github.com/LMMS/lmms/issues/5494)

Introduce a static const int variable for the default height of a ComboBox.
Set this height already in the constructor of the ComboBox object.
Update all modules setting the height of a ComboBox object to make use of the new constant.

* Replace 'const int' by 'constexpr int' after review.
2020-08-17 10:12:49 -04:00
RossGammon
4c2d8941dc Fix some spelling errors in lmms (#5151) 2019-08-26 09:09:05 +08:00
Johannes Lorenz
73c2c70d96 Merge branch 'variable-tab-widget' 2019-07-17 22:21:47 +02:00
Johannes Lorenz
aa8f9361c6 Rename InstrumentView250 to InstrumentViewFixedSize 2019-07-17 22:20:25 +02:00
Johannes Lorenz
a4df7a9765 Split InstrumentView into itself and InstrumentView250 2019-07-14 10:20:54 +02:00
Hussam al-Homsi
5431cc7942 Replace tLimit() with qBound() and remove templates.h (#5040)
* Replace tLimit() with qBound()

* Remove templates.h
2019-06-15 23:33:29 +03:00
Johannes Lorenz
a1b355828e Allow sub plugins for instruments aswell
* 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)
2018-12-27 21:24:19 +01:00
Lukas W
b7c09974ac MSVC: Fix Monstro instrument 2018-07-28 14:20:36 +02:00
Lukas W
47a5248d1d Linux compile fixes 2018-07-07 16:40:37 +02:00
Hussam al-Homsi
6d46bd473f Remove "What's This?" and update tooltips (#4128) 2018-06-06 01:50:11 +03:00
Lukas W
8f3ab4b1b0 Merge branch 'master' into fix/msvc
# Conflicts:
#	plugins/LadspaEffect/CMakeLists.txt
#	plugins/Xpressive/Xpressive.cpp
#	plugins/opl2/CMakeLists.txt
#	plugins/papu/CMakeLists.txt
#	plugins/xpressive/CMakeLists.txt
#	src/CMakeLists.txt
2017-11-22 17:34:22 +01:00
Lukas W
ba2ed12f05 MSVC: EXPORT macro fixes 2017-11-22 11:08:47 +01:00
Lukas W
68c85c8e05 Merge branch 'stable-1.2' 2017-10-30 11:07:05 +01:00
Hussam Eddin Alhomsi
05971cac6a Fix monstro's osc 3 vol knob values. (#3912) 2017-10-24 21:01:26 +02:00
Lukas W
9f905bce3e Use Qt's Resource System (2nd approach) (#1891)
* 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
2017-03-26 22:06:43 +02:00
Lukas W
de3b344edd lmms_math: C++11 updates 2017-03-26 12:38:30 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
midi-pascal
fa498caf5c Add and correct some French translation
The translation of the instrument plugins description does not work in Instruments pluginBrowser

Translation of the effect plugins description not showing in effects selector

Replace tabs with spaces in the fix indentation (as Tres request)

More French translations added

Remove the call to tr() inside the macro makeknob (DualFilterControlDialog.cpp) and tr() the strings before calling makeknob
Fix DualFilter description (was labeled as "A native amplifier plugin") (DualFilter.cpp)
Add French translation for the Dual filter knobs.

Move tr() out of macro's so lupdate find them for translation (extract litterals in "ts" file).
Full French translation of Monstro :-)

Make NES translatable (some tr() missing)
Remove tr() from macros (litterals not extracted by lupdate
Translate NES to French

Translate Watsyn Synth as others

Missing Q_OBJECT in DelayControlsDialog definition prevents its translation
Translate Delay plugin to French

Make EqControlsDialog translatable

Fix selected-note volume bug

Closes #2070

Fix a typo in French translation.

Add EqControlsDialog.h to the MOCFILES list in Eq CMakeLists.txt

Remove definition of slot updateVuMeters() in EqControlsDialog.h which is not implemented
2015-06-10 09:07:55 -04:00
Vesa
c0932bd75e Fix monstro slopes properly 2015-01-15 17:14:50 +02:00
dnl-music
26592907e6 Update Monstro.cpp 2015-01-14 17:06:07 +05:00
Lukas W
1bbf7455a4 Rename a lot… 2014-11-26 10:09:49 +01:00
Lukas W
968909c07c Rename engine to Engine 2014-11-26 00:49:55 +01:00
Lukas W
7d0e3945e5 Rename song to Song 2014-11-26 00:44:41 +01:00
Vesa
e6938994cd Merge branch 'stable-1.1' 2014-11-18 09:22:25 +02:00
Vesa
78042ed4c5 More exp10 stuff 2014-11-17 18:55:09 +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 V
52c18dc3c1 Merge pull request #1107 from LMMS/stable-1.1
sync
2014-08-28 06:28:36 +03:00
Vesa
c1acd66d25 Monstro: more optimization 2014-08-28 06:28:14 +03:00
Vesa V
6304104506 Merge pull request #1095 from LMMS/stable-1.1
sync
2014-08-24 17:15:28 +03:00
Vesa
956a698d20 Monstro: optimize
use stack for rendering envs/lfos - this allows us to render them in advance which in turn seems to allow better optimizations by compiler
2014-08-24 17:12:53 +03:00
Tobias Doerffel
4cee046909 Added initial Qt5 support
LMMS now properly builds and runs with Qt5. Various deprecated functions
had to be replaced like QString::toAscii()/fromAscii(). Also occurences
of FALSE/TRUE have been replaced with false/true.

LmmsStyle now derives from QProxyStyle and sets a style instance as base
style (Plastique for Qt4, Fusion for Qt5).

MOC files are not included anymore but added as regular source files.

What's missing is support for embedding VST plugins into a subwindow
inside LMMS on Linux/X11 due to missing QX11EmbedContainer class in Qt5.

Build instructions can be found in INSTALL.Qt5

Minimum version requirement for Qt4 has been raised to 4.6.0 for best
API compatibility between Qt4 and Qt5.
2014-08-14 17:34:49 +02:00
Vesa V
3bbb81cf24 Merge pull request #1036 from LMMS/stable-1.1
sync
2014-07-27 19:36:37 +03:00
Vesa
c266e7b88e Monstro: optimize
Rewrote handling of modulators so that we don't have to allocate extra buffers for every note - should improve performance and make cpu usage more consistent
2014-07-27 19:34:41 +03:00
Vesa V
1934879109 Merge pull request #1026 from LMMS/stable-1.1
sync
2014-07-26 00:31:03 +03:00
Vesa
2469196c33 Monstro: add newlines to helptexts 2014-07-22 20:13:06 +03:00
Vesa
ff0c9beadd SF2: Make timing more accurate, also some fixes
I'm not saying sample-accurate, because it turns out, Fluidsynth has an internal buffer size and thus timing granularity of 64 frames. So 64 frames is the max. accuracy attainable for SF2. But it's better than nothing. Big thanks to David Henningsson of the Fluidsynth dev team, who very helpfully answered questions. A great guy.
In addition, there are some fixes to earlier commits here, which I ran into while working on the SF2 timing.
2014-07-06 16:11:35 +03:00
Vesa V
6ffcc0e799 Merge pull request #911 from diizy/master-nph
Revision of handling of frameoffset for NPH, SPH
2014-06-30 12:52:44 +03:00
Vesa
71217c0d85 Addition to earlier: Fix monstro 2014-06-29 23:28:51 +03:00
Vesa
270af579b8 Revision of handling of frameoffset for NPH, SPH
Change in handling of frameoffset for multistreamed instruments and sampletracks.
- Instead of holding the offset for the lifetime of the playhandle, negate the offset in the first period
- Multistream-instruments require some small changes: they have to now check for the offset and accordingly leave empty space in the start of the period (already done in this commit)
- There are possibly optimizations that can be done later
- This change is necessary so that we can have sample-exact models, and sample-exact vol/pan knobs for all instruments. Earlier multistream instruments were always rendering some frames ahead-of-time, so applying sample-exact data for them would have been impossible, since we don't have the future-values yet...
2014-06-29 23:13:00 +03:00
Vesa
dd65d48318 Monstro: improve accuracy of env release 2014-06-29 13:27:29 +03:00
Vesa
92544a7932 What's this strings for Monstro 2014-06-26 19:21:16 +03:00
Vesa
9d3c8a98ae Monstro: fix another silly error... 2014-06-15 22:38:25 +03:00
Vesa
dcfa4ebe43 Monstro: oops... corrected an error 2014-06-15 17:29:24 +03:00
Vesa
b5d9286fdc Monstro - additional small fix... 2014-06-15 16:01:12 +03:00