Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #27

Merged
merged 16 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
url = https://github.com/Lukas-W/qt5-x11embed.git
[submodule "src/3rdparty/rpmalloc/rpmalloc"]
path = src/3rdparty/rpmalloc/rpmalloc
url = https://github.com/rampantpixels/rpmalloc.git
url = https://github.com/mjansson/rpmalloc.git
[submodule "plugins/zynaddsubfx/zynaddsubfx"]
path = plugins/zynaddsubfx/zynaddsubfx
url = https://github.com/lmms/zynaddsubfx.git
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,9 @@ If(WANT_GIG)
ENDIF(WANT_GIG)

# check for pthreads
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD)
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD OR LMMS_BUILD_HAIKU)
FIND_PACKAGE(Threads)
ENDIF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD)
ENDIF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD OR LMMS_BUILD_HAIKU)

# check for sndio (roaraudio won't work yet)
IF(WANT_SNDIO)
Expand Down
Binary file added data/themes/default/insert_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/themes/default/remove_bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 22 additions & 8 deletions include/FileBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class FileBrowser : public SideBarWidget

private slots:
void reloadTree( void );
void expandItems( QTreeWidgetItem * item=NULL, QList<QString> expandedDirs = QList<QString>() );
void expandItems( QTreeWidgetItem * item=nullptr, QList<QString> expandedDirs = QList<QString>() );
// call with item=NULL to filter the entire tree
bool filterItems( const QString & filter, QTreeWidgetItem * item=NULL );
bool filterItems( const QString & filter, QTreeWidgetItem * item=nullptr );
void giveFocusToFilter();

private:
Expand Down Expand Up @@ -105,29 +105,38 @@ class FileBrowserTreeWidget : public QTreeWidget
void mousePressEvent( QMouseEvent * me ) override;
void mouseMoveEvent( QMouseEvent * me ) override;
void mouseReleaseEvent( QMouseEvent * me ) override;
void keyPressEvent( QKeyEvent * ke ) override;
void keyReleaseEvent( QKeyEvent * ke ) override;
void hideEvent( QHideEvent * he ) override;


private:
//! Start a preview of a file item
void previewFileItem(FileItem* file);
//! If a preview is playing, stop it.
void stopPreview();

void handleFile( FileItem * fi, InstrumentTrack * it );
void openInNewInstrumentTrack( TrackContainer* tc );
void openInNewInstrumentTrack( TrackContainer* tc, FileItem* item );


bool m_mousePressed;
QPoint m_pressPos;

//! This should only be accessed or modified when m_pphMutex is held
PlayHandle* m_previewPlayHandle;
QMutex m_pphMutex;

FileItem * m_contextMenuItem;
QList<QAction*> getContextActions(FileItem* item, bool songEditor);


private slots:
void activateListItem( QTreeWidgetItem * item, int column );
void openInNewInstrumentTrackBBE( void );
void openInNewInstrumentTrackSE( void );
void sendToActiveInstrumentTrack( void );
void openInNewInstrumentTrack( FileItem* item, bool songEditor );
bool openInNewSampleTrack( FileItem* item );
void sendToActiveInstrumentTrack( FileItem* item );
void updateDirectory( QTreeWidgetItem * item );
void openContainingFolder();
void openContainingFolder( FileItem* item );

} ;

Expand Down Expand Up @@ -234,6 +243,11 @@ class FileItem : public QTreeWidgetItem
return( m_handling );
}

inline bool isTrack( void ) const
{
return m_handling == LoadAsPreset || m_handling == LoadByPlugin;
}

QString extension( void );
static QString extension( const QString & file );

Expand Down
2 changes: 1 addition & 1 deletion include/Lv2Ports.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct Cv : public VisitablePort<Cv, ControlPortBase>

struct Audio : public VisitablePort<Audio, PortBase>
{
Audio(std::size_t bufferSize, bool isSidechain, bool isOptional);
Audio(std::size_t bufferSize, bool isSidechain);

//! Copy buffer passed by LMMS into our ports
//! @param channel channel index into each sample frame
Expand Down
5 changes: 4 additions & 1 deletion include/PianoRoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,13 @@ protected slots:
void zoomingYChanged();
void quantizeChanged();
void noteLengthChanged();
void keyChanged();
void quantizeNotes();

void updateSemiToneMarkerMenu();

void changeNoteEditMode( int i );
void markSemiTone( int i );
void markSemiTone(int i, bool fromMenu = true);

void hidePattern( Pattern* pattern );

Expand Down Expand Up @@ -311,6 +312,7 @@ protected slots:
ComboBoxModel m_zoomingYModel;
ComboBoxModel m_quantizeModel;
ComboBoxModel m_noteLenModel;
ComboBoxModel m_keyModel;
ComboBoxModel m_scaleModel;
ComboBoxModel m_chordModel;

Expand Down Expand Up @@ -507,6 +509,7 @@ private slots:
ComboBox * m_zoomingYComboBox;
ComboBox * m_quantizeComboBox;
ComboBox * m_noteLenComboBox;
ComboBox * m_keyComboBox;
ComboBox * m_scaleComboBox;
ComboBox * m_chordComboBox;
QPushButton * m_clearGhostButton;
Expand Down
2 changes: 2 additions & 0 deletions include/PluginIssue.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ enum PluginIssueType
unknownPortType,
tooManyInputChannels,
tooManyOutputChannels,
tooManyMidiInputChannels,
tooManyMidiOutputChannels,
noOutputChannel,
portHasNoDef,
portHasNoMin,
Expand Down
3 changes: 3 additions & 0 deletions include/SongEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ protected slots:
ComboBox * m_zoomingComboBox;
ComboBox * m_snappingComboBox;
QLabel* m_snapSizeLabel;

QAction* m_insertBarAction;
QAction* m_removeBarAction;
};

#endif
24 changes: 0 additions & 24 deletions include/stdshims.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,9 @@
#ifndef STDSHIMS_H
#define STDSHIMS_H

#include <memory>
#include <type_traits>
#include <utility>

#if (__cplusplus >= 201402L || _MSC_VER)
#ifndef _MSC_VER
#warning "This part of this file should now be removed! The functions it provides are part of the C++14 standard."
#endif
using std::make_unique;

#else

/// Shim for http://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}

//! Overload for the case a deleter should be specified
template<typename T, typename Deleter, typename... Args>
std::unique_ptr<T, Deleter> make_unique(Args&&... args)
{
return std::unique_ptr<T, Deleter>(new T(std::forward<Args>(args)...));
}
#endif

#if (__cplusplus >= 201703L || _MSC_VER >= 1914)
#ifndef _MSC_VER
#warning "This part of this file should now be removed! The functions it provides are part of the C++17 standard."
Expand Down
4 changes: 2 additions & 2 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
SET(CMAKE_DEBUG_POSTFIX "")

# Enable C++11
SET(CMAKE_CXX_STANDARD 11)
# Enable C++14
SET(CMAKE_CXX_STANDARD 14)

IF(LMMS_BUILD_APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
Expand Down
91 changes: 45 additions & 46 deletions plugins/DualFilter/DualFilterControls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "embed.h"
#include "Engine.h"
#include "Song.h"
#include "stdshims.h"

DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
EffectControls( effect ),
Expand All @@ -52,51 +51,51 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
m_res2Model( 0.5, BasicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) )
{
m_filter1Model.addItem( tr( "Low-pass" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "Hi-pass" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "Band-pass csg" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "Band-pass czpg" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "Notch" ), make_unique<PixmapLoader>( "filter_notch" ) );
m_filter1Model.addItem( tr( "All-pass" ), make_unique<PixmapLoader>( "filter_ap" ) );
m_filter1Model.addItem( tr( "Moog" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "2x Low-pass" ), make_unique<PixmapLoader>( "filter_2lp" ) );
m_filter1Model.addItem( tr( "RC Low-pass 12 dB/oct" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "RC Band-pass 12 dB/oct" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "RC High-pass 12 dB/oct" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "RC Low-pass 24 dB/oct" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "RC Band-pass 24 dB/oct" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "RC High-pass 24 dB/oct" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "Vocal Formant" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "2x Moog" ), make_unique<PixmapLoader>( "filter_2lp" ) );
m_filter1Model.addItem( tr( "SV Low-pass" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "SV Band-pass" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "SV High-pass" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "SV Notch" ), make_unique<PixmapLoader>( "filter_notch" ) );
m_filter1Model.addItem( tr( "Fast Formant" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "Tripole" ), make_unique<PixmapLoader>( "filter_lp" ) );

m_filter2Model.addItem( tr( "Low-pass" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "Hi-pass" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "Band-pass csg" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "Band-pass czpg" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "Notch" ), make_unique<PixmapLoader>( "filter_notch" ) );
m_filter2Model.addItem( tr( "All-pass" ), make_unique<PixmapLoader>( "filter_ap" ) );
m_filter2Model.addItem( tr( "Moog" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "2x Low-pass" ), make_unique<PixmapLoader>( "filter_2lp" ) );
m_filter2Model.addItem( tr( "RC Low-pass 12 dB/oct" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "RC Band-pass 12 dB/oct" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "RC High-pass 12 dB/oct" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "RC Low-pass 24 dB/oct" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "RC Band-pass 24 dB/oct" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "RC High-pass 24 dB/oct" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "Vocal Formant" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "2x Moog" ), make_unique<PixmapLoader>( "filter_2lp" ) );
m_filter2Model.addItem( tr( "SV Low-pass" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "SV Band-pass" ), make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "SV High-pass" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "SV Notch" ), make_unique<PixmapLoader>( "filter_notch" ) );
m_filter2Model.addItem( tr( "Fast Formant" ), make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "Tripole" ), make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "Low-pass" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "Hi-pass" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "Band-pass csg" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "Band-pass czpg" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "Notch" ), std::make_unique<PixmapLoader>( "filter_notch" ) );
m_filter1Model.addItem( tr( "All-pass" ), std::make_unique<PixmapLoader>( "filter_ap" ) );
m_filter1Model.addItem( tr( "Moog" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "2x Low-pass" ), std::make_unique<PixmapLoader>( "filter_2lp" ) );
m_filter1Model.addItem( tr( "RC Low-pass 12 dB/oct" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "RC Band-pass 12 dB/oct" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "RC High-pass 12 dB/oct" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "RC Low-pass 24 dB/oct" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "RC Band-pass 24 dB/oct" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "RC High-pass 24 dB/oct" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "Vocal Formant" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "2x Moog" ), std::make_unique<PixmapLoader>( "filter_2lp" ) );
m_filter1Model.addItem( tr( "SV Low-pass" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter1Model.addItem( tr( "SV Band-pass" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter1Model.addItem( tr( "SV High-pass" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "SV Notch" ), std::make_unique<PixmapLoader>( "filter_notch" ) );
m_filter1Model.addItem( tr( "Fast Formant" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter1Model.addItem( tr( "Tripole" ), std::make_unique<PixmapLoader>( "filter_lp" ) );

m_filter2Model.addItem( tr( "Low-pass" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "Hi-pass" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "Band-pass csg" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "Band-pass czpg" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "Notch" ), std::make_unique<PixmapLoader>( "filter_notch" ) );
m_filter2Model.addItem( tr( "All-pass" ), std::make_unique<PixmapLoader>( "filter_ap" ) );
m_filter2Model.addItem( tr( "Moog" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "2x Low-pass" ), std::make_unique<PixmapLoader>( "filter_2lp" ) );
m_filter2Model.addItem( tr( "RC Low-pass 12 dB/oct" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "RC Band-pass 12 dB/oct" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "RC High-pass 12 dB/oct" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "RC Low-pass 24 dB/oct" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "RC Band-pass 24 dB/oct" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "RC High-pass 24 dB/oct" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "Vocal Formant" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "2x Moog" ), std::make_unique<PixmapLoader>( "filter_2lp" ) );
m_filter2Model.addItem( tr( "SV Low-pass" ), std::make_unique<PixmapLoader>( "filter_lp" ) );
m_filter2Model.addItem( tr( "SV Band-pass" ), std::make_unique<PixmapLoader>( "filter_bp" ) );
m_filter2Model.addItem( tr( "SV High-pass" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "SV Notch" ), std::make_unique<PixmapLoader>( "filter_notch" ) );
m_filter2Model.addItem( tr( "Fast Formant" ), std::make_unique<PixmapLoader>( "filter_hp" ) );
m_filter2Model.addItem( tr( "Tripole" ), std::make_unique<PixmapLoader>( "filter_lp" ) );

connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) );
}
Expand Down
2 changes: 0 additions & 2 deletions plugins/LadspaEffect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialo

SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa")

SET(CMAKE_CXX_STANDARD 11)

IF(WANT_CAPS)
ADD_SUBDIRECTORY(caps)
ENDIF(WANT_CAPS)
Expand Down
2 changes: 0 additions & 2 deletions plugins/LadspaEffect/calf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Note:
# The last version of Calf that was LADSPA-capable is version 0.0.18.2

SET(CMAKE_CXX_STANDARD 11)

# Parse version info from autoconf
FILE(READ veal/configure.ac VERSION_FILE)
STRING(REPLACE "[" ";" VERSION_FILE ${VERSION_FILE} )
Expand Down
7 changes: 5 additions & 2 deletions plugins/lb302/lb302.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@


//#define engine::mixer()->processingSampleRate() 44100.0f

const float sampleRateCutoff = 44100.0f;

extern "C"
{
Expand Down Expand Up @@ -228,8 +228,11 @@ void lb302Filter3Pole::envRecalc()
// e0 is adjusted for Hz and doesn't need ENVINC
w = vcf_e0 + vcf_c0;
k = (fs->cutoff > 0.975)?0.975:fs->cutoff;
// sampleRateCutoff should not be changed to anything dynamic that is outside the
// scope of lb302 (like e.g. the mixers sample rate) as this changes the filters cutoff
// behavior without any modification to its controls.
kfco = 50.f + (k)*((2300.f-1600.f*(fs->envmod))+(w) *
(700.f+1500.f*(k)+(1500.f+(k)*(Engine::mixer()->processingSampleRate()/2.f-6000.f)) *
(700.f+1500.f*(k)+(1500.f+(k)*(sampleRateCutoff/2.f-6000.f)) *
(fs->envmod)) );
//+iacc*(.3+.7*kfco*kenvmod)*kaccent*kaccurve*2000

Expand Down
Loading