Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/piano-roll-scrollba…
Browse files Browse the repository at this point in the history
…r-dev' into piano-roll-scrollbar-dev
  • Loading branch information
messmerd committed Nov 12, 2023
2 parents 3ff2d8e + 5ff0ffd commit 7200406
Show file tree
Hide file tree
Showing 171 changed files with 3,219 additions and 670 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
[submodule "plugins/CarlaBase/carla"]
path = plugins/CarlaBase/carla
url = https://github.com/falktx/carla
[submodule "plugins/Sid/resid"]
path = plugins/Sid/resid
url = https://github.com/simonowen/resid
[submodule "plugins/Sid/resid/resid"]
path = plugins/Sid/resid/resid
url = https://github.com/libsidplayfp/resid
[submodule "src/3rdparty/jack2"]
path = src/3rdparty/jack2
url = https://github.com/jackaudio/jack2
Expand Down
83 changes: 77 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ SET(LMMS_BINARY_DIR ${CMAKE_BINARY_DIR})
SET(LMMS_SOURCE_DIR ${CMAKE_SOURCE_DIR})

# CMAKE_POLICY Section
IF(COMMAND CMAKE_POLICY)
# TODO: Keep CMP0074 but remove this condition when cmake 3.12+ is guaranteed
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.12)
# Needed for the SWH Ladspa plugins. See below.
CMAKE_POLICY(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT variables
ENDIF()
ENDIF(COMMAND CMAKE_POLICY)

# Import of windows.h breaks min()/max()
ADD_DEFINITIONS(-DNOMINMAX)
Expand Down Expand Up @@ -70,6 +77,7 @@ OPTION(WANT_SOUNDIO "Include libsoundio support" ON)
OPTION(WANT_SDL "Include SDL (Simple DirectMedia Layer) support" ON)
OPTION(WANT_SF2 "Include SoundFont2 player plugin" ON)
OPTION(WANT_GIG "Include GIG player plugin" ON)
option(WANT_SID "Include Sid instrument" ON)
OPTION(WANT_STK "Include Stk (Synthesis Toolkit) support" ON)
OPTION(WANT_SWH "Include Steve Harris's LADSPA plugins" ON)
OPTION(WANT_TAP "Include Tom's Audio Processing LADSPA plugins" ON)
Expand All @@ -78,6 +86,10 @@ OPTION(WANT_VST_32 "Include 32-bit VST support" ON)
OPTION(WANT_VST_64 "Include 64-bit VST support" ON)
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
OPTION(WANT_DEBUG_FPE "Debug floating point exceptions" OFF)
option(WANT_DEBUG_ASAN "Enable AddressSanitizer" OFF)
option(WANT_DEBUG_TSAN "Enable ThreadSanitizer" OFF)
option(WANT_DEBUG_MSAN "Enable MemorySanitizer" OFF)
option(WANT_DEBUG_UBSAN "Enable UndefinedBehaviorSanitizer" OFF)
OPTION(BUNDLE_QT_TRANSLATIONS "Install Qt translation files for LMMS" OFF)


Expand Down Expand Up @@ -200,6 +212,13 @@ CHECK_CXX_SOURCE_COMPILES(
LMMS_HAVE_SF_COMPLEVEL
)

# check for perl
if(LMMS_BUILD_APPLE)
# Prefer system perl over Homebrew, MacPorts, etc
set(Perl_ROOT "/usr/bin")
endif()
find_package(Perl)

IF(WANT_LV2)
IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(LV2 lv2)
Expand Down Expand Up @@ -262,8 +281,12 @@ ELSE(WANT_CMT)
ENDIF(WANT_CMT)

IF(WANT_SWH)
SET(LMMS_HAVE_SWH TRUE)
SET(STATUS_SWH "OK")
IF(PERL_FOUND)
SET(LMMS_HAVE_SWH TRUE)
SET(STATUS_SWH "OK")
ELSE()
SET(STATUS_SWH "Skipping, perl is missing")
ENDIF()
ELSE(WANT_SWH)
SET(STATUS_SWH "not built as requested")
ENDIF(WANT_SWH)
Expand Down Expand Up @@ -329,6 +352,16 @@ IF(WANT_SDL AND NOT LMMS_HAVE_SDL2)
ENDIF()
ENDIF()

# check for Sid
if(WANT_SID)
if(PERL_FOUND)
set(LMMS_HAVE_SID TRUE)
set(STATUS_SID "OK")
else()
set(STATUS_SID "not found, please install perl if you require the Sid instrument")
endif()
endif()

# check for Stk
IF(WANT_STK)
FIND_PACKAGE(STK)
Expand Down Expand Up @@ -494,7 +527,11 @@ IF(WANT_SF2)
find_package(FluidSynth 1.1.0)
if(FluidSynth_FOUND)
SET(LMMS_HAVE_FLUIDSYNTH TRUE)
SET(STATUS_FLUIDSYNTH "OK")
if(FluidSynth_VERSION_STRING VERSION_GREATER_EQUAL 2)
set(STATUS_FLUIDSYNTH "OK")
else()
set(STATUS_FLUIDSYNTH "OK (FluidSynth version < 2: per-note panning unsupported)")
endif()
else()
SET(STATUS_FLUIDSYNTH "not found, libfluidsynth-dev (or similar)"
"is highly recommended")
Expand Down Expand Up @@ -605,7 +642,9 @@ else()
set(NOOP_COMMAND "${CMAKE_COMMAND}" "-E" "echo")
endif()
if(STRIP)
set(STRIP_COMMAND "$<IF:$<TARGET:Debug,RelWithDebInfo>,${NOOP_COMMAND},${STRIP}>")
# TODO CMake 3.19: Now that CONFIG generator expressions support testing for
# multiple configurations, combine the OR into a single CONFIG expression.
set(STRIP_COMMAND "$<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,${NOOP_COMMAND},${STRIP}>")
else()
set(STRIP_COMMAND "${NOOP_COMMAND}")
endif()
Expand Down Expand Up @@ -641,8 +680,36 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC")
ENDIF(WIN32)
elseif(MSVC)
# Use UTF-8 as the source and execution character set
add_compile_options("/utf-8")
ENDIF()

# add enabled sanitizers
function(add_sanitizer sanitizer supported_compilers want_flag status_flag)
if(${want_flag})
if(CMAKE_CXX_COMPILER_ID MATCHES "${supported_compilers}")
set("${status_flag}" "Enabled" PARENT_SCOPE)
string(REPLACE ";" " " additional_flags "${ARGN}")
# todo CMake 3.13: use add_compile_options/add_link_options instead
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=${sanitizer} ${additional_flags}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=${sanitizer} ${additional_flags}" PARENT_SCOPE)
else()
set("${status_flag}" "Wanted but disabled due to unsupported compiler" PARENT_SCOPE)
endif()
else()
set("${status_flag}" "Disabled" PARENT_SCOPE)
endif()
endfunction()

add_sanitizer(address "GNU|Clang|MSVC" WANT_DEBUG_ASAN STATUS_DEBUG_ASAN)
add_sanitizer(thread "GNU|Clang" WANT_DEBUG_TSAN STATUS_DEBUG_TSAN)
add_sanitizer(memory "Clang" WANT_DEBUG_MSAN STATUS_DEBUG_MSAN -fno-omit-frame-pointer)
# UBSan does not link with vptr enabled due to a problem with references from PeakControllerEffect
# not being found by PeakController
add_sanitizer(undefined "GNU|Clang" WANT_DEBUG_UBSAN STATUS_DEBUG_UBSAN -fno-sanitize=vptr)


# use ccache
include(CompileCache)

Expand Down Expand Up @@ -711,7 +778,6 @@ ADD_CUSTOM_TARGET(uninstall
COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake"
)


#
# display configuration information
#
Expand Down Expand Up @@ -763,6 +829,7 @@ MESSAGE(
"* ZynAddSubFX instrument : ${STATUS_ZYN}\n"
"* Carla Patchbay & Rack : ${STATUS_CARLA}\n"
"* SoundFont2 player : ${STATUS_FLUIDSYNTH}\n"
"* Sid instrument : ${STATUS_SID}\n"
"* Stk Mallets : ${STATUS_STK}\n"
"* VST-instrument hoster : ${STATUS_VST}\n"
"* VST-effect hoster : ${STATUS_VST}\n"
Expand All @@ -777,7 +844,11 @@ MESSAGE(
MESSAGE(
"Developer options\n"
"-----------------------------------------\n"
"* Debug FP exceptions : ${STATUS_DEBUG_FPE}\n"
"* Debug FP exceptions : ${STATUS_DEBUG_FPE}\n"
"* Debug using AddressSanitizer : ${STATUS_DEBUG_ASAN}\n"
"* Debug using ThreadSanitizer : ${STATUS_DEBUG_TSAN}\n"
"* Debug using MemorySanitizer : ${STATUS_DEBUG_MSAN}\n"
"* Debug using UBSanitizer : ${STATUS_DEBUG_UBSAN}\n"
)

MESSAGE(
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/bs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3677,7 +3677,7 @@ You can remove and move mixer channels in the context menu, which is accessed by
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="src/gui/instrument/InstrumentMidiIOView.cpp" line="213"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Ověřte si prosím, zda máte povolen zápis do souboru a do složky, ve které
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/eo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Asegúrate de tener permisos de escritura tanto del archivo como del directorio
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/eu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6641,7 +6641,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/fa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6645,7 +6645,7 @@ Veuillez vous assurez que vous avez les droits d&apos;écriture sur le fichier e
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/gl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/he.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/hi_IN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/hu_HU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6366,7 +6366,7 @@ Ellenőrizd, hogy rendelkezel-e a szükséges engedélyekkel és próbáld újra
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Pastikan Anda memiliki izin menulis ke file dan direktori yang berisi berkas ter
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6366,7 +6366,7 @@ Si prega di controllare i permessi di scrittura sul file e la cartella che lo co
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6364,7 +6364,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ms_MY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/nb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Zorg ervoor dat u schrijfbevoegdheid heeft voor het bestand en voor de map die h
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
Loading

0 comments on commit 7200406

Please sign in to comment.