File and class renames part 1
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:
391 files changed, 25400 insertions(+), 25598 deletions(-)
Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.
Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
(cherry picked from commit 8c9a9dd14c)
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#include "audio_file_processor.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "interpolation.h"
|
||||
#include "gui_templates.h"
|
||||
@@ -47,7 +47,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"AudioFileProcessor",
|
||||
@@ -57,8 +57,8 @@ plugin::descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
|
||||
"instrument-track" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"wav,ogg,ds,spx,au,voc,aif,aiff,flac,raw",
|
||||
NULL
|
||||
} ;
|
||||
@@ -68,22 +68,22 @@ plugin::descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
audioFileProcessor::audioFileProcessor( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &audiofileprocessor_plugin_descriptor ),
|
||||
audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &audiofileprocessor_plugin_descriptor ),
|
||||
m_sampleBuffer(),
|
||||
m_ampModel( 100, 0, 500, 1, this, tr( "Amplify" ) ),
|
||||
m_startPointModel( 0, 0, 1, 0.0000001f, this, tr( "Start of sample") ),
|
||||
m_endPointModel( 1, 0, 1, 0.0000001f, this, tr( "End of sample" ) ),
|
||||
m_reverseModel( FALSE, this, tr( "Reverse sample" ) ),
|
||||
m_loopModel( FALSE, this, tr( "Loop") )
|
||||
m_startPoIntModel( 0, 0, 1, 0.0000001f, this, tr( "Start of sample") ),
|
||||
m_endPoIntModel( 1, 0, 1, 0.0000001f, this, tr( "End of sample" ) ),
|
||||
m_reverseModel( false, this, tr( "Reverse sample" ) ),
|
||||
m_loopModel( false, this, tr( "Loop") )
|
||||
{
|
||||
connect( &m_reverseModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( reverseModelChanged() ) );
|
||||
connect( &m_ampModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( ampModelChanged() ) );
|
||||
connect( &m_startPointModel, SIGNAL( dataChanged() ),
|
||||
connect( &m_startPoIntModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( loopPointChanged() ) );
|
||||
connect( &m_endPointModel, SIGNAL( dataChanged() ),
|
||||
connect( &m_endPoIntModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( loopPointChanged() ) );
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void audioFileProcessor::playNote( notePlayHandle * _n,
|
||||
m_loopModel.value() ) == TRUE )
|
||||
{
|
||||
applyRelease( _working_buffer, _n );
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer,
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer,
|
||||
frames,_n );
|
||||
}
|
||||
}
|
||||
@@ -142,8 +142,8 @@ void audioFileProcessor::saveSettings( QDomDocument & _doc,
|
||||
m_reverseModel.saveSettings( _doc, _this, "reversed" );
|
||||
m_loopModel.saveSettings( _doc, _this, "looped" );
|
||||
m_ampModel.saveSettings( _doc, _this, "amp" );
|
||||
m_startPointModel.saveSettings( _doc, _this, "sframe" );
|
||||
m_endPointModel.saveSettings( _doc, _this, "eframe" );
|
||||
m_startPoIntModel.saveSettings( _doc, _this, "sframe" );
|
||||
m_endPoIntModel.saveSettings( _doc, _this, "eframe" );
|
||||
}
|
||||
|
||||
|
||||
@@ -162,8 +162,8 @@ void audioFileProcessor::loadSettings( const QDomElement & _this )
|
||||
m_reverseModel.loadSettings( _this, "reversed" );
|
||||
m_loopModel.loadSettings( _this, "looped" );
|
||||
m_ampModel.loadSettings( _this, "amp" );
|
||||
m_startPointModel.loadSettings( _this, "sframe" );
|
||||
m_endPointModel.loadSettings( _this, "eframe" );
|
||||
m_startPoIntModel.loadSettings( _this, "sframe" );
|
||||
m_endPoIntModel.loadSettings( _this, "eframe" );
|
||||
|
||||
loopPointChanged();
|
||||
}
|
||||
@@ -201,9 +201,9 @@ Uint32 audioFileProcessor::getBeatLen( notePlayHandle * _n ) const
|
||||
|
||||
|
||||
|
||||
pluginView * audioFileProcessor::instantiateView( QWidget * _parent )
|
||||
PluginView * audioFileProcessor::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new audioFileProcessorView( this, _parent ) );
|
||||
return( new AudioFileProcessorView( this, _parent ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -214,13 +214,12 @@ void audioFileProcessor::setAudioFile( const QString & _audio_file,
|
||||
{
|
||||
// is current channel-name equal to previous-filename??
|
||||
if( _rename &&
|
||||
( getInstrumentTrack()->name() ==
|
||||
( instrumentTrack()->name() ==
|
||||
QFileInfo( m_sampleBuffer.audioFile() ).fileName() ||
|
||||
m_sampleBuffer.audioFile().isEmpty() ) )
|
||||
{
|
||||
// then set it to new one
|
||||
getInstrumentTrack()->setName( QFileInfo( _audio_file
|
||||
).fileName() );
|
||||
instrumentTrack()->setName( QFileInfo( _audio_file).fileName() );
|
||||
}
|
||||
// else we don't touch the track-name, because the user named it self
|
||||
|
||||
@@ -249,9 +248,9 @@ void audioFileProcessor::ampModelChanged( void )
|
||||
|
||||
void audioFileProcessor::loopPointChanged( void )
|
||||
{
|
||||
const f_cnt_t f1 = static_cast<f_cnt_t>( m_startPointModel.value() *
|
||||
const f_cnt_t f1 = static_cast<f_cnt_t>( m_startPoIntModel.value() *
|
||||
( m_sampleBuffer.frames()-1 ) );
|
||||
const f_cnt_t f2 = static_cast<f_cnt_t>( m_endPointModel.value() *
|
||||
const f_cnt_t f2 = static_cast<f_cnt_t>( m_endPoIntModel.value() *
|
||||
( m_sampleBuffer.frames()-1 ) );
|
||||
m_sampleBuffer.setStartFrame( qMin<f_cnt_t>( f1, f2 ) );
|
||||
m_sampleBuffer.setEndFrame( qMax<f_cnt_t>( f1, f2 ) );
|
||||
@@ -277,12 +276,12 @@ public:
|
||||
|
||||
|
||||
|
||||
QPixmap * audioFileProcessorView::s_artwork = NULL;
|
||||
QPixmap * AudioFileProcessorView::s_artwork = NULL;
|
||||
|
||||
|
||||
audioFileProcessorView::audioFileProcessorView( instrument * _instrument,
|
||||
AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
if( s_artwork == NULL )
|
||||
{
|
||||
@@ -374,14 +373,14 @@ audioFileProcessorView::audioFileProcessorView( instrument * _instrument,
|
||||
|
||||
|
||||
|
||||
audioFileProcessorView::~audioFileProcessorView()
|
||||
AudioFileProcessorView::~AudioFileProcessorView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void audioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
void AudioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
|
||||
{
|
||||
@@ -410,7 +409,7 @@ void audioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessorView::dropEvent( QDropEvent * _de )
|
||||
void AudioFileProcessorView::dropEvent( QDropEvent * _de )
|
||||
{
|
||||
QString type = stringPairDrag::decodeKey( _de );
|
||||
QString value = stringPairDrag::decodeValue( _de );
|
||||
@@ -435,7 +434,7 @@ void audioFileProcessorView::dropEvent( QDropEvent * _de )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessorView::paintEvent( QPaintEvent * )
|
||||
void AudioFileProcessorView::paintEvent( QPaintEvent * )
|
||||
{
|
||||
QPainter p( this );
|
||||
|
||||
@@ -490,7 +489,7 @@ void audioFileProcessorView::paintEvent( QPaintEvent * )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessorView::sampleUpdated( void )
|
||||
void AudioFileProcessorView::sampleUpdated( void )
|
||||
{
|
||||
m_graph = QPixmap( 245, 75 );
|
||||
m_graph.fill( Qt::transparent );
|
||||
@@ -506,7 +505,7 @@ void audioFileProcessorView::sampleUpdated( void )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessorView::openAudioFile( void )
|
||||
void AudioFileProcessorView::openAudioFile( void )
|
||||
{
|
||||
QString af = castModel<audioFileProcessor>()->m_sampleBuffer.
|
||||
openAudioFile();
|
||||
@@ -520,14 +519,14 @@ void audioFileProcessorView::openAudioFile( void )
|
||||
|
||||
|
||||
|
||||
void audioFileProcessorView::modelChanged( void )
|
||||
void AudioFileProcessorView::modelChanged( void )
|
||||
{
|
||||
audioFileProcessor * a = castModel<audioFileProcessor>();
|
||||
connect( &a->m_sampleBuffer, SIGNAL( sampleUpdated() ),
|
||||
this, SLOT( sampleUpdated() ) );
|
||||
m_ampKnob->setModel( &a->m_ampModel );
|
||||
m_startKnob->setModel( &a->m_startPointModel );
|
||||
m_endKnob->setModel( &a->m_endPointModel );
|
||||
m_startKnob->setModel( &a->m_startPoIntModel );
|
||||
m_endKnob->setModel( &a->m_endPoIntModel );
|
||||
m_reverseButton->setModel( &a->m_reverseModel );
|
||||
m_loopButton->setModel( &a->m_loopModel );
|
||||
sampleUpdated();
|
||||
@@ -541,10 +540,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new audioFileProcessor(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
return new audioFileProcessor(
|
||||
static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,19 +29,19 @@
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "knob.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
|
||||
|
||||
class audioFileProcessor : public instrument
|
||||
class audioFileProcessor : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
audioFileProcessor( instrumentTrack * _instrument_track );
|
||||
audioFileProcessor( InstrumentTrack * _instrument_track );
|
||||
virtual ~audioFileProcessor();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
return( 128 );
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -81,25 +81,25 @@ private:
|
||||
|
||||
sampleBuffer m_sampleBuffer;
|
||||
|
||||
knobModel m_ampModel;
|
||||
knobModel m_startPointModel;
|
||||
knobModel m_endPointModel;
|
||||
boolModel m_reverseModel;
|
||||
boolModel m_loopModel;
|
||||
FloatModel m_ampModel;
|
||||
FloatModel m_startPoIntModel;
|
||||
FloatModel m_endPoIntModel;
|
||||
BoolModel m_reverseModel;
|
||||
BoolModel m_loopModel;
|
||||
|
||||
|
||||
friend class audioFileProcessorView;
|
||||
friend class AudioFileProcessorView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class audioFileProcessorView : public instrumentView
|
||||
class AudioFileProcessorView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
audioFileProcessorView( instrument * _instrument, QWidget * _parent );
|
||||
virtual ~audioFileProcessorView();
|
||||
AudioFileProcessorView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~AudioFileProcessorView();
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"BassBooster Effect",
|
||||
@@ -39,8 +39,8 @@ plugin::descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor =
|
||||
"plugin for boosting bass" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Effect,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -49,9 +49,9 @@ plugin::descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
bassBoosterEffect::bassBoosterEffect( model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key ) :
|
||||
effect( &bassbooster_plugin_descriptor, _parent, _key ),
|
||||
bassBoosterEffect::bassBoosterEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &bassbooster_plugin_descriptor, _parent, _key ),
|
||||
m_bbFX( effectLib::fastBassBoost( 70.0f, 1.0f, 2.8f ) ),
|
||||
m_bbControls( this )
|
||||
{
|
||||
@@ -76,8 +76,8 @@ bool bassBoosterEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
}
|
||||
|
||||
double out_sum = 0.0;
|
||||
const float d = getDryLevel();
|
||||
const float w = getWetLevel();
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
for( fpp_t f = 0; f < _frames; ++f )
|
||||
{
|
||||
sample_t s[2] = { _buf[f][0], _buf[f][1] };
|
||||
@@ -102,10 +102,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model * _parent, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new bassBoosterEffect( _parent,
|
||||
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -26,22 +26,22 @@
|
||||
#ifndef _BASS_BOOSTER_H
|
||||
#define _BASS_BOOSTER_H
|
||||
|
||||
#include "effect.h"
|
||||
#include "Effect.h"
|
||||
#include "effect_lib.h"
|
||||
#include "bassbooster_controls.h"
|
||||
|
||||
|
||||
|
||||
class bassBoosterEffect : public effect
|
||||
class bassBoosterEffect : public Effect
|
||||
{
|
||||
public:
|
||||
bassBoosterEffect( model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key );
|
||||
bassBoosterEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~bassBoosterEffect();
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
virtual effectControls * getControls( void )
|
||||
virtual EffectControls * controls( void )
|
||||
{
|
||||
return( &m_bbControls );
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
bassBoosterControlDialog::bassBoosterControlDialog(
|
||||
bassBoosterControls * _controls ) :
|
||||
effectControlDialog( _controls )
|
||||
EffectControlDialog( _controls )
|
||||
{
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
#ifndef _BASSBOOSTER_CONTROL_DIALOG_H
|
||||
#define _BASSBOOSTER_CONTROL_DIALOG_H
|
||||
|
||||
#include "effect_control_dialog.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
|
||||
class bassBoosterControls;
|
||||
|
||||
|
||||
class bassBoosterControlDialog : public effectControlDialog
|
||||
class bassBoosterControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
bassBoosterControlDialog( bassBoosterControls * _controls );
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
bassBoosterControls::bassBoosterControls( bassBoosterEffect * _eff ) :
|
||||
effectControls( _eff ),
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
m_freqModel( 100.0f, 50.0f, 200.0f, 1.0f, this, tr( "Frequency" ) ),
|
||||
m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this, tr( "Gain" ) ),
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef _BASSBOOSTER_CONTROLS_H
|
||||
#define _BASSBOOSTER_CONTROLS_H
|
||||
|
||||
#include "effect_controls.h"
|
||||
#include "EffectControls.h"
|
||||
#include "bassbooster_control_dialog.h"
|
||||
#include "knob.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
class bassBoosterEffect;
|
||||
|
||||
|
||||
class bassBoosterControls : public effectControls
|
||||
class bassBoosterControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
return( "bassboostercontrols" );
|
||||
}
|
||||
|
||||
virtual int getControlCount( void )
|
||||
virtual int controlCount( void )
|
||||
{
|
||||
return( 3 );
|
||||
}
|
||||
|
||||
virtual effectControlDialog * createView( void )
|
||||
virtual EffectControlDialog * createView( void )
|
||||
{
|
||||
return( new bassBoosterControlDialog( this ) );
|
||||
}
|
||||
@@ -68,9 +68,9 @@ private slots:
|
||||
|
||||
private:
|
||||
bassBoosterEffect * m_effect;
|
||||
knobModel m_freqModel;
|
||||
knobModel m_gainModel;
|
||||
knobModel m_ratioModel;
|
||||
FloatModel m_freqModel;
|
||||
FloatModel m_gainModel;
|
||||
FloatModel m_ratioModel;
|
||||
|
||||
friend class bassBoosterControlDialog;
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#include "bit_invader.h"
|
||||
#include "engine.h"
|
||||
#include "graph.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "oscillator.h"
|
||||
#include "Oscillator.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "song_editor.h"
|
||||
#include "templates.h"
|
||||
@@ -44,7 +44,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT bitinvader_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT bitinvader_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"BitInvader",
|
||||
@@ -52,8 +52,8 @@ plugin::descriptor PLUGIN_EXPORT bitinvader_plugin_descriptor =
|
||||
"Customizable wavetable synthesizer" ),
|
||||
"Andreas Brandmaier <andreas/at/brandmaier/dot/de>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -134,8 +134,8 @@ sample_t bSynth::nextStringSample( void )
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
bitInvader::bitInvader( instrumentTrack * _channel_track ) :
|
||||
instrument( _channel_track, &bitinvader_plugin_descriptor ),
|
||||
bitInvader::bitInvader( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &bitinvader_plugin_descriptor ),
|
||||
m_sampleLength( 128, 8, 128, 1, this, tr( "Samplelength" ) ),
|
||||
m_graph( -1.0f, 1.0f, 128, this ),
|
||||
m_interpolation( FALSE, this ),
|
||||
@@ -295,7 +295,7 @@ void bitInvader::playNote( notePlayHandle * _n,
|
||||
|
||||
applyRelease( _working_buffer, _n );
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ void bitInvader::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
pluginView * bitInvader::instantiateView( QWidget * _parent )
|
||||
PluginView * bitInvader::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new bitInvaderView( this, _parent ) );
|
||||
}
|
||||
@@ -320,9 +320,9 @@ pluginView * bitInvader::instantiateView( QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
bitInvaderView::bitInvaderView( instrument * _instrument,
|
||||
bitInvaderView::bitInvaderView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
@@ -576,9 +576,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new bitInvader( static_cast<instrumentTrack *>( _data ) ) );
|
||||
return( new bitInvader( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,9 +27,8 @@
|
||||
#ifndef _BIT_INVADER_H
|
||||
#define _BIT_INVADER_H
|
||||
|
||||
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "graph.h"
|
||||
#include "knob.h"
|
||||
#include "pixmap_button.h"
|
||||
@@ -61,11 +60,11 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
class bitInvader : public instrument
|
||||
class bitInvader : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
bitInvader(instrumentTrack * _channel_track );
|
||||
bitInvader(InstrumentTrack * _instrument_track );
|
||||
virtual ~bitInvader();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -84,7 +83,7 @@ public:
|
||||
return( 64 );
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
protected slots:
|
||||
void lengthChanged( void );
|
||||
@@ -94,11 +93,11 @@ protected slots:
|
||||
|
||||
|
||||
private:
|
||||
knobModel m_sampleLength;
|
||||
FloatModel m_sampleLength;
|
||||
graphModel m_graph;
|
||||
|
||||
boolModel m_interpolation;
|
||||
boolModel m_normalize;
|
||||
BoolModel m_interpolation;
|
||||
BoolModel m_normalize;
|
||||
|
||||
float normalizeFactor;
|
||||
|
||||
@@ -109,11 +108,11 @@ private:
|
||||
|
||||
|
||||
|
||||
class bitInvaderView : public instrumentView
|
||||
class bitInvaderView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
bitInvaderView( instrument * _instrument,
|
||||
bitInvaderView( Instrument * _instrument,
|
||||
QWidget * _parent );
|
||||
|
||||
virtual ~bitInvaderView() {};
|
||||
|
||||
@@ -2,4 +2,4 @@ INCLUDE(BuildPlugin)
|
||||
|
||||
INCLUDE_DIRECTORIES(unrtf)
|
||||
|
||||
BUILD_PLUGIN(flpimport flp_import.cpp unrtf.cpp flp_import.h)
|
||||
BUILD_PLUGIN(flpimport FlpImport.cpp unrtf.cpp FlpImport.h)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QBuffer>
|
||||
|
||||
#include "flp_import.h"
|
||||
#include "FlpImport.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "automation_pattern.h"
|
||||
#include "basic_filters.h"
|
||||
@@ -37,21 +37,20 @@
|
||||
#include "combobox.h"
|
||||
#include "config_mgr.h"
|
||||
#include "debug.h"
|
||||
#include "effect.h"
|
||||
#include "Effect.h"
|
||||
#include "engine.h"
|
||||
#include "fx_mixer.h"
|
||||
#include "FxMixer.h"
|
||||
#include "group_box.h"
|
||||
#include "instrument.h"
|
||||
#include "instrument_track.h"
|
||||
#include "envelope_and_lfo_parameters.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "EnvelopeAndLfoParameters.h"
|
||||
#include "knob.h"
|
||||
#include "oscillator.h"
|
||||
#include "Oscillator.h"
|
||||
#include "pattern.h"
|
||||
#include "piano.h"
|
||||
#include "project_journal.h"
|
||||
#include "Piano.h"
|
||||
#include "ProjectJournal.h"
|
||||
#include "project_notes.h"
|
||||
#include "song.h"
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "track_container.h"
|
||||
#include "embed.h"
|
||||
#include "lmmsconfig.h"
|
||||
@@ -67,7 +66,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT flpimport_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT flpimport_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"FLP Import",
|
||||
@@ -75,7 +74,7 @@ plugin::descriptor PLUGIN_EXPORT flpimport_plugin_descriptor =
|
||||
"Filter for importing FL Studio projects into LMMS" ),
|
||||
"Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>",
|
||||
0x0100,
|
||||
plugin::ImportFilter,
|
||||
Plugin::ImportFilter,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
@@ -305,7 +304,7 @@ struct FL_Automation
|
||||
|
||||
struct FL_Channel_Envelope
|
||||
{
|
||||
instrumentSoundShaping::Targets target;
|
||||
InstrumentSoundShaping::Targets target;
|
||||
float predelay;
|
||||
float attack;
|
||||
float hold;
|
||||
@@ -422,7 +421,7 @@ struct FL_Channel : public FL_Plugin
|
||||
bool sampleReverseStereo;
|
||||
bool sampleUseLoopPoints;
|
||||
|
||||
instrument * instrumentPlugin;
|
||||
Instrument * instrumentPlugin;
|
||||
|
||||
QList<FL_Channel_Envelope> envelopes;
|
||||
|
||||
@@ -462,7 +461,7 @@ struct FL_Channel : public FL_Plugin
|
||||
filterCut( 10000 ),
|
||||
filterRes( 0.1 ),
|
||||
filterEnabled( false ),
|
||||
arpDir( arpeggiator::ArpDirUp ),
|
||||
arpDir( Arpeggiator::ArpDirUp ),
|
||||
arpRange( 0 ),
|
||||
selectedArp( 0 ),
|
||||
arpTime( 100 ),
|
||||
@@ -572,22 +571,22 @@ struct FL_Project
|
||||
|
||||
|
||||
|
||||
flpImport::flpImport( const QString & _file ) :
|
||||
importFilter( _file, &flpimport_plugin_descriptor )
|
||||
FlpImport::FlpImport( const QString & _file ) :
|
||||
ImportFilter( _file, &flpimport_plugin_descriptor )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
flpImport::~flpImport()
|
||||
FlpImport::~FlpImport()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool flpImport::tryImport( trackContainer * _tc )
|
||||
bool FlpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
const int mappedFilter[] =
|
||||
{
|
||||
@@ -601,14 +600,14 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
basicFilters<>::NumFilters+basicFilters<>::LowPass
|
||||
} ;
|
||||
|
||||
const arpeggiator::ArpDirections mappedArpDir[] =
|
||||
const Arpeggiator::ArpDirections mappedArpDir[] =
|
||||
{
|
||||
arpeggiator::ArpDirUp,
|
||||
arpeggiator::ArpDirUp,
|
||||
arpeggiator::ArpDirDown,
|
||||
arpeggiator::ArpDirUpAndDown,
|
||||
arpeggiator::ArpDirUpAndDown,
|
||||
arpeggiator::ArpDirRandom
|
||||
Arpeggiator::ArpDirUp,
|
||||
Arpeggiator::ArpDirUp,
|
||||
Arpeggiator::ArpDirDown,
|
||||
Arpeggiator::ArpDirUpAndDown,
|
||||
Arpeggiator::ArpDirUpAndDown,
|
||||
Arpeggiator::ArpDirRandom
|
||||
} ;
|
||||
|
||||
QMap<QString, int> mappedPluginTypes;
|
||||
@@ -677,21 +676,21 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
|
||||
if( readID() != makeID( 'F', 'L', 'h', 'd' ) )
|
||||
{
|
||||
qWarning( "flpImport::tryImport(): not a valid FL project\n" );
|
||||
qWarning( "FlpImport::tryImport(): not a valid FL project\n" );
|
||||
return false;
|
||||
}
|
||||
|
||||
const int header_len = read32LE();
|
||||
if( header_len != 6 )
|
||||
{
|
||||
qWarning( "flpImport::tryImport(): invalid file format\n" );
|
||||
qWarning( "FlpImport::tryImport(): invalid file format\n" );
|
||||
return false;
|
||||
}
|
||||
|
||||
const int type = read16LE();
|
||||
if( type != 0 )
|
||||
{
|
||||
qWarning( "flpImport::tryImport(): type %d format is not "
|
||||
qWarning( "FlpImport::tryImport(): type %d format is not "
|
||||
"supported\n", type );
|
||||
return false;
|
||||
}
|
||||
@@ -699,7 +698,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
p.numChannels = read16LE();
|
||||
if( p.numChannels < 1 || p.numChannels > 1000 )
|
||||
{
|
||||
qWarning( "flpImport::tryImport(): invalid number of channels "
|
||||
qWarning( "FlpImport::tryImport(): invalid number of channels "
|
||||
"(%d)\n", p.numChannels );
|
||||
return false;
|
||||
}
|
||||
@@ -707,7 +706,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
const int ppq = read16LE();
|
||||
if( ppq < 0 )
|
||||
{
|
||||
qWarning( "flpImport::tryImport(): invalid ppq\n" );
|
||||
qWarning( "FlpImport::tryImport(): invalid ppq\n" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -726,13 +725,13 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
const int len = read32LE();
|
||||
if( file().atEnd() )
|
||||
{
|
||||
qWarning( "flpImport::tryImport(): unexpected "
|
||||
qWarning( "FlpImport::tryImport(): unexpected "
|
||||
"end of file\n" );
|
||||
return false;
|
||||
}
|
||||
if( len < 0 || len >= 0x10000000 )
|
||||
{
|
||||
qWarning( "flpImport::tryImport(): invalid "
|
||||
qWarning( "FlpImport::tryImport(): invalid "
|
||||
"chunk length %d\n", len );
|
||||
return false;
|
||||
}
|
||||
@@ -763,8 +762,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
|
||||
int cur_channel = -1;
|
||||
|
||||
const bool is_journ = engine::getProjectJournal()->isJournalling();
|
||||
engine::getProjectJournal()->setJournalling( false );
|
||||
const bool is_journ = engine::projectJournal()->isJournalling();
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
|
||||
|
||||
while( file().atEnd() == false )
|
||||
@@ -1200,16 +1199,16 @@ if( p.currentEffectChannel <= NumFxChannels )
|
||||
switch( cc->envelopes.size() )
|
||||
{
|
||||
case 1:
|
||||
e.target = instrumentSoundShaping::Volume;
|
||||
e.target = InstrumentSoundShaping::Volume;
|
||||
break;
|
||||
case 2:
|
||||
e.target = instrumentSoundShaping::Cut;
|
||||
e.target = InstrumentSoundShaping::Cut;
|
||||
break;
|
||||
case 3:
|
||||
e.target = instrumentSoundShaping::Resonance;
|
||||
e.target = InstrumentSoundShaping::Resonance;
|
||||
break;
|
||||
default:
|
||||
e.target = instrumentSoundShaping::NumTargets;
|
||||
e.target = InstrumentSoundShaping::NumTargets;
|
||||
break;
|
||||
}
|
||||
e.predelay = pi[2] * scaling;
|
||||
@@ -1218,7 +1217,7 @@ if( p.currentEffectChannel <= NumFxChannels )
|
||||
e.decay = pi[5] * scaling;
|
||||
e.sustain = 1-pi[6] / 128.0f;
|
||||
e.release = pi[7] * scaling;
|
||||
if( e.target == instrumentSoundShaping::Volume )
|
||||
if( e.target == InstrumentSoundShaping::Volume )
|
||||
{
|
||||
e.amount = pi[1] ? 1 : 0;
|
||||
}
|
||||
@@ -1424,7 +1423,7 @@ else
|
||||
|
||||
// create BB tracks
|
||||
QList<bbTrack *> bb_tracks;
|
||||
QList<instrumentTrack *> i_tracks;
|
||||
QList<InstrumentTrack *> i_tracks;
|
||||
|
||||
while( engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns )
|
||||
{
|
||||
@@ -1441,10 +1440,10 @@ else
|
||||
}
|
||||
|
||||
// create instrument-track for each channel
|
||||
for( QList<FL_Channel>::iterator it = p.channels.begin();
|
||||
for( QList<FL_Channel>::Iterator it = p.channels.begin();
|
||||
it != p.channels.end(); ++it )
|
||||
{
|
||||
instrumentTrack * t = dynamic_cast<instrumentTrack *>(
|
||||
InstrumentTrack * t = dynamic_cast<InstrumentTrack *>(
|
||||
track::create( track::InstrumentTrack,
|
||||
engine::getBBTrackContainer() ) );
|
||||
engine::getBBTrackContainer()->updateAfterTrackAdd();
|
||||
@@ -1486,7 +1485,7 @@ else
|
||||
t->baseNoteModel()->setValue( it->baseNote );
|
||||
t->effectChannelModel()->setValue( it->fxChannel );
|
||||
|
||||
instrumentSoundShaping * iss = &t->m_soundShaping;
|
||||
InstrumentSoundShaping * iss = &t->m_soundShaping;
|
||||
iss->m_filterModel.setValue( it->filterType );
|
||||
iss->m_filterCutModel.setValue( it->filterCut *
|
||||
( iss->m_filterCutModel.maxValue() -
|
||||
@@ -1501,10 +1500,10 @@ else
|
||||
for( QList<FL_Channel_Envelope>::iterator jt = it->envelopes.begin();
|
||||
jt != it->envelopes.end(); ++jt )
|
||||
{
|
||||
if( jt->target != instrumentSoundShaping::NumTargets )
|
||||
if( jt->target != InstrumentSoundShaping::NumTargets )
|
||||
{
|
||||
envelopeAndLFOParameters * elp =
|
||||
iss->m_envLFOParameters[jt->target];
|
||||
EnvelopeAndLfoParameters * elp =
|
||||
iss->m_envLfoParameters[jt->target];
|
||||
|
||||
elp->m_predelayModel.setValue( jt->predelay );
|
||||
elp->m_attackModel.setValue( jt->attack );
|
||||
@@ -1517,7 +1516,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
arpeggiator * arp = &t->m_arpeggiator;
|
||||
Arpeggiator * arp = &t->m_arpeggiator;
|
||||
arp->m_arpDirectionModel.setValue( it->arpDir );
|
||||
arp->m_arpRangeModel.setValue( it->arpRange );
|
||||
arp->m_arpModel.setValue( it->selectedArp );
|
||||
@@ -1526,7 +1525,7 @@ else
|
||||
arp->m_arpEnabledModel.setValue( it->arpEnabled );
|
||||
|
||||
// process all dots
|
||||
for( QList<int>::const_iterator jt = it->dots.begin();
|
||||
for( QList<int>::ConstIterator jt = it->dots.begin();
|
||||
jt != it->dots.end(); ++jt )
|
||||
{
|
||||
const int pat = *jt / 256;
|
||||
@@ -1547,7 +1546,7 @@ else
|
||||
}
|
||||
|
||||
// process all notes
|
||||
for( FL_Channel::noteVector::const_iterator jt = it->notes.begin();
|
||||
for( FL_Channel::noteVector::ConstIterator jt = it->notes.begin();
|
||||
jt != it->notes.end(); ++jt )
|
||||
{
|
||||
const int pat = jt->first;
|
||||
@@ -1564,11 +1563,11 @@ else
|
||||
}
|
||||
|
||||
// process automation data
|
||||
for( QList<FL_Automation>::const_iterator jt =
|
||||
for( QList<FL_Automation>::ConstIterator jt =
|
||||
it->automationData.begin();
|
||||
jt != it->automationData.end(); ++jt )
|
||||
{
|
||||
automatableModel * m = NULL;
|
||||
AutomatableModel * m = NULL;
|
||||
float value = jt->value;
|
||||
bool scale = false;
|
||||
switch( jt->control )
|
||||
@@ -1625,13 +1624,13 @@ p->putValue( jt->pos, value, false );
|
||||
}
|
||||
|
||||
// process all effects
|
||||
effectKeyList effKeys;
|
||||
QVector<plugin::descriptor> pluginDescs;
|
||||
plugin::getDescriptorsOfAvailPlugins( pluginDescs );
|
||||
for( QVector<plugin::descriptor>::iterator it = pluginDescs.begin();
|
||||
EffectKeyList effKeys;
|
||||
QVector<Plugin::Descriptor> pluginDescs;
|
||||
Plugin::getDescriptorsOfAvailPlugins( pluginDescs );
|
||||
for( QVector<Plugin::Descriptor>::Iterator it = pluginDescs.begin();
|
||||
it != pluginDescs.end(); ++it )
|
||||
{
|
||||
if( it->type != plugin::Effect )
|
||||
if( it->type != Plugin::Effect )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1642,13 +1641,13 @@ p->putValue( jt->pos, value, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
effKeys << effectKey( &( *it ), it->name );
|
||||
effKeys << EffectKey( &( *it ), it->name );
|
||||
}
|
||||
}
|
||||
|
||||
for( int fx_ch = 0; fx_ch <= NumFxChannels ; ++fx_ch )
|
||||
{
|
||||
fxChannel * ch = engine::getFxMixer()->getEffectChannel( fx_ch );
|
||||
FxChannel * ch = engine::fxMixer()->effectChannel( fx_ch );
|
||||
if( !ch )
|
||||
{
|
||||
continue;
|
||||
@@ -1662,8 +1661,8 @@ p->putValue( jt->pos, value, false );
|
||||
ch->m_muteModel.setValue( flch->isMuted );
|
||||
}
|
||||
|
||||
for( QList<FL_Effect>::const_iterator it = p.effects.begin();
|
||||
it != p.effects.end(); ++it )
|
||||
for( QList<FL_Effect>::ConstIterator it = p.effects.begin();
|
||||
it != p.effects.end(); ++it )
|
||||
{
|
||||
QString effName;
|
||||
switch( it->pluginType )
|
||||
@@ -1710,21 +1709,19 @@ p->putValue( jt->pos, value, false );
|
||||
{
|
||||
continue;
|
||||
}
|
||||
effectChain * ec = &engine::getFxMixer()->
|
||||
getEffectChannel( it->fxChannel )->m_fxChain;
|
||||
EffectChain * ec = &engine::fxMixer()->
|
||||
effectChannel( it->fxChannel )->m_fxChain;
|
||||
qDebug( "adding %s to %d\n", effName.toUtf8().constData(),
|
||||
it->fxChannel );
|
||||
for( effectKeyList::iterator jt = effKeys.begin();
|
||||
for( EffectKeyList::Iterator jt = effKeys.begin();
|
||||
jt != effKeys.end(); ++jt )
|
||||
{
|
||||
if( QString( jt->desc->displayName ).
|
||||
contains( effName ) ||
|
||||
if( QString( jt->desc->displayName ).contains( effName ) ||
|
||||
( jt->desc->sub_plugin_features != NULL &&
|
||||
jt->name.contains( effName ) ) )
|
||||
{
|
||||
qDebug( "instantiate %s\n", jt->desc->name );
|
||||
effect * e = effect::instantiate(
|
||||
jt->desc->name, ec, &( *jt ) );
|
||||
::Effect * e = Effect::instantiate( jt->desc->name, ec, &( *jt ) );
|
||||
ec->appendEffect( e );
|
||||
ec->setEnabled( true );
|
||||
break;
|
||||
@@ -1738,8 +1735,7 @@ p->putValue( jt->pos, value, false );
|
||||
|
||||
|
||||
// process all playlist-items
|
||||
for( QList<FL_PlayListItem>::const_iterator it =
|
||||
p.playListItems.begin();
|
||||
for( QList<FL_PlayListItem>::ConstIterator it = p.playListItems.begin();
|
||||
it != p.playListItems.end(); ++it )
|
||||
{
|
||||
if( it->pattern > p.maxPatterns )
|
||||
@@ -1765,15 +1761,15 @@ p->putValue( jt->pos, value, false );
|
||||
}
|
||||
|
||||
// restore journalling settings
|
||||
engine::getProjectJournal()->setJournalling( is_journ );
|
||||
engine::projectJournal()->setJournalling( is_journ );
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void flpImport::processPluginParams( FL_Channel * _ch )
|
||||
void FlpImport::processPluginParams( FL_Channel * _ch )
|
||||
{
|
||||
qDebug( "plugin params for plugin %d (%d bytes): ", _ch->pluginType,
|
||||
_ch->pluginSettingsLength );
|
||||
@@ -1800,23 +1796,23 @@ void flpImport::processPluginParams( FL_Channel * _ch )
|
||||
|
||||
case FL_Plugin::Fruity_3x_Osc: // TripleOscillator loaded
|
||||
{
|
||||
const oscillator::WaveShapes mapped_3xOsc_Shapes[] =
|
||||
const Oscillator::WaveShapes mapped_3xOsc_Shapes[] =
|
||||
{
|
||||
oscillator::SineWave,
|
||||
oscillator::TriangleWave,
|
||||
oscillator::SquareWave,
|
||||
oscillator::SawWave,
|
||||
oscillator::SquareWave, // square-sin
|
||||
oscillator::WhiteNoise,
|
||||
oscillator::UserDefinedWave
|
||||
Oscillator::SineWave,
|
||||
Oscillator::TriangleWave,
|
||||
Oscillator::SquareWave,
|
||||
Oscillator::SawWave,
|
||||
Oscillator::SquareWave, // square-sin
|
||||
Oscillator::WhiteNoise,
|
||||
Oscillator::UserDefinedWave
|
||||
} ;
|
||||
|
||||
QDomDocument dd;
|
||||
QDomElement de = dd.createElement(
|
||||
_ch->instrumentPlugin->nodeName() );
|
||||
de.setAttribute( "modalgo1", oscillator::SignalMix );
|
||||
de.setAttribute( "modalgo2", oscillator::SignalMix );
|
||||
int ws = oscillator::UserDefinedWave;
|
||||
de.setAttribute( "modalgo1", Oscillator::SignalMix );
|
||||
de.setAttribute( "modalgo2", Oscillator::SignalMix );
|
||||
int ws = Oscillator::UserDefinedWave;
|
||||
for( int i = 0; i < 3; ++i )
|
||||
{
|
||||
const Sint32 * d = (const Sint32 *)
|
||||
@@ -1838,15 +1834,15 @@ void flpImport::processPluginParams( FL_Channel * _ch )
|
||||
const int s = mapped_3xOsc_Shapes[d[2]];
|
||||
de.setAttribute( "wavetype" + is,
|
||||
QString::number( s ) );
|
||||
if( s != oscillator::UserDefinedWave )
|
||||
if( s != Oscillator::UserDefinedWave )
|
||||
{
|
||||
ws = s;
|
||||
}
|
||||
}
|
||||
if( ws == oscillator::UserDefinedWave )
|
||||
if( ws == Oscillator::UserDefinedWave )
|
||||
{
|
||||
de.setAttribute( "wavetype0",
|
||||
oscillator::SawWave );
|
||||
Oscillator::SawWave );
|
||||
}
|
||||
de.setAttribute( "vol0", QString::number( 100/2 ) );
|
||||
// now apply the prepared plugin-state
|
||||
@@ -1877,9 +1873,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new flpImport( static_cast<const char *>( _data ) );
|
||||
return new FlpImport( static_cast<const char *>( _data ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* flp_import.h - support for importing FLP-files
|
||||
* FlpImport.h - support for importing FLP-files
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _FLP_IMPORT_H
|
||||
#define _FLP_IMPORT_H
|
||||
|
||||
@@ -30,7 +29,7 @@
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "import_filter.h"
|
||||
#include "ImportFilter.h"
|
||||
#include "note.h"
|
||||
|
||||
|
||||
@@ -38,15 +37,15 @@
|
||||
class instrument;
|
||||
struct FL_Channel;
|
||||
|
||||
class flpImport : public importFilter
|
||||
class FlpImport : public ImportFilter
|
||||
{
|
||||
public:
|
||||
flpImport( const QString & _file );
|
||||
virtual ~flpImport();
|
||||
FlpImport( const QString & _file );
|
||||
virtual ~FlpImport();
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * )
|
||||
virtual PluginView * instantiateView( QWidget * )
|
||||
{
|
||||
return( NULL );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +69,7 @@ private:
|
||||
return( value );
|
||||
}
|
||||
|
||||
inline Sint32 read32LE( void )
|
||||
inline Sint32 read32LE()
|
||||
{
|
||||
int value = readByte();
|
||||
value |= readByte() << 8;
|
||||
@@ -78,14 +77,14 @@ private:
|
||||
value |= readByte() << 24;
|
||||
return( value );
|
||||
}
|
||||
inline Sint32 read16LE( void )
|
||||
inline Sint32 read16LE()
|
||||
{
|
||||
int value = readByte();
|
||||
value |= readByte() << 8;
|
||||
return( value );
|
||||
}
|
||||
|
||||
inline Sint32 readID( void )
|
||||
inline Sint32 readID()
|
||||
{
|
||||
return( read32LE() );
|
||||
}
|
||||
@@ -99,7 +98,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
#include "kicker.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "sweep_oscillator.h"
|
||||
#include "SweepOscillator.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT kicker_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT kicker_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Kicker",
|
||||
@@ -47,8 +47,8 @@ plugin::descriptor PLUGIN_EXPORT kicker_plugin_descriptor =
|
||||
"versatile kick- & bassdrum-synthesizer" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -56,8 +56,8 @@ plugin::descriptor PLUGIN_EXPORT kicker_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
kickerInstrument::kickerInstrument( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &kicker_plugin_descriptor ),
|
||||
kickerInstrument::kickerInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &kicker_plugin_descriptor ),
|
||||
m_startFreqModel( 150.0f, 5.0f, 1000.0f, 1.0f, this, tr( "Start frequency" ) ),
|
||||
m_endFreqModel( 40.0f, 5.0f, 1000.0f, 1.0f, this, tr( "End frequency" ) ),
|
||||
m_decayModel( 120.0f, 5.0f, 1000.0f, 1.0f, this, tr( "Decay" ) ),
|
||||
@@ -101,16 +101,16 @@ void kickerInstrument::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
QString kickerInstrument::nodeName( void ) const
|
||||
QString kickerInstrument::nodeName() const
|
||||
{
|
||||
return( kicker_plugin_descriptor.name );
|
||||
return kicker_plugin_descriptor.name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//typedef effectLib::foldbackDistortion<> distFX;
|
||||
typedef effectLib::distortion distFX;
|
||||
typedef sweepOscillator<effectLib::monoToStereoAdaptor<distFX> > sweepOsc;
|
||||
//typedef effectLib::foldbackDistortion<> DistFX;
|
||||
typedef effectLib::distortion DistFX;
|
||||
typedef SweepOscillator<effectLib::monoToStereoAdaptor<DistFX> > SweepOsc;
|
||||
|
||||
|
||||
void kickerInstrument::playNote( notePlayHandle * _n,
|
||||
@@ -122,8 +122,8 @@ void kickerInstrument::playNote( notePlayHandle * _n,
|
||||
|
||||
if ( tfp == 0 )
|
||||
{
|
||||
_n->m_pluginData = new sweepOsc(
|
||||
distFX( m_distModel.value(),
|
||||
_n->m_pluginData = new SweepOsc(
|
||||
DistFX( m_distModel.value(),
|
||||
m_gainModel.value() ) );
|
||||
}
|
||||
else if( tfp > decfr && !_n->released() )
|
||||
@@ -131,7 +131,7 @@ void kickerInstrument::playNote( notePlayHandle * _n,
|
||||
_n->noteOff();
|
||||
}
|
||||
|
||||
//const float freq = getInstrumentTrack()->frequency( _n ) / 2;
|
||||
//const float freq = instrumentTrack()->frequency( _n ) / 2;
|
||||
const float fdiff = m_endFreqModel.value() - m_startFreqModel.value();
|
||||
/* const fpp_t frames = _n->released() ?
|
||||
tMax( tMin<f_cnt_t>( desiredReleaseFrames() -
|
||||
@@ -144,7 +144,7 @@ void kickerInstrument::playNote( notePlayHandle * _n,
|
||||
const float f2 = m_startFreqModel.value() + (frames+tfp-1)*fdiff/decfr;
|
||||
|
||||
|
||||
sweepOsc * so = static_cast<sweepOsc *>( _n->m_pluginData );
|
||||
SweepOsc * so = static_cast<SweepOsc *>( _n->m_pluginData );
|
||||
so->update( _working_buffer, frames, f1, f2,
|
||||
engine::getMixer()->processingSampleRate() );
|
||||
|
||||
@@ -160,7 +160,7 @@ void kickerInstrument::playNote( notePlayHandle * _n,
|
||||
}
|
||||
}
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
}
|
||||
|
||||
|
||||
@@ -168,15 +168,15 @@ void kickerInstrument::playNote( notePlayHandle * _n,
|
||||
|
||||
void kickerInstrument::deleteNotePluginData( notePlayHandle * _n )
|
||||
{
|
||||
delete static_cast<sweepOsc *>( _n->m_pluginData );
|
||||
delete static_cast<SweepOsc *>( _n->m_pluginData );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
pluginView * kickerInstrument::instantiateView( QWidget * _parent )
|
||||
PluginView * kickerInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new kickerInstrumentView( this, _parent ) );
|
||||
return new kickerInstrumentView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
@@ -195,9 +195,9 @@ public:
|
||||
|
||||
|
||||
|
||||
kickerInstrumentView::kickerInstrumentView( instrument * _instrument,
|
||||
kickerInstrumentView::kickerInstrumentView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
m_startFreqKnob = new kickerKnob( this );
|
||||
m_startFreqKnob->setHintText( tr( "Start frequency:" ) + " ", "Hz" );
|
||||
@@ -236,7 +236,7 @@ kickerInstrumentView::~kickerInstrumentView()
|
||||
|
||||
|
||||
|
||||
void kickerInstrumentView::modelChanged( void )
|
||||
void kickerInstrumentView::modelChanged()
|
||||
{
|
||||
kickerInstrument * k = castModel<kickerInstrument>();
|
||||
m_startFreqKnob->setModel( &k->m_startFreqModel );
|
||||
@@ -254,10 +254,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new kickerInstrument(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
return new kickerInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#define _KICKER_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "knob.h"
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ class kickerInstrumentView;
|
||||
class notePlayHandle;
|
||||
|
||||
|
||||
class kickerInstrument : public instrument
|
||||
class kickerInstrument : public Instrument
|
||||
{
|
||||
public:
|
||||
kickerInstrument( instrumentTrack * _instrument_track );
|
||||
kickerInstrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~kickerInstrument();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -57,15 +57,15 @@ public:
|
||||
return( 512 );
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
private:
|
||||
knobModel m_startFreqModel;
|
||||
knobModel m_endFreqModel;
|
||||
knobModel m_decayModel;
|
||||
knobModel m_distModel;
|
||||
knobModel m_gainModel;
|
||||
FloatModel m_startFreqModel;
|
||||
FloatModel m_endFreqModel;
|
||||
FloatModel m_decayModel;
|
||||
FloatModel m_distModel;
|
||||
FloatModel m_gainModel;
|
||||
|
||||
friend class kickerInstrumentView;
|
||||
|
||||
@@ -73,11 +73,11 @@ private:
|
||||
|
||||
|
||||
|
||||
class kickerInstrumentView : public instrumentView
|
||||
class kickerInstrumentView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
kickerInstrumentView( instrument * _instrument, QWidget * _parent );
|
||||
kickerInstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~kickerInstrumentView();
|
||||
|
||||
private:
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -44,7 +45,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"LADSPA Plugin Browser",
|
||||
@@ -52,17 +53,17 @@ plugin::descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor =
|
||||
"List installed LADSPA plugins" ),
|
||||
"Danny McRae <khjklujn/at/users.sourceforge.net>",
|
||||
0x0100,
|
||||
plugin::Tool,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Tool,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model * _parent, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new ladspaBrowser );
|
||||
return new ladspaBrowser;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -70,8 +71,8 @@ plugin * PLUGIN_EXPORT lmms_plugin_main( model * _parent, void * _data )
|
||||
|
||||
|
||||
|
||||
ladspaBrowser::ladspaBrowser( void ) :
|
||||
tool( &ladspabrowser_plugin_descriptor, NULL )
|
||||
ladspaBrowser::ladspaBrowser() :
|
||||
ToolPlugin( &ladspabrowser_plugin_descriptor, NULL )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -85,9 +86,9 @@ ladspaBrowser::~ladspaBrowser()
|
||||
|
||||
|
||||
|
||||
QString ladspaBrowser::nodeName( void ) const
|
||||
QString ladspaBrowser::nodeName() const
|
||||
{
|
||||
return( ladspabrowser_plugin_descriptor.name );
|
||||
return ladspabrowser_plugin_descriptor.name;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,8 +96,8 @@ QString ladspaBrowser::nodeName( void ) const
|
||||
|
||||
|
||||
|
||||
ladspaBrowserView::ladspaBrowserView( tool * _tool ) :
|
||||
toolView( _tool )
|
||||
ladspaBrowserView::ladspaBrowserView( ToolPlugin * _tool ) :
|
||||
ToolPluginView( _tool )
|
||||
{
|
||||
QHBoxLayout * hlayout = new QHBoxLayout( this );
|
||||
hlayout->setSpacing( 0 );
|
||||
@@ -219,7 +220,7 @@ QWidget * ladspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
SLOT( showPorts( const ladspa_key_t & ) ) );
|
||||
layout->addWidget( description, 1 );
|
||||
|
||||
return( tab );
|
||||
return tab;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -23,23 +24,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LADSPA_BROWSER_H
|
||||
#define _LADSPA_BROWSER_H
|
||||
|
||||
|
||||
#include "ladspa_manager.h"
|
||||
#include "tool.h"
|
||||
|
||||
#include "ToolPlugin.h"
|
||||
#include "ToolPluginView.h"
|
||||
|
||||
class tabBar;
|
||||
|
||||
|
||||
class ladspaBrowserView : public toolView
|
||||
class ladspaBrowserView : public ToolPluginView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ladspaBrowserView( tool * _tool );
|
||||
ladspaBrowserView( ToolPlugin * _tool );
|
||||
virtual ~ladspaBrowserView();
|
||||
|
||||
|
||||
@@ -56,18 +55,18 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
class ladspaBrowser : public tool
|
||||
class ladspaBrowser : public ToolPlugin
|
||||
{
|
||||
public:
|
||||
ladspaBrowser( void );
|
||||
ladspaBrowser();
|
||||
virtual ~ladspaBrowser();
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * )
|
||||
virtual PluginView * instantiateView( QWidget * )
|
||||
{
|
||||
return( new ladspaBrowserView( this ) );
|
||||
return new ladspaBrowserView( this );
|
||||
}
|
||||
|
||||
virtual QString nodeName( void ) const;
|
||||
virtual QString nodeName() const;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -21,6 +21,6 @@ ENDIF(WANT_CALF)
|
||||
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(ladspaeffect ladspa_effect.cpp ladspa_controls.cpp ladspa_control_dialog.cpp ladspa_subplugin_features.cpp ladspa_effect.h ladspa_controls.h ladspa_control_dialog.h ladspa_subplugin_features.h MOCFILES ladspa_effect.h ladspa_controls.h ladspa_control_dialog.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/*
|
||||
* ladspa_control_dialog.cpp - dialog for displaying and editing control port
|
||||
* LadspaControlDialog.cpp - dialog for displaying and editing control port
|
||||
* values for LADSPA plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -27,15 +28,15 @@
|
||||
#include <QtGui/QGroupBox>
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#include "ladspa_effect.h"
|
||||
#include "ladspa_control_dialog.h"
|
||||
#include "ladspa_control_view.h"
|
||||
#include "LadspaEffect.h"
|
||||
#include "LadspaControlDialog.h"
|
||||
#include "LadspaControlView.h"
|
||||
#include "led_checkbox.h"
|
||||
|
||||
|
||||
|
||||
ladspaControlDialog::ladspaControlDialog( ladspaControls * _ctl ) :
|
||||
effectControlDialog( _ctl ),
|
||||
LadspaControlDialog::LadspaControlDialog( LadspaControls * _ctl ) :
|
||||
EffectControlDialog( _ctl ),
|
||||
m_effectLayout( NULL ),
|
||||
m_stereoLink( NULL )
|
||||
{
|
||||
@@ -60,14 +61,14 @@ ladspaControlDialog::ladspaControlDialog( ladspaControls * _ctl ) :
|
||||
|
||||
|
||||
|
||||
ladspaControlDialog::~ladspaControlDialog()
|
||||
LadspaControlDialog::~LadspaControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void ladspaControlDialog::updateEffectView( ladspaControls * _ctl )
|
||||
void LadspaControlDialog::updateEffectView( LadspaControls * _ctl )
|
||||
{
|
||||
QList<QGroupBox *> list = findChildren<QGroupBox *>();
|
||||
for( QList<QGroupBox *>::iterator it = list.begin(); it != list.end();
|
||||
@@ -108,27 +109,23 @@ void ladspaControlDialog::updateEffectView( ladspaControls * _ctl )
|
||||
for( control_list_t::iterator it = controls.begin();
|
||||
it != controls.end(); it++ )
|
||||
{
|
||||
if( (*it)->getPort()->proc == proc )
|
||||
if( (*it)->port()->proc == proc )
|
||||
{
|
||||
if( last_port != NONE &&
|
||||
(*it)->getPort()->data_type ==
|
||||
TOGGLED &&
|
||||
!( (*it)->getPort()->data_type ==
|
||||
TOGGLED &&
|
||||
(*it)->port()->data_type == TOGGLED &&
|
||||
!( (*it)->port()->data_type == TOGGLED &&
|
||||
last_port == TOGGLED ) )
|
||||
{
|
||||
++row;
|
||||
col = 0;
|
||||
}
|
||||
gl->addWidget( new ladspaControlView(
|
||||
grouper, *it ),
|
||||
row, col );
|
||||
gl->addWidget( new LadspaControlView( grouper, *it ), row, col );
|
||||
if( ++col == cols )
|
||||
{
|
||||
++row;
|
||||
col = 0;
|
||||
}
|
||||
last_port = (*it)->getPort()->data_type;
|
||||
last_port = (*it)->port()->data_type;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,11 +137,11 @@ void ladspaControlDialog::updateEffectView( ladspaControls * _ctl )
|
||||
m_stereoLink->setModel( &_ctl->m_stereoLinkModel );
|
||||
}
|
||||
|
||||
connect( _ctl, SIGNAL( effectModelChanged( ladspaControls * ) ),
|
||||
this, SLOT( updateEffectView( ladspaControls * ) ),
|
||||
connect( _ctl, SIGNAL( effectModelChanged( LadspaControls * ) ),
|
||||
this, SLOT( updateEffectView( LadspaControls * ) ),
|
||||
Qt::DirectConnection );
|
||||
}
|
||||
|
||||
|
||||
#include "moc_ladspa_control_dialog.cxx"
|
||||
#include "moc_LadspaControlDialog.cxx"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/*
|
||||
* ladspa_control_dialog.h - dialog for displaying and editing control port
|
||||
* values for LADSPA plugins
|
||||
* LadspaControlDialog.h - dialog for displaying and editing control port
|
||||
* values for LADSPA plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,24 +27,24 @@
|
||||
#ifndef _LADSPA_CONTROL_DIALOG_H
|
||||
#define _LADSPA_CONTROL_DIALOG_H
|
||||
|
||||
#include "effect_control_dialog.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
|
||||
class QHBoxLayout;
|
||||
class ladspaControls;
|
||||
class LadspaControls;
|
||||
class ledCheckBox;
|
||||
|
||||
|
||||
class ladspaControlDialog : public effectControlDialog
|
||||
class LadspaControlDialog : public EffectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ladspaControlDialog( ladspaControls * _ctl );
|
||||
~ladspaControlDialog();
|
||||
LadspaControlDialog( LadspaControls * _ctl );
|
||||
~LadspaControlDialog();
|
||||
|
||||
|
||||
private slots:
|
||||
void updateEffectView( ladspaControls * _ctl );
|
||||
void updateEffectView( LadspaControls * _ctl );
|
||||
|
||||
|
||||
private:
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ladspa_controls.cpp - model for LADSPA-plugin controls
|
||||
* LadspaControls.cpp - model for LADSPA-plugin controls
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -25,15 +25,15 @@
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include "ladspa_effect.h"
|
||||
#include "LadspaEffect.h"
|
||||
|
||||
|
||||
ladspaControls::ladspaControls( ladspaEffect * _eff ) :
|
||||
effectControls( _eff ),
|
||||
LadspaControls::LadspaControls( LadspaEffect * _eff ) :
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
m_processors( _eff->getProcessorCount() ),
|
||||
m_noLink( FALSE ),
|
||||
m_stereoLinkModel( TRUE, this )
|
||||
m_processors( _eff->processorCount() ),
|
||||
m_noLink( false ),
|
||||
m_stereoLinkModel( true, this )
|
||||
{
|
||||
multi_proc_t controls = m_effect->getPortControls();
|
||||
m_controlCount = controls.count();
|
||||
@@ -45,12 +45,12 @@ ladspaControls::ladspaControls( ladspaEffect * _eff ) :
|
||||
const bool linked_control = ( m_processors > 1 && proc == 0 );
|
||||
buffer_data_t last_port = NONE;
|
||||
|
||||
for( multi_proc_t::iterator it = controls.begin();
|
||||
for( multi_proc_t::Iterator it = controls.begin();
|
||||
it != controls.end(); it++ )
|
||||
{
|
||||
if( (*it)->proc == proc )
|
||||
{
|
||||
(*it)->control = new ladspaControl( this, *it,
|
||||
(*it)->control = new LadspaControl( this, *it,
|
||||
linked_control );
|
||||
|
||||
last_port = (*it)->data_type;
|
||||
@@ -73,12 +73,12 @@ ladspaControls::ladspaControls( ladspaEffect * _eff ) :
|
||||
// now link all controls
|
||||
if( m_processors > 1 )
|
||||
{
|
||||
for( multi_proc_t::iterator it = controls.begin();
|
||||
for( multi_proc_t::Iterator it = controls.begin();
|
||||
it != controls.end(); it++ )
|
||||
{
|
||||
if( (*it)->proc == 0 )
|
||||
{
|
||||
linkPort( ( *it )->control_id, TRUE );
|
||||
linkPort( ( *it )->control_id, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,7 +87,7 @@ ladspaControls::ladspaControls( ladspaEffect * _eff ) :
|
||||
|
||||
|
||||
|
||||
ladspaControls::~ladspaControls()
|
||||
LadspaControls::~LadspaControls()
|
||||
{
|
||||
for( ch_cnt_t proc = 0; proc < m_processors; proc++ )
|
||||
{
|
||||
@@ -99,7 +99,7 @@ ladspaControls::~ladspaControls()
|
||||
|
||||
|
||||
|
||||
void ladspaControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void LadspaControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
if( m_processors > 1 )
|
||||
{
|
||||
@@ -108,7 +108,7 @@ void ladspaControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
multi_proc_t controls = m_effect->getPortControls();
|
||||
_this.setAttribute( "ports", controls.count() );
|
||||
for( multi_proc_t::iterator it = controls.begin();
|
||||
for( multi_proc_t::Iterator it = controls.begin();
|
||||
it != controls.end(); it++ )
|
||||
{
|
||||
QString n = "port" + QString::number( (*it)->proc ) +
|
||||
@@ -120,7 +120,7 @@ void ladspaControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void ladspaControls::loadSettings( const QDomElement & _this )
|
||||
void LadspaControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
if( m_processors > 1 )
|
||||
{
|
||||
@@ -128,7 +128,7 @@ void ladspaControls::loadSettings( const QDomElement & _this )
|
||||
}
|
||||
|
||||
multi_proc_t controls = m_effect->getPortControls();
|
||||
for( multi_proc_t::iterator it = controls.begin();
|
||||
for( multi_proc_t::Iterator it = controls.begin();
|
||||
it != controls.end(); it++ )
|
||||
{
|
||||
QString n = "port" + QString::number( (*it)->proc ) +
|
||||
@@ -140,9 +140,9 @@ void ladspaControls::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void ladspaControls::linkPort( Uint16 _port, bool _state )
|
||||
void LadspaControls::linkPort( Uint16 _port, bool _state )
|
||||
{
|
||||
ladspaControl * first = m_controls[0][_port];
|
||||
LadspaControl * first = m_controls[0][_port];
|
||||
if( _state )
|
||||
{
|
||||
for( ch_cnt_t proc = 1; proc < m_processors; proc++ )
|
||||
@@ -156,14 +156,14 @@ void ladspaControls::linkPort( Uint16 _port, bool _state )
|
||||
{
|
||||
first->unlinkControls( m_controls[proc][_port] );
|
||||
}
|
||||
m_noLink = TRUE;
|
||||
m_stereoLinkModel.setValue( FALSE );
|
||||
m_noLink = true;
|
||||
m_stereoLinkModel.setValue( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ladspaControls::updateChannelLinkState( void )
|
||||
void LadspaControls::updateChannelLinkState()
|
||||
{
|
||||
if( m_stereoLinkModel.value() )
|
||||
{
|
||||
@@ -171,7 +171,7 @@ void ladspaControls::updateChannelLinkState( void )
|
||||
port < m_controlCount / m_processors;
|
||||
port++ )
|
||||
{
|
||||
m_controls[0][port]->setLink( TRUE );
|
||||
m_controls[0][port]->setLink( true );
|
||||
}
|
||||
}
|
||||
else if( !m_noLink )
|
||||
@@ -180,15 +180,15 @@ void ladspaControls::updateChannelLinkState( void )
|
||||
port < m_controlCount / m_processors;
|
||||
port++ )
|
||||
{
|
||||
m_controls[0][port]->setLink( FALSE );
|
||||
m_controls[0][port]->setLink( false );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_noLink = FALSE;
|
||||
m_noLink = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#include "moc_ladspa_controls.cxx"
|
||||
#include "moc_LadspaControls.cxx"
|
||||
|
||||
@@ -25,61 +25,61 @@
|
||||
#ifndef _LADSPA_CONTROLS_H
|
||||
#define _LADSPA_CONTROLS_H
|
||||
|
||||
#include "effect_controls.h"
|
||||
#include "ladspa_control.h"
|
||||
#include "ladspa_control_dialog.h"
|
||||
#include "EffectControls.h"
|
||||
#include "LadspaControl.h"
|
||||
#include "LadspaControlDialog.h"
|
||||
|
||||
|
||||
typedef QVector<ladspaControl *> control_list_t;
|
||||
typedef QVector<LadspaControl *> control_list_t;
|
||||
|
||||
class ladspaEffect;
|
||||
class LadspaEffect;
|
||||
|
||||
|
||||
class ladspaControls : public effectControls
|
||||
class LadspaControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ladspaControls( ladspaEffect * _eff );
|
||||
virtual ~ladspaControls();
|
||||
LadspaControls( LadspaEffect * _eff );
|
||||
virtual ~LadspaControls();
|
||||
|
||||
inline int getControlCount( void )
|
||||
inline int controlCount()
|
||||
{
|
||||
return( m_controlCount );
|
||||
return m_controlCount;
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return( "ladspacontrols" );
|
||||
return "ladspacontrols";
|
||||
}
|
||||
|
||||
virtual effectControlDialog * createView( void )
|
||||
virtual EffectControlDialog * createView()
|
||||
{
|
||||
return( new ladspaControlDialog( this ) );
|
||||
return new LadspaControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
protected slots:
|
||||
void updateChannelLinkState( void );
|
||||
void updateChannelLinkState();
|
||||
void linkPort( Uint16 _port, bool _state );
|
||||
|
||||
|
||||
private:
|
||||
ladspaEffect * m_effect;
|
||||
LadspaEffect * m_effect;
|
||||
ch_cnt_t m_processors;
|
||||
ch_cnt_t m_controlCount;
|
||||
bool m_noLink;
|
||||
boolModel m_stereoLinkModel;
|
||||
BoolModel m_stereoLinkModel;
|
||||
QVector<control_list_t> m_controls;
|
||||
|
||||
|
||||
friend class ladspaControlDialog;
|
||||
friend class ladspaEffect;
|
||||
friend class LadspaControlDialog;
|
||||
friend class LadspaEffect;
|
||||
|
||||
|
||||
signals:
|
||||
void effectModelChanged( ladspaControls * );
|
||||
void effectModelChanged( LadspaControls * );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ladspa_effect.cpp - class for processing LADSPA effects
|
||||
* LadspaEffect.cpp - class for processing LADSPA effects
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -26,15 +26,15 @@
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
#include "ladspa_effect.h"
|
||||
#include "LadspaEffect.h"
|
||||
#include "mmp.h"
|
||||
#include "AudioDevice.h"
|
||||
#include "config_mgr.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "ladspa_control.h"
|
||||
#include "ladspa_subplugin_features.h"
|
||||
#include "LadspaControl.h"
|
||||
#include "LadspaSubPluginFeatures.h"
|
||||
#include "mixer.h"
|
||||
#include "effect_chain.h"
|
||||
#include "EffectChain.h"
|
||||
#include "automation_pattern.h"
|
||||
#include "ControllerConnection.h"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT ladspaeffect_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT ladspaeffect_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"LADSPA Effect",
|
||||
@@ -53,21 +53,21 @@ plugin::descriptor PLUGIN_EXPORT ladspaeffect_plugin_descriptor =
|
||||
"inside LMMS." ),
|
||||
"Danny McRae <khjklujn/at/users.sourceforge.net>",
|
||||
0x0100,
|
||||
plugin::Effect,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
new ladspaSubPluginFeatures( plugin::Effect )
|
||||
new LadspaSubPluginFeatures( Plugin::Effect )
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
ladspaEffect::ladspaEffect( model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key ) :
|
||||
effect( &ladspaeffect_plugin_descriptor, _parent, _key ),
|
||||
LadspaEffect::LadspaEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &ladspaeffect_plugin_descriptor, _parent, _key ),
|
||||
m_controls( NULL ),
|
||||
m_maxSampleRate( 0 ),
|
||||
m_key( ladspaSubPluginFeatures::subPluginKeyToLadspaKey( _key ) )
|
||||
m_key( LadspaSubPluginFeatures::subPluginKeyToLadspaKey( _key ) )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
if( manager->getDescription( m_key ) == NULL )
|
||||
@@ -94,7 +94,7 @@ ladspaEffect::ladspaEffect( model * _parent,
|
||||
|
||||
|
||||
|
||||
ladspaEffect::~ladspaEffect()
|
||||
LadspaEffect::~LadspaEffect()
|
||||
{
|
||||
pluginDestruction();
|
||||
}
|
||||
@@ -102,12 +102,12 @@ ladspaEffect::~ladspaEffect()
|
||||
|
||||
|
||||
|
||||
void ladspaEffect::changeSampleRate( void )
|
||||
void LadspaEffect::changeSampleRate()
|
||||
{
|
||||
multimediaProject mmp( multimediaProject::EffectSettings );
|
||||
m_controls->saveState( mmp, mmp.content() );
|
||||
|
||||
ladspaControls * controls = m_controls;
|
||||
LadspaControls * controls = m_controls;
|
||||
m_controls = NULL;
|
||||
|
||||
m_pluginMutex.lock();
|
||||
@@ -131,7 +131,7 @@ void ladspaEffect::changeSampleRate( void )
|
||||
|
||||
|
||||
|
||||
bool ladspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames )
|
||||
{
|
||||
m_pluginMutex.lock();
|
||||
@@ -158,7 +158,7 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
// plugins--would speed things up to use the same buffer for both
|
||||
// LMMS and LADSPA.
|
||||
ch_cnt_t channel = 0;
|
||||
for( ch_cnt_t proc = 0; proc < getProcessorCount(); ++proc )
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); ++proc )
|
||||
{
|
||||
for( int port = 0; port < m_portCount; ++port )
|
||||
{
|
||||
@@ -175,10 +175,8 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
++channel;
|
||||
break;
|
||||
case AUDIO_RATE_INPUT:
|
||||
pp->value =
|
||||
static_cast<LADSPA_Data>(
|
||||
pp->control->getValue() /
|
||||
pp->scale );
|
||||
pp->value = static_cast<LADSPA_Data>(
|
||||
pp->control->value() / pp->scale );
|
||||
// This only supports control rate ports, so the audio rates are
|
||||
// treated as though they were control rate by setting the
|
||||
// port buffer to all the same value.
|
||||
@@ -194,10 +192,8 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
{
|
||||
break;
|
||||
}
|
||||
pp->value =
|
||||
static_cast<LADSPA_Data>(
|
||||
pp->control->getValue() /
|
||||
pp->scale );
|
||||
pp->value = static_cast<LADSPA_Data>(
|
||||
pp->control->value() / pp->scale );
|
||||
pp->buffer[0] =
|
||||
pp->value;
|
||||
break;
|
||||
@@ -212,7 +208,7 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
}
|
||||
|
||||
// Process the buffers.
|
||||
for( ch_cnt_t proc = 0; proc < getProcessorCount(); ++proc )
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); ++proc )
|
||||
{
|
||||
(m_descriptor->run)( m_handles[proc], frames );
|
||||
}
|
||||
@@ -220,9 +216,9 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
// Copy the LADSPA output buffers to the LMMS buffer.
|
||||
double out_sum = 0.0;
|
||||
channel = 0;
|
||||
const float d = getDryLevel();
|
||||
const float w = getWetLevel();
|
||||
for( ch_cnt_t proc = 0; proc < getProcessorCount(); ++proc )
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); ++proc )
|
||||
{
|
||||
for( int port = 0; port < m_portCount; ++port )
|
||||
{
|
||||
@@ -274,7 +270,7 @@ bool ladspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
|
||||
|
||||
|
||||
void ladspaEffect::setControl( int _control, LADSPA_Data _value )
|
||||
void LadspaEffect::setControl( int _control, LADSPA_Data _value )
|
||||
{
|
||||
if( !isOkay() )
|
||||
{
|
||||
@@ -286,7 +282,7 @@ void ladspaEffect::setControl( int _control, LADSPA_Data _value )
|
||||
|
||||
|
||||
|
||||
void ladspaEffect::pluginInstantiation( void )
|
||||
void LadspaEffect::pluginInstantiation()
|
||||
{
|
||||
m_maxSampleRate = maxSamplerate( displayName() );
|
||||
|
||||
@@ -300,12 +296,12 @@ void ladspaEffect::pluginInstantiation( void )
|
||||
// Categorize the ports, and create the buffers.
|
||||
m_portCount = manager->getPortCount( m_key );
|
||||
|
||||
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); proc++ )
|
||||
{
|
||||
multi_proc_t ports;
|
||||
for( int port = 0; port < m_portCount; port++ )
|
||||
{
|
||||
port_desc_t * p = new portDescription;
|
||||
port_desc_t * p = new PortDescription;
|
||||
|
||||
p->name = manager->getPortName( m_key, port );
|
||||
p->proc = proc;
|
||||
@@ -467,7 +463,7 @@ void ladspaEffect::pluginInstantiation( void )
|
||||
QMessageBox::Ok, QMessageBox::NoButton );
|
||||
setDontRun( TRUE );
|
||||
}
|
||||
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); proc++ )
|
||||
{
|
||||
LADSPA_Handle effect = manager->instantiate( m_key,
|
||||
m_maxSampleRate );
|
||||
@@ -483,7 +479,7 @@ void ladspaEffect::pluginInstantiation( void )
|
||||
}
|
||||
|
||||
// Connect the ports.
|
||||
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); proc++ )
|
||||
{
|
||||
for( int port = 0; port < m_portCount; port++ )
|
||||
{
|
||||
@@ -503,17 +499,17 @@ void ladspaEffect::pluginInstantiation( void )
|
||||
}
|
||||
|
||||
// Activate the processing units.
|
||||
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); proc++ )
|
||||
{
|
||||
manager->activate( m_key, m_handles[proc] );
|
||||
}
|
||||
m_controls = new ladspaControls( this );
|
||||
m_controls = new LadspaControls( this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void ladspaEffect::pluginDestruction( void )
|
||||
void LadspaEffect::pluginDestruction()
|
||||
{
|
||||
if( !isOkay() )
|
||||
{
|
||||
@@ -522,7 +518,7 @@ void ladspaEffect::pluginDestruction( void )
|
||||
|
||||
delete m_controls;
|
||||
|
||||
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); proc++ )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
manager->deactivate( m_key, m_handles[proc] );
|
||||
@@ -547,7 +543,7 @@ void ladspaEffect::pluginDestruction( void )
|
||||
|
||||
static QMap<QString, sample_rate_t> __buggy_plugins;
|
||||
|
||||
sample_rate_t ladspaEffect::maxSamplerate( const QString & _name )
|
||||
sample_rate_t LadspaEffect::maxSamplerate( const QString & _name )
|
||||
{
|
||||
if( __buggy_plugins.isEmpty() )
|
||||
{
|
||||
@@ -571,15 +567,15 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model * _parent, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new ladspaEffect( _parent,
|
||||
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
|
||||
_data ) ) );
|
||||
return new LadspaEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#include "moc_ladspa_effect.cxx"
|
||||
#include "moc_LadspaEffect.cxx"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/*
|
||||
* ladspa_effect.h - class for handling LADSPA effect plugins
|
||||
* LadspaEffect.h - class for handling LADSPA effect plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -27,53 +28,50 @@
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#include "effect.h"
|
||||
#include "engine.h"
|
||||
#include "ladspa_base.h"
|
||||
#include "ladspa_controls.h"
|
||||
#include "main_window.h"
|
||||
#include "mixer.h"
|
||||
#include "Effect.h"
|
||||
#include "LadspaBase.h"
|
||||
#include "LadspaControls.h"
|
||||
|
||||
|
||||
typedef QVector<port_desc_t *> multi_proc_t;
|
||||
|
||||
class ladspaEffect : public effect
|
||||
class LadspaEffect : public Effect
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ladspaEffect( model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key );
|
||||
virtual ~ladspaEffect();
|
||||
LadspaEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~LadspaEffect();
|
||||
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
void setControl( int _control, LADSPA_Data _data );
|
||||
|
||||
virtual effectControls * getControls( void )
|
||||
virtual EffectControls * controls()
|
||||
{
|
||||
return( m_controls );
|
||||
return m_controls;
|
||||
}
|
||||
|
||||
inline const multi_proc_t & getPortControls( void )
|
||||
inline const multi_proc_t & getPortControls()
|
||||
{
|
||||
return( m_portControls );
|
||||
return m_portControls;
|
||||
}
|
||||
|
||||
|
||||
private slots:
|
||||
void changeSampleRate( void );
|
||||
void changeSampleRate();
|
||||
|
||||
|
||||
private:
|
||||
void pluginInstantiation( void );
|
||||
void pluginDestruction( void );
|
||||
void pluginInstantiation();
|
||||
void pluginDestruction();
|
||||
|
||||
static sample_rate_t maxSamplerate( const QString & _name );
|
||||
|
||||
|
||||
QMutex m_pluginMutex;
|
||||
ladspaControls * m_controls;
|
||||
LadspaControls * m_controls;
|
||||
|
||||
sample_rate_t m_maxSampleRate;
|
||||
ladspa_key_t m_key;
|
||||
@@ -84,6 +82,7 @@ private:
|
||||
|
||||
QVector<multi_proc_t> m_ports;
|
||||
multi_proc_t m_portControls;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ladspa_subplugin_features.cpp - derivation from
|
||||
* plugin::descriptor::subPluginFeatures for
|
||||
* hosting LADSPA-plugins
|
||||
* LadspaSubPluginFeatures.cpp - derivation from
|
||||
* Plugin::Descriptor::SubPluginFeatures for
|
||||
* hosting LADSPA-plugins
|
||||
*
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -25,28 +25,28 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ladspa_subplugin_features.h"
|
||||
|
||||
#include <QtGui/QHBoxLayout>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
#include "LadspaSubPluginFeatures.h"
|
||||
#include "AudioDevice.h"
|
||||
#include "engine.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "ladspa_base.h"
|
||||
#include "LadspaBase.h"
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
ladspaSubPluginFeatures::ladspaSubPluginFeatures( plugin::PluginTypes _type ) :
|
||||
subPluginFeatures( _type )
|
||||
LadspaSubPluginFeatures::LadspaSubPluginFeatures( Plugin::PluginTypes _type ) :
|
||||
SubPluginFeatures( _type )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void ladspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
const key * _key )
|
||||
void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
const Key * _key )
|
||||
{
|
||||
const ladspa_key_t & lkey = subPluginKeyToLadspaKey( _key );
|
||||
ladspa2LMMS * lm = engine::getLADSPAManager();
|
||||
@@ -114,25 +114,25 @@ void ladspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
|
||||
|
||||
|
||||
void ladspaSubPluginFeatures::listSubPluginKeys( plugin::descriptor * _desc,
|
||||
keyList & _kl )
|
||||
void LadspaSubPluginFeatures::listSubPluginKeys( Plugin::Descriptor * _desc,
|
||||
KeyList & _kl )
|
||||
{
|
||||
ladspa2LMMS * lm = engine::getLADSPAManager();
|
||||
|
||||
l_sortable_plugin_t plugins;
|
||||
switch( m_type )
|
||||
{
|
||||
case plugin::Instrument:
|
||||
case Plugin::Instrument:
|
||||
plugins = lm->getInstruments();
|
||||
break;
|
||||
case plugin::Effect:
|
||||
case Plugin::Effect:
|
||||
plugins = lm->getValidEffects();
|
||||
//plugins += lm->getInvalidEffects();
|
||||
break;
|
||||
case plugin::Tool:
|
||||
case Plugin::Tool:
|
||||
plugins = lm->getAnalysisTools();
|
||||
break;
|
||||
case plugin::Other:
|
||||
case Plugin::Other:
|
||||
plugins = lm->getOthers();
|
||||
break;
|
||||
default:
|
||||
@@ -145,10 +145,7 @@ void ladspaSubPluginFeatures::listSubPluginKeys( plugin::descriptor * _desc,
|
||||
if( lm->getDescription( ( *it ).second )->inputChannels <=
|
||||
engine::getMixer()->audioDev()->channels() )
|
||||
{
|
||||
_kl.push_back( ladspaKeyToSubPluginKey(
|
||||
_desc,
|
||||
( *it ).first,
|
||||
( *it ).second ) );
|
||||
_kl.push_back( ladspaKeyToSubPluginKey( _desc, ( *it ).first, ( *it ).second ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,8 +153,8 @@ void ladspaSubPluginFeatures::listSubPluginKeys( plugin::descriptor * _desc,
|
||||
|
||||
|
||||
|
||||
ladspa_key_t ladspaSubPluginFeatures::subPluginKeyToLadspaKey(
|
||||
const key * _key )
|
||||
ladspa_key_t LadspaSubPluginFeatures::subPluginKeyToLadspaKey(
|
||||
const Key * _key )
|
||||
{
|
||||
QString file = _key->attributes["file"].toLower();
|
||||
return( ladspa_key_t( file.remove( QRegExp( "\\.so$" ) ).
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* ladspa_subplugin_features.h - derivation from
|
||||
* plugin::descriptor::subPluginFeatures for
|
||||
* hosting LADSPA-plugins
|
||||
* LadspaSubPluginFeatures.h - derivation from
|
||||
* Plugin::Descriptor::SubPluginFeatures for
|
||||
* hosting LADSPA-plugins
|
||||
*
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -30,21 +30,19 @@
|
||||
#define _LADSPA_SUBPLUGIN_FEATURES_H
|
||||
|
||||
#include "ladspa_manager.h"
|
||||
#include "plugin.h"
|
||||
#include "Plugin.h"
|
||||
|
||||
|
||||
class ladspaSubPluginFeatures : public plugin::descriptor::subPluginFeatures
|
||||
class LadspaSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures
|
||||
{
|
||||
public:
|
||||
ladspaSubPluginFeatures( plugin::PluginTypes _type );
|
||||
LadspaSubPluginFeatures( Plugin::PluginTypes _type );
|
||||
|
||||
virtual void fillDescriptionWidget( QWidget * _parent,
|
||||
const key * _key );
|
||||
virtual void fillDescriptionWidget( QWidget * _parent, const Key * _key );
|
||||
|
||||
virtual void listSubPluginKeys( plugin::descriptor * _desc,
|
||||
keyList & _kl );
|
||||
virtual void listSubPluginKeys( Plugin::Descriptor * _desc, KeyList & _kl );
|
||||
|
||||
static ladspa_key_t subPluginKeyToLadspaKey( const key * _key );
|
||||
static ladspa_key_t subPluginKeyToLadspaKey( const Key * _key );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
#include "automatable_button.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_play_handle.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "oscillator.h"
|
||||
#include "Oscillator.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "templates.h"
|
||||
#include "tooltip.h"
|
||||
@@ -76,7 +76,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT lb302_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT lb302_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"LB302",
|
||||
@@ -84,8 +84,8 @@ plugin::descriptor PLUGIN_EXPORT lb302_plugin_descriptor =
|
||||
"Incomplete monophonic immitation tb303" ),
|
||||
"Paul Giblock <pgib/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
@@ -268,8 +268,8 @@ float lb302Filter3Pole::process(const float& samp)
|
||||
// LBSynth
|
||||
//
|
||||
|
||||
lb302Synth::lb302Synth( instrumentTrack * _instrumentTrack ) :
|
||||
instrument( _instrumentTrack, &lb302_plugin_descriptor ),
|
||||
lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
Instrument( _instrumentTrack, &lb302_plugin_descriptor ),
|
||||
vcf_cut_knob( 0.75f, 0.0f, 1.5f, 0.005f, this, tr( "VCF Cutoff Frequency" ) ),
|
||||
vcf_res_knob( 0.75f, 0.0f, 1.25f, 0.005f, this, tr( "VCF Resonance" ) ),
|
||||
vcf_mod_knob( 0.1f, 0.0f, 1.0f, 0.005f, this, tr( "VCF Envelope Mod" ) ),
|
||||
@@ -277,10 +277,10 @@ lb302Synth::lb302Synth( instrumentTrack * _instrumentTrack ) :
|
||||
dist_knob( 0.0f, 0.0f, 1.0f, 0.01f, this, tr( "Distortion" ) ),
|
||||
wave_shape( 0.0f, 0.0f, 7.0f, this, tr( "Waveform" ) ),
|
||||
slide_dec_knob( 0.6f, 0.0f, 1.0f, 0.005f, this, tr( "Slide Decay" ) ),
|
||||
slideToggle( FALSE, this, tr( "Slide" ) ),
|
||||
accentToggle( FALSE, this, tr( "Accent" ) ),
|
||||
deadToggle( FALSE, this, tr( "Dead" ) ),
|
||||
db24Toggle( FALSE, this, tr( "24dB/oct Filter" ) )
|
||||
slideToggle( false, this, tr( "Slide" ) ),
|
||||
accentToggle( false, this, tr( "Accent" ) ),
|
||||
deadToggle( false, this, tr( "Dead" ) ),
|
||||
db24Toggle( false, this, tr( "24dB/oct Filter" ) )
|
||||
|
||||
{
|
||||
|
||||
@@ -353,7 +353,7 @@ lb302Synth::lb302Synth( instrumentTrack * _instrumentTrack ) :
|
||||
current_freq = -1;
|
||||
delete_freq = -1;
|
||||
|
||||
instrumentPlayHandle * iph = new instrumentPlayHandle( this );
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
|
||||
engine::getMixer()->addPlayHandle( iph );
|
||||
|
||||
filterChanged();
|
||||
@@ -403,7 +403,7 @@ void lb302Synth::loadSettings( const QDomElement & _this )
|
||||
|
||||
// TODO: Split into one function per knob. envdecay doesn't require
|
||||
// recalcFilter.
|
||||
void lb302Synth::filterChanged( void )
|
||||
void lb302Synth::filterChanged()
|
||||
{
|
||||
fs.cutoff = vcf_cut_knob.value();
|
||||
fs.reso = vcf_res_knob.value();
|
||||
@@ -420,7 +420,7 @@ void lb302Synth::filterChanged( void )
|
||||
}
|
||||
|
||||
|
||||
void lb302Synth::db24Toggled( void )
|
||||
void lb302Synth::db24Toggled()
|
||||
{
|
||||
delete vcf;
|
||||
if(db24Toggle.value()) {
|
||||
@@ -434,7 +434,7 @@ void lb302Synth::db24Toggled( void )
|
||||
|
||||
|
||||
|
||||
QString lb302Synth::nodeName( void ) const
|
||||
QString lb302Synth::nodeName() const
|
||||
{
|
||||
return( lb302_plugin_descriptor.name );
|
||||
}
|
||||
@@ -583,15 +583,15 @@ int lb302Synth::process(sampleFrame *outbuf, const Uint32 size)
|
||||
|
||||
case SINE:
|
||||
// [-0.5, 0.5] : [-pi, pi]
|
||||
vco_k = 0.5f * oscillator::sinSample( vco_c );
|
||||
vco_k = 0.5f * Oscillator::sinSample( vco_c );
|
||||
break;
|
||||
|
||||
case EXPONENTIAL:
|
||||
vco_k = 0.5 * oscillator::expSample( vco_c );
|
||||
vco_k = 0.5 * Oscillator::expSample( vco_c );
|
||||
break;
|
||||
|
||||
case WHITE_NOISE:
|
||||
vco_k = 0.5 * oscillator::noiseSample( vco_c );
|
||||
vco_k = 0.5 * Oscillator::noiseSample( vco_c );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -775,7 +775,7 @@ void lb302Synth::play( sampleFrame * _working_buffer )
|
||||
const fpp_t frames = engine::getMixer()->framesPerPeriod();
|
||||
|
||||
process( _working_buffer, frames);
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames,
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames,
|
||||
NULL );
|
||||
}
|
||||
|
||||
@@ -791,14 +791,14 @@ void lb302Synth::deleteNotePluginData( notePlayHandle * _n )
|
||||
}
|
||||
|
||||
|
||||
pluginView * lb302Synth::instantiateView( QWidget * _parent )
|
||||
PluginView * lb302Synth::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new lb302SynthView( this, _parent ) );
|
||||
}
|
||||
|
||||
|
||||
lb302SynthView::lb302SynthView( instrument * _instrument, QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
lb302SynthView::lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
// GUI
|
||||
m_vcfCutKnob = new knob( knobBright_26, this );
|
||||
@@ -940,7 +940,7 @@ lb302SynthView::lb302SynthView( instrument * _instrument, QWidget * _parent ) :
|
||||
m_waveBtnGrp->addButton( exponentialWaveBtn );
|
||||
m_waveBtnGrp->addButton( whiteNoiseWaveBtn );
|
||||
|
||||
setAutoFillBackground( TRUE );
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap(
|
||||
"artwork" ) );
|
||||
@@ -953,7 +953,7 @@ lb302SynthView::~lb302SynthView()
|
||||
}
|
||||
|
||||
|
||||
void lb302SynthView::modelChanged( void )
|
||||
void lb302SynthView::modelChanged()
|
||||
{
|
||||
lb302Synth * syn = castModel<lb302Synth>();
|
||||
|
||||
@@ -978,11 +978,11 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
|
||||
return( new lb302Synth(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#define _LB302_H_
|
||||
|
||||
#include "effect_lib.h"
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "knob.h"
|
||||
#include "mixer.h"
|
||||
@@ -131,11 +131,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class lb302Synth : public instrument
|
||||
class lb302Synth : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
lb302Synth( instrumentTrack * _channel_track );
|
||||
lb302Synth( InstrumentTrack * _instrument_track );
|
||||
virtual ~lb302Synth();
|
||||
|
||||
virtual void play( sampleFrame * _working_buffer );
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
return 0; //4048;
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
private:
|
||||
|
||||
@@ -162,21 +162,21 @@ private:
|
||||
|
||||
|
||||
private:
|
||||
knobModel vcf_cut_knob;
|
||||
knobModel vcf_res_knob;
|
||||
knobModel vcf_mod_knob;
|
||||
knobModel vcf_dec_knob;
|
||||
FloatModel vcf_cut_knob;
|
||||
FloatModel vcf_res_knob;
|
||||
FloatModel vcf_mod_knob;
|
||||
FloatModel vcf_dec_knob;
|
||||
|
||||
knobModel vco_fine_detune_knob;
|
||||
FloatModel vco_fine_detune_knob;
|
||||
|
||||
knobModel dist_knob;
|
||||
intModel wave_shape;
|
||||
knobModel slide_dec_knob;
|
||||
FloatModel dist_knob;
|
||||
IntModel wave_shape;
|
||||
FloatModel slide_dec_knob;
|
||||
|
||||
boolModel slideToggle;
|
||||
boolModel accentToggle;
|
||||
boolModel deadToggle;
|
||||
boolModel db24Toggle;
|
||||
BoolModel slideToggle;
|
||||
BoolModel accentToggle;
|
||||
BoolModel deadToggle;
|
||||
BoolModel db24Toggle;
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -238,10 +238,10 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
class lb302SynthView : public instrumentView
|
||||
class lb302SynthView : public InstrumentView
|
||||
{
|
||||
public:
|
||||
lb302SynthView( instrument * _instrument,
|
||||
lb302SynthView( Instrument * _instrument,
|
||||
QWidget * _parent );
|
||||
virtual ~lb302SynthView();
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "lb303.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_play_handle.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "templates.h"
|
||||
@@ -76,7 +76,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT lb303_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT lb303_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"LB303",
|
||||
@@ -84,8 +84,8 @@ plugin::descriptor PLUGIN_EXPORT lb303_plugin_descriptor =
|
||||
"Incomplete monophonic immitation tb303" ),
|
||||
"Paul Giblock <pgib/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -267,8 +267,8 @@ float lb303Filter3Pole::process(const float& samp)
|
||||
// LBSynth
|
||||
//
|
||||
|
||||
lb303Synth::lb303Synth( instrumentTrack * _instrumentTrack ) :
|
||||
instrument( _instrumentTrack, &lb303_plugin_descriptor ),
|
||||
lb303Synth::lb303Synth( InstrumentTrack * _InstrumentTrack ) :
|
||||
instrument( _InstrumentTrack, &lb303_plugin_descriptor ),
|
||||
vcf_cut_knob( 0.75f, 0.0f, 1.5f, 0.005f, this, tr( "VCF Cutoff Frequency" ) ),
|
||||
vcf_res_knob( 0.75f, 0.0f, 1.25f, 0.005f, this, tr( "VCF Resonance" ) ),
|
||||
vcf_mod_knob( 0.1f, 0.0f, 1.0f, 0.005f, this, tr( "VCF Envelope Mod" ) ),
|
||||
@@ -713,7 +713,7 @@ void lb303Synth::play( sampleFrame * _working_buffer )
|
||||
const fpp_t frames = engine::getMixer()->framesPerPeriod();
|
||||
|
||||
process( _working_buffer, frames);
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames,
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames,
|
||||
NULL );
|
||||
}
|
||||
|
||||
@@ -729,14 +729,14 @@ void lb303Synth::deleteNotePluginData( notePlayHandle * _n )
|
||||
}
|
||||
|
||||
|
||||
pluginView * lb303Synth::instantiateView( QWidget * _parent )
|
||||
PluginView * lb303Synth::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new lb303SynthView( this, _parent ) );
|
||||
}
|
||||
|
||||
|
||||
lb303SynthView::lb303SynthView( instrument * _instrument, QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
lb303SynthView::lb303SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
// GUI
|
||||
m_vcfCutKnob = new knob( knobBright_26, this );
|
||||
@@ -830,11 +830,11 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
|
||||
return( new lb303Synth(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#define _LB303_H_
|
||||
|
||||
#include "effect_lib.h"
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "knob.h"
|
||||
#include "mixer.h"
|
||||
@@ -132,11 +132,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class lb303Synth : public instrument
|
||||
class lb303Synth : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
lb303Synth( instrumentTrack * _channel_track );
|
||||
lb303Synth( InstrumentTrack * _instrument_track );
|
||||
virtual ~lb303Synth();
|
||||
|
||||
virtual void play( sampleFrame * _working_buffer );
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
return 0; //4048;
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
private:
|
||||
|
||||
@@ -163,21 +163,21 @@ private:
|
||||
|
||||
|
||||
private:
|
||||
knobModel vcf_cut_knob;
|
||||
knobModel vcf_res_knob;
|
||||
knobModel vcf_mod_knob;
|
||||
knobModel vcf_dec_knob;
|
||||
FloatModel vcf_cut_knob;
|
||||
FloatModel vcf_res_knob;
|
||||
FloatModel vcf_mod_knob;
|
||||
FloatModel vcf_dec_knob;
|
||||
|
||||
knobModel vco_fine_detune_knob;
|
||||
FloatModel vco_fine_detune_knob;
|
||||
|
||||
knobModel dist_knob;
|
||||
knobModel wave_knob;
|
||||
knobModel slide_dec_knob;
|
||||
FloatModel dist_knob;
|
||||
FloatModel wave_knob;
|
||||
FloatModel slide_dec_knob;
|
||||
|
||||
boolModel slideToggle;
|
||||
boolModel accentToggle;
|
||||
boolModel deadToggle;
|
||||
boolModel db24Toggle;
|
||||
BoolModel slideToggle;
|
||||
BoolModel accentToggle;
|
||||
BoolModel deadToggle;
|
||||
BoolModel db24Toggle;
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -239,10 +239,10 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
class lb303SynthView : public instrumentView
|
||||
class lb303SynthView : public InstrumentView
|
||||
{
|
||||
public:
|
||||
lb303SynthView( instrument * _instrument,
|
||||
lb303SynthView( Instrument * _instrument,
|
||||
QWidget * _parent );
|
||||
virtual ~lb303SynthView();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(midiimport midi_import.cpp midi_import.h
|
||||
BUILD_PLUGIN(midiimport MidiImport.cpp MidiImport.h
|
||||
portsmf/allegro.cpp portsmf/allegro.h portsmf/allegrosmfwr.cpp
|
||||
portsmf/allegrord.cpp portsmf/allegrowr.cpp portsmf/allegrosmfrd.cpp
|
||||
portsmf/mfmidi.cpp portsmf/mfmidi.h portsmf/strparse.cpp
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* midi_import.cpp - support for importing MIDI-files
|
||||
* MidiImport.cpp - support for importing MIDI files
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -29,15 +29,15 @@
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QProgressDialog>
|
||||
|
||||
#include "midi_import.h"
|
||||
#include "MidiImport.h"
|
||||
#include "track_container.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "automation_track.h"
|
||||
#include "automation_pattern.h"
|
||||
#include "config_mgr.h"
|
||||
#include "pattern.h"
|
||||
#include "instrument.h"
|
||||
#include "main_window.h"
|
||||
#include "Instrument.h"
|
||||
#include "MainWindow.h"
|
||||
#include "debug.h"
|
||||
#include "embed.h"
|
||||
#include "song.h"
|
||||
@@ -53,7 +53,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT midiimport_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT midiimport_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"MIDI Import",
|
||||
@@ -61,7 +61,7 @@ plugin::descriptor PLUGIN_EXPORT midiimport_plugin_descriptor =
|
||||
"Filter for importing MIDI-files into LMMS" ),
|
||||
"Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>",
|
||||
0x0100,
|
||||
plugin::ImportFilter,
|
||||
Plugin::ImportFilter,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
@@ -70,8 +70,8 @@ plugin::descriptor PLUGIN_EXPORT midiimport_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
midiImport::midiImport( const QString & _file ) :
|
||||
importFilter( _file, &midiimport_plugin_descriptor ),
|
||||
MidiImport::MidiImport( const QString & _file ) :
|
||||
ImportFilter( _file, &midiimport_plugin_descriptor ),
|
||||
m_events(),
|
||||
m_timingDivision( 0 )
|
||||
{
|
||||
@@ -80,25 +80,25 @@ midiImport::midiImport( const QString & _file ) :
|
||||
|
||||
|
||||
|
||||
midiImport::~midiImport()
|
||||
MidiImport::~MidiImport()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool midiImport::tryImport( trackContainer * _tc )
|
||||
bool MidiImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
if( openFile() == FALSE )
|
||||
if( openFile() == false )
|
||||
{
|
||||
return( FALSE );
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
if( engine::hasGUI() &&
|
||||
configManager::inst()->defaultSoundfont().isEmpty() )
|
||||
{
|
||||
QMessageBox::information( engine::getMainWindow(),
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
tr( "Setup incomplete" ),
|
||||
tr( "You do not have set up a default soundfont in "
|
||||
"the settings dialog (Edit->Settings). "
|
||||
@@ -110,7 +110,7 @@ bool midiImport::tryImport( trackContainer * _tc )
|
||||
#else
|
||||
if( engine::hasGUI() )
|
||||
{
|
||||
QMessageBox::information( engine::getMainWindow(),
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
tr( "Setup incomplete" ),
|
||||
tr( "You did not compile LMMS with support for "
|
||||
"SoundFont2 player, which is used to add default "
|
||||
@@ -123,17 +123,17 @@ bool midiImport::tryImport( trackContainer * _tc )
|
||||
switch( readID() )
|
||||
{
|
||||
case makeID( 'M', 'T', 'h', 'd' ):
|
||||
printf( "midiImport::tryImport(): found MThd\n");
|
||||
return( readSMF( _tc ) );
|
||||
printf( "MidiImport::tryImport(): found MThd\n");
|
||||
return readSMF( _tc );
|
||||
|
||||
case makeID( 'R', 'I', 'F', 'F' ):
|
||||
printf( "midiImport::tryImport(): found RIFF\n");
|
||||
return( readRIFF( _tc ) );
|
||||
printf( "MidiImport::tryImport(): found RIFF\n");
|
||||
return readRIFF( _tc );
|
||||
|
||||
default:
|
||||
printf( "midiImport::tryImport(): not a Standard MIDI "
|
||||
printf( "MidiImport::tryImport(): not a Standard MIDI "
|
||||
"file\n" );
|
||||
return( FALSE );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
smfMidiCC & putValue( midiTime time, automatableModel * objModel, float value )
|
||||
smfMidiCC & putValue( midiTime time, AutomatableModel * objModel, float value )
|
||||
{
|
||||
if( !ap || time > lastPos + DefaultTicksPerTact )
|
||||
{
|
||||
@@ -208,9 +208,9 @@ public:
|
||||
lastEnd( 0 )
|
||||
{ }
|
||||
|
||||
instrumentTrack * it;
|
||||
InstrumentTrack * it;
|
||||
pattern * p;
|
||||
instrument * it_inst;
|
||||
Instrument * it_inst;
|
||||
bool isSF2;
|
||||
bool hasNotes;
|
||||
midiTime lastEnd;
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
smfMidiChannel * create( trackContainer * _tc )
|
||||
{
|
||||
if( !it ) {
|
||||
it = dynamic_cast<instrumentTrack *>(
|
||||
it = dynamic_cast<InstrumentTrack *>(
|
||||
track::create( track::InstrumentTrack, _tc ) );
|
||||
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
@@ -228,8 +228,8 @@ public:
|
||||
{
|
||||
isSF2 = true;
|
||||
it_inst->loadFile( configManager::inst()->defaultSoundfont() );
|
||||
it_inst->getChildModel( "bank" )->setValue( 0 );
|
||||
it_inst->getChildModel( "patch" )->setValue( 0 );
|
||||
it_inst->childModel( "bank" )->setValue( 0 );
|
||||
it_inst->childModel( "patch" )->setValue( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -262,14 +262,14 @@ public:
|
||||
};
|
||||
|
||||
|
||||
bool midiImport::readSMF( trackContainer * _tc )
|
||||
bool MidiImport::readSMF( trackContainer * _tc )
|
||||
{
|
||||
QString filename = file().fileName();
|
||||
closeFile();
|
||||
|
||||
const int preTrackSteps = 2;
|
||||
QProgressDialog pd( trackContainer::tr( "Importing MIDI-file..." ),
|
||||
trackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::getMainWindow() );
|
||||
trackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() );
|
||||
pd.setWindowTitle( trackContainer::tr( "Please wait..." ) );
|
||||
pd.setWindowModality(Qt::WindowModal);
|
||||
pd.setMinimumDuration( 0 );
|
||||
@@ -286,7 +286,7 @@ bool midiImport::readSMF( trackContainer * _tc )
|
||||
smfMidiCC ccs[129];
|
||||
smfMidiChannel chs[256];
|
||||
|
||||
meterModel & timeSigMM = engine::getSong()->getTimeSigModel();
|
||||
MeterModel & timeSigMM = engine::getSong()->getTimeSigModel();
|
||||
automationPattern * timeSigNumeratorPat =
|
||||
automationPattern::globalAutomationPattern( &timeSigMM.numeratorModel() );
|
||||
automationPattern * timeSigDenominatorPat =
|
||||
@@ -399,8 +399,8 @@ bool midiImport::readSMF( trackContainer * _tc )
|
||||
long prog = evt->get_integer_value();
|
||||
if( ch->isSF2 )
|
||||
{
|
||||
ch->it_inst->getChildModel( "bank" )->setValue( 0 );
|
||||
ch->it_inst->getChildModel( "patch" )->setValue( prog );
|
||||
ch->it_inst->childModel( "bank" )->setValue( 0 );
|
||||
ch->it_inst->childModel( "patch" )->setValue( prog );
|
||||
}
|
||||
else {
|
||||
const QString num = QString::number( prog );
|
||||
@@ -432,14 +432,14 @@ bool midiImport::readSMF( trackContainer * _tc )
|
||||
if( ccid <= 128 )
|
||||
{
|
||||
double cc = evt->get_real_value();
|
||||
automatableModel * objModel = NULL;
|
||||
AutomatableModel * objModel = NULL;
|
||||
|
||||
switch( ccid )
|
||||
{
|
||||
case 0:
|
||||
if( ch->isSF2 && ch->it_inst )
|
||||
{
|
||||
objModel = ch->it_inst->getChildModel( "bank" );
|
||||
objModel = ch->it_inst->childModel( "bank" );
|
||||
printf("BANK SELECT %f %d\n", cc, (int)(cc*127.0));
|
||||
cc *= 127.0f;
|
||||
}
|
||||
@@ -503,54 +503,55 @@ bool midiImport::readSMF( trackContainer * _tc )
|
||||
|
||||
|
||||
|
||||
bool midiImport::readRIFF( trackContainer * _tc )
|
||||
bool MidiImport::readRIFF( trackContainer * _tc )
|
||||
{
|
||||
// skip file length
|
||||
// skip file length
|
||||
skip( 4 );
|
||||
|
||||
// check file type ("RMID" = RIFF MIDI)
|
||||
if( readID() != makeID( 'R', 'M', 'I', 'D' ) )
|
||||
// check file type ("RMID" = RIFF MIDI)
|
||||
if( readID() != makeID( 'R', 'M', 'I', 'D' ) )
|
||||
{
|
||||
invalid_format:
|
||||
printf( "midiImport::readRIFF(): invalid file format\n" );
|
||||
return( FALSE );
|
||||
}
|
||||
// search for "data" chunk
|
||||
while( 1 )
|
||||
qWarning( "MidiImport::readRIFF(): invalid file format" );
|
||||
return false;
|
||||
}
|
||||
|
||||
// search for "data" chunk
|
||||
while( 1 )
|
||||
{
|
||||
int id = readID();
|
||||
int len = read32LE();
|
||||
if( file().atEnd() )
|
||||
const int id = readID();
|
||||
const int len = read32LE();
|
||||
if( file().atEnd() )
|
||||
{
|
||||
data_not_found:
|
||||
printf( "midiImport::readRIFF(): data chunk not "
|
||||
"found\n" );
|
||||
return( FALSE );
|
||||
}
|
||||
if( id == makeID( 'd', 'a', 't', 'a' ) )
|
||||
qWarning( "MidiImport::readRIFF(): data chunk not found" );
|
||||
return false;
|
||||
}
|
||||
if( id == makeID( 'd', 'a', 't', 'a' ) )
|
||||
{
|
||||
break;
|
||||
break;
|
||||
}
|
||||
if( len < 0 )
|
||||
if( len < 0 )
|
||||
{
|
||||
goto data_not_found;
|
||||
goto data_not_found;
|
||||
}
|
||||
skip( ( len + 1 ) & ~1 );
|
||||
}
|
||||
// the "data" chunk must contain data in SMF format
|
||||
if( readID() != makeID( 'M', 'T', 'h', 'd' ) )
|
||||
{
|
||||
goto invalid_format;
|
||||
skip( ( len + 1 ) & ~1 );
|
||||
}
|
||||
return( readSMF( _tc ) );
|
||||
|
||||
// the "data" chunk must contain data in SMF format
|
||||
if( readID() != makeID( 'M', 'T', 'h', 'd' ) )
|
||||
{
|
||||
goto invalid_format;
|
||||
}
|
||||
return readSMF( _tc );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void midiImport::error( void )
|
||||
void MidiImport::error()
|
||||
{
|
||||
printf( "midiImport::readTrack(): invalid MIDI data (offset %#x)\n",
|
||||
printf( "MidiImport::readTrack(): invalid MIDI data (offset %#x)\n",
|
||||
(unsigned int) file().pos() );
|
||||
}
|
||||
|
||||
@@ -560,9 +561,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new midiImport( static_cast<const char *>( _data ) ) );
|
||||
return new MidiImport( static_cast<const char *>( _data ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* midi_import.h - support for importing MIDI-files
|
||||
* MidiImport.h - support for importing MIDI-files
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MIDI_IMPORT_H
|
||||
#define _MIDI_IMPORT_H
|
||||
|
||||
@@ -31,16 +30,16 @@
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "midi.h"
|
||||
#include "import_filter.h"
|
||||
#include "ImportFilter.h"
|
||||
|
||||
|
||||
class midiImport : public importFilter
|
||||
class MidiImport : public ImportFilter
|
||||
{
|
||||
public:
|
||||
midiImport( const QString & _file );
|
||||
virtual ~midiImport();
|
||||
MidiImport( const QString & _file );
|
||||
virtual ~MidiImport();
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * )
|
||||
virtual PluginView * instantiateView( QWidget * )
|
||||
{
|
||||
return( NULL );
|
||||
}
|
||||
@@ -31,10 +31,10 @@
|
||||
|
||||
|
||||
#include "engine.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "oscillator.h"
|
||||
#include "Oscillator.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "templates.h"
|
||||
#include "tooltip.h"
|
||||
@@ -45,7 +45,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT organic_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT organic_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Organic",
|
||||
@@ -53,8 +53,8 @@ plugin::descriptor PLUGIN_EXPORT organic_plugin_descriptor =
|
||||
"Additive Synthesizer for organ-like sounds" ),
|
||||
"Andreas Brandmaier <andreas/at/brandmaier.de>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -73,18 +73,18 @@ QPixmap * organicInstrumentView::s_artwork = NULL;
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
organicInstrument::organicInstrument( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &organic_plugin_descriptor ),
|
||||
m_modulationAlgo( oscillator::SignalMix ),
|
||||
organicInstrument::organicInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &organic_plugin_descriptor ),
|
||||
m_modulationAlgo( Oscillator::SignalMix ),
|
||||
m_fx1Model( 0.0f, 0.0f, 0.99f, 0.01f , this, tr( "Distortion" ) ),
|
||||
m_volModel( 100.0f, 0.0f, 200.0f, 1.0f, this, tr( "Volume" ) )
|
||||
{
|
||||
m_numOscillators = 8;
|
||||
|
||||
m_osc = new oscillatorObject*[ m_numOscillators ];
|
||||
m_osc = new OscillatorObject*[ m_numOscillators ];
|
||||
for (int i=0; i < m_numOscillators; i++)
|
||||
{
|
||||
m_osc[i] = new oscillatorObject( this, i );
|
||||
m_osc[i] = new OscillatorObject( this, i );
|
||||
m_osc[i]->m_numOscillators = m_numOscillators;
|
||||
|
||||
// Connect events
|
||||
@@ -174,7 +174,7 @@ void organicInstrument::loadSettings( const QDomElement & _this )
|
||||
}
|
||||
|
||||
|
||||
QString organicInstrument::nodeName( void ) const
|
||||
QString organicInstrument::nodeName() const
|
||||
{
|
||||
return( organic_plugin_descriptor.name );
|
||||
}
|
||||
@@ -187,8 +187,8 @@ void organicInstrument::playNote( notePlayHandle * _n,
|
||||
{
|
||||
if( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL )
|
||||
{
|
||||
oscillator * oscs_l[m_numOscillators];
|
||||
oscillator * oscs_r[m_numOscillators];
|
||||
Oscillator * oscs_l[m_numOscillators];
|
||||
Oscillator * oscs_r[m_numOscillators];
|
||||
|
||||
for( Sint8 i = m_numOscillators - 1; i >= 0; --i )
|
||||
{
|
||||
@@ -205,7 +205,7 @@ void organicInstrument::playNote( notePlayHandle * _n,
|
||||
if( i == m_numOscillators - 1 )
|
||||
{
|
||||
// create left oscillator
|
||||
oscs_l[i] = new oscillator(
|
||||
oscs_l[i] = new Oscillator(
|
||||
&m_osc[i]->m_waveShape,
|
||||
&m_modulationAlgo,
|
||||
_n->frequency(),
|
||||
@@ -213,7 +213,7 @@ void organicInstrument::playNote( notePlayHandle * _n,
|
||||
m_osc[i]->m_phaseOffsetLeft,
|
||||
m_osc[i]->m_volumeLeft );
|
||||
// create right oscillator
|
||||
oscs_r[i] = new oscillator(
|
||||
oscs_r[i] = new Oscillator(
|
||||
&m_osc[i]->m_waveShape,
|
||||
&m_modulationAlgo,
|
||||
_n->frequency(),
|
||||
@@ -224,7 +224,7 @@ void organicInstrument::playNote( notePlayHandle * _n,
|
||||
else
|
||||
{
|
||||
// create left oscillator
|
||||
oscs_l[i] = new oscillator(
|
||||
oscs_l[i] = new Oscillator(
|
||||
&m_osc[i]->m_waveShape,
|
||||
&m_modulationAlgo,
|
||||
_n->frequency(),
|
||||
@@ -233,7 +233,7 @@ void organicInstrument::playNote( notePlayHandle * _n,
|
||||
m_osc[i]->m_volumeLeft,
|
||||
oscs_l[i + 1] );
|
||||
// create right oscillator
|
||||
oscs_r[i] = new oscillator(
|
||||
oscs_r[i] = new Oscillator(
|
||||
&m_osc[i]->m_waveShape,
|
||||
&m_modulationAlgo,
|
||||
_n->frequency(),
|
||||
@@ -251,9 +251,8 @@ void organicInstrument::playNote( notePlayHandle * _n,
|
||||
static_cast<oscPtr *>( _n->m_pluginData )->oscRight = oscs_r[0];
|
||||
}
|
||||
|
||||
oscillator * osc_l = static_cast<oscPtr *>( _n->m_pluginData )->oscLeft;
|
||||
oscillator * osc_r = static_cast<oscPtr *>( _n->m_pluginData
|
||||
)->oscRight;
|
||||
Oscillator * osc_l = static_cast<oscPtr *>( _n->m_pluginData )->oscLeft;
|
||||
Oscillator * osc_r = static_cast<oscPtr *>( _n->m_pluginData)->oscRight;
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
|
||||
@@ -276,7 +275,7 @@ void organicInstrument::playNote( notePlayHandle * _n,
|
||||
|
||||
// -- --
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
}
|
||||
|
||||
|
||||
@@ -284,9 +283,9 @@ void organicInstrument::playNote( notePlayHandle * _n,
|
||||
|
||||
void organicInstrument::deleteNotePluginData( notePlayHandle * _n )
|
||||
{
|
||||
delete static_cast<oscillator *>( static_cast<oscPtr *>(
|
||||
delete static_cast<Oscillator *>( static_cast<oscPtr *>(
|
||||
_n->m_pluginData )->oscLeft );
|
||||
delete static_cast<oscillator *>( static_cast<oscPtr *>(
|
||||
delete static_cast<Oscillator *>( static_cast<oscPtr *>(
|
||||
_n->m_pluginData )->oscRight );
|
||||
delete static_cast<oscPtr *>( _n->m_pluginData );
|
||||
}
|
||||
@@ -314,7 +313,7 @@ float inline organicInstrument::waveshape(float in, float amount)
|
||||
|
||||
|
||||
|
||||
void organicInstrument::randomiseSettings( void )
|
||||
void organicInstrument::randomiseSettings()
|
||||
{
|
||||
|
||||
for( int i = 0; i < m_numOscillators; i++ )
|
||||
@@ -333,7 +332,7 @@ void organicInstrument::randomiseSettings( void )
|
||||
|
||||
|
||||
|
||||
void organicInstrument::updateAllDetuning( void )
|
||||
void organicInstrument::updateAllDetuning()
|
||||
{
|
||||
for( int i = 0; i < m_numOscillators; ++i )
|
||||
{
|
||||
@@ -353,7 +352,7 @@ int organicInstrument::intRand( int min, int max )
|
||||
}
|
||||
|
||||
|
||||
pluginView * organicInstrument::instantiateView( QWidget * _parent )
|
||||
PluginView * organicInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new organicInstrumentView( this, _parent ) );
|
||||
}
|
||||
@@ -374,9 +373,9 @@ public:
|
||||
|
||||
|
||||
|
||||
organicInstrumentView::organicInstrumentView( instrument * _instrument,
|
||||
organicInstrumentView::organicInstrumentView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
organicInstrument * oi = castModel<organicInstrument>();
|
||||
|
||||
@@ -428,7 +427,7 @@ organicInstrumentView::~organicInstrumentView()
|
||||
}
|
||||
|
||||
|
||||
void organicInstrumentView::modelChanged( void )
|
||||
void organicInstrumentView::modelChanged()
|
||||
{
|
||||
organicInstrument * oi = castModel<organicInstrument>();
|
||||
const float y=91.3;
|
||||
@@ -443,7 +442,7 @@ void organicInstrumentView::modelChanged( void )
|
||||
|
||||
// TODO: Delete existing oscKnobs if they exist
|
||||
|
||||
m_oscKnobs = new oscillatorKnobs[ m_numOscillators ];
|
||||
m_oscKnobs = new OscillatorKnobs[ m_numOscillators ];
|
||||
|
||||
// Create knobs, now that we know how many to make
|
||||
for( int i = 0; i < m_numOscillators; ++i )
|
||||
@@ -476,7 +475,7 @@ void organicInstrumentView::modelChanged( void )
|
||||
+ " ", " " +
|
||||
tr( "cents" ) );
|
||||
|
||||
m_oscKnobs[i] = oscillatorKnobs( volKnob, oscKnob, panKnob, detuneKnob );
|
||||
m_oscKnobs[i] = OscillatorKnobs( volKnob, oscKnob, panKnob, detuneKnob );
|
||||
|
||||
// Attach to models
|
||||
m_oscKnobs[i].m_volKnob->setModel(
|
||||
@@ -493,9 +492,9 @@ void organicInstrumentView::modelChanged( void )
|
||||
|
||||
|
||||
|
||||
oscillatorObject::oscillatorObject( model * _parent, int _index ) :
|
||||
model( _parent ),
|
||||
m_waveShape( oscillator::SineWave, 0, oscillator::NumWaveShapes-1, this ),
|
||||
OscillatorObject::OscillatorObject( Model * _parent, int _index ) :
|
||||
Model( _parent ),
|
||||
m_waveShape( Oscillator::SineWave, 0, Oscillator::NumWaveShapes-1, this ),
|
||||
m_oscModel( 0.0f, 0.0f, 5.0f, 1.0f,
|
||||
this, tr( "Osc %1 waveform" ).arg( _index + 1 ) ),
|
||||
m_volModel( 100.0f, 0.0f, 100.0f, 1.0f,
|
||||
@@ -510,24 +509,24 @@ oscillatorObject::oscillatorObject( model * _parent, int _index ) :
|
||||
|
||||
|
||||
|
||||
oscillatorObject::~oscillatorObject()
|
||||
OscillatorObject::~OscillatorObject()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::oscButtonChanged( void )
|
||||
void OscillatorObject::oscButtonChanged()
|
||||
{
|
||||
|
||||
static oscillator::WaveShapes shapes[] =
|
||||
static Oscillator::WaveShapes shapes[] =
|
||||
{
|
||||
oscillator::SineWave,
|
||||
oscillator::SawWave,
|
||||
oscillator::SquareWave,
|
||||
oscillator::TriangleWave,
|
||||
oscillator::MoogSawWave,
|
||||
oscillator::ExponentialWave
|
||||
Oscillator::SineWave,
|
||||
Oscillator::SawWave,
|
||||
Oscillator::SquareWave,
|
||||
Oscillator::TriangleWave,
|
||||
Oscillator::MoogSawWave,
|
||||
Oscillator::ExponentialWave
|
||||
} ;
|
||||
|
||||
m_waveShape.setValue( shapes[(int)roundf( m_oscModel.value() )] );
|
||||
@@ -537,7 +536,7 @@ void oscillatorObject::oscButtonChanged( void )
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::updateVolume( void )
|
||||
void OscillatorObject::updateVolume()
|
||||
{
|
||||
m_volumeLeft = ( 1.0f - m_panModel.value() / (float)PanningRight )
|
||||
* m_volModel.value() / m_numOscillators / 100.0f;
|
||||
@@ -548,7 +547,7 @@ void oscillatorObject::updateVolume( void )
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::updateDetuning( void )
|
||||
void OscillatorObject::updateDetuning()
|
||||
{
|
||||
m_detuningLeft = powf( 2.0f, m_harmonic
|
||||
+ (float)m_detuneModel.value() / 100.0f ) /
|
||||
@@ -565,9 +564,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new organicInstrument( static_cast<instrumentTrack *>( _data ) ) );
|
||||
return( new organicInstrument( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,11 +26,10 @@
|
||||
#ifndef _ORGANIC_H
|
||||
#define _ORGANIC_H
|
||||
|
||||
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "oscillator.h"
|
||||
#include "automatable_model.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "Oscillator.h"
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
class QPixmap;
|
||||
|
||||
@@ -39,16 +38,16 @@ class notePlayHandle;
|
||||
class pixmapButton;
|
||||
|
||||
|
||||
class oscillatorObject : public model
|
||||
class OscillatorObject : public Model
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
int m_numOscillators;
|
||||
intModel m_waveShape;
|
||||
floatModel m_oscModel;
|
||||
floatModel m_volModel;
|
||||
floatModel m_panModel;
|
||||
floatModel m_detuneModel;
|
||||
IntModel m_waveShape;
|
||||
FloatModel m_oscModel;
|
||||
FloatModel m_volModel;
|
||||
FloatModel m_panModel;
|
||||
FloatModel m_detuneModel;
|
||||
|
||||
float m_harmonic;
|
||||
float m_volumeLeft;
|
||||
@@ -60,8 +59,8 @@ private:
|
||||
float m_phaseOffsetLeft;
|
||||
float m_phaseOffsetRight;
|
||||
|
||||
oscillatorObject( model * _parent, int _index );
|
||||
virtual ~oscillatorObject();
|
||||
OscillatorObject( Model * _parent, int _index );
|
||||
virtual ~OscillatorObject();
|
||||
|
||||
friend class organicInstrument;
|
||||
friend class organicInstrumentView;
|
||||
@@ -75,11 +74,11 @@ private slots:
|
||||
} ;
|
||||
|
||||
|
||||
class organicInstrument : public instrument
|
||||
class organicInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
organicInstrument( instrumentTrack * _instrument_track );
|
||||
organicInstrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~organicInstrument();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -111,20 +110,20 @@ private:
|
||||
|
||||
int m_numOscillators;
|
||||
|
||||
oscillatorObject ** m_osc;
|
||||
OscillatorObject ** m_osc;
|
||||
|
||||
struct oscPtr
|
||||
{
|
||||
oscillator * oscLeft;
|
||||
oscillator * oscRight;
|
||||
Oscillator * oscLeft;
|
||||
Oscillator * oscRight;
|
||||
} ;
|
||||
|
||||
const intModel m_modulationAlgo;
|
||||
const IntModel m_modulationAlgo;
|
||||
|
||||
floatModel m_fx1Model;
|
||||
floatModel m_volModel;
|
||||
FloatModel m_fx1Model;
|
||||
FloatModel m_volModel;
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
private slots:
|
||||
void updateAllDetuning( void );
|
||||
@@ -133,19 +132,19 @@ private slots:
|
||||
} ;
|
||||
|
||||
|
||||
class organicInstrumentView : public instrumentView
|
||||
class organicInstrumentView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
organicInstrumentView( instrument * _instrument, QWidget * _parent );
|
||||
organicInstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~organicInstrumentView();
|
||||
|
||||
private:
|
||||
virtual void modelChanged( void );
|
||||
|
||||
struct oscillatorKnobs
|
||||
struct OscillatorKnobs
|
||||
{
|
||||
oscillatorKnobs( knob * v,
|
||||
OscillatorKnobs( knob * v,
|
||||
knob * o,
|
||||
knob * p,
|
||||
knob * dt ) :
|
||||
@@ -155,7 +154,7 @@ private:
|
||||
m_detuneKnob( dt )
|
||||
{
|
||||
}
|
||||
oscillatorKnobs()
|
||||
OscillatorKnobs()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -165,7 +164,7 @@ private:
|
||||
knob * m_detuneKnob;
|
||||
} ;
|
||||
|
||||
oscillatorKnobs * m_oscKnobs;
|
||||
OscillatorKnobs * m_oscKnobs;
|
||||
|
||||
knob * m_fx1Knob;
|
||||
knob * m_volKnob;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "Basic_Gb_Apu.h"
|
||||
|
||||
#include "papu_instrument.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "pixmap_button.h"
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
extern "C"
|
||||
{
|
||||
plugin::descriptor PLUGIN_EXPORT papu_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT papu_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"FreeBoy",
|
||||
@@ -49,16 +49,16 @@ plugin::descriptor PLUGIN_EXPORT papu_plugin_descriptor =
|
||||
"Attila Herman <attila589/at/gmail.com>"
|
||||
"Csaba Hruska <csaba.hruska/at/gmail.com>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
papuInstrument::papuInstrument( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &papu_plugin_descriptor ),
|
||||
papuInstrument::papuInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &papu_plugin_descriptor ),
|
||||
|
||||
m_ch1SweepTimeModel( 4.0f, 0.0f, 7.0f, 1.0f, this, tr( "Sweep time" ) ),
|
||||
m_ch1SweepDirModel( false, this, tr( "Sweep direction" ) ),
|
||||
@@ -404,7 +404,7 @@ void papuInstrument::playNote( notePlayHandle * _n,
|
||||
}
|
||||
framesleft -= count;
|
||||
}
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
}
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@ void papuInstrument::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
pluginView * papuInstrument::instantiateView( QWidget * _parent )
|
||||
PluginView * papuInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new papuInstrumentView( this, _parent ) );
|
||||
}
|
||||
@@ -442,9 +442,9 @@ public:
|
||||
|
||||
|
||||
|
||||
papuInstrumentView::papuInstrumentView( instrument * _instrument,
|
||||
papuInstrumentView::papuInstrumentView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
|
||||
setAutoFillBackground( true );
|
||||
@@ -733,10 +733,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new papuInstrument(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* papu_instrument.h - GameBoy papu based instrument
|
||||
* papu_Instrument.h - GameBoy papu based instrument
|
||||
*
|
||||
* Copyright (c) 2008 <Attila Herman <attila589/at/gmail.com>
|
||||
* Csaba Hruska <csaba.hruska/at/gmail.com>
|
||||
@@ -27,8 +27,8 @@
|
||||
#define _PAPU_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "knob.h"
|
||||
#include "graph.h"
|
||||
|
||||
@@ -36,12 +36,12 @@ class papuInstrumentView;
|
||||
class notePlayHandle;
|
||||
class pixmapButton;
|
||||
|
||||
class papuInstrument : public instrument
|
||||
class papuInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
papuInstrument( instrumentTrack * _instrument_track );
|
||||
papuInstrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~papuInstrument();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
virtual f_cnt_t desiredReleaseFrames( void ) const;
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
/*public slots:
|
||||
@@ -64,41 +64,41 @@ public:
|
||||
void updateKnobToolTip( void );*/
|
||||
|
||||
private:
|
||||
knobModel m_ch1SweepTimeModel;
|
||||
boolModel m_ch1SweepDirModel;
|
||||
knobModel m_ch1SweepRtShiftModel;
|
||||
knobModel m_ch1WavePatternDutyModel;
|
||||
knobModel m_ch1VolumeModel;
|
||||
boolModel m_ch1VolSweepDirModel;
|
||||
knobModel m_ch1SweepStepLengthModel;
|
||||
FloatModel m_ch1SweepTimeModel;
|
||||
BoolModel m_ch1SweepDirModel;
|
||||
FloatModel m_ch1SweepRtShiftModel;
|
||||
FloatModel m_ch1WavePatternDutyModel;
|
||||
FloatModel m_ch1VolumeModel;
|
||||
BoolModel m_ch1VolSweepDirModel;
|
||||
FloatModel m_ch1SweepStepLengthModel;
|
||||
|
||||
knobModel m_ch2WavePatternDutyModel;
|
||||
knobModel m_ch2VolumeModel;
|
||||
boolModel m_ch2VolSweepDirModel;
|
||||
knobModel m_ch2SweepStepLengthModel;
|
||||
FloatModel m_ch2WavePatternDutyModel;
|
||||
FloatModel m_ch2VolumeModel;
|
||||
BoolModel m_ch2VolSweepDirModel;
|
||||
FloatModel m_ch2SweepStepLengthModel;
|
||||
|
||||
boolModel m_ch3OnModel;
|
||||
knobModel m_ch3VolumeModel;
|
||||
BoolModel m_ch3OnModel;
|
||||
FloatModel m_ch3VolumeModel;
|
||||
|
||||
knobModel m_ch4VolumeModel;
|
||||
boolModel m_ch4VolSweepDirModel;
|
||||
knobModel m_ch4SweepStepLengthModel;
|
||||
knobModel m_ch4ShiftClockFreqModel;
|
||||
boolModel m_ch4ShiftRegWidthModel;
|
||||
knobModel m_ch4FreqDivRatioModel;
|
||||
FloatModel m_ch4VolumeModel;
|
||||
BoolModel m_ch4VolSweepDirModel;
|
||||
FloatModel m_ch4SweepStepLengthModel;
|
||||
FloatModel m_ch4ShiftClockFreqModel;
|
||||
BoolModel m_ch4ShiftRegWidthModel;
|
||||
FloatModel m_ch4FreqDivRatioModel;
|
||||
|
||||
knobModel m_so1VolumeModel;
|
||||
knobModel m_so2VolumeModel;
|
||||
boolModel m_ch1So1Model;
|
||||
boolModel m_ch2So1Model;
|
||||
boolModel m_ch3So1Model;
|
||||
boolModel m_ch4So1Model;
|
||||
boolModel m_ch1So2Model;
|
||||
boolModel m_ch2So2Model;
|
||||
boolModel m_ch3So2Model;
|
||||
boolModel m_ch4So2Model;
|
||||
knobModel m_trebleModel;
|
||||
knobModel m_bassModel;
|
||||
FloatModel m_so1VolumeModel;
|
||||
FloatModel m_so2VolumeModel;
|
||||
BoolModel m_ch1So1Model;
|
||||
BoolModel m_ch2So1Model;
|
||||
BoolModel m_ch3So1Model;
|
||||
BoolModel m_ch4So1Model;
|
||||
BoolModel m_ch1So2Model;
|
||||
BoolModel m_ch2So2Model;
|
||||
BoolModel m_ch3So2Model;
|
||||
BoolModel m_ch4So2Model;
|
||||
FloatModel m_trebleModel;
|
||||
FloatModel m_bassModel;
|
||||
|
||||
graphModel m_graphModel;
|
||||
|
||||
@@ -106,11 +106,11 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
class papuInstrumentView : public instrumentView
|
||||
class papuInstrumentView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
papuInstrumentView( instrument * _instrument, QWidget * _parent );
|
||||
papuInstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~papuInstrumentView();
|
||||
|
||||
private:
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "endian_handling.h"
|
||||
#include "engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "song.h"
|
||||
@@ -47,7 +47,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT patman_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT patman_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"PatMan",
|
||||
@@ -55,17 +55,17 @@ plugin::descriptor PLUGIN_EXPORT patman_plugin_descriptor =
|
||||
"GUS-compatible patch instrument" ),
|
||||
"Javier Serrano Polo <jasp00/at/users.sourceforge.net>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"pat",
|
||||
NULL
|
||||
} ;
|
||||
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new patmanInstrument( static_cast<instrumentTrack *>( _data ) ) );
|
||||
return new patmanInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -73,8 +73,8 @@ plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
|
||||
|
||||
|
||||
patmanInstrument::patmanInstrument( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &patman_plugin_descriptor ),
|
||||
patmanInstrument::patmanInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &patman_plugin_descriptor ),
|
||||
m_patchFile( QString::null ),
|
||||
m_loopedModel( true, this ),
|
||||
m_tunedModel( true, this )
|
||||
@@ -151,7 +151,7 @@ void patmanInstrument::playNote( notePlayHandle * _n,
|
||||
play_freq, m_loopedModel.value() ) )
|
||||
{
|
||||
applyRelease( _working_buffer, _n );
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer,
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer,
|
||||
frames, _n );
|
||||
}
|
||||
}
|
||||
@@ -180,12 +180,12 @@ void patmanInstrument::setFile( const QString & _patch_file, bool _rename )
|
||||
|
||||
// is current instrument-track-name equal to previous-filename??
|
||||
if( _rename &&
|
||||
( getInstrumentTrack()->name() ==
|
||||
( instrumentTrack()->name() ==
|
||||
QFileInfo( m_patchFile ).fileName() ||
|
||||
m_patchFile == "" ) )
|
||||
{
|
||||
// then set it to new one
|
||||
getInstrumentTrack()->setName( QFileInfo( _patch_file
|
||||
instrumentTrack()->setName( QFileInfo( _patch_file
|
||||
).fileName() );
|
||||
}
|
||||
// else we don't touch the instrument-track-name, because the user
|
||||
@@ -423,9 +423,9 @@ void patmanInstrument::selectSample( notePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
pluginView * patmanInstrument::instantiateView( QWidget * _parent )
|
||||
PluginView * patmanInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new patmanView( this, _parent ) );
|
||||
return( new PatmanView( this, _parent ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -437,8 +437,8 @@ pluginView * patmanInstrument::instantiateView( QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
patmanView::patmanView( instrument * _instrument, QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent ),
|
||||
PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) :
|
||||
InstrumentView( _instrument, _parent ),
|
||||
m_pi( NULL )
|
||||
{
|
||||
setAutoFillBackground( TRUE );
|
||||
@@ -500,14 +500,14 @@ patmanView::patmanView( instrument * _instrument, QWidget * _parent ) :
|
||||
|
||||
|
||||
|
||||
patmanView::~patmanView()
|
||||
PatmanView::~PatmanView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void patmanView::openFile( void )
|
||||
void PatmanView::openFile( void )
|
||||
{
|
||||
QFileDialog ofd( NULL, tr( "Open patch file" ) );
|
||||
ofd.setFileMode( QFileDialog::ExistingFiles );
|
||||
@@ -559,7 +559,7 @@ void patmanView::openFile( void )
|
||||
|
||||
|
||||
|
||||
void patmanView::updateFilename( void )
|
||||
void PatmanView::updateFilename( void )
|
||||
{
|
||||
m_displayFilename = "";
|
||||
Uint16 idx = m_pi->m_patchFile.length();
|
||||
@@ -586,7 +586,7 @@ void patmanView::updateFilename( void )
|
||||
|
||||
|
||||
|
||||
void patmanView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
void PatmanView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
|
||||
{
|
||||
@@ -610,7 +610,7 @@ void patmanView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
|
||||
|
||||
|
||||
void patmanView::dropEvent( QDropEvent * _de )
|
||||
void PatmanView::dropEvent( QDropEvent * _de )
|
||||
{
|
||||
QString type = stringPairDrag::decodeKey( _de );
|
||||
QString value = stringPairDrag::decodeValue( _de );
|
||||
@@ -627,7 +627,7 @@ void patmanView::dropEvent( QDropEvent * _de )
|
||||
|
||||
|
||||
|
||||
void patmanView::paintEvent( QPaintEvent * )
|
||||
void PatmanView::paintEvent( QPaintEvent * )
|
||||
{
|
||||
QPainter p( this );
|
||||
|
||||
@@ -640,7 +640,7 @@ void patmanView::paintEvent( QPaintEvent * )
|
||||
|
||||
|
||||
|
||||
void patmanView::modelChanged( void )
|
||||
void PatmanView::modelChanged( void )
|
||||
{
|
||||
m_pi = castModel<patmanInstrument>();
|
||||
m_loopButton->setModel( &m_pi->m_loopedModel );
|
||||
|
||||
@@ -26,11 +26,10 @@
|
||||
#ifndef _PATMAN_H_
|
||||
#define _PATMAN_H_
|
||||
|
||||
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "automatable_model.h"
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
|
||||
class pixmapButton;
|
||||
@@ -46,11 +45,11 @@ class pixmapButton;
|
||||
#define MODES_CLAMPED ( 1 << 7 )
|
||||
|
||||
|
||||
class patmanInstrument : public instrument
|
||||
class patmanInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
patmanInstrument( instrumentTrack * _track );
|
||||
patmanInstrument( InstrumentTrack * _track );
|
||||
virtual ~patmanInstrument();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -70,7 +69,7 @@ public:
|
||||
return( 128 );
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -87,8 +86,8 @@ private:
|
||||
|
||||
QString m_patchFile;
|
||||
QVector<sampleBuffer *> m_patchSamples;
|
||||
boolModel m_loopedModel;
|
||||
boolModel m_tunedModel;
|
||||
BoolModel m_loopedModel;
|
||||
BoolModel m_tunedModel;
|
||||
|
||||
|
||||
enum LoadErrors
|
||||
@@ -107,7 +106,7 @@ private:
|
||||
void selectSample( notePlayHandle * _n );
|
||||
|
||||
|
||||
friend class patmanView;
|
||||
friend class PatmanView;
|
||||
|
||||
signals:
|
||||
void fileChanged( void );
|
||||
@@ -116,12 +115,12 @@ signals:
|
||||
|
||||
|
||||
|
||||
class patmanView : public instrumentView
|
||||
class PatmanView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
patmanView( instrument * _instrument, QWidget * _parent );
|
||||
virtual ~patmanView();
|
||||
PatmanView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~PatmanView();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT peakcontrollereffect_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT peakcontrollereffect_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Peak Controller",
|
||||
@@ -42,25 +42,24 @@ plugin::descriptor PLUGIN_EXPORT peakcontrollereffect_plugin_descriptor =
|
||||
"Plugin for controlling knobs with sound peaks" ),
|
||||
"Paul Giblock <drfaygo/at/gmail.com>",
|
||||
0x0100,
|
||||
plugin::Effect,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
// We have to keep a list of all the peakController effects so that we can save
|
||||
// an peakEffect-ID to the project. This ID is referenced in the peakController
|
||||
// settings and is used to set the peakControllerEffect pointer upon load
|
||||
// We have to keep a list of all the PeakController effects so that we can save
|
||||
// an peakEffect-ID to the project. This ID is referenced in the PeakController
|
||||
// settings and is used to set the PeakControllerEffect pointer upon load
|
||||
|
||||
//QVector<peakControllerEffect *> peakControllerEffect::s_effects;
|
||||
//QVector<PeakControllerEffect *> PeakControllerEffect::s_effects;
|
||||
|
||||
peakControllerEffect::peakControllerEffect(
|
||||
model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key ) :
|
||||
effect( &peakcontrollereffect_plugin_descriptor, _parent, _key ),
|
||||
m_effectId( ++PeakController::s_lastEffectId ),
|
||||
PeakControllerEffect::PeakControllerEffect(
|
||||
Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &peakcontrollereffect_plugin_descriptor, _parent, _key ),
|
||||
m_peakControls( this ),
|
||||
m_autoController( NULL )
|
||||
{
|
||||
@@ -72,7 +71,7 @@ peakControllerEffect::peakControllerEffect(
|
||||
|
||||
|
||||
|
||||
peakControllerEffect::~peakControllerEffect()
|
||||
PeakControllerEffect::~PeakControllerEffect()
|
||||
{
|
||||
int idx = PeakController::s_effects.indexOf( this );
|
||||
if( idx >= 0 )
|
||||
@@ -83,10 +82,10 @@ peakControllerEffect::~peakControllerEffect()
|
||||
|
||||
|
||||
|
||||
bool peakControllerEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
bool PeakControllerEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames )
|
||||
{
|
||||
peakControllerEffectControls & c = m_peakControls;
|
||||
PeakControllerEffectControls & c = m_peakControls;
|
||||
|
||||
// This appears to be used for determining whether or not to continue processing
|
||||
// audio with this effect
|
||||
@@ -126,11 +125,11 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model * _parent, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new peakControllerEffect( _parent,
|
||||
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
|
||||
_data ) ) );
|
||||
return new PeakControllerEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* peak_controller_effect.h - PeakController effect plugin
|
||||
* peak_controller_Effect.h - PeakController effect plugin
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
@@ -26,29 +26,24 @@
|
||||
#ifndef _PEAK_CONTROLLER_EFFECT_H
|
||||
#define _PEAK_CONTROLLER_EFFECT_H
|
||||
|
||||
#include <QtGui/QWorkspace>
|
||||
|
||||
#include "effect.h"
|
||||
#include "effect_lib.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "Effect.h"
|
||||
#include "peak_controller_effect_controls.h"
|
||||
|
||||
class peakControllerEffect : public effect
|
||||
class PeakControllerEffect : public Effect
|
||||
{
|
||||
public:
|
||||
peakControllerEffect( model * parent,
|
||||
const descriptor::subPluginFeatures::key * _key );
|
||||
virtual ~peakControllerEffect();
|
||||
PeakControllerEffect( Model * parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~PeakControllerEffect();
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
virtual effectControls * getControls( void )
|
||||
virtual EffectControls * controls()
|
||||
{
|
||||
return &m_peakControls;
|
||||
}
|
||||
|
||||
float lastSample( void )
|
||||
float lastSample()
|
||||
{
|
||||
return m_lastSample;
|
||||
}
|
||||
@@ -56,15 +51,14 @@ public:
|
||||
int m_effectId;
|
||||
|
||||
private:
|
||||
peakControllerEffectControls m_peakControls;
|
||||
|
||||
friend class peakControllerEffectControls;
|
||||
PeakControllerEffectControls m_peakControls;
|
||||
|
||||
float m_lastSample;
|
||||
|
||||
Controller * m_autoController;
|
||||
|
||||
friend class PeakControllerEffectControls;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* stereomatrix_control_dialog.cpp - control dialog for stereoMatrix-effect
|
||||
* peak_controller_effect_control_dialog.cpp - control dialog for
|
||||
* PeakControllerEffect
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
@@ -30,14 +31,13 @@
|
||||
#include "peak_controller_effect_control_dialog.h"
|
||||
#include "peak_controller_effect_controls.h"
|
||||
#include "knob.h"
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "embed.h"
|
||||
|
||||
|
||||
peakControllerEffectControlDialog::peakControllerEffectControlDialog(
|
||||
peakControllerEffectControls * _controls ) :
|
||||
effectControlDialog( _controls )
|
||||
PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
|
||||
PeakControllerEffectControls * _controls ) :
|
||||
EffectControlDialog( _controls )
|
||||
{
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
@@ -61,7 +61,7 @@ peakControllerEffectControlDialog::peakControllerEffectControlDialog(
|
||||
m_amountKnob->setModel( &_controls->m_amountModel );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
|
||||
|
||||
m_decayKnob = new tempoSyncKnob( knobBright_26, this );
|
||||
m_decayKnob = new knob( knobBright_26, this );
|
||||
m_decayKnob->setLabel( tr( "DECAY" ) );
|
||||
m_decayKnob->setModel( &_controls->m_decayModel );
|
||||
m_decayKnob->setHintText( tr( "Release decay (not implemented):" ) + " ", "" );
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* stereomatrix_control_dialog.h - control dialog for stereoMatrix-effect
|
||||
* peak_controller_EffectControlDialog.h - control dialog for
|
||||
* peakControllerEffect
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
@@ -25,26 +26,26 @@
|
||||
#ifndef _PEAK_CONTROLLER_EFFECT_CONTROL_DIALOG_H
|
||||
#define _PEAK_CONTROLLER_EFFECT_CONTROL_DIALOG_H
|
||||
|
||||
#include "effect_control_dialog.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
class peakControllerEffectControls;
|
||||
class PeakControllerEffectControls;
|
||||
class knob;
|
||||
class tempoSyncKnob;
|
||||
class ledCheckBox;
|
||||
|
||||
|
||||
class peakControllerEffectControlDialog : public effectControlDialog
|
||||
class PeakControllerEffectControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
peakControllerEffectControlDialog( peakControllerEffectControls * _controls );
|
||||
virtual ~peakControllerEffectControlDialog()
|
||||
PeakControllerEffectControlDialog(
|
||||
PeakControllerEffectControls * _controls );
|
||||
virtual ~PeakControllerEffectControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
knob * m_baseKnob;
|
||||
knob * m_amountKnob;
|
||||
tempoSyncKnob * m_decayKnob;
|
||||
knob * m_decayKnob;
|
||||
ledCheckBox * m_muteLed;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* stereomatrix_controls.cpp - controls for stereoMatrix-effect
|
||||
* peak_controller_effect_controls.cpp - controls for PeakController effect
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
@@ -30,20 +30,20 @@
|
||||
#include "peak_controller_effect.h"
|
||||
|
||||
|
||||
peakControllerEffectControls::
|
||||
peakControllerEffectControls( peakControllerEffect * _eff ) :
|
||||
effectControls( _eff ),
|
||||
PeakControllerEffectControls::
|
||||
PeakControllerEffectControls( PeakControllerEffect * _eff ) :
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
m_baseModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Base value" ) ),
|
||||
m_amountModel( 1.0, -1.0, 1.0, 0.005, this, tr( "Modulation amount" ) ),
|
||||
m_decayModel( 0.1, 0.01, 5.0, 0.0001, 20000.0, this, tr( "Release decay" ) ),
|
||||
m_decayModel( 0.1, 0.01, 5.0, 0.0001, this, tr( "Release decay" ) ),
|
||||
m_muteModel( FALSE, this, tr( "Mute output" ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void peakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_baseModel.setValue( _this.attribute( "base" ).toFloat() );
|
||||
m_amountModel.setValue( _this.attribute( "amount" ).toFloat() );
|
||||
@@ -66,7 +66,7 @@ void peakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void peakControllerEffectControls::saveSettings( QDomDocument & _doc,
|
||||
void PeakControllerEffectControls::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
_this.setAttribute( "base", m_baseModel.value() );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* stereomatrix_controls.h - controls for stereoMatrix-effect
|
||||
* peak_controller_EffectControls.h - controls for peakController effect
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
*
|
||||
@@ -25,49 +25,48 @@
|
||||
#ifndef _PEAK_CONTROLLER_EFFECT_CONTROLS_H
|
||||
#define _PEAK_CONTROLLER_EFFECT_CONTROLS_H
|
||||
|
||||
#include "effect_controls.h"
|
||||
#include "EffectControls.h"
|
||||
#include "peak_controller_effect_control_dialog.h"
|
||||
#include "knob.h"
|
||||
|
||||
class peakControllerEffect;
|
||||
class PeakControllerEffect;
|
||||
|
||||
class peakControllerEffectControls : public effectControls
|
||||
class PeakControllerEffectControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
peakControllerEffectControls( peakControllerEffect( * _eff ) );
|
||||
virtual ~peakControllerEffectControls()
|
||||
PeakControllerEffectControls( PeakControllerEffect * _eff );
|
||||
virtual ~PeakControllerEffectControls()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return( "peakcontrollereffectcontrols" );
|
||||
}
|
||||
|
||||
virtual int getControlCount( void )
|
||||
virtual int controlCount()
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
virtual effectControlDialog * createView( void )
|
||||
virtual EffectControlDialog * createView()
|
||||
{
|
||||
return new peakControllerEffectControlDialog( this );
|
||||
return new PeakControllerEffectControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
peakControllerEffect * m_effect;
|
||||
PeakControllerEffect * m_effect;
|
||||
|
||||
floatModel m_baseModel;
|
||||
floatModel m_amountModel;
|
||||
tempoSyncKnobModel m_decayModel;
|
||||
boolModel m_muteModel;
|
||||
|
||||
friend class peakControllerEffectControlDialog;
|
||||
friend class peakControllerEffect;
|
||||
FloatModel m_baseModel;
|
||||
FloatModel m_amountModel;
|
||||
FloatModel m_decayModel;
|
||||
BoolModel m_muteModel;
|
||||
|
||||
friend class PeakControllerEffectControlDialog;
|
||||
friend class PeakControllerEffect;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -32,13 +32,12 @@
|
||||
|
||||
#include "sf2_player.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "instrument_play_handle.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "knob.h"
|
||||
#include "song.h"
|
||||
|
||||
#include "main_window.h"
|
||||
#include "patches_dialog.h"
|
||||
#include "tooltip.h"
|
||||
#include "lcd_spinbox.h"
|
||||
@@ -49,7 +48,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor sf2player_plugin_descriptor =
|
||||
Plugin::Descriptor sf2player_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Sf2 Player",
|
||||
@@ -57,8 +56,8 @@ plugin::descriptor sf2player_plugin_descriptor =
|
||||
"Player for SoundFont files" ),
|
||||
"Paul Giblock <drfaygo/at/gmail/dot/com>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"sf2",
|
||||
NULL
|
||||
} ;
|
||||
@@ -82,8 +81,8 @@ QMutex sf2Instrument::s_fontsMutex;
|
||||
|
||||
|
||||
|
||||
sf2Instrument::sf2Instrument( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &sf2player_plugin_descriptor ),
|
||||
sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &sf2player_plugin_descriptor ),
|
||||
m_srcState( NULL ),
|
||||
m_font( NULL ),
|
||||
m_fontId( 0 ),
|
||||
@@ -126,7 +125,7 @@ sf2Instrument::sf2Instrument( instrumentTrack * _instrument_track ) :
|
||||
// everytime we load a new soundfont.
|
||||
m_synth = new_fluid_synth( m_settings );
|
||||
|
||||
instrumentPlayHandle * iph = new instrumentPlayHandle( this );
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
|
||||
engine::getMixer()->addPlayHandle( iph );
|
||||
|
||||
//loadFile( configManager::inst()->defaultSoundfont() );
|
||||
@@ -190,7 +189,7 @@ sf2Instrument::sf2Instrument( instrumentTrack * _instrument_track ) :
|
||||
|
||||
sf2Instrument::~sf2Instrument()
|
||||
{
|
||||
engine::getMixer()->removePlayHandles( getInstrumentTrack() );
|
||||
engine::getMixer()->removePlayHandles( instrumentTrack() );
|
||||
freeFont();
|
||||
delete_fluid_synth( m_synth );
|
||||
delete_fluid_settings( m_settings );
|
||||
@@ -270,7 +269,7 @@ void sf2Instrument::loadFile( const QString & _file )
|
||||
|
||||
|
||||
|
||||
automatableModel * sf2Instrument::getChildModel( const QString & _modelName )
|
||||
AutomatableModel * sf2Instrument::childModel( const QString & _modelName )
|
||||
{
|
||||
if( _modelName == "bank" )
|
||||
{
|
||||
@@ -674,9 +673,9 @@ void sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
const fpp_t frames = engine::getMixer()->framesPerPeriod();
|
||||
|
||||
m_synthMutex.lock();
|
||||
if( m_lastMidiPitch != getInstrumentTrack()->midiPitch() )
|
||||
if( m_lastMidiPitch != instrumentTrack()->midiPitch() )
|
||||
{
|
||||
m_lastMidiPitch = getInstrumentTrack()->midiPitch();
|
||||
m_lastMidiPitch = instrumentTrack()->midiPitch();
|
||||
fluid_synth_pitch_bend( m_synth, m_channel, m_lastMidiPitch );
|
||||
}
|
||||
|
||||
@@ -721,7 +720,7 @@ void sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
}
|
||||
m_synthMutex.unlock();
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames,
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames,
|
||||
NULL );
|
||||
}
|
||||
|
||||
@@ -749,7 +748,7 @@ void sf2Instrument::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
pluginView * sf2Instrument::instantiateView( QWidget * _parent )
|
||||
PluginView * sf2Instrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new sf2InstrumentView( this, _parent );
|
||||
}
|
||||
@@ -772,9 +771,9 @@ public:
|
||||
|
||||
|
||||
|
||||
sf2InstrumentView::sf2InstrumentView( instrument * _instrument,
|
||||
sf2InstrumentView::sf2InstrumentView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
// QVBoxLayout * vl = new QVBoxLayout( this );
|
||||
// QHBoxLayout * hl = new QHBoxLayout();
|
||||
@@ -1091,7 +1090,7 @@ void sf2InstrumentView::showPatchDialog()
|
||||
|
||||
patchesDialog pd( this );
|
||||
|
||||
pd.setup( k->m_synth, 1, k->getInstrumentTrack()->name(),
|
||||
pd.setup( k->m_synth, 1, k->instrumentTrack()->name(),
|
||||
&k->m_bankNum, &k->m_patchNum, m_patchLabel );
|
||||
|
||||
pd.exec();
|
||||
@@ -1103,10 +1102,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( model *, void * _data )
|
||||
Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new sf2Instrument(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
return new sf2Instrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#include "instrument.h"
|
||||
#include "Instrument.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "instrument_view.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "knob.h"
|
||||
#include "lcd_spinbox.h"
|
||||
#include "led_checkbox.h"
|
||||
@@ -46,14 +46,14 @@ class patchesDialog;
|
||||
class QLabel;
|
||||
|
||||
|
||||
class sf2Instrument : public instrument
|
||||
class sf2Instrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
mapPropertyFromModel(int,getBank,setBank,m_bankNum);
|
||||
mapPropertyFromModel(int,getPatch,setPatch,m_patchNum);
|
||||
|
||||
public:
|
||||
sf2Instrument( instrumentTrack * _instrument_track );
|
||||
sf2Instrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~sf2Instrument();
|
||||
|
||||
virtual void play( sampleFrame * _working_buffer );
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
virtual void loadFile( const QString & _file );
|
||||
|
||||
virtual automatableModel * getChildModel( const QString & _modelName );
|
||||
virtual AutomatableModel * childModel( const QString & _modelName );
|
||||
|
||||
virtual QString nodeName() const;
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
QString getCurrentPatchName();
|
||||
|
||||
@@ -134,19 +134,19 @@ private:
|
||||
lcdSpinBoxModel m_bankNum;
|
||||
lcdSpinBoxModel m_patchNum;
|
||||
|
||||
knobModel m_gain;
|
||||
FloatModel m_gain;
|
||||
|
||||
boolModel m_reverbOn;
|
||||
knobModel m_reverbRoomSize;
|
||||
knobModel m_reverbDamping;
|
||||
knobModel m_reverbWidth;
|
||||
knobModel m_reverbLevel;
|
||||
BoolModel m_reverbOn;
|
||||
FloatModel m_reverbRoomSize;
|
||||
FloatModel m_reverbDamping;
|
||||
FloatModel m_reverbWidth;
|
||||
FloatModel m_reverbLevel;
|
||||
|
||||
boolModel m_chorusOn;
|
||||
knobModel m_chorusNum;
|
||||
knobModel m_chorusLevel;
|
||||
knobModel m_chorusSpeed;
|
||||
knobModel m_chorusDepth;
|
||||
BoolModel m_chorusOn;
|
||||
FloatModel m_chorusNum;
|
||||
FloatModel m_chorusLevel;
|
||||
FloatModel m_chorusSpeed;
|
||||
FloatModel m_chorusDepth;
|
||||
|
||||
|
||||
private:
|
||||
@@ -178,11 +178,11 @@ public:
|
||||
|
||||
|
||||
|
||||
class sf2InstrumentView : public instrumentView
|
||||
class sf2InstrumentView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
sf2InstrumentView( instrument * _instrument,
|
||||
sf2InstrumentView( Instrument * _instrument,
|
||||
QWidget * _parent );
|
||||
virtual ~sf2InstrumentView();
|
||||
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
|
||||
#include "sid_instrument.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "sweep_oscillator.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
@@ -69,7 +68,7 @@ static const int relTime[16] = { 6, 24, 48, 72, 114, 168, 204, 240, 300, 750,
|
||||
|
||||
extern "C"
|
||||
{
|
||||
plugin::descriptor PLUGIN_EXPORT sid_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT sid_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"SID",
|
||||
@@ -79,16 +78,16 @@ plugin::descriptor PLUGIN_EXPORT sid_plugin_descriptor =
|
||||
"Csaba Hruska <csaba.hruska/at/gmail.com>"
|
||||
"Attila Herman <attila589/at/gmail.com>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
voiceObject::voiceObject( model * _parent, int _idx ) :
|
||||
model( _parent ),
|
||||
voiceObject::voiceObject( Model * _parent, int _idx ) :
|
||||
Model( _parent ),
|
||||
m_pulseWidthModel( 2048.0f, 0.0f, 4095.0f, 1.0f, this,
|
||||
tr( "Voice %1 pulse width" ).arg( _idx+1 ) ),
|
||||
m_attackModel( 8.0f, 0.0f, 15.0f, 1.0f, this,
|
||||
@@ -117,8 +116,8 @@ voiceObject::~voiceObject()
|
||||
}
|
||||
|
||||
|
||||
sidInstrument::sidInstrument( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &sid_plugin_descriptor ),
|
||||
sidInstrument::sidInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &sid_plugin_descriptor ),
|
||||
// filter
|
||||
m_filterFCModel( 1024.0f, 0.0f, 2047.0f, 1.0f, this, tr( "Cutoff" ) ),
|
||||
m_filterResonanceModel( 8.0f, 0.0f, 15.0f, 1.0f, this, tr( "Resonance" ) ),
|
||||
@@ -432,7 +431,7 @@ void sidInstrument::playNote( notePlayHandle * _n,
|
||||
}
|
||||
}
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
}
|
||||
|
||||
|
||||
@@ -446,7 +445,7 @@ void sidInstrument::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
pluginView * sidInstrument::instantiateView( QWidget * _parent )
|
||||
PluginView * sidInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new sidInstrumentView( this, _parent ) );
|
||||
}
|
||||
@@ -473,9 +472,9 @@ public:
|
||||
|
||||
|
||||
|
||||
sidInstrumentView::sidInstrumentView( instrument * _instrument,
|
||||
sidInstrumentView::sidInstrumentView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
|
||||
setAutoFillBackground( TRUE );
|
||||
@@ -817,10 +816,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new sidInstrument(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* sid_instrument.h - ResID based software-synthesizer
|
||||
* sid_Instrument.h - ResID based software-synthesizer
|
||||
*
|
||||
* Copyright (c) 2008 Csaba Hruska <csaba.hruska/at/gmail.com>
|
||||
* Attila Herman <attila589/at/gmail.com>
|
||||
@@ -28,8 +28,8 @@
|
||||
#define _SID_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "knob.h"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class notePlayHandle;
|
||||
class automatableButtonGroup;
|
||||
class pixmapButton;
|
||||
|
||||
class voiceObject : public model
|
||||
class voiceObject : public Model
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -49,28 +49,28 @@ public:
|
||||
NoiseWave,
|
||||
NumWaveShapes
|
||||
};
|
||||
voiceObject( model * _parent, int _idx );
|
||||
voiceObject( Model * _parent, int _idx );
|
||||
virtual ~voiceObject();
|
||||
|
||||
|
||||
private:
|
||||
knobModel m_pulseWidthModel;
|
||||
knobModel m_attackModel;
|
||||
knobModel m_decayModel;
|
||||
knobModel m_sustainModel;
|
||||
knobModel m_releaseModel;
|
||||
knobModel m_coarseModel;
|
||||
intModel m_waveFormModel;
|
||||
boolModel m_syncModel;
|
||||
boolModel m_ringModModel;
|
||||
boolModel m_filteredModel;
|
||||
boolModel m_testModel;
|
||||
FloatModel m_pulseWidthModel;
|
||||
FloatModel m_attackModel;
|
||||
FloatModel m_decayModel;
|
||||
FloatModel m_sustainModel;
|
||||
FloatModel m_releaseModel;
|
||||
FloatModel m_coarseModel;
|
||||
IntModel m_waveFormModel;
|
||||
BoolModel m_syncModel;
|
||||
BoolModel m_ringModModel;
|
||||
BoolModel m_filteredModel;
|
||||
BoolModel m_testModel;
|
||||
|
||||
friend class sidInstrument;
|
||||
friend class sidInstrumentView;
|
||||
} ;
|
||||
|
||||
class sidInstrument : public instrument
|
||||
class sidInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
sidInstrument( instrumentTrack * _instrument_track );
|
||||
sidInstrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~sidInstrument();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
virtual f_cnt_t desiredReleaseFrames( void ) const;
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
/*public slots:
|
||||
@@ -115,15 +115,15 @@ private:
|
||||
voiceObject * m_voice[3];
|
||||
|
||||
// filter
|
||||
knobModel m_filterFCModel;
|
||||
knobModel m_filterResonanceModel;
|
||||
intModel m_filterModeModel;
|
||||
FloatModel m_filterFCModel;
|
||||
FloatModel m_filterResonanceModel;
|
||||
IntModel m_filterModeModel;
|
||||
|
||||
// misc
|
||||
boolModel m_voice3OffModel;
|
||||
knobModel m_volumeModel;
|
||||
BoolModel m_voice3OffModel;
|
||||
FloatModel m_volumeModel;
|
||||
|
||||
intModel m_chipModel;
|
||||
IntModel m_chipModel;
|
||||
|
||||
friend class sidInstrumentView;
|
||||
|
||||
@@ -131,11 +131,11 @@ private:
|
||||
|
||||
|
||||
|
||||
class sidInstrumentView : public instrumentView
|
||||
class sidInstrumentView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
sidInstrumentView( instrument * _instrument, QWidget * _parent );
|
||||
sidInstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~sidInstrumentView();
|
||||
|
||||
private:
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT spectrumanalyzer_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT spectrumanalyzer_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Spectrum Analyzer",
|
||||
@@ -39,8 +39,8 @@ plugin::descriptor PLUGIN_EXPORT spectrumanalyzer_plugin_descriptor =
|
||||
"inside LMMS." ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Effect,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -49,9 +49,9 @@ plugin::descriptor PLUGIN_EXPORT spectrumanalyzer_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
spectrumAnalyzer::spectrumAnalyzer( model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key ) :
|
||||
effect( &spectrumanalyzer_plugin_descriptor, _parent, _key ),
|
||||
spectrumAnalyzer::spectrumAnalyzer( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &spectrumanalyzer_plugin_descriptor, _parent, _key ),
|
||||
m_saControls( this ),
|
||||
m_framesFilledUp( 0 ),
|
||||
m_energy( 0 )
|
||||
@@ -164,10 +164,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model * _parent, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new spectrumAnalyzer( _parent,
|
||||
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifndef _SPECTRUM_ANALYZER_H
|
||||
#define _SPECTRUM_ANALYZER_H
|
||||
|
||||
#include "effect.h"
|
||||
#include "Effect.h"
|
||||
#include "fft_helpers.h"
|
||||
#include "spectrumanalyzer_controls.h"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
const int MAX_BANDS = 249;
|
||||
|
||||
|
||||
class spectrumAnalyzer : public effect
|
||||
class spectrumAnalyzer : public Effect
|
||||
{
|
||||
public:
|
||||
enum ChannelModes
|
||||
@@ -44,13 +44,13 @@ public:
|
||||
RightChannel
|
||||
} ;
|
||||
|
||||
spectrumAnalyzer( model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key );
|
||||
spectrumAnalyzer( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~spectrumAnalyzer();
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
virtual effectControls * getControls( void )
|
||||
virtual EffectControls * controls( void )
|
||||
{
|
||||
return( &m_saControls );
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#include "spectrum_analyzer.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "embed.h"
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
m_background( PLUGIN_NAME::getIconPixmap( "spectrum_background" ).toImage() )
|
||||
{
|
||||
setFixedSize( 249, 151 );
|
||||
connect( engine::getMainWindow(), SIGNAL( periodicUpdate() ),
|
||||
connect( engine::mainWindow(), SIGNAL( periodicUpdate() ),
|
||||
this, SLOT( update() ) );
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, TRUE );
|
||||
}
|
||||
@@ -146,7 +146,7 @@ private:
|
||||
|
||||
spectrumAnalyzerControlDialog::spectrumAnalyzerControlDialog(
|
||||
spectrumAnalyzerControls * _controls ) :
|
||||
effectControlDialog( _controls ),
|
||||
EffectControlDialog( _controls ),
|
||||
m_controls( _controls ),
|
||||
m_logXAxis( PLUGIN_NAME::getIconPixmap( "log_x_axis" ) ),
|
||||
m_logYAxis( PLUGIN_NAME::getIconPixmap( "log_y_axis" ) )
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
#ifndef _SPECTRUMANALYZER_CONTROL_DIALOG_H
|
||||
#define _SPECTRUMANALYZER_CONTROL_DIALOG_H
|
||||
|
||||
#include "effect_control_dialog.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
|
||||
class spectrumAnalyzerControls;
|
||||
|
||||
|
||||
class spectrumAnalyzerControlDialog : public effectControlDialog
|
||||
class spectrumAnalyzerControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
spectrumAnalyzerControlDialog( spectrumAnalyzerControls * _controls );
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
spectrumAnalyzerControls::spectrumAnalyzerControls( spectrumAnalyzer * _eff ) :
|
||||
effectControls( _eff ),
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
m_linearSpec( FALSE, this, tr( "Linear spectrum" ) ),
|
||||
m_linearYAxis( FALSE, this, tr( "Linear Y-axis" ) ),
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef _SPECTRUMANALYZER_CONTROLS_H
|
||||
#define _SPECTRUMANALYZER_CONTROLS_H
|
||||
|
||||
#include "effect_controls.h"
|
||||
#include "EffectControls.h"
|
||||
#include "spectrumanalyzer_control_dialog.h"
|
||||
#include "knob.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
class spectrumAnalyzer;
|
||||
|
||||
|
||||
class spectrumAnalyzerControls : public effectControls
|
||||
class spectrumAnalyzerControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
return( "spectrumanaylzercontrols" );
|
||||
}
|
||||
|
||||
virtual int getControlCount( void )
|
||||
virtual int controlCount( void )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
virtual effectControlDialog * createView( void )
|
||||
virtual EffectControlDialog * createView( void )
|
||||
{
|
||||
return( new spectrumAnalyzerControlDialog( this ) );
|
||||
}
|
||||
@@ -62,9 +62,9 @@ public:
|
||||
|
||||
private:
|
||||
spectrumAnalyzer * m_effect;
|
||||
boolModel m_linearSpec;
|
||||
boolModel m_linearYAxis;
|
||||
intModel m_channelMode;
|
||||
BoolModel m_linearSpec;
|
||||
BoolModel m_linearYAxis;
|
||||
IntModel m_channelMode;
|
||||
|
||||
friend class spectrumAnalyzer;
|
||||
friend class spectrumAnalyzerControlDialog;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT stereoenhancer_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT stereoenhancer_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"StereoEnhancer Effect",
|
||||
@@ -39,8 +39,8 @@ plugin::descriptor PLUGIN_EXPORT stereoenhancer_plugin_descriptor =
|
||||
"Plugin for enhancing stereo separation of a stereo input file" ),
|
||||
"Lou Herard <lherard/at/gmail.com>",
|
||||
0x0100,
|
||||
plugin::Effect,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -50,9 +50,9 @@ plugin::descriptor PLUGIN_EXPORT stereoenhancer_plugin_descriptor =
|
||||
|
||||
|
||||
stereoEnhancerEffect::stereoEnhancerEffect(
|
||||
model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key ) :
|
||||
effect( &stereoenhancer_plugin_descriptor, _parent, _key ),
|
||||
Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &stereoenhancer_plugin_descriptor, _parent, _key ),
|
||||
m_seFX( effectLib::stereoEnhancer( 0.0f ) ),
|
||||
m_delayBuffer( new sampleFrame[DEFAULT_BUFFER_SIZE] ),
|
||||
m_currFrame( 0 ),
|
||||
@@ -96,8 +96,8 @@ bool stereoEnhancerEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
const float d = getDryLevel();
|
||||
const float w = getWetLevel();
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
|
||||
for( fpp_t f = 0; f < _frames; ++f )
|
||||
{
|
||||
@@ -164,10 +164,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model * _parent, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new stereoEnhancerEffect( _parent,
|
||||
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -26,24 +26,21 @@
|
||||
#ifndef _STEREO_ENHANCER_H
|
||||
#define _STEREO_ENHANCER_H
|
||||
|
||||
#include <QtGui/QWorkspace>
|
||||
|
||||
#include "effect.h"
|
||||
#include "Effect.h"
|
||||
#include "effect_lib.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "stereoenhancer_controls.h"
|
||||
|
||||
class stereoEnhancerEffect : public effect
|
||||
class stereoEnhancerEffect : public Effect
|
||||
{
|
||||
public:
|
||||
stereoEnhancerEffect( model * parent,
|
||||
const descriptor::subPluginFeatures::key * _key );
|
||||
stereoEnhancerEffect( Model * parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~stereoEnhancerEffect();
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
virtual effectControls * getControls( void )
|
||||
virtual EffectControls * controls( void )
|
||||
{
|
||||
return( &m_bbControls );
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
stereoEnhancerControlDialog::stereoEnhancerControlDialog(
|
||||
stereoEnhancerControls * _controls ) :
|
||||
effectControlDialog( _controls )
|
||||
EffectControlDialog( _controls )
|
||||
{
|
||||
QHBoxLayout * l = new QHBoxLayout( this );
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
#ifndef _STEREOENHANCER_CONTROL_DIALOG_H
|
||||
#define _STEREOENHANCER_CONTROL_DIALOG_H
|
||||
|
||||
#include "effect_control_dialog.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
class stereoEnhancerControls;
|
||||
|
||||
|
||||
class stereoEnhancerControlDialog : public effectControlDialog
|
||||
class stereoEnhancerControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
stereoEnhancerControlDialog( stereoEnhancerControls * _controls );
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
stereoEnhancerControls::stereoEnhancerControls( stereoEnhancerEffect * _eff ) :
|
||||
effectControls( _eff ),
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
m_widthModel(0.0f, 0.0f, 180.0f, 1.0f, this, tr( "Width" ) )
|
||||
{
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
#ifndef _STEREO_ENHANCER_CONTROLS_H
|
||||
#define _STEREO_ENHANCER_CONTROLS_H
|
||||
|
||||
#include "effect_controls.h"
|
||||
#include "EffectControls.h"
|
||||
#include "stereoenhancer_control_dialog.h"
|
||||
#include "knob.h"
|
||||
|
||||
class stereoEnhancerEffect;
|
||||
|
||||
class stereoEnhancerControls : public effectControls
|
||||
class stereoEnhancerControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -47,12 +47,12 @@ public:
|
||||
return( "stereoenhancercontrols" );
|
||||
}
|
||||
|
||||
virtual int getControlCount( void )
|
||||
virtual int controlCount( void )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
virtual effectControlDialog * createView( void )
|
||||
virtual EffectControlDialog * createView( void )
|
||||
{
|
||||
return new stereoEnhancerControlDialog( this );
|
||||
}
|
||||
@@ -64,7 +64,7 @@ private slots:
|
||||
|
||||
private:
|
||||
stereoEnhancerEffect * m_effect;
|
||||
knobModel m_widthModel;
|
||||
FloatModel m_widthModel;
|
||||
|
||||
friend class stereoEnhancerControlDialog;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT stereomatrix_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT stereomatrix_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Stereophonic Matrix",
|
||||
@@ -39,8 +39,8 @@ plugin::descriptor PLUGIN_EXPORT stereomatrix_plugin_descriptor =
|
||||
"Plugin for freely manipulating stereo output" ),
|
||||
"Paul Giblock <drfaygo/at/gmail.com>",
|
||||
0x0100,
|
||||
plugin::Effect,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -50,9 +50,9 @@ plugin::descriptor PLUGIN_EXPORT stereomatrix_plugin_descriptor =
|
||||
|
||||
|
||||
stereoMatrixEffect::stereoMatrixEffect(
|
||||
model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key ) :
|
||||
effect( &stereomatrix_plugin_descriptor, _parent, _key ),
|
||||
Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &stereomatrix_plugin_descriptor, _parent, _key ),
|
||||
m_smControls( this )
|
||||
{
|
||||
}
|
||||
@@ -81,8 +81,8 @@ bool stereoMatrixEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
|
||||
for( fpp_t f = 0; f < _frames; ++f )
|
||||
{
|
||||
const float d = getDryLevel();
|
||||
const float w = getWetLevel();
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
|
||||
sample_t l = _buf[f][0];
|
||||
sample_t r = _buf[f][1];
|
||||
@@ -113,10 +113,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model * _parent, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new stereoMatrixEffect( _parent,
|
||||
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -26,24 +26,19 @@
|
||||
#ifndef _STEREO_MATRIX_H
|
||||
#define _STEREO_MATRIX_H
|
||||
|
||||
#include <QtGui/QWorkspace>
|
||||
|
||||
#include "effect.h"
|
||||
#include "effect_lib.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "Effect.h"
|
||||
#include "stereomatrix_controls.h"
|
||||
|
||||
class stereoMatrixEffect : public effect
|
||||
class stereoMatrixEffect : public Effect
|
||||
{
|
||||
public:
|
||||
stereoMatrixEffect( model * parent,
|
||||
const descriptor::subPluginFeatures::key * _key );
|
||||
stereoMatrixEffect( Model * parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~stereoMatrixEffect();
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
virtual effectControls * getControls( void )
|
||||
virtual EffectControls * controls( void )
|
||||
{
|
||||
return( &m_smControls );
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
stereoMatrixControlDialog::stereoMatrixControlDialog(
|
||||
stereoMatrixControls * _controls ) :
|
||||
effectControlDialog( _controls )
|
||||
EffectControlDialog( _controls )
|
||||
{
|
||||
|
||||
setFixedSize( 105, 115);
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
#ifndef _STEREOMATRIX_CONTROL_DIALOG_H
|
||||
#define _STEREOMATRIX_CONTROL_DIALOG_H
|
||||
|
||||
#include "effect_control_dialog.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
class stereoMatrixControls;
|
||||
|
||||
|
||||
class stereoMatrixControlDialog : public effectControlDialog
|
||||
class stereoMatrixControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
stereoMatrixControlDialog( stereoMatrixControls * _controls );
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
stereoMatrixControls::stereoMatrixControls( stereoMatrixEffect * _eff ) :
|
||||
effectControls( _eff ),
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff ),
|
||||
m_llModel( 1.0f, -1.0f, 1.0f, 0.01f, this, tr( "Left to Left" ) ),
|
||||
m_lrModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Left to Right" ) ),
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
#ifndef _STEREO_MATRIX_CONTROLS_H
|
||||
#define _STEREO_MATRIX_CONTROLS_H
|
||||
|
||||
#include "effect_controls.h"
|
||||
#include "EffectControls.h"
|
||||
#include "stereomatrix_control_dialog.h"
|
||||
#include "knob.h"
|
||||
|
||||
class stereoMatrixEffect;
|
||||
|
||||
class stereoMatrixControls : public effectControls
|
||||
class stereoMatrixControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -47,12 +47,12 @@ public:
|
||||
return( "stereomatrixcontrols" );
|
||||
}
|
||||
|
||||
virtual int getControlCount( void )
|
||||
virtual int controlCount( void )
|
||||
{
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
virtual effectControlDialog * createView( void )
|
||||
virtual EffectControlDialog * createView( void )
|
||||
{
|
||||
return new stereoMatrixControlDialog( this );
|
||||
}
|
||||
@@ -65,10 +65,10 @@ private slots:
|
||||
private:
|
||||
stereoMatrixEffect * m_effect;
|
||||
|
||||
knobModel m_llModel;
|
||||
knobModel m_lrModel;
|
||||
knobModel m_rlModel;
|
||||
knobModel m_rrModel;
|
||||
FloatModel m_llModel;
|
||||
FloatModel m_lrModel;
|
||||
FloatModel m_rlModel;
|
||||
FloatModel m_rrModel;
|
||||
|
||||
friend class stereoMatrixControlDialog;
|
||||
friend class stereoMatrixEffect;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor malletsstk_plugin_descriptor =
|
||||
Plugin::Descriptor malletsstk_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Mallets",
|
||||
@@ -49,8 +49,8 @@ plugin::descriptor malletsstk_plugin_descriptor =
|
||||
"Tuneful things to bang on" ),
|
||||
"Danny McRae <khjklujn/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -58,8 +58,8 @@ plugin::descriptor malletsstk_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
malletsInstrument::malletsInstrument( instrumentTrack * _instrument_track ):
|
||||
instrument( _instrument_track, &malletsstk_plugin_descriptor ),
|
||||
malletsInstrument::malletsInstrument( InstrumentTrack * _instrument_track ):
|
||||
Instrument( _instrument_track, &malletsstk_plugin_descriptor ),
|
||||
m_hardnessModel(64.0f, 0.0f, 128.0f, 0.1f, this, tr( "Hardness" )),
|
||||
m_positionModel(64.0f, 0.0f, 128.0f, 0.1f, this, tr( "Position" )),
|
||||
m_vibratoGainModel(64.0f, 0.0f, 128.0f, 0.1f, this, tr( "Vibrato Gain" )),
|
||||
@@ -281,7 +281,7 @@ void malletsInstrument::playNote( notePlayHandle * _n,
|
||||
( m_scalers[m_presetsModel.value()] + add_scale );
|
||||
}
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
}
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ void malletsInstrument::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
pluginView * malletsInstrument::instantiateView( QWidget * _parent )
|
||||
PluginView * malletsInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new malletsInstrumentView( this, _parent ) );
|
||||
}
|
||||
@@ -305,7 +305,7 @@ pluginView * malletsInstrument::instantiateView( QWidget * _parent )
|
||||
|
||||
malletsInstrumentView::malletsInstrumentView( malletsInstrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
m_modalBarWidget = setupModalBarControls( this );
|
||||
setWidgetBackground( m_modalBarWidget, "artwork" );
|
||||
@@ -655,9 +655,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( model *, void * _data )
|
||||
Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new malletsInstrument( static_cast<instrumentTrack *>( _data ) ) );
|
||||
return new malletsInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include "Instrmnt.h"
|
||||
|
||||
#include "combobox.h"
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "led_checkbox.h"
|
||||
@@ -125,10 +125,10 @@ protected:
|
||||
|
||||
|
||||
|
||||
class malletsInstrument : public instrument
|
||||
class malletsInstrument : public Instrument
|
||||
{
|
||||
public:
|
||||
malletsInstrument( instrumentTrack * _channel_track );
|
||||
malletsInstrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~malletsInstrument( void );
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -141,31 +141,31 @@ public:
|
||||
|
||||
virtual QString nodeName( void ) const;
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
private:
|
||||
knobModel m_hardnessModel;
|
||||
knobModel m_positionModel;
|
||||
knobModel m_vibratoGainModel;
|
||||
knobModel m_vibratoFreqModel;
|
||||
knobModel m_stickModel;
|
||||
FloatModel m_hardnessModel;
|
||||
FloatModel m_positionModel;
|
||||
FloatModel m_vibratoGainModel;
|
||||
FloatModel m_vibratoFreqModel;
|
||||
FloatModel m_stickModel;
|
||||
|
||||
knobModel m_modulatorModel;
|
||||
knobModel m_crossfadeModel;
|
||||
knobModel m_lfoSpeedModel;
|
||||
knobModel m_lfoDepthModel;
|
||||
knobModel m_adsrModel;
|
||||
FloatModel m_modulatorModel;
|
||||
FloatModel m_crossfadeModel;
|
||||
FloatModel m_lfoSpeedModel;
|
||||
FloatModel m_lfoDepthModel;
|
||||
FloatModel m_adsrModel;
|
||||
|
||||
knobModel m_pressureModel;
|
||||
knobModel m_motionModel;
|
||||
knobModel m_vibratoModel;
|
||||
knobModel m_velocityModel;
|
||||
FloatModel m_pressureModel;
|
||||
FloatModel m_motionModel;
|
||||
FloatModel m_vibratoModel;
|
||||
FloatModel m_velocityModel;
|
||||
|
||||
boolModel m_strikeModel;
|
||||
BoolModel m_strikeModel;
|
||||
|
||||
comboBoxModel m_presetsModel;
|
||||
knobModel m_spreadModel;
|
||||
ComboBoxModel m_presetsModel;
|
||||
FloatModel m_spreadModel;
|
||||
|
||||
QVector<sample_t> m_scalers;
|
||||
|
||||
@@ -177,7 +177,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
class malletsInstrumentView: public instrumentView
|
||||
class malletsInstrumentView: public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(tripleoscillator triple_oscillator.cpp triple_oscillator.h MOCFILES triple_oscillator.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
BUILD_PLUGIN(tripleoscillator TripleOscillator.cpp TripleOscillator.h MOCFILES TripleOscillator.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* triple_oscillator.cpp - powerful instrument with three oscillators
|
||||
* TripleOscillator.cpp - powerful instrument with three oscillators
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -27,11 +27,11 @@
|
||||
#include <QtGui/QBitmap>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#include "triple_oscillator.h"
|
||||
#include "TripleOscillator.h"
|
||||
#include "automatable_button.h"
|
||||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "pixmap_button.h"
|
||||
@@ -45,7 +45,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT tripleoscillator_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT tripleoscillator_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"TripleOscillator",
|
||||
@@ -54,8 +54,8 @@ plugin::descriptor PLUGIN_EXPORT tripleoscillator_plugin_descriptor =
|
||||
"in several ways" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0110,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
@@ -64,8 +64,8 @@ plugin::descriptor PLUGIN_EXPORT tripleoscillator_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
oscillatorObject::oscillatorObject( model * _parent, int _idx ) :
|
||||
model( _parent ),
|
||||
OscillatorObject::OscillatorObject( Model * _parent, int _idx ) :
|
||||
Model( _parent ),
|
||||
m_volumeModel( DefaultVolume / NUM_OF_OSCILLATORS, MinVolume,
|
||||
MaxVolume, 1.0f, this, tr( "Osc %1 volume" ).arg( _idx+1 ) ),
|
||||
m_panModel( DefaultPanning, PanningLeft, PanningRight, 1.0f, this,
|
||||
@@ -81,11 +81,11 @@ oscillatorObject::oscillatorObject( model * _parent, int _idx ) :
|
||||
tr( "Osc %1 phase-offset" ).arg( _idx+1 ) ),
|
||||
m_stereoPhaseDetuningModel( 0.0f, 0.0f, 360.0f, 1.0f, this,
|
||||
tr( "Osc %1 stereo phase-detuning" ).arg( _idx+1 ) ),
|
||||
m_waveShapeModel( oscillator::SineWave, 0,
|
||||
oscillator::NumWaveShapes-1, this,
|
||||
m_waveShapeModel( Oscillator::SineWave, 0,
|
||||
Oscillator::NumWaveShapes-1, this,
|
||||
tr( "Osc %1 wave shape" ).arg( _idx+1 ) ),
|
||||
m_modulationAlgoModel( oscillator::SignalMix, 0,
|
||||
oscillator::NumModulationAlgos-1, this,
|
||||
m_modulationAlgoModel( Oscillator::SignalMix, 0,
|
||||
Oscillator::NumModulationAlgos-1, this,
|
||||
tr( "Modulation type %1" ).arg( _idx+1 ) ),
|
||||
|
||||
m_sampleBuffer( new sampleBuffer ),
|
||||
@@ -96,7 +96,7 @@ oscillatorObject::oscillatorObject( model * _parent, int _idx ) :
|
||||
m_phaseOffsetLeft( 0.0f ),
|
||||
m_phaseOffsetRight( 0.0f )
|
||||
{
|
||||
// Connect knobs with oscillators' inputs
|
||||
// Connect knobs with Oscillators' inputs
|
||||
connect( &m_volumeModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( updateVolume() ) );
|
||||
connect( &m_panModel, SIGNAL( dataChanged() ),
|
||||
@@ -128,7 +128,7 @@ oscillatorObject::oscillatorObject( model * _parent, int _idx ) :
|
||||
|
||||
|
||||
|
||||
oscillatorObject::~oscillatorObject()
|
||||
OscillatorObject::~OscillatorObject()
|
||||
{
|
||||
sharedObject::unref( m_sampleBuffer );
|
||||
}
|
||||
@@ -136,7 +136,7 @@ oscillatorObject::~oscillatorObject()
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::oscUserDefWaveDblClick( void )
|
||||
void OscillatorObject::oscUserDefWaveDblClick()
|
||||
{
|
||||
QString af = m_sampleBuffer->openAudioFile();
|
||||
if( af != "" )
|
||||
@@ -150,7 +150,7 @@ void oscillatorObject::oscUserDefWaveDblClick( void )
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::updateVolume( void )
|
||||
void OscillatorObject::updateVolume()
|
||||
{
|
||||
if( m_panModel.value() >= 0.0f )
|
||||
{
|
||||
@@ -173,7 +173,7 @@ void oscillatorObject::updateVolume( void )
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::updateDetuningLeft( void )
|
||||
void OscillatorObject::updateDetuningLeft()
|
||||
{
|
||||
m_detuningLeft = powf( 2.0f, ( (float)m_coarseModel.value() * 100.0f
|
||||
+ (float)m_fineLeftModel.value() ) / 1200.0f )
|
||||
@@ -183,7 +183,7 @@ void oscillatorObject::updateDetuningLeft( void )
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::updateDetuningRight( void )
|
||||
void OscillatorObject::updateDetuningRight()
|
||||
{
|
||||
m_detuningRight = powf( 2.0f, ( (float)m_coarseModel.value() * 100.0f
|
||||
+ (float)m_fineRightModel.value() ) / 1200.0f )
|
||||
@@ -193,7 +193,7 @@ void oscillatorObject::updateDetuningRight( void )
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::updatePhaseOffsetLeft( void )
|
||||
void OscillatorObject::updatePhaseOffsetLeft()
|
||||
{
|
||||
m_phaseOffsetLeft = ( m_phaseOffsetModel.value() +
|
||||
m_stereoPhaseDetuningModel.value() ) / 360.0f;
|
||||
@@ -202,7 +202,7 @@ void oscillatorObject::updatePhaseOffsetLeft( void )
|
||||
|
||||
|
||||
|
||||
void oscillatorObject::updatePhaseOffsetRight( void )
|
||||
void OscillatorObject::updatePhaseOffsetRight()
|
||||
{
|
||||
m_phaseOffsetRight = m_phaseOffsetModel.value() / 360.0f;
|
||||
}
|
||||
@@ -210,12 +210,12 @@ void oscillatorObject::updatePhaseOffsetRight( void )
|
||||
|
||||
|
||||
|
||||
tripleOscillator::tripleOscillator( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &tripleoscillator_plugin_descriptor )
|
||||
TripleOscillator::TripleOscillator( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &tripleoscillator_plugin_descriptor )
|
||||
{
|
||||
for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
|
||||
{
|
||||
m_osc[i] = new oscillatorObject( this, i );
|
||||
m_osc[i] = new OscillatorObject( this, i );
|
||||
|
||||
}
|
||||
|
||||
@@ -226,14 +226,14 @@ tripleOscillator::tripleOscillator( instrumentTrack * _instrument_track ) :
|
||||
|
||||
|
||||
|
||||
tripleOscillator::~tripleOscillator()
|
||||
TripleOscillator::~TripleOscillator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void tripleOscillator::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void TripleOscillator::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
|
||||
{
|
||||
@@ -262,7 +262,7 @@ void tripleOscillator::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void tripleOscillator::loadSettings( const QDomElement & _this )
|
||||
void TripleOscillator::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
|
||||
{
|
||||
@@ -288,7 +288,7 @@ void tripleOscillator::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
QString tripleOscillator::nodeName( void ) const
|
||||
QString TripleOscillator::nodeName() const
|
||||
{
|
||||
return( tripleoscillator_plugin_descriptor.name );
|
||||
}
|
||||
@@ -296,13 +296,13 @@ QString tripleOscillator::nodeName( void ) const
|
||||
|
||||
|
||||
|
||||
void tripleOscillator::playNote( notePlayHandle * _n,
|
||||
void TripleOscillator::playNote( notePlayHandle * _n,
|
||||
sampleFrame * _working_buffer )
|
||||
{
|
||||
if( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL )
|
||||
{
|
||||
oscillator * oscs_l[NUM_OF_OSCILLATORS];
|
||||
oscillator * oscs_r[NUM_OF_OSCILLATORS];
|
||||
Oscillator * oscs_l[NUM_OF_OSCILLATORS];
|
||||
Oscillator * oscs_r[NUM_OF_OSCILLATORS];
|
||||
|
||||
for( Sint8 i = NUM_OF_OSCILLATORS - 1; i >= 0; --i )
|
||||
{
|
||||
@@ -310,14 +310,14 @@ void tripleOscillator::playNote( notePlayHandle * _n,
|
||||
// the last oscs needs no sub-oscs...
|
||||
if( i == NUM_OF_OSCILLATORS - 1 )
|
||||
{
|
||||
oscs_l[i] = new oscillator(
|
||||
oscs_l[i] = new Oscillator(
|
||||
&m_osc[i]->m_waveShapeModel,
|
||||
&m_osc[i]->m_modulationAlgoModel,
|
||||
_n->frequency(),
|
||||
m_osc[i]->m_detuningLeft,
|
||||
m_osc[i]->m_phaseOffsetLeft,
|
||||
m_osc[i]->m_volumeLeft );
|
||||
oscs_r[i] = new oscillator(
|
||||
oscs_r[i] = new Oscillator(
|
||||
&m_osc[i]->m_waveShapeModel,
|
||||
&m_osc[i]->m_modulationAlgoModel,
|
||||
_n->frequency(),
|
||||
@@ -327,7 +327,7 @@ void tripleOscillator::playNote( notePlayHandle * _n,
|
||||
}
|
||||
else
|
||||
{
|
||||
oscs_l[i] = new oscillator(
|
||||
oscs_l[i] = new Oscillator(
|
||||
&m_osc[i]->m_waveShapeModel,
|
||||
&m_osc[i]->m_modulationAlgoModel,
|
||||
_n->frequency(),
|
||||
@@ -335,7 +335,7 @@ void tripleOscillator::playNote( notePlayHandle * _n,
|
||||
m_osc[i]->m_phaseOffsetLeft,
|
||||
m_osc[i]->m_volumeLeft,
|
||||
oscs_l[i + 1] );
|
||||
oscs_r[i] = new oscillator(
|
||||
oscs_r[i] = new Oscillator(
|
||||
&m_osc[i]->m_waveShapeModel,
|
||||
&m_osc[i]->m_modulationAlgoModel,
|
||||
_n->frequency(),
|
||||
@@ -356,9 +356,8 @@ void tripleOscillator::playNote( notePlayHandle * _n,
|
||||
oscs_r[0];
|
||||
}
|
||||
|
||||
oscillator * osc_l = static_cast<oscPtr *>( _n->m_pluginData )->oscLeft;
|
||||
oscillator * osc_r = static_cast<oscPtr *>( _n->m_pluginData
|
||||
)->oscRight;
|
||||
Oscillator * osc_l = static_cast<oscPtr *>( _n->m_pluginData )->oscLeft;
|
||||
Oscillator * osc_r = static_cast<oscPtr *>( _n->m_pluginData )->oscRight;
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
|
||||
@@ -367,17 +366,17 @@ void tripleOscillator::playNote( notePlayHandle * _n,
|
||||
|
||||
applyRelease( _working_buffer, _n );
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void tripleOscillator::deleteNotePluginData( notePlayHandle * _n )
|
||||
void TripleOscillator::deleteNotePluginData( notePlayHandle * _n )
|
||||
{
|
||||
delete static_cast<oscillator *>( static_cast<oscPtr *>(
|
||||
delete static_cast<Oscillator *>( static_cast<oscPtr *>(
|
||||
_n->m_pluginData )->oscLeft );
|
||||
delete static_cast<oscillator *>( static_cast<oscPtr *>(
|
||||
delete static_cast<Oscillator *>( static_cast<oscPtr *>(
|
||||
_n->m_pluginData )->oscRight );
|
||||
delete static_cast<oscPtr *>( _n->m_pluginData );
|
||||
}
|
||||
@@ -385,15 +384,15 @@ void tripleOscillator::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
pluginView * tripleOscillator::instantiateView( QWidget * _parent )
|
||||
PluginView * TripleOscillator::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new tripleOscillatorView( this, _parent ) );
|
||||
return new TripleOscillatorView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void tripleOscillator::updateAllDetuning( void )
|
||||
void TripleOscillator::updateAllDetuning()
|
||||
{
|
||||
for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
|
||||
{
|
||||
@@ -405,10 +404,10 @@ void tripleOscillator::updateAllDetuning( void )
|
||||
|
||||
|
||||
|
||||
class tripleOscKnob : public knob
|
||||
class TripleOscKnob : public knob
|
||||
{
|
||||
public:
|
||||
tripleOscKnob( QWidget * _parent ) :
|
||||
TripleOscKnob( QWidget * _parent ) :
|
||||
knob( knobStyled, _parent )
|
||||
{
|
||||
setFixedSize( 28, 35 );
|
||||
@@ -418,9 +417,9 @@ public:
|
||||
// 82, 109
|
||||
|
||||
|
||||
tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
@@ -566,7 +565,7 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
"here.").arg( i+1 ) );
|
||||
|
||||
// setup panning-knob
|
||||
knob * pk = new tripleOscKnob( this );
|
||||
knob * pk = new TripleOscKnob( this );
|
||||
pk->move( 35, knob_y );
|
||||
pk->setHintText( tr("Osc %1 panning:").arg( i + 1 ) + " ", "" );
|
||||
pk->setWhatsThis(
|
||||
@@ -576,7 +575,7 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
"output right.").arg( i+1 ) );
|
||||
|
||||
// setup coarse-knob
|
||||
knob * ck = new tripleOscKnob( this );
|
||||
knob * ck = new TripleOscKnob( this );
|
||||
ck->move( 82, knob_y );
|
||||
ck->setHintText( tr( "Osc %1 coarse detuning:" ).arg( i + 1 ) +
|
||||
" ", " " + tr( "semitones" ) );
|
||||
@@ -589,7 +588,7 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
|
||||
|
||||
// setup knob for left fine-detuning
|
||||
knob * flk = new tripleOscKnob( this );
|
||||
knob * flk = new TripleOscKnob( this );
|
||||
flk->move( 111, knob_y );
|
||||
flk->setHintText( tr( "Osc %1 fine detuning left:" ).
|
||||
arg( i + 1 ) + " ",
|
||||
@@ -602,7 +601,7 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
"\"fat\" sounds." ).arg( i + 1 ) );
|
||||
|
||||
// setup knob for right fine-detuning
|
||||
knob * frk = new tripleOscKnob( this );
|
||||
knob * frk = new TripleOscKnob( this );
|
||||
frk->move( 140, knob_y );
|
||||
frk->setHintText( tr( "Osc %1 fine detuning right:" ).
|
||||
arg( i + 1 ) + " ",
|
||||
@@ -616,7 +615,7 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
|
||||
|
||||
// setup phase-offset-knob
|
||||
knob * pok = new tripleOscKnob( this );
|
||||
knob * pok = new TripleOscKnob( this );
|
||||
pok->move( 188, knob_y );
|
||||
pok->setHintText( tr( "Osc %1 phase-offset:" ).
|
||||
arg( i + 1 ) + " ",
|
||||
@@ -632,7 +631,7 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
).arg( i+1 ) );
|
||||
|
||||
// setup stereo-phase-detuning-knob
|
||||
knob * spdk = new tripleOscKnob( this );
|
||||
knob * spdk = new TripleOscKnob( this );
|
||||
spdk->move( 217, knob_y );
|
||||
spdk->setHintText( tr("Osc %1 stereo phase-detuning:" ).
|
||||
arg( i + 1 ) + " ",
|
||||
@@ -645,7 +644,6 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
"channel. This is very good for creating wide "
|
||||
"stereo sounds." ).arg( i+1 ) );
|
||||
|
||||
|
||||
int btn_y = 96 + i * osc_h;
|
||||
|
||||
pixmapButton * sin_wave_btn = new pixmapButton( this, NULL );
|
||||
@@ -741,25 +739,24 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
|
||||
wsbg->addButton( white_noise_btn );
|
||||
wsbg->addButton( uwb );
|
||||
|
||||
m_oscKnobs[i] = oscillatorKnobs( vk, pk, ck, flk, frk, pok,
|
||||
m_oscKnobs[i] = OscillatorKnobs( vk, pk, ck, flk, frk, pok,
|
||||
spdk, uwb, wsbg );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
tripleOscillatorView::~tripleOscillatorView()
|
||||
TripleOscillatorView::~TripleOscillatorView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void tripleOscillatorView::modelChanged( void )
|
||||
void TripleOscillatorView::modelChanged()
|
||||
{
|
||||
tripleOscillator * t = castModel<tripleOscillator>();
|
||||
TripleOscillator * t = castModel<TripleOscillator>();
|
||||
m_mod1BtnGrp->setModel( &t->m_osc[0]->m_modulationAlgoModel );
|
||||
m_mod2BtnGrp->setModel( &t->m_osc[1]->m_modulationAlgoModel );
|
||||
|
||||
@@ -794,14 +791,13 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new tripleOscillator(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
return new TripleOscillator( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#include "moc_triple_oscillator.cxx"
|
||||
#include "moc_TripleOscillator.cxx"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* triple_oscillator.h - declaration of class tripleOscillator a powerful
|
||||
* instrument-plugin with 3 oscillators
|
||||
* TripleOscillator.h - declaration of class TripleOscillator a powerful
|
||||
* instrument-plugin with 3 oscillators
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -26,11 +26,10 @@
|
||||
#ifndef _TRIPLE_OSCILLATOR_H
|
||||
#define _TRIPLE_OSCILLATOR_H
|
||||
|
||||
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "oscillator.h"
|
||||
#include "automatable_model.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "Oscillator.h"
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
|
||||
class automatableButtonGroup;
|
||||
@@ -42,24 +41,24 @@ class sampleBuffer;
|
||||
const int NUM_OF_OSCILLATORS = 3;
|
||||
|
||||
|
||||
class oscillatorObject : public model
|
||||
class OscillatorObject : public Model
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
oscillatorObject( model * _parent, int _idx );
|
||||
virtual ~oscillatorObject();
|
||||
OscillatorObject( Model * _parent, int _idx );
|
||||
virtual ~OscillatorObject();
|
||||
|
||||
|
||||
private:
|
||||
floatModel m_volumeModel;
|
||||
floatModel m_panModel;
|
||||
floatModel m_coarseModel;
|
||||
floatModel m_fineLeftModel;
|
||||
floatModel m_fineRightModel;
|
||||
floatModel m_phaseOffsetModel;
|
||||
floatModel m_stereoPhaseDetuningModel;
|
||||
intModel m_waveShapeModel;
|
||||
intModel m_modulationAlgoModel;
|
||||
FloatModel m_volumeModel;
|
||||
FloatModel m_panModel;
|
||||
FloatModel m_coarseModel;
|
||||
FloatModel m_fineLeftModel;
|
||||
FloatModel m_fineRightModel;
|
||||
FloatModel m_phaseOffsetModel;
|
||||
FloatModel m_stereoPhaseDetuningModel;
|
||||
IntModel m_waveShapeModel;
|
||||
IntModel m_modulationAlgoModel;
|
||||
sampleBuffer * m_sampleBuffer;
|
||||
|
||||
float m_volumeLeft;
|
||||
@@ -72,30 +71,30 @@ private:
|
||||
float m_phaseOffsetLeft;
|
||||
float m_phaseOffsetRight;
|
||||
|
||||
friend class tripleOscillator;
|
||||
friend class tripleOscillatorView;
|
||||
friend class TripleOscillator;
|
||||
friend class TripleOscillatorView;
|
||||
|
||||
|
||||
private slots:
|
||||
void oscUserDefWaveDblClick( void );
|
||||
void oscUserDefWaveDblClick();
|
||||
|
||||
void updateVolume( void );
|
||||
void updateDetuningLeft( void );
|
||||
void updateDetuningRight( void );
|
||||
void updatePhaseOffsetLeft( void );
|
||||
void updatePhaseOffsetRight( void );
|
||||
void updateVolume();
|
||||
void updateDetuningLeft();
|
||||
void updateDetuningRight();
|
||||
void updatePhaseOffsetLeft();
|
||||
void updatePhaseOffsetRight();
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
class tripleOscillator : public instrument
|
||||
class TripleOscillator : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tripleOscillator( instrumentTrack * _track );
|
||||
virtual ~tripleOscillator();
|
||||
TripleOscillator( InstrumentTrack * _track );
|
||||
virtual ~TripleOscillator();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
sampleFrame * _working_buffer );
|
||||
@@ -105,55 +104,55 @@ public:
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
virtual QString nodeName( void ) const;
|
||||
virtual QString nodeName() const;
|
||||
|
||||
virtual f_cnt_t desiredReleaseFrames( void ) const
|
||||
virtual f_cnt_t desiredReleaseFrames() const
|
||||
{
|
||||
return( 128 );
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
protected slots:
|
||||
void updateAllDetuning( void );
|
||||
void updateAllDetuning();
|
||||
|
||||
|
||||
private:
|
||||
instrumentTrack * m_instrumentTrack;
|
||||
InstrumentTrack * m_InstrumentTrack;
|
||||
|
||||
oscillatorObject * m_osc[NUM_OF_OSCILLATORS];
|
||||
OscillatorObject * m_osc[NUM_OF_OSCILLATORS];
|
||||
|
||||
struct oscPtr
|
||||
{
|
||||
oscillator * oscLeft;
|
||||
oscillator * oscRight;
|
||||
Oscillator * oscLeft;
|
||||
Oscillator * oscRight;
|
||||
} ;
|
||||
|
||||
|
||||
friend class tripleOscillatorView;
|
||||
friend class TripleOscillatorView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class tripleOscillatorView : public instrumentView
|
||||
class TripleOscillatorView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tripleOscillatorView( instrument * _instrument, QWidget * _parent );
|
||||
virtual ~tripleOscillatorView();
|
||||
TripleOscillatorView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~TripleOscillatorView();
|
||||
|
||||
|
||||
private:
|
||||
virtual void modelChanged( void );
|
||||
virtual void modelChanged();
|
||||
|
||||
automatableButtonGroup * m_mod1BtnGrp;
|
||||
automatableButtonGroup * m_mod2BtnGrp;
|
||||
|
||||
struct oscillatorKnobs
|
||||
struct OscillatorKnobs
|
||||
{
|
||||
oscillatorKnobs( knob * v,
|
||||
OscillatorKnobs( knob * v,
|
||||
knob * p,
|
||||
knob * c,
|
||||
knob * fl,
|
||||
@@ -173,7 +172,7 @@ private:
|
||||
m_waveShapeBtnGrp( wsbg )
|
||||
{
|
||||
}
|
||||
oscillatorKnobs()
|
||||
OscillatorKnobs()
|
||||
{
|
||||
}
|
||||
knob * m_volKnob;
|
||||
@@ -188,7 +187,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
oscillatorKnobs m_oscKnobs[NUM_OF_OSCILLATORS];
|
||||
OscillatorKnobs m_oscKnobs[NUM_OF_OSCILLATORS];
|
||||
} ;
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
#include "engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "instrument_play_handle.h"
|
||||
#include "instrument_track.h"
|
||||
#include "vst_plugin.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "VstPlugin.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "text_float.h"
|
||||
@@ -47,7 +47,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor vestige_plugin_descriptor =
|
||||
Plugin::Descriptor vestige_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"VeSTige",
|
||||
@@ -55,8 +55,8 @@ plugin::descriptor vestige_plugin_descriptor =
|
||||
"VST-host for using VST(i)-plugins within LMMS" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"dll",
|
||||
NULL
|
||||
} ;
|
||||
@@ -64,16 +64,16 @@ plugin::descriptor vestige_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
QPixmap * vestigeInstrumentView::s_artwork = NULL;
|
||||
QPixmap * VestigeInstrumentView::s_artwork = NULL;
|
||||
|
||||
|
||||
vestigeInstrument::vestigeInstrument( instrumentTrack * _instrument_track ) :
|
||||
instrument( _instrument_track, &vestige_plugin_descriptor ),
|
||||
vestigeInstrument::vestigeInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &vestige_plugin_descriptor ),
|
||||
m_plugin( NULL ),
|
||||
m_pluginMutex()
|
||||
{
|
||||
// now we need a play-handle which cares for calling play()
|
||||
instrumentPlayHandle * iph = new instrumentPlayHandle( this );
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
|
||||
engine::getMixer()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ vestigeInstrument::vestigeInstrument( instrumentTrack * _instrument_track ) :
|
||||
|
||||
vestigeInstrument::~vestigeInstrument()
|
||||
{
|
||||
engine::getMixer()->removePlayHandles( getInstrumentTrack() );
|
||||
engine::getMixer()->removePlayHandles( instrumentTrack() );
|
||||
closePlugin();
|
||||
}
|
||||
|
||||
@@ -129,9 +129,9 @@ void vestigeInstrument::loadFile( const QString & _file )
|
||||
{
|
||||
m_pluginMutex.lock();
|
||||
const bool set_ch_name = ( m_plugin != NULL &&
|
||||
getInstrumentTrack()->name() == m_plugin->name() ) ||
|
||||
getInstrumentTrack()->name() ==
|
||||
instrumentTrack::tr( "Default preset" );
|
||||
instrumentTrack()->name() == m_plugin->name() ) ||
|
||||
instrumentTrack()->name() ==
|
||||
InstrumentTrack::tr( "Default preset" );
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
closePlugin();
|
||||
@@ -143,7 +143,7 @@ void vestigeInstrument::loadFile( const QString & _file )
|
||||
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
|
||||
|
||||
m_pluginMutex.lock();
|
||||
m_plugin = new vstPlugin( m_pluginDLL );
|
||||
m_plugin = new VstPlugin( m_pluginDLL );
|
||||
if( m_plugin->failed() )
|
||||
{
|
||||
m_pluginMutex.unlock();
|
||||
@@ -165,7 +165,7 @@ void vestigeInstrument::loadFile( const QString & _file )
|
||||
|
||||
if( set_ch_name )
|
||||
{
|
||||
getInstrumentTrack()->setName( m_plugin->name() );
|
||||
instrumentTrack()->setName( m_plugin->name() );
|
||||
}
|
||||
|
||||
m_pluginMutex.unlock();
|
||||
@@ -191,7 +191,7 @@ void vestigeInstrument::play( sampleFrame * _buf )
|
||||
|
||||
const fpp_t frames = engine::getMixer()->framesPerPeriod();
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _buf, frames, NULL );
|
||||
instrumentTrack()->processAudioBuffer( _buf, frames, NULL );
|
||||
|
||||
m_pluginMutex.unlock();
|
||||
}
|
||||
@@ -228,9 +228,9 @@ void vestigeInstrument::closePlugin( void )
|
||||
|
||||
|
||||
|
||||
pluginView * vestigeInstrument::instantiateView( QWidget * _parent )
|
||||
PluginView * vestigeInstrument::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new vestigeInstrumentView( this, _parent ) );
|
||||
return new VestigeInstrumentView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
@@ -241,9 +241,9 @@ pluginView * vestigeInstrument::instantiateView( QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
vestigeInstrumentView::vestigeInstrumentView( instrument * _instrument,
|
||||
VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
if( s_artwork == NULL )
|
||||
{
|
||||
@@ -292,14 +292,14 @@ vestigeInstrumentView::vestigeInstrumentView( instrument * _instrument,
|
||||
|
||||
|
||||
|
||||
vestigeInstrumentView::~vestigeInstrumentView()
|
||||
VestigeInstrumentView::~VestigeInstrumentView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void vestigeInstrumentView::modelChanged( void )
|
||||
void VestigeInstrumentView::modelChanged( void )
|
||||
{
|
||||
m_vi = castModel<vestigeInstrument>();
|
||||
}
|
||||
@@ -307,7 +307,7 @@ void vestigeInstrumentView::modelChanged( void )
|
||||
|
||||
|
||||
|
||||
void vestigeInstrumentView::openPlugin( void )
|
||||
void VestigeInstrumentView::openPlugin( void )
|
||||
{
|
||||
QFileDialog ofd( NULL, tr( "Open VST-plugin" ) );
|
||||
|
||||
@@ -351,7 +351,7 @@ void vestigeInstrumentView::openPlugin( void )
|
||||
|
||||
|
||||
|
||||
void vestigeInstrumentView::toggleGUI( void )
|
||||
void VestigeInstrumentView::toggleGUI( void )
|
||||
{
|
||||
QMutexLocker ml( &m_vi->m_pluginMutex );
|
||||
if( m_vi->m_plugin == NULL )
|
||||
@@ -376,7 +376,7 @@ void vestigeInstrumentView::toggleGUI( void )
|
||||
|
||||
|
||||
|
||||
void vestigeInstrumentView::noteOffAll( void )
|
||||
void VestigeInstrumentView::noteOffAll( void )
|
||||
{
|
||||
m_vi->m_pluginMutex.lock();
|
||||
if( m_vi->m_plugin != NULL )
|
||||
@@ -393,7 +393,7 @@ void vestigeInstrumentView::noteOffAll( void )
|
||||
|
||||
|
||||
|
||||
void vestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
void VestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
|
||||
{
|
||||
@@ -417,7 +417,7 @@ void vestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
|
||||
|
||||
|
||||
void vestigeInstrumentView::dropEvent( QDropEvent * _de )
|
||||
void VestigeInstrumentView::dropEvent( QDropEvent * _de )
|
||||
{
|
||||
QString type = stringPairDrag::decodeKey( _de );
|
||||
QString value = stringPairDrag::decodeValue( _de );
|
||||
@@ -433,7 +433,7 @@ void vestigeInstrumentView::dropEvent( QDropEvent * _de )
|
||||
|
||||
|
||||
|
||||
void vestigeInstrumentView::paintEvent( QPaintEvent * )
|
||||
void VestigeInstrumentView::paintEvent( QPaintEvent * )
|
||||
{
|
||||
QPainter p( this );
|
||||
|
||||
@@ -474,9 +474,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( model *, void * _data )
|
||||
Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new vestigeInstrument( static_cast<instrumentTrack *>( _data ) ) );
|
||||
return new vestigeInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,9 +29,8 @@
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "midi.h"
|
||||
#include "note.h"
|
||||
|
||||
@@ -40,14 +39,14 @@ class QPixmap;
|
||||
class QPushButton;
|
||||
|
||||
class pixmapButton;
|
||||
class vstPlugin;
|
||||
class VstPlugin;
|
||||
|
||||
|
||||
class vestigeInstrument : public instrument
|
||||
class vestigeInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
vestigeInstrument( instrumentTrack * _channel_track );
|
||||
vestigeInstrument( InstrumentTrack * _instrument_track );
|
||||
virtual ~vestigeInstrument();
|
||||
|
||||
virtual void play( sampleFrame * _working_buffer );
|
||||
@@ -67,7 +66,7 @@ public:
|
||||
virtual bool handleMidiEvent( const midiEvent & _me,
|
||||
const midiTime & _time );
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
private:
|
||||
@@ -76,24 +75,24 @@ private:
|
||||
int m_runningNotes[NumKeys];
|
||||
|
||||
|
||||
vstPlugin * m_plugin;
|
||||
VstPlugin * m_plugin;
|
||||
QMutex m_pluginMutex;
|
||||
|
||||
QString m_pluginDLL;
|
||||
|
||||
|
||||
friend class vestigeInstrumentView;
|
||||
friend class VestigeInstrumentView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class vestigeInstrumentView : public instrumentView
|
||||
class VestigeInstrumentView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
vestigeInstrumentView( instrument * _instrument, QWidget * _parent );
|
||||
virtual ~vestigeInstrumentView();
|
||||
VestigeInstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~VestigeInstrumentView();
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
@@ -54,7 +54,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on,
|
||||
Uint32 _x, Uint32 _y,
|
||||
QWidget * _parent ):
|
||||
QWidget( _parent ),
|
||||
intModelView( new nineButtonSelectorModel(0, 8, _default, NULL,
|
||||
IntModelView( new nineButtonSelectorModel(0, 8, _default, NULL,
|
||||
QString::null, TRUE ), this )
|
||||
{
|
||||
setFixedSize( 50, 50 );
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "pixmap_button.h"
|
||||
|
||||
|
||||
class nineButtonSelector: public QWidget , public intModelView
|
||||
class nineButtonSelector: public QWidget , public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -91,6 +91,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
typedef intModel nineButtonSelectorModel;
|
||||
typedef IntModel nineButtonSelectorModel;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* vibed.cpp - combination of PluckedStringSynth and BitInvader
|
||||
*
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/yahoo/com>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
#include "vibed.h"
|
||||
#include "engine.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "tooltip.h"
|
||||
#include "base64.h"
|
||||
#include "caption_menu.h"
|
||||
#include "oscillator.h"
|
||||
#include "Oscillator.h"
|
||||
#include "string_container.h"
|
||||
#include "templates.h"
|
||||
#include "volume.h"
|
||||
@@ -45,7 +45,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT vibedstrings_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT vibedstrings_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"Vibed",
|
||||
@@ -53,8 +53,8 @@ plugin::descriptor PLUGIN_EXPORT vibedstrings_plugin_descriptor =
|
||||
"Vibrating string modeler" ),
|
||||
"Danny McRae <khjklujn/at/yahoo/com>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
@@ -62,54 +62,54 @@ plugin::descriptor PLUGIN_EXPORT vibedstrings_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
vibed::vibed( instrumentTrack * instrument_track ) :
|
||||
instrument( instrument_track, &vibedstrings_plugin_descriptor )
|
||||
vibed::vibed( InstrumentTrack * _instrumentTrack ) :
|
||||
Instrument( _instrumentTrack, &vibedstrings_plugin_descriptor )
|
||||
{
|
||||
|
||||
knobModel * knob;
|
||||
boolModel * led;
|
||||
FloatModel * knob;
|
||||
BoolModel * led;
|
||||
nineButtonSelectorModel * harmonic;
|
||||
graphModel * graphTmp;
|
||||
|
||||
for( Uint8 harm = 0; harm < 9; harm++ )
|
||||
{
|
||||
knob = new knobModel( DefaultVolume, MinVolume, MaxVolume,
|
||||
knob = new FloatModel( DefaultVolume, MinVolume, MaxVolume,
|
||||
1.0f, this, tr( "String %1 volume" ).arg( harm+1 ) );
|
||||
m_volumeKnobs.append( knob );
|
||||
|
||||
knob = new knobModel( 0.0f, 0.0f, 0.05f, 0.001f, this,
|
||||
knob = new FloatModel( 0.0f, 0.0f, 0.05f, 0.001f, this,
|
||||
tr( "String %1 stiffness" ).arg( harm+1 ) );
|
||||
m_stiffnessKnobs.append( knob );
|
||||
|
||||
knob = new knobModel( 0.0f, 0.0f, 0.05f, 0.005f, this,
|
||||
knob = new FloatModel( 0.0f, 0.0f, 0.05f, 0.005f, this,
|
||||
tr( "Pick %1 position" ).arg( harm+1 ) );
|
||||
m_pickKnobs.append( knob );
|
||||
|
||||
knob = new knobModel( 0.05f, 0.0f, 0.05f, 0.005f, this,
|
||||
knob = new FloatModel( 0.05f, 0.0f, 0.05f, 0.005f, this,
|
||||
tr( "Pickup %1 position" ).arg( harm+1 ) );
|
||||
m_pickupKnobs.append( knob );
|
||||
|
||||
knob = new knobModel( 0.0f, -1.0f, 1.0f, 0.01f, this,
|
||||
knob = new FloatModel( 0.0f, -1.0f, 1.0f, 0.01f, this,
|
||||
tr( "Pan %1" ).arg( harm+1 ) );
|
||||
m_panKnobs.append( knob );
|
||||
|
||||
knob = new knobModel( 0.0f, -0.1f, 0.1f, 0.001f, this,
|
||||
knob = new FloatModel( 0.0f, -0.1f, 0.1f, 0.001f, this,
|
||||
tr( "Detune %1" ).arg( harm+1 ) );
|
||||
m_detuneKnobs.append( knob );
|
||||
|
||||
knob = new knobModel( 0.0f, 0.0f, 0.75f, 0.01f, this,
|
||||
knob = new FloatModel( 0.0f, 0.0f, 0.75f, 0.01f, this,
|
||||
tr( "Fuzziness %1 " ).arg( harm+1 ) );
|
||||
m_randomKnobs.append( knob );
|
||||
|
||||
knob = new knobModel( 1, 1, 16, 1, this,
|
||||
knob = new FloatModel( 1, 1, 16, 1, this,
|
||||
tr( "Length %1" ).arg( harm+1 ) );
|
||||
m_lengthKnobs.append( knob );
|
||||
|
||||
led = new boolModel( FALSE, this,
|
||||
led = new BoolModel( FALSE, this,
|
||||
tr( "Impulse %1" ).arg( harm+1 ) );
|
||||
m_impulses.append( led );
|
||||
|
||||
led = new boolModel( harm==0, this,
|
||||
led = new BoolModel( harm==0, this,
|
||||
tr( "Octave %1" ).arg( harm+1 ) );
|
||||
m_powerButtons.append( led );
|
||||
|
||||
@@ -182,11 +182,11 @@ void vibed::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
QString sampleString;
|
||||
base64::encode(
|
||||
(const char *)m_graphs[i]->samples(),
|
||||
__sampleLength * sizeof(float),
|
||||
(const char *)m_graphs[i]->samples(),
|
||||
__sampleLength * sizeof(float),
|
||||
sampleString );
|
||||
name = "graph" + QString::number( i );
|
||||
_this.setAttribute( name, sampleString );
|
||||
_this.setAttribute( name, sampleString );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ void vibed::loadSettings( const QDomElement & _this )
|
||||
name = "active" + QString::number( i );
|
||||
m_powerButtons[i]->setValue( _this.attribute( name ).toInt() );
|
||||
|
||||
if( m_powerButtons[i]->value() &&
|
||||
if( m_powerButtons[i]->value() &&
|
||||
_this.hasAttribute( "volume" + QString::number( i ) ) )
|
||||
{
|
||||
name = "volume" + QString::number( i );
|
||||
@@ -258,7 +258,7 @@ void vibed::loadSettings( const QDomElement & _this )
|
||||
}
|
||||
}
|
||||
|
||||
// update();
|
||||
// update();
|
||||
}
|
||||
|
||||
|
||||
@@ -315,7 +315,7 @@ void vibed::playNote( notePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
if( ps->exists( string ) )
|
||||
{
|
||||
// pan: 0 -> left, 1 -> right
|
||||
const float pan = (
|
||||
const float pan = (
|
||||
m_panKnobs[string]->value() + 1 ) /
|
||||
2.0f;
|
||||
const sample_t sample =
|
||||
@@ -328,7 +328,7 @@ void vibed::playNote( notePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
}
|
||||
}
|
||||
|
||||
getInstrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, _n );
|
||||
}
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ void vibed::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
|
||||
|
||||
pluginView * vibed::instantiateView( QWidget * _parent )
|
||||
PluginView * vibed::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new vibedView( this, _parent ) );
|
||||
}
|
||||
@@ -351,9 +351,9 @@ pluginView * vibed::instantiateView( QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
vibedView::vibedView( instrument * _instrument,
|
||||
vibedView::vibedView( Instrument * _instrument,
|
||||
QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
@@ -370,9 +370,9 @@ vibedView::vibedView( instrument * _instrument,
|
||||
|
||||
m_stiffnessKnob = new knob( knobBright_26, this );
|
||||
m_stiffnessKnob->move( 129, 142 );
|
||||
m_stiffnessKnob->setHintText( tr( "String stiffness:" ) +
|
||||
m_stiffnessKnob->setHintText( tr( "String stiffness:" ) +
|
||||
" ", "" );
|
||||
m_stiffnessKnob->setWhatsThis( tr(
|
||||
m_stiffnessKnob->setWhatsThis( tr(
|
||||
"The 'S' knob sets the stiffness of the selected string. The stiffness "
|
||||
"of the string affects how long the string will ring out. The lower "
|
||||
"the setting, the longer the string will ring." ) );
|
||||
@@ -381,15 +381,15 @@ vibedView::vibedView( instrument * _instrument,
|
||||
m_pickKnob = new knob( knobBright_26, this );
|
||||
m_pickKnob->move( 153, 142 );
|
||||
m_pickKnob->setHintText( tr( "Pick position:" ) + " ", "" );
|
||||
m_pickKnob->setWhatsThis( tr(
|
||||
m_pickKnob->setWhatsThis( tr(
|
||||
"The 'P' knob sets the position where the selected string will be 'picked'. "
|
||||
"The lower the setting the closer the pick is to the bridge." ) );
|
||||
|
||||
m_pickupKnob = new knob( knobBright_26, this );
|
||||
m_pickupKnob->move( 177, 142 );
|
||||
m_pickupKnob->setHintText( tr( "Pickup position:" ) +
|
||||
m_pickupKnob->setHintText( tr( "Pickup position:" ) +
|
||||
" ", "" );
|
||||
m_pickupKnob->setWhatsThis( tr(
|
||||
m_pickupKnob->setWhatsThis( tr(
|
||||
"The 'PU' knob sets the position where the vibrations will be monitored "
|
||||
"for the selected string. The lower the setting, the closer the "
|
||||
"pickup is to the bridge." ) );
|
||||
@@ -397,32 +397,32 @@ vibedView::vibedView( instrument * _instrument,
|
||||
m_panKnob = new knob( knobBright_26, this );
|
||||
m_panKnob->move( 105, 187 );
|
||||
m_panKnob->setHintText( tr( "Pan:" ) + " ", "" );
|
||||
m_panKnob->setWhatsThis( tr(
|
||||
m_panKnob->setWhatsThis( tr(
|
||||
"The Pan knob determines the location of the selected string in the stereo "
|
||||
"field." ) );
|
||||
|
||||
m_detuneKnob = new knob( knobBright_26, this );
|
||||
m_detuneKnob->move( 150, 187 );
|
||||
m_detuneKnob->setHintText( tr( "Detune:" ) + " ", "" );
|
||||
m_detuneKnob->setWhatsThis( tr(
|
||||
m_detuneKnob->setWhatsThis( tr(
|
||||
"The Detune knob modifies the pitch of the selected string. Settings less "
|
||||
"than zero will cause the string to sound flat. Settings greater than zero "
|
||||
"will cause the string to sound sharp." ) );
|
||||
|
||||
m_randomKnob = new knob( knobBright_26, this );
|
||||
m_randomKnob->move( 194, 187 );
|
||||
m_randomKnob->setHintText( tr( "Fuzziness:" ) +
|
||||
m_randomKnob->setHintText( tr( "Fuzziness:" ) +
|
||||
" ", "" );
|
||||
m_randomKnob->setWhatsThis( tr(
|
||||
m_randomKnob->setWhatsThis( tr(
|
||||
"The Slap knob adds a bit of fuzz to the selected string which is most "
|
||||
"apparent during the attack, though it can also be used to make the string "
|
||||
"sound more 'metallic'.") );
|
||||
|
||||
m_lengthKnob = new knob( knobBright_26, this );
|
||||
m_lengthKnob->move( 23, 193 );
|
||||
m_lengthKnob->setHintText( tr( "Length:" ) +
|
||||
m_lengthKnob->setHintText( tr( "Length:" ) +
|
||||
" ", "" );
|
||||
m_lengthKnob->setWhatsThis( tr(
|
||||
m_lengthKnob->setWhatsThis( tr(
|
||||
"The Length knob sets the length of the selected string. Longer strings "
|
||||
"will both ring longer and sound brighter, however, they will also eat up "
|
||||
"more CPU cycles." ) );
|
||||
@@ -431,7 +431,7 @@ vibedView::vibedView( instrument * _instrument,
|
||||
m_impulse->move( 23, 94 );
|
||||
toolTip::add( m_impulse,
|
||||
tr( "Impulse or initial state" ) );
|
||||
m_impulse->setWhatsThis( tr(
|
||||
m_impulse->setWhatsThis( tr(
|
||||
"The 'Imp' selector determines whether the waveform in the graph is to be "
|
||||
"treated as an impulse imparted to the string by the pick or the initial "
|
||||
"state of the string." ) );
|
||||
@@ -460,7 +460,7 @@ vibedView::vibedView( instrument * _instrument,
|
||||
this );
|
||||
|
||||
m_harmonic->setAccessibleName( tr( "Octave" ) );
|
||||
m_harmonic->setWhatsThis( tr(
|
||||
m_harmonic->setWhatsThis( tr(
|
||||
"The Octave selector is used to choose which harmonic of the note the "
|
||||
"string will ring at. For example, '-2' means the string will ring two "
|
||||
"octaves below the fundamental, 'F' means the string will ring at the "
|
||||
@@ -497,7 +497,7 @@ vibedView::vibedView( instrument * _instrument,
|
||||
m_graph->move( 76, 21 );
|
||||
m_graph->resize(132, 104);
|
||||
|
||||
m_graph->setWhatsThis( tr(
|
||||
m_graph->setWhatsThis( tr(
|
||||
"The waveform editor provides control over the initial state or impulse "
|
||||
"that is used to start the string vibrating. The buttons to the right of "
|
||||
"the graph will initialize the waveform to the selected type. The '?' "
|
||||
@@ -511,7 +511,7 @@ vibedView::vibedView( instrument * _instrument,
|
||||
"The 'N' button will normalize the waveform.") );
|
||||
|
||||
|
||||
setWhatsThis( tr(
|
||||
setWhatsThis( tr(
|
||||
"Vibed models up to nine independently vibrating strings. The 'String' "
|
||||
"selector allows you to choose which string is being edited. The 'Imp' " "selector chooses whether the graph represents an impulse or the initial "
|
||||
"state of the string. The 'Octave' selector chooses which harmonic the "
|
||||
@@ -541,7 +541,7 @@ vibedView::vibedView( instrument * _instrument,
|
||||
|
||||
// String selector is not a part of the model
|
||||
m_stringSelector->setAccessibleName( tr( "String" ) );
|
||||
m_stringSelector->setWhatsThis( tr(
|
||||
m_stringSelector->setWhatsThis( tr(
|
||||
"The String selector is used to choose which string the controls are "
|
||||
"editting. A Vibed instrument can contain up to nine independently "
|
||||
"vibrating strings. The LED in the lower right corner of the "
|
||||
@@ -780,9 +780,9 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new vibed( static_cast<instrumentTrack *>( _data ) ) );
|
||||
return( new vibed( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#ifndef _VIBED_H
|
||||
#define _VIBED_H
|
||||
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "graph.h"
|
||||
#include "knob.h"
|
||||
@@ -36,11 +36,11 @@
|
||||
class vibedView;
|
||||
class notePlayHandle;
|
||||
|
||||
class vibed : public instrument
|
||||
class vibed : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
vibed( instrumentTrack * _instrument_track );
|
||||
vibed( InstrumentTrack * _instrument_track );
|
||||
virtual ~vibed();
|
||||
|
||||
virtual void playNote( notePlayHandle * _n,
|
||||
@@ -58,21 +58,21 @@ public:
|
||||
return( false );
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
private:
|
||||
QList<knobModel*> m_pickKnobs;
|
||||
QList<knobModel*> m_pickupKnobs;
|
||||
QList<knobModel*> m_stiffnessKnobs;
|
||||
QList<knobModel*> m_volumeKnobs;
|
||||
QList<knobModel*> m_panKnobs;
|
||||
QList<knobModel*> m_detuneKnobs;
|
||||
QList<knobModel*> m_randomKnobs;
|
||||
QList<knobModel*> m_lengthKnobs;
|
||||
QList<boolModel*> m_powerButtons;
|
||||
QList<FloatModel*> m_pickKnobs;
|
||||
QList<FloatModel*> m_pickupKnobs;
|
||||
QList<FloatModel*> m_stiffnessKnobs;
|
||||
QList<FloatModel*> m_volumeKnobs;
|
||||
QList<FloatModel*> m_panKnobs;
|
||||
QList<FloatModel*> m_detuneKnobs;
|
||||
QList<FloatModel*> m_randomKnobs;
|
||||
QList<FloatModel*> m_lengthKnobs;
|
||||
QList<BoolModel*> m_powerButtons;
|
||||
QList<graphModel*> m_graphs;
|
||||
QList<boolModel*> m_impulses;
|
||||
QList<BoolModel*> m_impulses;
|
||||
QList<nineButtonSelectorModel*> m_harmonics;
|
||||
|
||||
static const int __sampleLength = 128;
|
||||
@@ -82,11 +82,11 @@ private:
|
||||
|
||||
|
||||
|
||||
class vibedView : public instrumentView
|
||||
class vibedView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
vibedView( instrument * _instrument,
|
||||
vibedView( Instrument * _instrument,
|
||||
QWidget * _parent );
|
||||
virtual ~vibedView() {};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ IF(LMMS_SUPPORT_VST)
|
||||
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
BUILD_PLUGIN(vstbase vst_base.cpp vst_plugin.cpp vst_plugin.h communication.h MOCFILES vst_plugin.h)
|
||||
BUILD_PLUGIN(vstbase vst_base.cpp VstPlugin.cpp VstPlugin.h communication.h MOCFILES VstPlugin.h)
|
||||
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* vst_plugin.cpp - implementation of vstPlugin class
|
||||
* VstPlugin.cpp - implementation of VstPlugin class
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -22,8 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "vst_plugin.h"
|
||||
#include "VstPlugin.h"
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
@@ -40,15 +39,13 @@
|
||||
#endif
|
||||
#include <QtXml/QDomDocument>
|
||||
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "config_mgr.h"
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
#include "MainWindow.h"
|
||||
#include "song.h"
|
||||
#include "templates.h"
|
||||
|
||||
@@ -78,17 +75,17 @@ public:
|
||||
|
||||
|
||||
|
||||
vstPlugin::vstPlugin( const QString & _plugin ) :
|
||||
VstPlugin::VstPlugin( const QString & _plugin ) :
|
||||
QObject(),
|
||||
journallingObject(),
|
||||
remotePlugin( "remote_vst_plugin", false ),
|
||||
JournallingObject(),
|
||||
RemotePlugin( "remote_vst_plugin", false ),
|
||||
m_plugin( _plugin ),
|
||||
m_pluginWidget( NULL ),
|
||||
m_pluginWindowID( 0 ),
|
||||
m_name( "" ),
|
||||
m_name(),
|
||||
m_version( 0 ),
|
||||
m_vendorString( "" ),
|
||||
m_productString( "" )
|
||||
m_vendorString(),
|
||||
m_productString()
|
||||
{
|
||||
setSplittedChannels( true );
|
||||
|
||||
@@ -145,7 +142,7 @@ vstPlugin::vstPlugin( const QString & _plugin ) :
|
||||
{
|
||||
target->setFixedSize( m_pluginGeometry );
|
||||
vstSubWin * sw = new vstSubWin(
|
||||
engine::getMainWindow()->workspace() );
|
||||
engine::mainWindow()->workspace() );
|
||||
sw->setWidget( helper );
|
||||
helper->setWindowTitle( name() );
|
||||
m_pluginWidget = helper;
|
||||
@@ -167,14 +164,14 @@ vstPlugin::vstPlugin( const QString & _plugin ) :
|
||||
|
||||
|
||||
|
||||
vstPlugin::~vstPlugin()
|
||||
VstPlugin::~VstPlugin()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void vstPlugin::showEditor( QWidget * _parent )
|
||||
void VstPlugin::showEditor( QWidget * _parent )
|
||||
{
|
||||
QWidget * w = pluginWidget();
|
||||
if( w )
|
||||
@@ -195,7 +192,7 @@ void vstPlugin::showEditor( QWidget * _parent )
|
||||
if( _parent == NULL )
|
||||
{
|
||||
vstSubWin * sw = new vstSubWin(
|
||||
engine::getMainWindow()->workspace() );
|
||||
engine::mainWindow()->workspace() );
|
||||
sw->setWidget( m_pluginWidget );
|
||||
}
|
||||
|
||||
@@ -214,7 +211,7 @@ void vstPlugin::showEditor( QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
void vstPlugin::hideEditor( void )
|
||||
void VstPlugin::hideEditor()
|
||||
{
|
||||
QWidget * w = pluginWidget();
|
||||
if( w )
|
||||
@@ -226,7 +223,7 @@ void vstPlugin::hideEditor( void )
|
||||
|
||||
|
||||
|
||||
void vstPlugin::loadSettings( const QDomElement & _this )
|
||||
void VstPlugin::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
if( pluginWidget() != NULL )
|
||||
{
|
||||
@@ -265,7 +262,7 @@ void vstPlugin::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void vstPlugin::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void VstPlugin::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
if( pluginWidget() != NULL )
|
||||
{
|
||||
@@ -295,7 +292,7 @@ void vstPlugin::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void vstPlugin::setTempo( bpm_t _bpm )
|
||||
void VstPlugin::setTempo( bpm_t _bpm )
|
||||
{
|
||||
lock();
|
||||
sendMessage( message( IdVstSetTempo ).addInt( _bpm ) );
|
||||
@@ -305,7 +302,7 @@ void vstPlugin::setTempo( bpm_t _bpm )
|
||||
|
||||
|
||||
|
||||
void vstPlugin::updateSampleRate( void )
|
||||
void VstPlugin::updateSampleRate()
|
||||
{
|
||||
lock();
|
||||
sendMessage( message( IdSampleRateInformation ).
|
||||
@@ -316,7 +313,7 @@ void vstPlugin::updateSampleRate( void )
|
||||
|
||||
|
||||
|
||||
const QMap<QString, QString> & vstPlugin::parameterDump( void )
|
||||
const QMap<QString, QString> & VstPlugin::parameterDump()
|
||||
{
|
||||
lock();
|
||||
sendMessage( IdVstGetParameterDump );
|
||||
@@ -329,14 +326,14 @@ const QMap<QString, QString> & vstPlugin::parameterDump( void )
|
||||
|
||||
|
||||
|
||||
void vstPlugin::setParameterDump( const QMap<QString, QString> & _pdump )
|
||||
void VstPlugin::setParameterDump( const QMap<QString, QString> & _pdump )
|
||||
{
|
||||
message m( IdVstSetParameterDump );
|
||||
m.addInt( _pdump.size() );
|
||||
for( QMap<QString, QString>::const_iterator it = _pdump.begin();
|
||||
for( QMap<QString, QString>::ConstIterator it = _pdump.begin();
|
||||
it != _pdump.end(); ++it )
|
||||
{
|
||||
const vstParameterDumpItem item =
|
||||
const VstParameterDumpItem item =
|
||||
{
|
||||
( *it ).section( ':', 0, 0 ).toInt(),
|
||||
"",
|
||||
@@ -354,7 +351,7 @@ void vstPlugin::setParameterDump( const QMap<QString, QString> & _pdump )
|
||||
|
||||
|
||||
|
||||
bool vstPlugin::processMessage( const message & _m )
|
||||
bool VstPlugin::processMessage( const message & _m )
|
||||
{
|
||||
switch( _m.id )
|
||||
{
|
||||
@@ -395,7 +392,7 @@ bool vstPlugin::processMessage( const message & _m )
|
||||
int p = 0;
|
||||
for( int i = 0; i < num_params; ++i )
|
||||
{
|
||||
vstParameterDumpItem item;
|
||||
VstParameterDumpItem item;
|
||||
item.index = _m.getInt( ++p );
|
||||
item.shortLabel = _m.getString( ++p );
|
||||
item.value = _m.getFloat( ++p );
|
||||
@@ -407,7 +404,7 @@ bool vstPlugin::processMessage( const message & _m )
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return remotePlugin::processMessage( _m );
|
||||
return RemotePlugin::processMessage( _m );
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -416,7 +413,7 @@ bool vstPlugin::processMessage( const message & _m )
|
||||
|
||||
|
||||
|
||||
void vstPlugin::loadChunk( const QByteArray & _chunk )
|
||||
void VstPlugin::loadChunk( const QByteArray & _chunk )
|
||||
{
|
||||
QTemporaryFile tf;
|
||||
if( tf.open() )
|
||||
@@ -436,7 +433,7 @@ void vstPlugin::loadChunk( const QByteArray & _chunk )
|
||||
|
||||
|
||||
|
||||
QByteArray vstPlugin::saveChunk( void )
|
||||
QByteArray VstPlugin::saveChunk()
|
||||
{
|
||||
QByteArray a;
|
||||
QTemporaryFile tf;
|
||||
@@ -456,5 +453,5 @@ QByteArray vstPlugin::saveChunk( void )
|
||||
}
|
||||
|
||||
|
||||
#include "moc_vst_plugin.cxx"
|
||||
#include "moc_VstPlugin.cxx"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* vst_plugin.h - declaration of vstPlugin class
|
||||
* VstPlugin.h - declaration of VstPlugin class
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _VST_PLUGIN_H
|
||||
#define _VST_PLUGIN_H
|
||||
|
||||
@@ -31,51 +30,49 @@
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "mixer.h"
|
||||
#include "journalling_object.h"
|
||||
#include "JournallingObject.h"
|
||||
#include "communication.h"
|
||||
#include "remote_plugin.h"
|
||||
|
||||
|
||||
|
||||
class PLUGIN_EXPORT vstPlugin : public QObject, public journallingObject,
|
||||
public remotePlugin
|
||||
class PLUGIN_EXPORT VstPlugin : public QObject, public JournallingObject,
|
||||
public RemotePlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
vstPlugin( const QString & _plugin );
|
||||
virtual ~vstPlugin();
|
||||
VstPlugin( const QString & _plugin );
|
||||
virtual ~VstPlugin();
|
||||
|
||||
virtual bool processMessage( const message & _m );
|
||||
|
||||
inline bool hasEditor( void ) const
|
||||
inline bool hasEditor() const
|
||||
{
|
||||
return m_pluginWindowID != 0;
|
||||
}
|
||||
|
||||
void showEditor( QWidget * _parent = NULL );
|
||||
void hideEditor( void );
|
||||
void hideEditor();
|
||||
|
||||
inline const QString & name( void ) const
|
||||
inline const QString & name() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
inline Sint32 version( void ) const
|
||||
inline Sint32 version() const
|
||||
{
|
||||
return m_version;
|
||||
}
|
||||
|
||||
inline const QString & vendorString( void ) const
|
||||
inline const QString & vendorString() const
|
||||
{
|
||||
return m_vendorString;
|
||||
}
|
||||
|
||||
inline const QString & productString( void ) const
|
||||
inline const QString & productString() const
|
||||
{
|
||||
return m_productString;
|
||||
}
|
||||
|
||||
const QMap<QString, QString> & parameterDump( void );
|
||||
const QMap<QString, QString> & parameterDump();
|
||||
void setParameterDump( const QMap<QString, QString> & _pdump );
|
||||
|
||||
|
||||
@@ -94,7 +91,7 @@ public:
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
|
||||
inline virtual QString nodeName( void ) const
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return "vstplugin";
|
||||
}
|
||||
@@ -102,12 +99,12 @@ public:
|
||||
|
||||
public slots:
|
||||
void setTempo( bpm_t _bpm );
|
||||
void updateSampleRate( void );
|
||||
void updateSampleRate();
|
||||
|
||||
|
||||
private:
|
||||
void loadChunk( const QByteArray & _chunk );
|
||||
QByteArray saveChunk( void );
|
||||
QByteArray saveChunk();
|
||||
|
||||
QString m_plugin;
|
||||
QWidget * m_pluginWidget;
|
||||
@@ -27,10 +27,10 @@
|
||||
#ifndef _COMMUNICATION_H
|
||||
#define _COMMUNICATION_H
|
||||
|
||||
#include "remote_plugin.h"
|
||||
#include "RemotePlugin.h"
|
||||
|
||||
|
||||
struct vstParameterDumpItem
|
||||
struct VstParameterDumpItem
|
||||
{
|
||||
int32_t index;
|
||||
std::string shortLabel;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* remote_vst_plugin.cpp - LMMS VST Support Layer (remotePlugin client)
|
||||
* remote_vst_plugin.cpp - LMMS VST Support Layer (RemotePlugin client)
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#define BUILD_REMOTE_PLUGIN_CLIENT
|
||||
|
||||
#include "remote_plugin.h"
|
||||
#include "RemotePlugin.h"
|
||||
|
||||
#ifdef LMMS_HAVE_PTHREAD_H
|
||||
#include <pthread.h>
|
||||
@@ -108,7 +108,7 @@ DWORD __GuiThreadID = NULL;
|
||||
|
||||
|
||||
|
||||
class RemoteVstPlugin : public remotePluginClient
|
||||
class RemoteVstPlugin : public RemotePluginClient
|
||||
{
|
||||
public:
|
||||
RemoteVstPlugin( key_t _shm_in, key_t _shm_out );
|
||||
@@ -280,7 +280,7 @@ private:
|
||||
|
||||
|
||||
RemoteVstPlugin::RemoteVstPlugin( key_t _shm_in, key_t _shm_out ) :
|
||||
remotePluginClient( _shm_in, _shm_out ),
|
||||
RemotePluginClient( _shm_in, _shm_out ),
|
||||
m_shortName( "" ),
|
||||
m_libInst( NULL ),
|
||||
m_plugin( NULL ),
|
||||
@@ -390,7 +390,7 @@ bool RemoteVstPlugin::processMessage( const message & _m )
|
||||
break;
|
||||
|
||||
default:
|
||||
return remotePluginClient::processMessage( _m );
|
||||
return RemotePluginClient::processMessage( _m );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -751,7 +751,7 @@ void RemoteVstPlugin::setParameterDump( const message & _m )
|
||||
int p = 0;
|
||||
for( int i = 0; i < params; ++i )
|
||||
{
|
||||
vstParameterDumpItem item;
|
||||
VstParameterDumpItem item;
|
||||
item.index = _m.getInt( ++p );
|
||||
item.shortLabel = _m.getString( ++p );
|
||||
item.value = _m.getFloat( ++p );
|
||||
@@ -1216,7 +1216,7 @@ DWORD WINAPI RemoteVstPlugin::processingThread( LPVOID _param )
|
||||
{
|
||||
RemoteVstPlugin * _this = static_cast<RemoteVstPlugin *>( _param );
|
||||
|
||||
remotePluginClient::message m;
|
||||
RemotePluginClient::message m;
|
||||
while( ( m = _this->receiveMessage() ).id != IdQuit )
|
||||
{
|
||||
if( m.id == IdStartProcessing || m.id == IdMidiEvent )
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* vst_base.cpp - VST-base-code to be used by any LMMS-plugins dealing with VST-
|
||||
* vst_base.cpp - VST-base-code to be used by any LMMS plugins dealing with VST-
|
||||
* plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
@@ -24,21 +24,21 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "plugin.h"
|
||||
#include "Plugin.h"
|
||||
#include "embed.h"
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor vstbase_plugin_descriptor =
|
||||
Plugin::Descriptor vstbase_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"VST Base",
|
||||
"library for all LMMS-plugins dealing with VST-plugins",
|
||||
"library for all LMMS plugins dealing with VST-plugins",
|
||||
"Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>",
|
||||
0x0100,
|
||||
plugin::Library,
|
||||
Plugin::Library,
|
||||
NULL,
|
||||
NULL
|
||||
} ;
|
||||
|
||||
@@ -5,7 +5,7 @@ INCLUDE_DIRECTORIES(../vst_base)
|
||||
LINK_DIRECTORIES(../vst_base)
|
||||
LINK_LIBRARIES(vstbase)
|
||||
|
||||
BUILD_PLUGIN(vsteffect vst_effect.cpp vst_effect_controls.cpp vst_effect_control_dialog.cpp vst_subplugin_features.cpp vst_effect.h vst_effect_controls.h vst_effect_control_dialog.h vst_subplugin_features.h MOCFILES vst_effect_controls.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
BUILD_PLUGIN(vsteffect VstEffect.cpp VstEffectControls.cpp VstEffectControlDialog.cpp VstSubPluginFeatures.cpp VstEffect.h VstEffectControls.h VstEffectControlDialog.h VstSubPluginFeatures.h MOCFILES VstEffectControls.h EMBEDDED_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.png)
|
||||
|
||||
SET_TARGET_PROPERTIES(vsteffect PROPERTIES COMPILE_FLAGS "-Wno-attributes")
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* vst_effect.cpp - class for handling VST effect plugins
|
||||
* VstEffect.cpp - class for handling VST effect plugins
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,13 +22,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "vst_effect.h"
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
#include "VstEffect.h"
|
||||
#include "song.h"
|
||||
#include "text_float.h"
|
||||
#include "vst_subplugin_features.h"
|
||||
#include "VstSubPluginFeatures.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
|
||||
@@ -36,7 +35,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor vsteffect_plugin_descriptor =
|
||||
Plugin::Descriptor vsteffect_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"VST Effect",
|
||||
@@ -45,18 +44,18 @@ plugin::descriptor vsteffect_plugin_descriptor =
|
||||
"inside LMMS." ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0200,
|
||||
plugin::Effect,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
NULL,
|
||||
new vstSubPluginFeatures( plugin::Effect )
|
||||
new VstSubPluginFeatures( Plugin::Effect )
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
vstEffect::vstEffect( model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key ) :
|
||||
effect( &vsteffect_plugin_descriptor, _parent, _key ),
|
||||
VstEffect::VstEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &vsteffect_plugin_descriptor, _parent, _key ),
|
||||
m_plugin( NULL ),
|
||||
m_pluginMutex(),
|
||||
m_key( *_key ),
|
||||
@@ -72,7 +71,7 @@ vstEffect::vstEffect( model * _parent,
|
||||
|
||||
|
||||
|
||||
vstEffect::~vstEffect()
|
||||
VstEffect::~VstEffect()
|
||||
{
|
||||
closePlugin();
|
||||
}
|
||||
@@ -80,7 +79,7 @@ vstEffect::~vstEffect()
|
||||
|
||||
|
||||
|
||||
bool vstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
|
||||
bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
|
||||
{
|
||||
if( !isEnabled() || !isRunning () )
|
||||
{
|
||||
@@ -89,7 +88,7 @@ bool vstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
|
||||
|
||||
if( m_plugin )
|
||||
{
|
||||
const float d = getDryLevel();
|
||||
const float d = dryLevel();
|
||||
#ifdef __GNUC__
|
||||
sampleFrame buf[_frames];
|
||||
#else
|
||||
@@ -101,7 +100,7 @@ bool vstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
double out_sum = 0.0;
|
||||
const float w = getWetLevel();
|
||||
const float w = wetLevel();
|
||||
for( fpp_t f = 0; f < _frames; ++f )
|
||||
{
|
||||
_buf[f][0] = w*buf[f][0] + d*_buf[f][0];
|
||||
@@ -123,23 +122,23 @@ bool vstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
|
||||
|
||||
|
||||
|
||||
void vstEffect::openPlugin( const QString & _plugin )
|
||||
void VstEffect::openPlugin( const QString & _plugin )
|
||||
{
|
||||
textFloat * tf = textFloat::displayMessage(
|
||||
vstPlugin::tr( "Loading plugin" ),
|
||||
vstPlugin::tr(
|
||||
VstPlugin::tr( "Loading plugin" ),
|
||||
VstPlugin::tr(
|
||||
"Please wait while loading VST-plugin..." ),
|
||||
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
|
||||
m_pluginMutex.lock();
|
||||
m_plugin = new vstPlugin( _plugin );
|
||||
m_plugin = new VstPlugin( _plugin );
|
||||
if( m_plugin->failed() )
|
||||
{
|
||||
m_pluginMutex.unlock();
|
||||
closePlugin();
|
||||
delete tf;
|
||||
QMessageBox::information( NULL,
|
||||
vstPlugin::tr( "Failed loading VST-plugin" ),
|
||||
vstPlugin::tr( "The VST-plugin %1 could not "
|
||||
VstPlugin::tr( "Failed loading VST-plugin" ),
|
||||
VstPlugin::tr( "The VST-plugin %1 could not "
|
||||
"be loaded for some reason.\n"
|
||||
"If it runs with other VST-"
|
||||
"software under Linux, please "
|
||||
@@ -148,7 +147,7 @@ void vstEffect::openPlugin( const QString & _plugin )
|
||||
QMessageBox::Ok );
|
||||
return;
|
||||
}
|
||||
vstPlugin::connect( engine::getSong(),
|
||||
VstPlugin::connect( engine::getSong(),
|
||||
SIGNAL( tempoChanged( bpm_t ) ),
|
||||
m_plugin, SLOT( setTempo( bpm_t ) ) );
|
||||
m_plugin->setTempo( engine::getSong()->getTempo() );
|
||||
@@ -160,7 +159,7 @@ void vstEffect::openPlugin( const QString & _plugin )
|
||||
|
||||
|
||||
|
||||
void vstEffect::closePlugin( void )
|
||||
void VstEffect::closePlugin()
|
||||
{
|
||||
m_pluginMutex.lock();
|
||||
delete m_plugin;
|
||||
@@ -176,10 +175,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( model * _parent, void * _data )
|
||||
Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return new vstEffect( _parent,
|
||||
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
|
||||
return new VstEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
_data ) );
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* vst_effect.h - class for handling VST effect plugins
|
||||
* VstEffect.h - class for handling VST effect plugins
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,36 +22,33 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _VST_EFFECT_H
|
||||
#define _VST_EFFECT_H
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#include "effect.h"
|
||||
#include "vst_plugin.h"
|
||||
#include "vst_effect_control_dialog.h"
|
||||
#include "vst_effect_controls.h"
|
||||
#include "Effect.h"
|
||||
#include "VstPlugin.h"
|
||||
#include "VstEffectControlDialog.h"
|
||||
#include "VstEffectControls.h"
|
||||
|
||||
|
||||
|
||||
class vstEffect : public effect
|
||||
class VstEffect : public Effect
|
||||
{
|
||||
public:
|
||||
vstEffect( model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key );
|
||||
virtual ~vstEffect();
|
||||
VstEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~VstEffect();
|
||||
|
||||
virtual bool processAudioBuffer( sampleFrame * _buf,
|
||||
const fpp_t _frames );
|
||||
|
||||
virtual effectControls * getControls( void )
|
||||
virtual EffectControls * controls()
|
||||
{
|
||||
return &m_vstControls;
|
||||
}
|
||||
|
||||
|
||||
virtual inline QString publicName( void ) const
|
||||
virtual inline QString publicName() const
|
||||
{
|
||||
return m_plugin->name();
|
||||
}
|
||||
@@ -59,17 +56,17 @@ public:
|
||||
|
||||
private:
|
||||
void openPlugin( const QString & _plugin );
|
||||
void closePlugin( void );
|
||||
void closePlugin();
|
||||
|
||||
vstPlugin * m_plugin;
|
||||
VstPlugin * m_plugin;
|
||||
QMutex m_pluginMutex;
|
||||
effectKey m_key;
|
||||
EffectKey m_key;
|
||||
|
||||
vstEffectControls m_vstControls;
|
||||
VstEffectControls m_vstControls;
|
||||
|
||||
|
||||
friend class vstEffectControls;
|
||||
friend class vstEffectControlDialog;
|
||||
friend class VstEffectControls;
|
||||
friend class VstEffectControlDialog;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* vst_effect_control_dialog.cpp - dialog for displaying VST-effect GUI
|
||||
* VstEffectControlDialog.cpp - dialog for displaying VST-effect GUI
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -25,14 +25,13 @@
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
#include "vst_effect_control_dialog.h"
|
||||
#include "vst_effect.h"
|
||||
#include "main_window.h"
|
||||
#include "VstEffectControlDialog.h"
|
||||
#include "VstEffect.h"
|
||||
|
||||
|
||||
|
||||
vstEffectControlDialog::vstEffectControlDialog( vstEffectControls * _ctl ) :
|
||||
effectControlDialog( _ctl )
|
||||
VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
EffectControlDialog( _ctl )
|
||||
{
|
||||
QVBoxLayout * l = new QVBoxLayout( this );
|
||||
l->setMargin( 0 );
|
||||
@@ -50,7 +49,7 @@ vstEffectControlDialog::vstEffectControlDialog( vstEffectControls * _ctl ) :
|
||||
|
||||
|
||||
|
||||
vstEffectControlDialog::~vstEffectControlDialog()
|
||||
VstEffectControlDialog::~VstEffectControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* vst_effect_control_dialog.h - dialog for displaying GUI of VST-effect-plugin
|
||||
* VstEffectControlDialog.h - dialog for displaying GUI of VST-effect-plugin
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -25,17 +25,17 @@
|
||||
#ifndef _VST_EFFECT_CONTROL_DIALOG_H
|
||||
#define _VST_EFFECT_CONTROL_DIALOG_H
|
||||
|
||||
#include "effect_control_dialog.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
|
||||
class vstEffectControls;
|
||||
class VstEffectControls;
|
||||
|
||||
|
||||
class vstEffectControlDialog : public effectControlDialog
|
||||
class VstEffectControlDialog : public EffectControlDialog
|
||||
{
|
||||
public:
|
||||
vstEffectControlDialog( vstEffectControls * _controls );
|
||||
virtual ~vstEffectControlDialog();
|
||||
VstEffectControlDialog( VstEffectControls * _controls );
|
||||
virtual ~VstEffectControlDialog();
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* vst_effect_controls.cpp - controls for VST effect plugins
|
||||
* VstEffectControls.cpp - controls for VST effect plugins
|
||||
*
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,16 +22,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include "vst_effect_controls.h"
|
||||
#include "vst_effect.h"
|
||||
#include "VstEffectControls.h"
|
||||
#include "VstEffect.h"
|
||||
|
||||
|
||||
|
||||
vstEffectControls::vstEffectControls( vstEffect * _eff ) :
|
||||
effectControls( _eff ),
|
||||
VstEffectControls::VstEffectControls( VstEffect * _eff ) :
|
||||
EffectControls( _eff ),
|
||||
m_effect( _eff )
|
||||
{
|
||||
}
|
||||
@@ -39,7 +38,7 @@ vstEffectControls::vstEffectControls( vstEffect * _eff ) :
|
||||
|
||||
|
||||
|
||||
void vstEffectControls::loadSettings( const QDomElement & _this )
|
||||
void VstEffectControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_effect->closePlugin();
|
||||
m_effect->openPlugin( _this.attribute( "plugin" ) );
|
||||
@@ -54,7 +53,7 @@ void vstEffectControls::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void vstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void VstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
_this.setAttribute( "plugin", m_effect->m_key.attributes["file"] );
|
||||
m_effect->m_pluginMutex.lock();
|
||||
@@ -68,7 +67,7 @@ void vstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
int vstEffectControls::getControlCount( void )
|
||||
int VstEffectControls::controlCount()
|
||||
{
|
||||
return m_effect->m_plugin != NULL &&
|
||||
m_effect->m_plugin->hasEditor() ? 1 : 0;
|
||||
@@ -76,5 +75,5 @@ int vstEffectControls::getControlCount( void )
|
||||
|
||||
|
||||
|
||||
#include "moc_vst_effect_controls.cxx"
|
||||
#include "moc_VstEffectControls.cxx"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* vst_effect_controls.h - controls for VST effect plugins
|
||||
* VstEffectControls.h - controls for VST effect plugins
|
||||
*
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,46 +22,44 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _VST_EFFECT_CONTROLS_H
|
||||
#define _VST_EFFECT_CONTROLS_H
|
||||
|
||||
#include "effect_controls.h"
|
||||
#include "vst_effect_control_dialog.h"
|
||||
#include "EffectControls.h"
|
||||
#include "VstEffectControlDialog.h"
|
||||
|
||||
|
||||
class vstEffect;
|
||||
class VstEffect;
|
||||
|
||||
|
||||
class vstEffectControls : public effectControls
|
||||
class VstEffectControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
vstEffectControls( vstEffect * _eff );
|
||||
virtual ~vstEffectControls()
|
||||
VstEffectControls( VstEffect * _eff );
|
||||
virtual ~VstEffectControls()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return "vsteffectcontrols";
|
||||
}
|
||||
|
||||
virtual int getControlCount( void );
|
||||
virtual int controlCount();
|
||||
|
||||
virtual effectControlDialog * createView( void )
|
||||
virtual EffectControlDialog * createView()
|
||||
{
|
||||
return new vstEffectControlDialog( this );
|
||||
return new VstEffectControlDialog( this );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
vstEffect * m_effect;
|
||||
VstEffect * m_effect;
|
||||
|
||||
|
||||
friend class vstEffectControlDialog;
|
||||
friend class VstEffectControlDialog;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* vst_subplugin_features.cpp - derivation from
|
||||
* plugin::descriptor::subPluginFeatures for
|
||||
* hosting VST-plugins
|
||||
* VstSubPluginFeatures.cpp - derivation from
|
||||
* Plugin::Descriptor::SubPluginFeatures for
|
||||
* hosting VST-plugins
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -24,25 +24,23 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "vst_subplugin_features.h"
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
#include "VstSubPluginFeatures.h"
|
||||
#include "config_mgr.h"
|
||||
|
||||
|
||||
vstSubPluginFeatures::vstSubPluginFeatures( plugin::PluginTypes _type ) :
|
||||
subPluginFeatures( _type )
|
||||
VstSubPluginFeatures::VstSubPluginFeatures( Plugin::PluginTypes _type ) :
|
||||
SubPluginFeatures( _type )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void vstSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
const key * _key )
|
||||
void VstSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
const Key * _key )
|
||||
{
|
||||
new QLabel( QWidget::tr( "Name: " ) + _key->name, _parent );
|
||||
new QLabel( QWidget::tr( "File: " ) + _key->attributes["file"],
|
||||
@@ -52,19 +50,19 @@ void vstSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
|
||||
|
||||
|
||||
void vstSubPluginFeatures::listSubPluginKeys( plugin::descriptor * _desc,
|
||||
keyList & _kl )
|
||||
void VstSubPluginFeatures::listSubPluginKeys( Plugin::Descriptor * _desc,
|
||||
KeyList & _kl )
|
||||
{
|
||||
QStringList dlls = QDir( configManager::inst()->vstDir() ).
|
||||
entryList( QStringList() << "*.dll",
|
||||
QDir::Files, QDir::Name );
|
||||
// TODO: eval m_type
|
||||
for( QStringList::const_iterator it = dlls.begin();
|
||||
for( QStringList::ConstIterator it = dlls.begin();
|
||||
it != dlls.end(); ++it )
|
||||
{
|
||||
effectKey::attributeMap am;
|
||||
EffectKey::AttributeMap am;
|
||||
am["file"] = *it;
|
||||
_kl.push_back( key( _desc, QFileInfo( *it ).baseName(), am ) );
|
||||
_kl.push_back( Key( _desc, QFileInfo( *it ).baseName(), am ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* vst_subplugin_features.h - derivation from
|
||||
* plugin::descriptor::subPluginFeatures for
|
||||
* hosting VST-plugins
|
||||
* VstSubPluginFeatures.h - derivation from
|
||||
* Plugin::Descriptor::SubPluginFeatures for
|
||||
* hosting VST-plugins
|
||||
*
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -24,23 +24,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _VST_SUBPLUGIN_FEATURES_H
|
||||
#define _VST_SUBPLUGIN_FEATURES_H
|
||||
|
||||
#include "effect.h"
|
||||
#include "Effect.h"
|
||||
|
||||
|
||||
class vstSubPluginFeatures : public plugin::descriptor::subPluginFeatures
|
||||
class VstSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures
|
||||
{
|
||||
public:
|
||||
vstSubPluginFeatures( plugin::PluginTypes _type );
|
||||
VstSubPluginFeatures( Plugin::PluginTypes _type );
|
||||
|
||||
virtual void fillDescriptionWidget( QWidget * _parent,
|
||||
const key * _key );
|
||||
virtual void fillDescriptionWidget( QWidget * _parent, const Key * _key );
|
||||
|
||||
virtual void listSubPluginKeys( plugin::descriptor * _desc,
|
||||
keyList & _kl );
|
||||
virtual void listSubPluginKeys( Plugin::Descriptor * _desc, KeyList & _kl );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* remote_zynaddsubfx.cpp - ZynAddSubFX-embedding plugin
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "engine.h"
|
||||
#include "instrument_play_handle.h"
|
||||
#include "note_play_handle.h"
|
||||
#include "remote_plugin.h"
|
||||
#include "RemotePlugin.h"
|
||||
#include "remote_zynaddsubfx.h"
|
||||
|
||||
|
||||
@@ -48,14 +48,14 @@ std::string __presets_dir;
|
||||
|
||||
static pthread_t __gui_thread_handle;
|
||||
static pthread_mutex_t __gui_mutex;
|
||||
static std::queue<remotePluginClient::message> __gui_messages;
|
||||
static std::queue<RemotePluginClient::message> __gui_messages;
|
||||
|
||||
|
||||
class RemoteZynAddSubFX : public remotePluginClient
|
||||
class RemoteZynAddSubFX : public RemotePluginClient
|
||||
{
|
||||
public:
|
||||
RemoteZynAddSubFX( int _shm_in, int _shm_out ) :
|
||||
remotePluginClient( _shm_in, _shm_out )
|
||||
RemotePluginClient( _shm_in, _shm_out )
|
||||
{
|
||||
for( int i = 0; i < NumKeys; ++i )
|
||||
{
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
break;
|
||||
|
||||
default:
|
||||
return remotePluginClient::processMessage( _m );
|
||||
return RemotePluginClient::processMessage( _m );
|
||||
}
|
||||
if( gui_message )
|
||||
{
|
||||
@@ -255,7 +255,7 @@ void * guiThread( void * )
|
||||
pthread_mutex_lock( &__gui_mutex );
|
||||
while( __gui_messages.size() )
|
||||
{
|
||||
remotePluginClient::message m = __gui_messages.front();
|
||||
RemotePluginClient::message m = __gui_messages.front();
|
||||
__gui_messages.pop();
|
||||
switch( m.id )
|
||||
{
|
||||
@@ -364,7 +364,7 @@ int main( int _argc, char * * _argv )
|
||||
|
||||
pthread_create( &__gui_thread_handle, NULL, guiThread, NULL );
|
||||
|
||||
remotePluginClient::message m;
|
||||
RemotePluginClient::message m;
|
||||
while( ( m = __remote_zasf->receiveMessage() ).id != IdQuit )
|
||||
{
|
||||
pthread_mutex_lock( &master->mutex );
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifndef _REMOTE_ZYNADDSUBFX_H
|
||||
#define _REMOTE_ZYNADDSUBFX_H
|
||||
|
||||
#include "remote_plugin.h"
|
||||
#include "RemotePlugin.h"
|
||||
|
||||
enum ZasfRemoteMessageIDs
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "engine.h"
|
||||
#include "mmp.h"
|
||||
#include "instrument_play_handle.h"
|
||||
#include "instrument_track.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "gui_templates.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "remote_zynaddsubfx.h"
|
||||
@@ -46,7 +46,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor PLUGIN_EXPORT zynaddsubfx_plugin_descriptor =
|
||||
Plugin::Descriptor PLUGIN_EXPORT zynaddsubfx_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY( PLUGIN_NAME ),
|
||||
"ZynAddSubFX",
|
||||
@@ -54,8 +54,8 @@ plugin::descriptor PLUGIN_EXPORT zynaddsubfx_plugin_descriptor =
|
||||
"Embedded ZynAddSubFX" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
plugin::Instrument,
|
||||
new pluginPixmapLoader( "logo" ),
|
||||
Plugin::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"xiz",
|
||||
NULL,
|
||||
} ;
|
||||
@@ -64,14 +64,14 @@ plugin::descriptor PLUGIN_EXPORT zynaddsubfx_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
zynAddSubFx::zynAddSubFx( instrumentTrack * _instrumentTrack ) :
|
||||
instrument( _instrumentTrack, &zynaddsubfx_plugin_descriptor ),
|
||||
zynAddSubFx::zynAddSubFx( InstrumentTrack * _instrumentTrack ) :
|
||||
Instrument( _instrumentTrack, &zynaddsubfx_plugin_descriptor ),
|
||||
m_plugin( NULL )
|
||||
{
|
||||
initRemotePlugin();
|
||||
|
||||
// now we need a play-handle which cares for calling play()
|
||||
instrumentPlayHandle * iph = new instrumentPlayHandle( this );
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
|
||||
engine::getMixer()->addPlayHandle( iph );
|
||||
|
||||
connect( engine::getMixer(), SIGNAL( sampleRateChanged() ),
|
||||
@@ -83,7 +83,7 @@ zynAddSubFx::zynAddSubFx( instrumentTrack * _instrumentTrack ) :
|
||||
|
||||
zynAddSubFx::~zynAddSubFx()
|
||||
{
|
||||
engine::getMixer()->removePlayHandles( getInstrumentTrack() );
|
||||
engine::getMixer()->removePlayHandles( instrumentTrack() );
|
||||
|
||||
m_pluginMutex.lock();
|
||||
delete m_plugin;
|
||||
@@ -101,7 +101,7 @@ void zynAddSubFx::saveSettings( QDomDocument & _doc,
|
||||
{
|
||||
m_plugin->lock();
|
||||
m_plugin->sendMessage(
|
||||
remotePlugin::message( IdSaveSettingsToFile ).
|
||||
RemotePlugin::message( IdSaveSettingsToFile ).
|
||||
addString(
|
||||
QSTR_TO_STDSTR(
|
||||
QDir::toNativeSeparators( tf.fileName() ) ) ) );
|
||||
@@ -143,7 +143,7 @@ void zynAddSubFx::loadSettings( const QDomElement & _this )
|
||||
tf.write( a );
|
||||
m_plugin->lock();
|
||||
m_plugin->sendMessage(
|
||||
remotePlugin::message( IdLoadSettingsFromFile ).
|
||||
RemotePlugin::message( IdLoadSettingsFromFile ).
|
||||
addString(
|
||||
QSTR_TO_STDSTR(
|
||||
QDir::toNativeSeparators( tf.fileName() ) ) ) );
|
||||
@@ -161,7 +161,7 @@ void zynAddSubFx::loadFile( const QString & _file )
|
||||
{
|
||||
m_plugin->lock();
|
||||
m_plugin->sendMessage(
|
||||
remotePlugin::message( IdLoadPresetFromFile ).
|
||||
RemotePlugin::message( IdLoadPresetFromFile ).
|
||||
addString( QSTR_TO_STDSTR( _file ) ) );
|
||||
m_plugin->waitForMessage( IdLoadPresetFromFile );
|
||||
m_plugin->unlock();
|
||||
@@ -172,7 +172,7 @@ void zynAddSubFx::loadFile( const QString & _file )
|
||||
|
||||
|
||||
|
||||
QString zynAddSubFx::nodeName( void ) const
|
||||
QString zynAddSubFx::nodeName() const
|
||||
{
|
||||
return zynaddsubfx_plugin_descriptor.name;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ void zynAddSubFx::play( sampleFrame * _buf )
|
||||
m_pluginMutex.lock();
|
||||
m_plugin->process( NULL, _buf );
|
||||
m_pluginMutex.unlock();
|
||||
getInstrumentTrack()->processAudioBuffer( _buf,
|
||||
instrumentTrack()->processAudioBuffer( _buf,
|
||||
engine::getMixer()->framesPerPeriod(), NULL );
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ bool zynAddSubFx::handleMidiEvent( const midiEvent & _me,
|
||||
|
||||
|
||||
|
||||
void zynAddSubFx::updateSampleRate( void )
|
||||
void zynAddSubFx::updateSampleRate()
|
||||
{
|
||||
m_pluginMutex.lock();
|
||||
|
||||
@@ -222,15 +222,15 @@ void zynAddSubFx::updateSampleRate( void )
|
||||
|
||||
|
||||
|
||||
void zynAddSubFx::initRemotePlugin( void )
|
||||
void zynAddSubFx::initRemotePlugin()
|
||||
{
|
||||
delete m_plugin;
|
||||
m_plugin = new remotePlugin( "remote_zynaddsubfx", false );
|
||||
m_plugin = new RemotePlugin( "remote_zynaddsubfx", false );
|
||||
m_plugin->lock();
|
||||
m_plugin->waitForInitDone( false );
|
||||
|
||||
m_plugin->sendMessage(
|
||||
remotePlugin::message( IdZasfPresetDirectory ).
|
||||
RemotePlugin::message( IdZasfPresetDirectory ).
|
||||
addString(
|
||||
QSTR_TO_STDSTR(
|
||||
QString( configManager::inst()->factoryPresetsDir() +
|
||||
@@ -241,9 +241,9 @@ void zynAddSubFx::initRemotePlugin( void )
|
||||
|
||||
|
||||
|
||||
pluginView * zynAddSubFx::instantiateView( QWidget * _parent )
|
||||
PluginView * zynAddSubFx::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new zynAddSubFxView( this, _parent );
|
||||
return new ZynAddSubFxView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
@@ -252,8 +252,8 @@ pluginView * zynAddSubFx::instantiateView( QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
zynAddSubFxView::zynAddSubFxView( instrument * _instrument, QWidget * _parent ) :
|
||||
instrumentView( _instrument, _parent )
|
||||
ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent ) :
|
||||
InstrumentView( _instrument, _parent )
|
||||
{
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
@@ -279,14 +279,14 @@ zynAddSubFxView::zynAddSubFxView( instrument * _instrument, QWidget * _parent )
|
||||
|
||||
|
||||
|
||||
zynAddSubFxView::~zynAddSubFxView()
|
||||
ZynAddSubFxView::~ZynAddSubFxView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void zynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
void ZynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
|
||||
{
|
||||
@@ -310,7 +310,7 @@ void zynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
|
||||
|
||||
|
||||
void zynAddSubFxView::dropEvent( QDropEvent * _de )
|
||||
void ZynAddSubFxView::dropEvent( QDropEvent * _de )
|
||||
{
|
||||
const QString type = stringPairDrag::decodeKey( _de );
|
||||
const QString value = stringPairDrag::decodeValue( _de );
|
||||
@@ -326,7 +326,7 @@ void zynAddSubFxView::dropEvent( QDropEvent * _de )
|
||||
|
||||
|
||||
|
||||
void zynAddSubFxView::modelChanged( void )
|
||||
void ZynAddSubFxView::modelChanged()
|
||||
{
|
||||
toggleUI();
|
||||
}
|
||||
@@ -334,7 +334,7 @@ void zynAddSubFxView::modelChanged( void )
|
||||
|
||||
|
||||
|
||||
void zynAddSubFxView::toggleUI( void )
|
||||
void ZynAddSubFxView::toggleUI()
|
||||
{
|
||||
if( m_toggleUIButton->isChecked() )
|
||||
{
|
||||
@@ -355,10 +355,10 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
|
||||
return new zynAddSubFx( static_cast<instrumentTrack *>( _data ) );
|
||||
return new zynAddSubFx( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,22 +29,22 @@
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QThread>
|
||||
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "remote_plugin.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "RemotePlugin.h"
|
||||
|
||||
|
||||
class QPushButton;
|
||||
|
||||
class zynAddSubFxView;
|
||||
class ZynAddSubFxView;
|
||||
class notePlayHandle;
|
||||
|
||||
|
||||
class zynAddSubFx : public instrument
|
||||
class zynAddSubFx : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
zynAddSubFx( instrumentTrack * _instrument_track );
|
||||
zynAddSubFx( InstrumentTrack * _instrument_track );
|
||||
virtual ~zynAddSubFx();
|
||||
|
||||
virtual void play( sampleFrame * _working_buffer );
|
||||
@@ -58,42 +58,42 @@ public:
|
||||
virtual void loadFile( const QString & _file );
|
||||
|
||||
|
||||
virtual QString nodeName( void ) const;
|
||||
virtual QString nodeName() const;
|
||||
|
||||
virtual bool isMidiBased( void ) const
|
||||
virtual bool isMidiBased() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual pluginView * instantiateView( QWidget * _parent );
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
|
||||
private slots:
|
||||
void updateSampleRate( void );
|
||||
void updateSampleRate();
|
||||
|
||||
|
||||
private:
|
||||
void initRemotePlugin( void );
|
||||
void initRemotePlugin();
|
||||
|
||||
QMutex m_pluginMutex;
|
||||
remotePlugin * m_plugin;
|
||||
RemotePlugin * m_plugin;
|
||||
|
||||
friend class zynAddSubFxView;
|
||||
friend class ZynAddSubFxView;
|
||||
|
||||
|
||||
signals:
|
||||
void settingsChanged( void );
|
||||
void settingsChanged();
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class zynAddSubFxView : public instrumentView
|
||||
class ZynAddSubFxView : public InstrumentView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
zynAddSubFxView( instrument * _instrument, QWidget * _parent );
|
||||
virtual ~zynAddSubFxView();
|
||||
ZynAddSubFxView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~ZynAddSubFxView();
|
||||
|
||||
|
||||
protected:
|
||||
@@ -102,13 +102,13 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
void modelChanged( void );
|
||||
void modelChanged();
|
||||
|
||||
QPushButton * m_toggleUIButton;
|
||||
|
||||
|
||||
private slots:
|
||||
void toggleUI( void );
|
||||
void toggleUI();
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user