Skip to content

Commit

Permalink
Merge pull request #29 from LMMS/master
Browse files Browse the repository at this point in the history
Updare
  • Loading branch information
ryuukumar authored Nov 3, 2020
2 parents 7808e0b + c39690d commit 0d90cd5
Show file tree
Hide file tree
Showing 145 changed files with 344 additions and 19,634 deletions.
6 changes: 5 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ environment:
matrix:
- compiler: msvc
install:
- vcpkg install --triplet %PLATFORM%-windows --recurse fftw3 libsamplerate libsndfile sdl2
- cd C:\Tools\vcpkg
- git pull
- .\bootstrap-vcpkg.bat
- cd %APPVEYOR_BUILD_FOLDER%
- vcpkg install --triplet %PLATFORM%-windows --recurse fftw3 libsamplerate libsndfile lilv lv2 sdl2
- nuget install clcache -Version 4.1.0
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
Expand Down
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@
[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 "src/3rdparty/jack2"]
path = src/3rdparty/jack2
url = https://github.com/jackaudio/jack2
[submodule "plugins/LadspaEffect/cmt/cmt"]
path = plugins/LadspaEffect/cmt/cmt
url = https://github.com/lmms/cmt
54 changes: 32 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0057 NEW)
ENDIF(COMMAND CMAKE_POLICY)


# Import of windows.h breaks min()/max()
ADD_DEFINITIONS(-DNOMINMAX)

INCLUDE(PluginList)
INCLUDE(CheckSubmodules)
INCLUDE(AddFileDependencies)
Expand Down Expand Up @@ -97,15 +101,13 @@ ENDIF(LMMS_BUILD_APPLE)

IF(LMMS_BUILD_WIN32)
SET(WANT_ALSA OFF)
SET(WANT_JACK OFF)
SET(WANT_PULSEAUDIO OFF)
SET(WANT_SNDIO OFF)
SET(WANT_SOUNDIO OFF)
SET(WANT_WINMM ON)
SET(BUNDLE_QT_TRANSLATIONS ON)
SET(LMMS_HAVE_WINMM TRUE)
SET(STATUS_ALSA "<not supported on this platform>")
SET(STATUS_JACK "<not supported on this platform>")
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
SET(STATUS_SOUNDIO "<disabled in this release>")
SET(STATUS_WINMM "OK")
Expand Down Expand Up @@ -201,14 +203,19 @@ IF(WANT_LV2)
IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(LV2 lv2)
PKG_CHECK_MODULES(LILV lilv-0)
IF(LV2_FOUND AND LILV_FOUND)
SET(LMMS_HAVE_LV2 TRUE)
SET(STATUS_LV2 "OK")
ELSE()
SET(STATUS_LV2 "not found, install it or set PKG_CONFIG_PATH appropriately")
ENDIF()
IF(NOT LV2_FOUND AND NOT LILV_FOUND)
FIND_PACKAGE(LV2 CONFIG)
FIND_PACKAGE(LILV CONFIG)
IF(LILV_FOUND)
SET(LILV_LIBRARIES "lilv::lilv")
ENDIF()
ENDIF()
IF(LV2_FOUND AND LILV_FOUND)
SET(LMMS_HAVE_LV2 TRUE)
SET(STATUS_LV2 "OK")
ELSE()
SET(STATUS_LV2 "not found, requires pkg-config")
SET(STATUS_LV2 "not found, install it or set PKG_CONFIG_PATH appropriately")
ENDIF()
ELSE(WANT_LV2)
SET(STATUS_LV2 "not built as requested")
Expand Down Expand Up @@ -433,23 +440,26 @@ ENDIF(NOT LMMS_HAVE_ALSA)

# check for JACK
IF(WANT_JACK)
PKG_CHECK_MODULES(JACK jack>=0.77)
IF(JACK_FOUND)
IF(WANT_WEAKJACK)
SET(LMMS_HAVE_WEAKJACK TRUE)
SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack)
SET(STATUS_JACK "OK (weak linking enabled)")
# use dlsym instead
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
ELSE()
IF(WANT_WEAKJACK)
SET(LMMS_HAVE_WEAKJACK TRUE)
SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack)
SET(JACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/jack2/common)
SET(STATUS_JACK "OK (weak linking enabled)")
# use dlsym instead
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
SET(LMMS_HAVE_JACK TRUE)
SET(JACK_FOUND TRUE)
ELSE()
PKG_CHECK_MODULES(JACK jack>=0.77)
IF(JACK_FOUND)
SET(STATUS_JACK "OK")
ENDIF()
SET(LMMS_HAVE_JACK TRUE)
ELSE(JACK_FOUND)
ENDIF()

IF(NOT JACK_FOUND)
SET(JACK_INCLUDE_DIRS "")
SET(STATUS_JACK "not found, please install libjack0.100.0-dev (or similar) "
"if you require JACK support")
ENDIF(JACK_FOUND)
SET(STATUS_JACK "not found")
ENDIF()
ENDIF(WANT_JACK)

# check for FFTW3F-library
Expand Down
5 changes: 5 additions & 0 deletions cmake/apple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ SET(MACOSX_BUNDLE_MIMETYPE "application/x-lmms-project")
SET(MACOSX_BUNDLE_MIMETYPE_ICON "project.icns")
SET(MACOSX_BUNDLE_MIMETYPE_ID "io.lmms")
SET(MACOSX_BUNDLE_PROJECT_URL "${PROJECT_URL}")
SET(MACOSX_BUNDLE_DMG_TITLE "${MACOSX_BUNDLE_BUNDLE_NAME} ${MACOSX_BUNDLE_LONG_VERSION_STRING}")

# FIXME: appdmg won't allow volume names > 27 char
# See also https://github.com/LinusU/node-appdmg/issues/48
STRING(SUBSTRING "${MACOSX_BUNDLE_DMG_TITLE}" 0 27 MACOSX_BUNDLE_DMG_TITLE)

CONFIGURE_FILE("lmms.plist.in" "${CMAKE_BINARY_DIR}/Info.plist")
CONFIGURE_FILE("install_apple.sh.in" "${CMAKE_BINARY_DIR}/install_apple.sh" @ONLY)
Expand Down
2 changes: 1 addition & 1 deletion cmake/apple/package_apple.json.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "@MACOSX_BUNDLE_BUNDLE_NAME@ @MACOSX_BUNDLE_LONG_VERSION_STRING@",
"title": "@MACOSX_BUNDLE_DMG_TITLE@",
"background": "@CMAKE_SOURCE_DIR@/cmake/apple/dmg_branding.png",
"icon-size": 128,
"contents": [
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/PluginList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ SET(LMMS_PLUGIN_LIST
ReverbSC
sf2_player
sfxr
sid
Sid
SpectrumAnalyzer
stereo_enhancer
stereo_matrix
Expand Down
14 changes: 12 additions & 2 deletions data/themes/classic/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ QMdiArea {
background-image: url(resources:background_artwork.png);
}

Knob {
qproperty-lineInactiveColor: rgb(120, 120, 120);
qproperty-arcInactiveColor: rgba(120, 120, 120, 70);
}

AutomationEditor {
background-color: rgb(0, 0, 0);
color: #e0e0e0;
Expand All @@ -34,8 +39,6 @@ QLineEdit {
border-radius: 4px;
border: 2px inset rgba(91,101,113,128);
background: #49515b;
color: #e0e0e0;
selection-background-color: #202020;
}


Expand All @@ -50,6 +53,13 @@ QLineEdit:focus {
border: 1px solid rgba(0,0,0, 128);
}

/* Set color and selection background color for various inputs.
SpinBoxes are used in QInputDialogs */

QTextEdit, QLineEdit:focus, QComboBox:focus, QSpinBox:focus, QDoubleSpinBox:focus {
color: #e0e0e0;
selection-background-color: #202020;
}

QToolTip {
border-radius: 4px;
Expand Down
14 changes: 12 additions & 2 deletions data/themes/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ QMdiArea {
background-color: #111314;
}

Knob {
qproperty-lineInactiveColor: rgb(120, 120, 120);
qproperty-arcInactiveColor: rgba(120, 120, 120, 70);
}

AutomationEditor {
color: #ffffff;
background-color: #141616;
Expand All @@ -61,8 +66,6 @@ QLineEdit {
border-radius: 4px;
border: 1px;
background: #101213;
color: #d1d8e4;
selection-background-color: #17793b;
}

QLineEdit:read-only {
Expand All @@ -76,6 +79,13 @@ QLineEdit:focus {
border: 1px solid #0bd556;
}

/* Set color and selection background color for various inputs.
SpinBoxes are used in QInputDialogs */

QTextEdit, QLineEdit:focus, QComboBox:focus, QSpinBox:focus, QDoubleSpinBox:focus {
color: #d1d8e4;
selection-background-color: #17793b;
}

QToolTip {
border-radius: 4px;
Expand Down
1 change: 1 addition & 0 deletions include/AudioSoundIo.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class AudioSoundIo : public AudioDevice
fpp_t m_outBufFrameIndex;

bool m_stopped;
bool m_outstreamStarted;

int m_disconnectErr;
void onBackendDisconnect(int err);
Expand Down
26 changes: 16 additions & 10 deletions include/Knob.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#ifndef KNOB_H
#define KNOB_H

#include <memory>
#include <QPixmap>
#include <QWidget>
#include <QtCore/QPoint>

Expand All @@ -41,6 +43,7 @@ enum knobTypes
} ;


void convertPixmapToGrayScale(QPixmap &pixMap);

class LMMS_EXPORT Knob : public QWidget, public FloatModelView
{
Expand All @@ -58,8 +61,12 @@ class LMMS_EXPORT Knob : public QWidget, public FloatModelView
// Unfortunately, the gradient syntax doesn't create our gradient
// correctly so we need to do this:
Q_PROPERTY(QColor outerColor READ outerColor WRITE setOuterColor)
Q_PROPERTY(QColor lineColor READ lineColor WRITE setlineColor)
Q_PROPERTY(QColor arcColor READ arcColor WRITE setarcColor)

Q_PROPERTY(QColor lineActiveColor MEMBER m_lineActiveColor)
Q_PROPERTY(QColor lineInactiveColor MEMBER m_lineInactiveColor)
Q_PROPERTY(QColor arcActiveColor MEMBER m_arcActiveColor)
Q_PROPERTY(QColor arcInactiveColor MEMBER m_arcInactiveColor)

mapPropertyFromModel(bool,isVolumeKnob,setVolumeKnob,m_volumeKnob);
mapPropertyFromModel(float,volumeRatio,setVolumeRatio,m_volumeRatio);

Expand All @@ -74,7 +81,6 @@ class LMMS_EXPORT Knob : public QWidget, public FloatModelView
Knob( knobTypes _knob_num, QWidget * _parent = NULL, const QString & _name = QString() );
Knob( QWidget * _parent = NULL, const QString & _name = QString() ); //!< default ctor
Knob( const Knob& other ) = delete;
virtual ~Knob();

// TODO: remove
inline void setHintText( const QString & _txt_before,
Expand Down Expand Up @@ -108,10 +114,6 @@ class LMMS_EXPORT Knob : public QWidget, public FloatModelView

QColor outerColor() const;
void setOuterColor( const QColor & c );
QColor lineColor() const;
void setlineColor( const QColor & c );
QColor arcColor() const;
void setarcColor( const QColor & c );

QColor textColor() const;
void setTextColor( const QColor & c );
Expand All @@ -134,6 +136,7 @@ class LMMS_EXPORT Knob : public QWidget, public FloatModelView
void mouseDoubleClickEvent( QMouseEvent * _me ) override;
void paintEvent( QPaintEvent * _me ) override;
void wheelEvent( QWheelEvent * _me ) override;
void changeEvent(QEvent * ev) override;

virtual float getValue( const QPoint & _p );

Expand Down Expand Up @@ -169,7 +172,7 @@ private slots:

QString m_label;

QPixmap * m_knobPixmap;
std::unique_ptr<QPixmap> m_knobPixmap;
BoolModel m_volumeKnob;
FloatModel m_volumeRatio;

Expand All @@ -187,8 +190,11 @@ private slots:
float m_outerRadius;
float m_lineWidth;
QColor m_outerColor;
QColor m_lineColor; //!< unused yet
QColor m_arcColor; //!< unused yet

QColor m_lineActiveColor;
QColor m_lineInactiveColor;
QColor m_arcActiveColor;
QColor m_arcInactiveColor;

QColor m_textColor;

Expand Down
7 changes: 6 additions & 1 deletion include/Lv2ControlBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#include "DataFile.h"
#include "LinkedModelGroups.h"
#include "lmms_export.h"
#include "Plugin.h"

class Lv2Proc;
Expand Down Expand Up @@ -65,7 +66,7 @@ class PluginIssue;
* this class can not override virtuals of Instrument or EffectControls, so
it will offer functions that must be called by virtuals in its child class
*/
class Lv2ControlBase : public LinkedModelGroups
class LMMS_EXPORT Lv2ControlBase : public LinkedModelGroups
{
public:
static Plugin::PluginTypes check(const LilvPlugin* m_plugin,
Expand All @@ -87,7 +88,11 @@ class Lv2ControlBase : public LinkedModelGroups
//! this is the same pointer as this, but a different type
//! @param uri the Lv2 URI telling this class what plugin to construct
Lv2ControlBase(class Model *that, const QString& uri);
Lv2ControlBase(const Lv2ControlBase&) = delete;
~Lv2ControlBase() override;

Lv2ControlBase& operator=(const Lv2ControlBase&) = delete;

//! Must be checked after ctor or reload
bool isValid() const { return m_valid; }

Expand Down
3 changes: 2 additions & 1 deletion include/Lv2SubPluginFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@

#include <lilv/lilv.h>

#include "lmms_export.h"
#include "Plugin.h"

class Lv2SubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures
class LMMS_EXPORT Lv2SubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures
{
private:
static const LilvPlugin *getPlugin(const Key &k);
Expand Down
3 changes: 2 additions & 1 deletion include/Lv2ViewBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <QVector>

#include "LinkedModelGroupViews.h"
#include "lmms_export.h"
#include "Lv2Basics.h"

class Lv2Proc;
Expand All @@ -54,7 +55,7 @@ class Lv2ViewProc : public LinkedModelGroupView


//! Base class for view for one Lv2 plugin
class Lv2ViewBase : public LinkedModelGroupsView
class LMMS_EXPORT Lv2ViewBase : public LinkedModelGroupsView
{
protected:
//! @param pluginWidget A child class which inherits QWidget
Expand Down
12 changes: 6 additions & 6 deletions plugins/LadspaEffect/cmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
FILE(GLOB_RECURSE SOURCES src/*.cpp)
FILE(GLOB_RECURSE SOURCES cmt/src/*.cpp)
LIST(SORT SOURCES)
ADD_LIBRARY(cmt MODULE ${SOURCES})
INSTALL(TARGETS cmt LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")

SET_TARGET_PROPERTIES(cmt PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(cmt PROPERTIES COMPILE_FLAGS "-Wall -O3 -fno-strict-aliasing")

IF(LMMS_BUILD_WIN32)
ADD_CUSTOM_COMMAND(TARGET cmt POST_BUILD COMMAND "${STRIP}" \"$<TARGET_FILE:cmt>\")
ELSE(LMMS_BUILD_WIN32)
IF(LMMS_BUILD_WIN32 AND NOT CMAKE_BUILD_TYPE MATCHES "Deb")
ADD_CUSTOM_COMMAND(TARGET cmt POST_BUILD COMMAND "${STRIP}" "$<TARGET_FILE:cmt>")
ELSE()
SET_TARGET_PROPERTIES(cmt PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC")
ENDIF(LMMS_BUILD_WIN32)
ENDIF()

IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
SET_TARGET_PROPERTIES(cmt PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined")
ENDIF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
ENDIF()

7 changes: 0 additions & 7 deletions plugins/LadspaEffect/cmt/README

This file was deleted.

Loading

0 comments on commit 0d90cd5

Please sign in to comment.