Commit Graph

15 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
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
Alexandre Almeida
6e081265ba Rename MidiTime to TimePos (#5684)
Fixes #4866
2020-11-29 19:46:13 +01:00
David CARLIER
dac59a5fa0 C++11 inheritance updates
Add `override` and remove `virtual` where applicable
2019-10-31 20:05:33 +01:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Oskar Wallgren
81966fa1a6 Sort note patterns after both position and key 2017-10-18 14:41:00 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Amadeus Folego
6e3d4f431d Change behaviour for changing volume/pan on Piano
All the selected notes are changed by default for the 3 possible events:

- Mouse dragging the volume/pan meter
- Rolling the mouse wheel over the meter
- Double-clicking the meter

The user can still change each note individually by holding alt before
performing the desired action
2015-03-07 11:55:36 -03:00
Alexandre
3d46f8a290 Merge branch 'coding'
Conflicts:
	include/Note.h
	include/ProjectVersion.h
	include/TimeLineWidget.h
	include/Track.h
	src/core/Plugin.cpp
	src/core/ProjectVersion.cpp
	src/core/Song.cpp
	src/core/Track.cpp
	src/gui/TimeLineWidget.cpp
2015-03-01 12:55:58 -03:00
Alexandre Almeida
d04076f44d Update coding conventions on Note.h 2015-01-19 23:08:19 -02:00
Lukas W
56055b36b0 Merge branch 'master' into ed_refac
Conflicts:
	src/gui/editors/PianoRoll.cpp
2015-01-11 13:25:55 +01:00
Jonas Trappenberg
87e597510c Minor refactorings and codestyle cleanup. 2015-01-11 00:05:25 -08:00
Alexandre Almeida
87f6dd0a03 Update coding conventions on Note.h 2015-01-05 20:45:46 -02:00
Lukas W
657fb06c49 More Automation refactoring 2014-12-17 11:34:57 +01:00
Lukas W
aaeb5216ad Rename note to Note 2014-11-26 01:14:52 +01:00