Namespace lmms (#6174)
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.
Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .
Co-authored-by: allejok96 <allejok96@gmail.com>
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -145,3 +148,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "Effect.h"
|
||||
#include "AmplifierControls.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AmplifierEffect : public Effect
|
||||
{
|
||||
public:
|
||||
@@ -50,4 +53,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "Knob.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) :
|
||||
EffectControlDialog( controls )
|
||||
@@ -67,3 +70,6 @@ AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) :
|
||||
rightKnob->setLabel( tr( "RIGHT" ) );
|
||||
rightKnob->setHintText( tr( "Right gain:" ) , "%" );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
@@ -28,10 +28,15 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AmplifierControls;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class AmplifierControlDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -43,4 +48,9 @@ public:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "AmplifierControls.h"
|
||||
#include "Amplifier.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AmplifierControls::AmplifierControls( AmplifierEffect* effect ) :
|
||||
EffectControls( effect ),
|
||||
@@ -75,6 +77,6 @@ void AmplifierControls::saveSettings( QDomDocument& doc, QDomElement& _this )
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
|
||||
|
||||
@@ -29,9 +29,16 @@
|
||||
#include "EffectControls.h"
|
||||
#include "AmplifierControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AmplifierEffect;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class AmplifierControlDialog;
|
||||
}
|
||||
|
||||
|
||||
class AmplifierControls : public EffectControls
|
||||
{
|
||||
@@ -54,9 +61,9 @@ public:
|
||||
return 4;
|
||||
}
|
||||
|
||||
virtual EffectControlDialog* createView()
|
||||
virtual gui::EffectControlDialog* createView()
|
||||
{
|
||||
return new AmplifierControlDialog( this );
|
||||
return new gui::AmplifierControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -70,9 +77,12 @@ private:
|
||||
FloatModel m_leftModel;
|
||||
FloatModel m_rightModel;
|
||||
|
||||
friend class AmplifierControlDialog;
|
||||
friend class gui::AmplifierControlDialog;
|
||||
friend class AmplifierEffect;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,6 +47,11 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -110,13 +115,6 @@ AudioFileProcessor::AudioFileProcessor( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
|
||||
|
||||
AudioFileProcessor::~AudioFileProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessor::playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer )
|
||||
{
|
||||
@@ -312,9 +310,9 @@ int AudioFileProcessor::getBeatLen( NotePlayHandle * _n ) const
|
||||
|
||||
|
||||
|
||||
PluginView * AudioFileProcessor::instantiateView( QWidget * _parent )
|
||||
gui::PluginView* AudioFileProcessor::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new AudioFileProcessorView( this, _parent );
|
||||
return new gui::AudioFileProcessorView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
@@ -442,6 +440,8 @@ void AudioFileProcessor::pointChanged( void )
|
||||
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
QPixmap * AudioFileProcessorView::s_artwork = nullptr;
|
||||
@@ -548,8 +548,8 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
m_waveView = 0;
|
||||
newWaveView();
|
||||
|
||||
connect( castModel<AudioFileProcessor>(), SIGNAL( isPlaying( f_cnt_t ) ),
|
||||
m_waveView, SLOT( isPlaying( f_cnt_t ) ) );
|
||||
connect( castModel<AudioFileProcessor>(), SIGNAL( isPlaying( lmms::f_cnt_t ) ),
|
||||
m_waveView, SLOT( isPlaying( lmms::f_cnt_t ) ) );
|
||||
|
||||
qRegisterMetaType<f_cnt_t>( "f_cnt_t" );
|
||||
|
||||
@@ -1242,7 +1242,7 @@ float AudioFileProcessorWaveView::knob::getValue( const QPoint & _p )
|
||||
const double dec_fact = ! m_waveView ? 1 :
|
||||
double( m_waveView->m_to - m_waveView->m_from )
|
||||
/ m_waveView->m_sampleBuffer.frames();
|
||||
const float inc = ::Knob::getValue( _p ) * dec_fact;
|
||||
const float inc = Knob::getValue( _p ) * dec_fact;
|
||||
|
||||
return inc;
|
||||
}
|
||||
@@ -1273,6 +1273,7 @@ bool AudioFileProcessorWaveView::knob::checkBound( double _v ) const
|
||||
}
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
|
||||
@@ -1288,3 +1289,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main(Model * model, void *)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -35,9 +35,20 @@
|
||||
#include "SampleBuffer.h"
|
||||
#include "Knob.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class automatableButtonGroup;
|
||||
class ComboBox;
|
||||
class PluginView;
|
||||
class InstrumentViewFixedSize;
|
||||
class Knob;
|
||||
class PixmapButton;
|
||||
class ComboBox;
|
||||
class AudioFileProcessorView;
|
||||
}
|
||||
|
||||
|
||||
class AudioFileProcessor : public Instrument
|
||||
@@ -45,28 +56,27 @@ class AudioFileProcessor : public Instrument
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioFileProcessor( InstrumentTrack * _instrument_track );
|
||||
virtual ~AudioFileProcessor();
|
||||
|
||||
virtual void playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer );
|
||||
virtual void deleteNotePluginData( NotePlayHandle * _n );
|
||||
void playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer ) override;
|
||||
void deleteNotePluginData( NotePlayHandle * _n ) override;
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
virtual void loadFile( const QString & _file );
|
||||
void loadFile( const QString & _file ) override;
|
||||
|
||||
virtual QString nodeName() const;
|
||||
QString nodeName() const override;
|
||||
|
||||
virtual int getBeatLen( NotePlayHandle * _n ) const;
|
||||
|
||||
virtual f_cnt_t desiredReleaseFrames() const
|
||||
f_cnt_t desiredReleaseFrames() const override
|
||||
{
|
||||
return 128;
|
||||
}
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
gui::PluginView* instantiateView( QWidget * _parent ) override;
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -84,7 +94,7 @@ private slots:
|
||||
|
||||
|
||||
signals:
|
||||
void isPlaying( f_cnt_t _current_frame );
|
||||
void isPlaying( lmms::f_cnt_t _current_frame );
|
||||
|
||||
|
||||
private:
|
||||
@@ -104,16 +114,18 @@ private:
|
||||
f_cnt_t m_nextPlayStartPoint;
|
||||
bool m_nextPlayBackwards;
|
||||
|
||||
friend class AudioFileProcessorView;
|
||||
friend class gui::AudioFileProcessorView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class AudioFileProcessorWaveView;
|
||||
|
||||
|
||||
class AudioFileProcessorView : public InstrumentViewFixedSize
|
||||
class AudioFileProcessorView : public gui::InstrumentViewFixedSize
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -143,7 +155,7 @@ private:
|
||||
Knob * m_endKnob;
|
||||
Knob * m_loopKnob;
|
||||
|
||||
PixmapButton * m_openAudioFileButton;
|
||||
gui::PixmapButton * m_openAudioFileButton;
|
||||
PixmapButton * m_reverseButton;
|
||||
automatableButtonGroup * m_loopGroup;
|
||||
PixmapButton * m_stutterButton;
|
||||
@@ -174,7 +186,7 @@ public:
|
||||
loop
|
||||
} ;
|
||||
|
||||
class knob : public ::Knob
|
||||
class knob : public Knob
|
||||
{
|
||||
const AudioFileProcessorWaveView * m_waveView;
|
||||
const Knob * m_relatedKnob;
|
||||
@@ -182,7 +194,7 @@ public:
|
||||
|
||||
public:
|
||||
knob( QWidget * _parent ) :
|
||||
::Knob( knobBright_26, _parent ),
|
||||
Knob( knobBright_26, _parent ),
|
||||
m_waveView( 0 ),
|
||||
m_relatedKnob( 0 )
|
||||
{
|
||||
@@ -223,7 +235,7 @@ public slots:
|
||||
QWidget::update();
|
||||
}
|
||||
|
||||
void isPlaying( f_cnt_t _current_frame );
|
||||
void isPlaying( lmms::f_cnt_t _current_frame );
|
||||
|
||||
|
||||
private:
|
||||
@@ -287,6 +299,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -155,3 +159,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "DspEffectLibrary.h"
|
||||
#include "BassBoosterControls.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class BassBoosterEffect : public Effect
|
||||
{
|
||||
@@ -60,4 +62,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include "Knob.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* controls ) :
|
||||
EffectControlDialog( controls )
|
||||
@@ -69,3 +72,6 @@ BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* control
|
||||
tl->addLayout( l );
|
||||
setLayout( tl );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
@@ -27,9 +27,13 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class BassBoosterControls;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class BassBoosterControlDialog : public EffectControlDialog
|
||||
{
|
||||
@@ -42,4 +46,9 @@ public:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "BassBoosterControls.h"
|
||||
#include "BassBooster.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
BassBoosterControls::BassBoosterControls( BassBoosterEffect* effect ) :
|
||||
@@ -66,6 +68,4 @@ void BassBoosterControls::saveSettings( QDomDocument& doc, QDomElement& _this )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "EffectControls.h"
|
||||
#include "BassBoosterControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class BassBoosterEffect;
|
||||
|
||||
@@ -53,9 +55,9 @@ public:
|
||||
return 3;
|
||||
}
|
||||
|
||||
virtual EffectControlDialog* createView()
|
||||
virtual gui::EffectControlDialog* createView()
|
||||
{
|
||||
return new BassBoosterControlDialog( this );
|
||||
return new gui::BassBoosterControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -68,8 +70,11 @@ private:
|
||||
FloatModel m_gainModel;
|
||||
FloatModel m_ratioModel;
|
||||
|
||||
friend class BassBoosterControlDialog;
|
||||
friend class gui::BassBoosterControlDialog;
|
||||
friend class BassBoosterEffect;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
static const int wavetableSize = 200;
|
||||
static const float defaultNormalizationFactor = 1.0f;
|
||||
|
||||
@@ -325,15 +329,16 @@ void BitInvader::deleteNotePluginData( NotePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
PluginView * BitInvader::instantiateView( QWidget * _parent )
|
||||
gui::PluginView * BitInvader::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new BitInvaderView( this, _parent ) );
|
||||
return( new gui::BitInvaderView( this, _parent ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
BitInvaderView::BitInvaderView( Instrument * _instrument,
|
||||
@@ -571,6 +576,7 @@ void BitInvaderView::normalizeToggled( bool value )
|
||||
}
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
extern "C"
|
||||
@@ -584,3 +590,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * )
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -33,11 +33,18 @@
|
||||
#include "Graph.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class oscillator;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class BitInvaderView;
|
||||
class Knob;
|
||||
class LedCheckBox;
|
||||
class PixmapButton;
|
||||
}
|
||||
|
||||
|
||||
class BSynth
|
||||
{
|
||||
@@ -85,7 +92,7 @@ public:
|
||||
return( 64 );
|
||||
}
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
virtual gui::PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
protected slots:
|
||||
void lengthChanged();
|
||||
@@ -103,10 +110,12 @@ private:
|
||||
|
||||
float m_normalizeFactor;
|
||||
|
||||
friend class BitInvaderView;
|
||||
friend class gui::BitInvaderView;
|
||||
} ;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class BitInvaderView : public InstrumentViewFixedSize
|
||||
{
|
||||
@@ -153,5 +162,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
const int OS_RATE = 5;
|
||||
const float OS_RATIO = 1.0f / OS_RATE;
|
||||
const float CUTOFF_RATIO = 0.353553391f;
|
||||
@@ -251,3 +255,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -31,6 +31,11 @@
|
||||
#include "BitcrushControls.h"
|
||||
#include "BasicFilters.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class BitcrushEffect : public Effect
|
||||
{
|
||||
public:
|
||||
@@ -78,4 +83,7 @@ private:
|
||||
friend class BitcrushControls;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "LedCheckBox.h"
|
||||
#include "Knob.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
EffectControlDialog( controls )
|
||||
{
|
||||
@@ -110,3 +114,6 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
levels->setLabel( tr( "QUANT" ) );
|
||||
levels->setHintText( tr( "Levels:" ) , "" );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
@@ -29,8 +29,15 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class BitcrushControls;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class BitcrushControlDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -41,4 +48,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "BitcrushControls.h"
|
||||
#include "Bitcrush.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
|
||||
BitcrushControls::BitcrushControls( BitcrushEffect * eff ) :
|
||||
EffectControls( eff ),
|
||||
@@ -86,3 +90,6 @@ void BitcrushControls::sampleRateChanged()
|
||||
{
|
||||
m_effect->sampleRateChanged();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "EffectControls.h"
|
||||
#include "BitcrushControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class BitcrushEffect;
|
||||
|
||||
class BitcrushControls : public EffectControls
|
||||
@@ -50,9 +54,9 @@ public:
|
||||
return( 9 );
|
||||
}
|
||||
|
||||
virtual EffectControlDialog * createView()
|
||||
virtual gui::EffectControlDialog * createView()
|
||||
{
|
||||
return( new BitcrushControlDialog( this ) );
|
||||
return( new gui::BitcrushControlDialog( this ) );
|
||||
}
|
||||
|
||||
private slots:
|
||||
@@ -75,8 +79,11 @@ private:
|
||||
BoolModel m_rateEnabled;
|
||||
BoolModel m_depthEnabled;
|
||||
|
||||
friend class BitcrushControlDialog;
|
||||
friend class gui::BitcrushControlDialog;
|
||||
friend class BitcrushEffect;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
|
||||
#include "embed.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// this doesn't seem to be defined anywhere
|
||||
static const double ticksPerBeat = 48.0;
|
||||
|
||||
@@ -145,6 +148,7 @@ static const char* host_ui_save_file(NativeHostHandle, bool isDir, const char* t
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
|
||||
CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay)
|
||||
: Instrument(instrumentTrack, descriptor),
|
||||
kIsPatchbay(isPatchbay),
|
||||
@@ -575,7 +579,7 @@ bool CarlaInstrument::handleMidiEvent(const MidiEvent& event, const TimePos&, f_
|
||||
return true;
|
||||
}
|
||||
|
||||
PluginView* CarlaInstrument::instantiateView(QWidget* parent)
|
||||
gui::PluginView* CarlaInstrument::instantiateView(QWidget* parent)
|
||||
{
|
||||
// Disable plugin focus per https://bugreports.qt.io/browse/QTBUG-30181
|
||||
#ifndef CARLA_OS_MAC
|
||||
@@ -592,7 +596,7 @@ PluginView* CarlaInstrument::instantiateView(QWidget* parent)
|
||||
//fHost.uiName = strdup(parent->windowTitle().toUtf8().constData());
|
||||
fHost.uiName = strdup(kIsPatchbay ? "CarlaPatchbay-LMMS" : "CarlaRack-LMMS");
|
||||
|
||||
return new CarlaInstrumentView(this, parent);
|
||||
return new gui::CarlaInstrumentView(this, parent);
|
||||
}
|
||||
|
||||
void CarlaInstrument::sampleRateChanged()
|
||||
@@ -602,6 +606,9 @@ void CarlaInstrument::sampleRateChanged()
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWidget* const parent)
|
||||
: InstrumentViewFixedSize(instrument, parent),
|
||||
fHandle(instrument->fHandle),
|
||||
@@ -847,6 +854,17 @@ CarlaParamsView::CarlaParamsView(CarlaInstrumentView* const instrumentView, QWid
|
||||
splitter->addWidget(outputFrame);
|
||||
verticalLayout->addWidget(splitter);
|
||||
|
||||
#if QT_VERSION < 0x50C00
|
||||
// Workaround for a bug in Qt versions below 5.12,
|
||||
// where argument-dependent-lookup fails for QFlags operators
|
||||
// declared inside a namepsace.
|
||||
// This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h
|
||||
// See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348
|
||||
|
||||
using ::operator|;
|
||||
|
||||
#endif
|
||||
|
||||
// -- Sub window
|
||||
CarlaParamsSubWindow* win = new CarlaParamsSubWindow(getGUI()->mainWindow()->workspace()->viewport(), Qt::SubWindow |
|
||||
Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
|
||||
@@ -1043,6 +1061,17 @@ void CarlaParamsView::windowResized()
|
||||
|
||||
void CarlaParamsView::addKnob(uint32_t index)
|
||||
{
|
||||
#if QT_VERSION < 0x50C00
|
||||
// Workaround for a bug in Qt versions below 5.12,
|
||||
// where argument-dependent-lookup fails for QFlags operators
|
||||
// declared inside a namepsace.
|
||||
// This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h
|
||||
// See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348
|
||||
|
||||
using ::operator|;
|
||||
|
||||
#endif
|
||||
|
||||
bool output = m_carlaInstrument->m_paramModels[index]->isOutput();
|
||||
if (output)
|
||||
{
|
||||
@@ -1111,3 +1140,8 @@ void CarlaParamsView::clearKnobs()
|
||||
m_curOutColumn = 0;
|
||||
m_curOutRow = 0;
|
||||
}
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
@@ -65,8 +65,16 @@ class QLineEdit;
|
||||
class QStringListModel;
|
||||
class QScrollArea;
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class CarlaParamsView;
|
||||
class CarlaInstrumentView;
|
||||
class Knob;
|
||||
}
|
||||
|
||||
class CarlaParamFloatModel : public FloatModel
|
||||
{
|
||||
@@ -161,9 +169,79 @@ private:
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class CARLABASE_EXPORT CarlaInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static const uint32_t kMaxMidiEvents = 512;
|
||||
|
||||
CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay);
|
||||
virtual ~CarlaInstrument();
|
||||
|
||||
// Carla NativeHostDescriptor functions
|
||||
uint32_t handleGetBufferSize() const;
|
||||
double handleGetSampleRate() const;
|
||||
bool handleIsOffline() const;
|
||||
const NativeTimeInfo* handleGetTimeInfo() const;
|
||||
void handleUiParameterChanged(const uint32_t index, const float value) const;
|
||||
void handleUiClosed();
|
||||
intptr_t handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt);
|
||||
|
||||
// LMMS functions
|
||||
virtual Flags flags() const;
|
||||
virtual QString nodeName() const;
|
||||
virtual void saveSettings(QDomDocument& doc, QDomElement& parent);
|
||||
virtual void loadSettings(const QDomElement& elem);
|
||||
virtual void play(sampleFrame* workingBuffer);
|
||||
virtual bool handleMidiEvent(const MidiEvent& event, const TimePos& time, f_cnt_t offset);
|
||||
virtual gui::PluginView* instantiateView(QWidget* parent);
|
||||
|
||||
signals:
|
||||
void uiClosed();
|
||||
void paramsUpdated();
|
||||
|
||||
private slots:
|
||||
void sampleRateChanged();
|
||||
void refreshParams(bool init = false);
|
||||
void clearParamModels();
|
||||
void paramModelChanged(uint32_t index);
|
||||
void updateParamModel(uint32_t index);
|
||||
|
||||
private:
|
||||
const bool kIsPatchbay;
|
||||
|
||||
NativePluginHandle fHandle;
|
||||
NativeHostDescriptor fHost;
|
||||
const NativePluginDescriptor* fDescriptor;
|
||||
|
||||
uint32_t fMidiEventCount;
|
||||
NativeMidiEvent fMidiEvents[kMaxMidiEvents];
|
||||
NativeTimeInfo fTimeInfo;
|
||||
|
||||
// this is only needed because note-offs are being sent during play
|
||||
QMutex fMutex;
|
||||
|
||||
uint8_t m_paramGroupCount;
|
||||
QList<CarlaParamFloatModel*> m_paramModels;
|
||||
QDomElement m_settingsElem;
|
||||
|
||||
QCompleter* m_paramsCompleter;
|
||||
QStringListModel* m_completerModel;
|
||||
|
||||
friend class gui::CarlaInstrumentView;
|
||||
friend class gui::CarlaParamsView;
|
||||
};
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class CarlaParamsSubWindow : public SubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
signals:
|
||||
void uiClosed();
|
||||
@@ -212,73 +290,6 @@ private:
|
||||
bool mousePress = false;
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class CARLABASE_EXPORT CarlaInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static const uint32_t kMaxMidiEvents = 512;
|
||||
|
||||
CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay);
|
||||
virtual ~CarlaInstrument();
|
||||
|
||||
// Carla NativeHostDescriptor functions
|
||||
uint32_t handleGetBufferSize() const;
|
||||
double handleGetSampleRate() const;
|
||||
bool handleIsOffline() const;
|
||||
const NativeTimeInfo* handleGetTimeInfo() const;
|
||||
void handleUiParameterChanged(const uint32_t index, const float value) const;
|
||||
void handleUiClosed();
|
||||
intptr_t handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt);
|
||||
|
||||
// LMMS functions
|
||||
virtual Flags flags() const;
|
||||
virtual QString nodeName() const;
|
||||
virtual void saveSettings(QDomDocument& doc, QDomElement& parent);
|
||||
virtual void loadSettings(const QDomElement& elem);
|
||||
virtual void play(sampleFrame* workingBuffer);
|
||||
virtual bool handleMidiEvent(const MidiEvent& event, const TimePos& time, f_cnt_t offset);
|
||||
virtual PluginView* instantiateView(QWidget* parent);
|
||||
|
||||
signals:
|
||||
void uiClosed();
|
||||
void paramsUpdated();
|
||||
|
||||
private slots:
|
||||
void sampleRateChanged();
|
||||
void refreshParams(bool init = false);
|
||||
void clearParamModels();
|
||||
void paramModelChanged(uint32_t index);
|
||||
void updateParamModel(uint32_t index);
|
||||
|
||||
private:
|
||||
const bool kIsPatchbay;
|
||||
|
||||
NativePluginHandle fHandle;
|
||||
NativeHostDescriptor fHost;
|
||||
const NativePluginDescriptor* fDescriptor;
|
||||
|
||||
uint32_t fMidiEventCount;
|
||||
NativeMidiEvent fMidiEvents[kMaxMidiEvents];
|
||||
NativeTimeInfo fTimeInfo;
|
||||
|
||||
// this is only needed because note-offs are being sent during play
|
||||
QMutex fMutex;
|
||||
|
||||
uint8_t m_paramGroupCount;
|
||||
QList<CarlaParamFloatModel*> m_paramModels;
|
||||
QDomElement m_settingsElem;
|
||||
|
||||
QCompleter* m_paramsCompleter;
|
||||
QStringListModel* m_completerModel;
|
||||
|
||||
friend class CarlaInstrumentView;
|
||||
friend class CarlaParamsView;
|
||||
};
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
class CarlaInstrumentView : public InstrumentViewFixedSize
|
||||
@@ -365,4 +376,9 @@ private:
|
||||
QStringListModel* m_groupFilterModel;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "plugin_export.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -51,3 +55,6 @@ PLUGIN_EXPORT Plugin* lmms_plugin_main(Model* m, void*)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "plugin_export.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -51,3 +55,6 @@ PLUGIN_EXPORT Plugin* lmms_plugin_main(Model* m, void*)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "lmms_math.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -662,3 +666,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main(Model* parent, void* data)
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "Effect.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
constexpr float COMP_LOG = -2.2;
|
||||
|
||||
class CompressorEffect : public Effect
|
||||
@@ -145,7 +149,10 @@ private:
|
||||
bool m_redrawThreshold = true;
|
||||
|
||||
friend class CompressorControls;
|
||||
friend class CompressorControlDialog;
|
||||
friend class gui::CompressorControlDialog;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
#include "MainWindow.h"
|
||||
#include "PixmapButton.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) :
|
||||
EffectControlDialog(controls),
|
||||
m_controls(controls),
|
||||
@@ -762,3 +766,6 @@ void CompressorControlDialog::resetCompressorView()
|
||||
m_autoReleaseKnob->move(m_controlsBoxX + 590, m_controlsBoxY + 38);
|
||||
lookaheadButton->move(m_controlsBoxX + 202, m_controlsBoxY + 171);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
@@ -31,6 +31,18 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
class QLabel;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
constexpr float COMP_NOISE_FLOOR = 0.000001;// -120 dbFs
|
||||
|
||||
class CompressorControls;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
constexpr int COMP_MILLI_PER_PIXEL = 6;
|
||||
constexpr int MIN_COMP_SCREEN_X = 800;
|
||||
@@ -47,16 +59,11 @@ constexpr int COMP_BOX_Y = 280;
|
||||
constexpr float COMP_GRID_SPACING = 3.f;// 3 db per grid line
|
||||
constexpr float COMP_GRID_MAX = 96.f;// Can't zoom out past 96 db
|
||||
|
||||
constexpr float COMP_NOISE_FLOOR = 0.000001;// -120 dbFs
|
||||
|
||||
|
||||
|
||||
class automatableButtonGroup;
|
||||
class CompressorControls;
|
||||
class EqFader;
|
||||
class Knob;
|
||||
class PixmapButton;
|
||||
class QLabel;
|
||||
class EqFader;
|
||||
|
||||
|
||||
class CompressorControlDialog : public EffectControlDialog
|
||||
{
|
||||
@@ -213,4 +220,10 @@ private:
|
||||
friend class CompressorControls;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include <QDomElement>
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
CompressorControls::CompressorControls(CompressorEffect* effect) :
|
||||
EffectControls(effect),
|
||||
@@ -143,3 +145,4 @@ void CompressorControls::loadSettings(const QDomElement& _this)
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "EffectControls.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class CompressorEffect;
|
||||
|
||||
@@ -51,9 +53,9 @@ public:
|
||||
return 28;
|
||||
}
|
||||
|
||||
EffectControlDialog* createView() override
|
||||
gui::EffectControlDialog* createView() override
|
||||
{
|
||||
return new CompressorControlDialog(this);
|
||||
return new gui::CompressorControlDialog(this);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -93,9 +95,12 @@ private:
|
||||
float m_outPeakL;
|
||||
float m_outPeakR;
|
||||
|
||||
friend class CompressorControlDialog;
|
||||
friend class gui::CompressorControlDialog;
|
||||
friend class CompressorEffect;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -222,3 +226,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "CrossoverEQControls.h"
|
||||
#include "BasicFilters.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class CrossoverEQEffect : public Effect
|
||||
{
|
||||
public:
|
||||
@@ -74,4 +78,7 @@ private:
|
||||
friend class CrossoverEQControls;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "Knob.h"
|
||||
#include "Fader.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * controls ) :
|
||||
EffectControlDialog( controls )
|
||||
{
|
||||
@@ -110,3 +114,6 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro
|
||||
mute4->setModel( & controls->m_mute4 );
|
||||
mute4->setToolTip(tr("Mute band 4"));
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
@@ -30,8 +30,16 @@
|
||||
#include <QPixmap>
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class CrossoverEQControls;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class CrossoverEQControlDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -47,4 +55,9 @@ private:
|
||||
QPixmap m_fader_knob;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
#include "CrossoverEQControls.h"
|
||||
#include "CrossoverEQ.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
CrossoverEQControls::CrossoverEQControls( CrossoverEQEffect * eff ) :
|
||||
EffectControls( eff ),
|
||||
m_effect( eff ),
|
||||
@@ -115,3 +119,6 @@ void CrossoverEQControls::sampleRateChanged()
|
||||
{
|
||||
m_effect->sampleRateChanged();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "EffectControls.h"
|
||||
#include "CrossoverEQControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class CrossoverEQEffect;
|
||||
|
||||
class CrossoverEQControls : public EffectControls
|
||||
@@ -51,9 +54,9 @@ public:
|
||||
return( 11 );
|
||||
}
|
||||
|
||||
virtual EffectControlDialog * createView()
|
||||
virtual gui::EffectControlDialog * createView()
|
||||
{
|
||||
return( new CrossoverEQControlDialog( this ) );
|
||||
return( new gui::CrossoverEQControlDialog( this ) );
|
||||
}
|
||||
|
||||
private slots:
|
||||
@@ -79,8 +82,11 @@ private:
|
||||
BoolModel m_mute3;
|
||||
BoolModel m_mute4;
|
||||
|
||||
friend class CrossoverEQControlDialog;
|
||||
friend class gui::CrossoverEQControlDialog;
|
||||
friend class CrossoverEQEffect;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include "DelayEffect.h"
|
||||
#include "Engine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
DelayControls::DelayControls( DelayEffect* effect ):
|
||||
EffectControls( effect ),
|
||||
m_effect ( effect ),
|
||||
@@ -72,3 +75,6 @@ void DelayControls::changeSampleRate()
|
||||
{
|
||||
m_effect->changeSampleRate();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -28,10 +28,13 @@
|
||||
#include "EffectControls.h"
|
||||
#include "DelayControlsDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DelayEffect;
|
||||
|
||||
|
||||
class DelayControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -49,9 +52,9 @@ public:
|
||||
virtual int controlCount(){
|
||||
return 5;
|
||||
}
|
||||
virtual EffectControlDialog* createView()
|
||||
virtual gui::EffectControlDialog* createView()
|
||||
{
|
||||
return new DelayControlsDialog( this );
|
||||
return new gui::DelayControlsDialog( this );
|
||||
}
|
||||
|
||||
float m_outPeakL;
|
||||
@@ -69,8 +72,11 @@ private:
|
||||
TempoSyncKnobModel m_lfoAmountModel;
|
||||
FloatModel m_outGainModel;
|
||||
|
||||
friend class DelayControlsDialog;
|
||||
friend class gui::DelayControlsDialog;
|
||||
friend class DelayEffect;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // DELAYCONTROLS_H
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
#include <QMouseEvent>
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) :
|
||||
@@ -152,3 +153,6 @@ void XyPad::mouseMoveEvent(QMouseEvent *event)
|
||||
m_yModel->setValue( m_yModel->minValue() + ( event->y() * yInc ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
@@ -27,9 +27,16 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DelayControls;
|
||||
class FloatModel;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class DelayControlsDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -59,4 +66,9 @@ private:
|
||||
bool m_acceptInput;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // DELAYCONTROLSDIALOG_H
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#include "plugin_export.h"
|
||||
#include "StereoDelay.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -166,3 +170,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
|
||||
}}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -28,6 +28,9 @@
|
||||
#include "Effect.h"
|
||||
#include "DelayControls.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Lfo;
|
||||
class StereoDelay;
|
||||
|
||||
@@ -51,4 +54,7 @@ private:
|
||||
float m_currentLength;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // DELAYEFFECT_H
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Lfo::Lfo( int samplerate )
|
||||
@@ -45,3 +46,6 @@ float Lfo::tick()
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "lmms_constants.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class Lfo
|
||||
{
|
||||
public:
|
||||
@@ -77,4 +81,7 @@ private:
|
||||
int m_samplerate;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LFO_H
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
#include "StereoDelay.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
StereoDelay::StereoDelay( int maxTime, int sampleRate )
|
||||
{
|
||||
@@ -87,7 +90,4 @@ void StereoDelay::setSampleRate( int sampleRate )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class StereoDelay
|
||||
{
|
||||
public:
|
||||
@@ -57,4 +61,7 @@ private:
|
||||
float m_maxTime;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // STEREODELAY_H
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "BasicFilters.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -229,3 +233,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "DualFilterControls.h"
|
||||
#include "BasicFilters.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DualFilterEffect : public Effect
|
||||
{
|
||||
public:
|
||||
@@ -62,4 +66,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,12 +31,16 @@
|
||||
#include "ComboBox.h"
|
||||
#include "gui_templates.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
#define makeknob( name, x, y, model, label, hint, unit ) \
|
||||
Knob * name = new Knob( knobBright_26, this); \
|
||||
name -> move( x, y ); \
|
||||
name ->setModel( &controls-> model ); \
|
||||
name ->setLabel( label ); \
|
||||
name ->setHintText( hint, unit );
|
||||
(name) -> move( x, y ); \
|
||||
(name) ->setModel( &controls-> model ); \
|
||||
(name) ->setLabel( label ); \
|
||||
(name) ->setHintText( hint, unit );
|
||||
|
||||
|
||||
|
||||
@@ -83,3 +87,5 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls )
|
||||
m_filter2ComboBox->setModel( &controls->m_filter2Model );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
@@ -28,9 +28,15 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DualFilterControls;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class DualFilterControlDialog : public EffectControlDialog
|
||||
{
|
||||
@@ -43,4 +49,9 @@ public:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "embed.h"
|
||||
#include "Engine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
EffectControls( effect ),
|
||||
m_effect( effect ),
|
||||
@@ -156,6 +160,4 @@ void DualFilterControls::saveSettings( QDomDocument& _doc, QDomElement& _this )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#include "DualFilterControlDialog.h"
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DualFilterEffect;
|
||||
|
||||
|
||||
@@ -54,9 +58,9 @@ public:
|
||||
return 11;
|
||||
}
|
||||
|
||||
virtual EffectControlDialog* createView()
|
||||
virtual gui::EffectControlDialog* createView()
|
||||
{
|
||||
return new DualFilterControlDialog( this );
|
||||
return new gui::DualFilterControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -80,9 +84,12 @@ private:
|
||||
FloatModel m_res2Model;
|
||||
FloatModel m_gain2Model;
|
||||
|
||||
friend class DualFilterControlDialog;
|
||||
friend class gui::DualFilterControlDialog;
|
||||
friend class DualFilterEffect;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -244,3 +248,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "Effect.h"
|
||||
#include "DynamicsProcessorControls.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class RmsHelper;
|
||||
|
||||
|
||||
@@ -68,7 +71,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include "Knob.h"
|
||||
#include "PixmapButton.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
DynProcControlDialog::DynProcControlDialog(
|
||||
DynProcControls * _controls ) :
|
||||
@@ -151,3 +154,5 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
_controls, SLOT( subOneClicked() ) );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
@@ -28,10 +28,16 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DynProcControls;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class DynProcControlDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -46,4 +52,9 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
#define onedB 1.1220184543019633f
|
||||
|
||||
@@ -154,5 +157,4 @@ void DynProcControls::subOneClicked()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#include "DynamicsProcessorControlDialog.h"
|
||||
#include "Graph.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DynProcEffect;
|
||||
|
||||
|
||||
@@ -63,9 +67,9 @@ public:
|
||||
return( 6 );
|
||||
}
|
||||
|
||||
virtual EffectControlDialog * createView()
|
||||
virtual gui::EffectControlDialog * createView()
|
||||
{
|
||||
return( new DynProcControlDialog( this ) );
|
||||
return( new gui::DynProcControlDialog( this ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -89,9 +93,12 @@ private:
|
||||
graphModel m_wavegraphModel;
|
||||
IntModel m_stereomodeModel;
|
||||
|
||||
friend class DynProcControlDialog;
|
||||
friend class gui::DynProcControlDialog;
|
||||
friend class DynProcEffect;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "EqEffect.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
EqControls::EqControls( EqEffect *effect ) :
|
||||
EffectControls( effect ),
|
||||
@@ -149,9 +152,9 @@ void EqControls::loadSettings( const QDomElement &_this )
|
||||
m_analyseOutModel.loadSettings( _this, "AnalyseOut" );
|
||||
}
|
||||
|
||||
EffectControlDialog*EqControls::createView()
|
||||
gui::EffectControlDialog* EqControls::createView()
|
||||
{
|
||||
return new EqControlsDialog( this );
|
||||
return new gui::EqControlsDialog( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -202,3 +205,6 @@ void EqControls::saveSettings( QDomDocument &doc, QDomElement &parent )
|
||||
m_analyseInModel.saveSettings( doc, parent, "AnalyseIn" );
|
||||
m_analyseOutModel.saveSettings( doc, parent, "AnalyseOut" );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -28,9 +28,17 @@
|
||||
#include "EffectControls.h"
|
||||
#include "EqSpectrumView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class EqEffect;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class EqControlsDialog;
|
||||
}
|
||||
|
||||
class EqControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -54,7 +62,7 @@ public:
|
||||
return 42;
|
||||
}
|
||||
|
||||
virtual EffectControlDialog* createView();
|
||||
virtual gui::EffectControlDialog* createView();
|
||||
|
||||
float m_inPeakL;
|
||||
float m_inPeakR;
|
||||
@@ -126,7 +134,11 @@ private:
|
||||
BoolModel m_analyseInModel;
|
||||
BoolModel m_analyseOutModel;
|
||||
|
||||
friend class EqControlsDialog;
|
||||
friend class gui::EqControlsDialog;
|
||||
friend class EqEffect;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // EQCONTROLS_H
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
#include "EqParameterWidget.h"
|
||||
#include "EqSpectrumView.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
EqControlsDialog::EqControlsDialog( EqControls *controls ) :
|
||||
EffectControlDialog( controls ),
|
||||
@@ -234,3 +237,6 @@ EqBand* EqControlsDialog::setBand(int index, BoolModel* active, FloatModel* freq
|
||||
filterModels->lp48 = lp48;
|
||||
return filterModels;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
@@ -28,10 +28,17 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class BoolModel;
|
||||
class FloatModel;
|
||||
|
||||
class EqControls;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EqBand;
|
||||
class EqParameterWidget;
|
||||
|
||||
@@ -57,4 +64,9 @@ private:
|
||||
int m_originalHeight;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // EQCONTROLSDIALOG_H
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
#include "lmms_constants.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
EqHandle::EqHandle( int num, int x, int y ):
|
||||
m_numb( num ),
|
||||
m_width( x ),
|
||||
@@ -815,3 +819,6 @@ void EqCurve::setModelChanged( bool mc )
|
||||
{
|
||||
m_modelChanged = mc;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <QGraphicsObject>
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
enum{
|
||||
highpass=1,
|
||||
@@ -134,4 +137,7 @@ private:
|
||||
float m_scale;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // EQCURVE_H
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -363,3 +367,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "EqControls.h"
|
||||
#include "EqFilter.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class EqEffect : public Effect
|
||||
@@ -95,4 +97,7 @@ private:
|
||||
void setBandPeaks( EqAnalyser * fft , int );
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // EQEFFECT_H
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include "MainWindow.h"
|
||||
#include "TextFloat.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class EqFader : public Fader
|
||||
{
|
||||
@@ -112,4 +115,8 @@ private:
|
||||
FloatModel* m_model;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // EQFADER_H
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "BasicFilters.h"
|
||||
#include "lmms_math.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
///
|
||||
/// \brief The EqFilter class.
|
||||
/// A wrapper for the StereoBiQuad class, giving it freq, res, and gain controls.
|
||||
@@ -454,6 +458,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
|
||||
#endif // EQFILTER_H
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
#include "lmms_constants.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
EqParameterWidget::EqParameterWidget( QWidget *parent, EqControls * controls ) :
|
||||
QWidget( parent ),
|
||||
@@ -245,3 +248,6 @@ EqBand::EqBand() :
|
||||
peakR( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
@@ -30,11 +30,19 @@
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class BoolModel;
|
||||
class EqControls;
|
||||
class FloatModel;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EqCurve;
|
||||
class EqHandle;
|
||||
class FloatModel;
|
||||
|
||||
class EqBand
|
||||
{
|
||||
@@ -93,4 +101,10 @@ private slots:
|
||||
void updateModels();
|
||||
void updateHandle();
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // EQPARAMETERWIDGET_H
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
#include "MainWindow.h"
|
||||
#include "lmms_constants.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
EqAnalyser::EqAnalyser() :
|
||||
m_framesFilledUp ( 0 ),
|
||||
m_energy ( 0 ),
|
||||
@@ -176,6 +180,8 @@ void EqAnalyser::clear()
|
||||
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
EqSpectrumView::EqSpectrumView(EqAnalyser *b, QWidget *_parent) :
|
||||
QWidget( _parent ),
|
||||
@@ -298,3 +304,8 @@ void EqSpectrumView::periodicalUpdate()
|
||||
m_analyser->setActive( isVisible() );
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "fft_helpers.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
const int MAX_BANDS = 2048;
|
||||
class EqAnalyser
|
||||
@@ -63,7 +66,8 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EqSpectrumView : public QWidget
|
||||
{
|
||||
@@ -96,4 +100,10 @@ private:
|
||||
|
||||
float bandToFreq ( int index );
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // EQSPECTRUMVIEW_H
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
FlangerControls::FlangerControls( FlangerEffect *effect ) :
|
||||
@@ -91,3 +93,6 @@ void FlangerControls::changedPlaybackState()
|
||||
{
|
||||
m_effect->restartLFO();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include "EffectControls.h"
|
||||
#include "FlangerControlsDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class FlangerEffect;
|
||||
|
||||
@@ -49,9 +52,9 @@ public:
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
virtual EffectControlDialog* createView()
|
||||
virtual gui::EffectControlDialog* createView()
|
||||
{
|
||||
return new FlangerControlsDialog( this );
|
||||
return new gui::FlangerControlsDialog( this );
|
||||
}
|
||||
|
||||
private slots:
|
||||
@@ -68,9 +71,12 @@ private:
|
||||
FloatModel m_whiteNoiseAmountModel;
|
||||
BoolModel m_invertFeedbackModel;
|
||||
|
||||
friend class FlangerControlsDialog;
|
||||
friend class gui::FlangerControlsDialog;
|
||||
friend class FlangerEffect;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // FLANGERCONTROLS_H
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
#include "LedCheckBox.h"
|
||||
#include "TempoSyncKnob.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) :
|
||||
@@ -89,3 +90,6 @@ FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) :
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
@@ -27,8 +27,16 @@
|
||||
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class FlangerControls;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class FlangerControlsDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -39,4 +47,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // FLANGERCONTROLSDIALOG_H
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -161,3 +165,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -36,6 +36,9 @@ class MonoDelay;
|
||||
class Noise;
|
||||
class QuadratureLfo;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class FlangerEffect : public Effect
|
||||
{
|
||||
@@ -59,4 +62,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // FLANGEREFFECT_H
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
#include "MonoDelay.h"
|
||||
#include "string.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
MonoDelay::MonoDelay( int maxTime , int sampleRate )
|
||||
{
|
||||
m_buffer = 0;
|
||||
@@ -74,3 +78,6 @@ void MonoDelay::setSampleRate( int sampleRate )
|
||||
m_buffer = new sample_t[( int )( sampleRate * m_maxTime ) ];
|
||||
memset( m_buffer, 0, sizeof(float) * ( int )( sampleRate * m_maxTime ) );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class MonoDelay
|
||||
{
|
||||
public:
|
||||
@@ -57,4 +61,7 @@ private:
|
||||
float m_maxTime;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // MONODELAY_H
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
#include "Noise.h"
|
||||
#include "lmms_math.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Noise::Noise()
|
||||
{
|
||||
inv_randmax = 1.0/FAST_RAND_MAX; /* for range of 0 - 1.0 */
|
||||
@@ -37,3 +41,6 @@ float Noise::tick()
|
||||
{
|
||||
return (float) ((2.0 * fast_rand() * inv_randmax) - 1.0);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -25,6 +25,10 @@
|
||||
#ifndef NOISE_H
|
||||
#define NOISE_H
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class Noise
|
||||
{
|
||||
public:
|
||||
@@ -34,4 +38,7 @@ private:
|
||||
double inv_randmax;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // NOISE_H
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
const blip_time_t FRAME_LENGTH = 70224;
|
||||
const long CLOCK_RATE = 4194304;
|
||||
|
||||
@@ -427,12 +431,16 @@ void FreeBoyInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
PluginView * FreeBoyInstrument::instantiateView( QWidget * _parent )
|
||||
gui::PluginView * FreeBoyInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new FreeBoyInstrumentView( this, _parent ) );
|
||||
return( new gui::FreeBoyInstrumentView( this, _parent ) );
|
||||
}
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class FreeBoyKnob : public Knob
|
||||
{
|
||||
public:
|
||||
@@ -721,6 +729,9 @@ void FreeBoyInstrumentView::modelChanged()
|
||||
m_graph->setModel( &p->m_graphModel );
|
||||
}
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -735,3 +746,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * )
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -32,10 +32,19 @@
|
||||
#include "InstrumentView.h"
|
||||
#include "Graph.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class NotePlayHandle;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class PixmapButton;
|
||||
class FreeBoyInstrumentView;
|
||||
class Knob;
|
||||
class NotePlayHandle;
|
||||
class PixmapButton;
|
||||
}
|
||||
|
||||
|
||||
class FreeBoyInstrument : public Instrument
|
||||
{
|
||||
@@ -57,7 +66,7 @@ public:
|
||||
|
||||
virtual f_cnt_t desiredReleaseFrames() const;
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
virtual gui::PluginView* instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
/*public slots:
|
||||
@@ -107,10 +116,14 @@ private:
|
||||
blip_time_t m_time;
|
||||
blip_time_t fakeClock() { return m_time += 4; }
|
||||
|
||||
friend class FreeBoyInstrumentView;
|
||||
friend class gui::FreeBoyInstrumentView;
|
||||
} ;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class FreeBoyInstrumentView : public InstrumentViewFixedSize
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -162,4 +175,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
*/
|
||||
#include "Gb_Apu_Buffer.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Gb_Apu_Buffer::Gb_Apu_Buffer() {}
|
||||
Gb_Apu_Buffer::~Gb_Apu_Buffer() {}
|
||||
|
||||
@@ -51,3 +55,5 @@ void Gb_Apu_Buffer::bass_freq(int freq) {
|
||||
m_buf.bass_freq(freq);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
#include "Multi_Buffer.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class Gb_Apu_Buffer : public Gb_Apu {
|
||||
MM_OPERATORS
|
||||
public:
|
||||
@@ -44,5 +48,8 @@ private:
|
||||
Stereo_Buffer m_buf;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -703,9 +707,9 @@ void GigInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
PluginView * GigInstrument::instantiateView( QWidget * _parent )
|
||||
gui::PluginView* GigInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new GigInstrumentView( this, _parent );
|
||||
return new gui::GigInstrumentView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
@@ -907,6 +911,9 @@ void GigInstrument::updateSampleRate()
|
||||
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class gigKnob : public Knob
|
||||
{
|
||||
@@ -1094,6 +1101,7 @@ void GigInstrumentView::showPatchDialog()
|
||||
}
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
// Store information related to playing a sample from the GIG file
|
||||
@@ -1396,3 +1404,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * )
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -41,11 +41,21 @@
|
||||
#include "MemoryManager.h"
|
||||
#include "gig.h"
|
||||
|
||||
class GigInstrumentView;
|
||||
|
||||
class QLabel;
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class NotePlayHandle;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class PatchesDialog;
|
||||
class QLabel;
|
||||
class GigInstrumentView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -261,7 +271,7 @@ public:
|
||||
return IsSingleStreamed|IsNotBendable;
|
||||
}
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
virtual gui::PluginView* instantiateView( QWidget * _parent );
|
||||
|
||||
QString getCurrentPatchName();
|
||||
|
||||
@@ -283,8 +293,8 @@ private:
|
||||
// Part of the UI
|
||||
QString m_filename;
|
||||
|
||||
LcdSpinBoxModel m_bankNum;
|
||||
LcdSpinBoxModel m_patchNum;
|
||||
gui::LcdSpinBoxModel m_bankNum;
|
||||
gui::LcdSpinBoxModel m_patchNum;
|
||||
|
||||
FloatModel m_gain;
|
||||
|
||||
@@ -322,7 +332,7 @@ private:
|
||||
// samples
|
||||
void addSamples( GigNote & gignote, bool wantReleaseSample );
|
||||
|
||||
friend class GigInstrumentView;
|
||||
friend class gui::GigInstrumentView;
|
||||
|
||||
signals:
|
||||
void fileLoading();
|
||||
@@ -332,6 +342,8 @@ signals:
|
||||
} ;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class GigInstrumentView : public InstrumentViewFixedSize
|
||||
@@ -367,4 +379,8 @@ protected slots:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
|
||||
#include <QHeaderView>
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
// Custom list-view item (as for numerical sort purposes...)
|
||||
class PatchItem : public QTreeWidgetItem
|
||||
@@ -408,3 +411,6 @@ void PatchesDialog::progChanged( QTreeWidgetItem * curr, QTreeWidgetItem * prev
|
||||
// Stabilize the form.
|
||||
stabilizeForm();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// qsynthPresetForm -- UI wrapper form.
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class PatchesDialog : public QDialog, private Ui::PatchesDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -88,4 +92,7 @@ private:
|
||||
QLabel * m_patchLabel;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
#include "plugin_export.h"
|
||||
|
||||
#define MAX_LAYERS 4
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -351,3 +356,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
#include "ImportFilter.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class HydrogenImport : public ImportFilter
|
||||
{
|
||||
@@ -14,12 +17,16 @@ public:
|
||||
|
||||
virtual ~HydrogenImport();
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * )
|
||||
virtual gui::PluginView* instantiateView( QWidget * )
|
||||
{
|
||||
return( nullptr );
|
||||
}
|
||||
private:
|
||||
virtual bool tryImport( TrackContainer* tc );
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
#include <string>
|
||||
#include <QDomDocument>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class LocalFileMng
|
||||
{
|
||||
public:
|
||||
@@ -25,5 +29,9 @@ public:
|
||||
static QDomDocument openXmlDocument( const QString& filename );
|
||||
std::vector<QString> m_allPatternList;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif //LFILEMNG_H
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
#include "LocalFileMng.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
/* New QtXml based methods */
|
||||
|
||||
@@ -227,3 +230,5 @@ QDomDocument LocalFileMng::openXmlDocument( const QString& filename )
|
||||
return doc;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -220,12 +224,14 @@ void KickerInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
PluginView * KickerInstrument::instantiateView( QWidget * _parent )
|
||||
gui::PluginView * KickerInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new KickerInstrumentView( this, _parent );
|
||||
return new gui::KickerInstrumentView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class KickerKnob : public Knob
|
||||
@@ -361,7 +367,7 @@ void KickerInstrumentView::modelChanged()
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
extern "C"
|
||||
@@ -377,5 +383,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * m, void * )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -32,17 +32,22 @@
|
||||
#include "InstrumentView.h"
|
||||
#include "TempoSyncKnobModel.h"
|
||||
|
||||
class Knob;
|
||||
class LedCheckBox;
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
#define KICKER_PRESET_VERSION 1
|
||||
|
||||
|
||||
class KickerInstrumentView;
|
||||
class NotePlayHandle;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class Knob;
|
||||
class LedCheckBox;
|
||||
class KickerInstrumentView;
|
||||
}
|
||||
|
||||
|
||||
class KickerInstrument : public Instrument
|
||||
{
|
||||
@@ -70,7 +75,7 @@ public:
|
||||
return( 512 );
|
||||
}
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
virtual gui::PluginView* instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
private:
|
||||
@@ -90,11 +95,14 @@ private:
|
||||
|
||||
IntModel m_versionModel;
|
||||
|
||||
friend class KickerInstrumentView;
|
||||
friend class gui::KickerInstrumentView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class KickerInstrumentView : public InstrumentViewFixedSize
|
||||
{
|
||||
@@ -123,5 +131,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "interpolation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
template<class FX = DspEffectLibrary::StereoBypass>
|
||||
class KickerOsc
|
||||
@@ -107,4 +110,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
#include "embed.h"
|
||||
#include "plugin_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -93,7 +96,8 @@ QString LadspaBrowser::nodeName() const
|
||||
|
||||
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) :
|
||||
@@ -189,8 +193,8 @@ QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
layout->addSpacing( 10 );
|
||||
|
||||
LadspaDescription * description = new LadspaDescription( tab, _type );
|
||||
connect( description, SIGNAL( doubleClicked( const ladspa_key_t & ) ),
|
||||
SLOT( showPorts( const ladspa_key_t & ) ) );
|
||||
connect( description, SIGNAL( doubleClicked( const ::lmms::ladspa_key_t & ) ),
|
||||
SLOT( showPorts( const ::lmms::ladspa_key_t & ) ) );
|
||||
layout->addWidget( description, 1 );
|
||||
|
||||
return tab;
|
||||
@@ -199,13 +203,13 @@ QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
|
||||
|
||||
|
||||
void LadspaBrowserView::showPorts( const ladspa_key_t & _key )
|
||||
void LadspaBrowserView::showPorts( const ::lmms::ladspa_key_t & _key )
|
||||
{
|
||||
LadspaPortDialog ports( _key );
|
||||
ports.exec();
|
||||
}
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user