Rename engine to Engine
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "AmplifierControls.h"
|
||||
#include "Amplifier.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
|
||||
|
||||
inline void BassBoosterEffect::changeFrequency()
|
||||
{
|
||||
const sample_t fac = engine::mixer()->processingSampleRate() / 44100.0f;
|
||||
const sample_t fac = Engine::mixer()->processingSampleRate() / 44100.0f;
|
||||
|
||||
m_bbFX.leftFX().setFrequency( m_bbControls.m_freqModel.value() * fac );
|
||||
m_bbFX.rightFX().setFrequency( m_bbControls.m_freqModel.value() * fac );
|
||||
|
||||
@@ -37,7 +37,7 @@ BassBoosterControls::BassBoosterControls( BassBoosterEffect* effect ) :
|
||||
m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this, tr( "Gain" ) ),
|
||||
m_ratioModel( 2.0f, 0.1f, 10.0f, 0.1f, this, tr( "Ratio" ) )
|
||||
{
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeFrequency() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeFrequency() ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ DualFilterEffect::DualFilterEffect( Model* parent, const Descriptor::SubPluginFe
|
||||
Effect( &dualfilter_plugin_descriptor, parent, key ),
|
||||
m_dfControls( this )
|
||||
{
|
||||
m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_filter1 = new basicFilters<2>( Engine::mixer()->processingSampleRate() );
|
||||
m_filter2 = new basicFilters<2>( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
// ensure filters get updated
|
||||
m_filter1changed = true;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "DualFilterControls.h"
|
||||
#include "DualFilter.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
#include "basic_filters.h"
|
||||
#include "embed.h"
|
||||
@@ -97,7 +97,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
m_filter2Model.addItem( tr( "Fast Formant" ), new PixmapLoader( "filter_hp" ) );
|
||||
m_filter2Model.addItem( tr( "Tripole" ), new PixmapLoader( "filter_lp" ) );
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -108,8 +108,8 @@ void DualFilterControls::updateFilters()
|
||||
|
||||
delete m_effect->m_filter1;
|
||||
delete m_effect->m_filter2;
|
||||
m_effect->m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_effect->m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_effect->m_filter1 = new basicFilters<2>( Engine::mixer()->processingSampleRate() );
|
||||
m_effect->m_filter2 = new basicFilters<2>( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
// flag filters as needing recalculation
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "LocalFileMng.h"
|
||||
#include "HydrogenImport.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "note.h"
|
||||
@@ -143,7 +143,7 @@ bool HydrogenImport::readSong()
|
||||
QHash<QString, int> pattern_length;
|
||||
QHash<QString, int> pattern_id;
|
||||
|
||||
Song *s = engine::getSong();
|
||||
Song *s = Engine::getSong();
|
||||
int song_num_tracks = s->tracks().size();
|
||||
if ( QFile( filename ).exists() == false )
|
||||
{
|
||||
@@ -213,7 +213,7 @@ bool HydrogenImport::readSong()
|
||||
|
||||
if ( nLayer == 0 )
|
||||
{
|
||||
drum_track[sId] = ( InstrumentTrack * ) Track::create( Track::InstrumentTrack,engine::getBBTrackContainer() );
|
||||
drum_track[sId] = ( InstrumentTrack * ) Track::create( Track::InstrumentTrack,Engine::getBBTrackContainer() );
|
||||
drum_track[sId]->volumeModel()->setValue( fVolume * 100 );
|
||||
drum_track[sId]->panningModel()->setValue( ( fPan_R - fPan_L ) * 100 );
|
||||
ins = drum_track[sId]->loadInstrument( "audiofileprocessor" );
|
||||
@@ -237,7 +237,7 @@ bool HydrogenImport::readSong()
|
||||
}
|
||||
QDomNode patterns = songNode.firstChildElement( "patternList" );
|
||||
int pattern_count = 0;
|
||||
int nbb = engine::getBBTrackContainer()->numOfBBs();
|
||||
int nbb = Engine::getBBTrackContainer()->numOfBBs();
|
||||
QDomNode patternNode = patterns.firstChildElement( "pattern" );
|
||||
int pn = 1;
|
||||
while ( !patternNode.isNull() )
|
||||
|
||||
@@ -71,10 +71,10 @@ LadspaEffect::LadspaEffect( Model * _parent,
|
||||
m_maxSampleRate( 0 ),
|
||||
m_key( LadspaSubPluginFeatures::subPluginKeyToLadspaKey( _key ) )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
if( manager->getDescription( m_key ) == NULL )
|
||||
{
|
||||
if( !engine::suppressMessages() )
|
||||
if( !Engine::suppressMessages() )
|
||||
{
|
||||
QMessageBox::warning( 0, tr( "Effect" ),
|
||||
tr( "Unknown LADSPA plugin %1 requested." ).
|
||||
@@ -89,7 +89,7 @@ LadspaEffect::LadspaEffect( Model * _parent,
|
||||
|
||||
pluginInstantiation();
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( changeSampleRate() ) );
|
||||
}
|
||||
|
||||
@@ -147,13 +147,13 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
sampleFrame * o_buf = NULL;
|
||||
sampleFrame sBuf [_frames];
|
||||
|
||||
if( m_maxSampleRate < engine::mixer()->processingSampleRate() )
|
||||
if( m_maxSampleRate < Engine::mixer()->processingSampleRate() )
|
||||
{
|
||||
o_buf = _buf;
|
||||
_buf = &sBuf[0];
|
||||
sampleDown( o_buf, _buf, m_maxSampleRate );
|
||||
frames = _frames * m_maxSampleRate /
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
// Copy the LMMS audio buffer to the LADSPA input buffer and initialize
|
||||
@@ -291,10 +291,10 @@ void LadspaEffect::pluginInstantiation()
|
||||
{
|
||||
m_maxSampleRate = maxSamplerate( displayName() );
|
||||
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
// Calculate how many processing units are needed.
|
||||
const ch_cnt_t lmms_chnls = engine::mixer()->audioDev()->channels();
|
||||
const ch_cnt_t lmms_chnls = Engine::mixer()->audioDev()->channels();
|
||||
int effect_channels = manager->getDescription( m_key )->inputChannels;
|
||||
setProcessorCount( lmms_chnls / effect_channels );
|
||||
|
||||
@@ -329,7 +329,7 @@ void LadspaEffect::pluginInstantiation()
|
||||
manager->isPortInput( m_key, port ) )
|
||||
{
|
||||
p->rate = CHANNEL_IN;
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() );
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() );
|
||||
inbuf[ inputch ] = p->buffer;
|
||||
inputch++;
|
||||
}
|
||||
@@ -344,19 +344,19 @@ void LadspaEffect::pluginInstantiation()
|
||||
}
|
||||
else
|
||||
{
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() );
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() );
|
||||
m_inPlaceBroken = true;
|
||||
}
|
||||
}
|
||||
else if( manager->isPortInput( m_key, port ) )
|
||||
{
|
||||
p->rate = AUDIO_RATE_INPUT;
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() );
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
else
|
||||
{
|
||||
p->rate = AUDIO_RATE_OUTPUT;
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() );
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -548,7 +548,7 @@ void LadspaEffect::pluginDestruction()
|
||||
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); proc++ )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
manager->deactivate( m_key, m_handles[proc] );
|
||||
manager->cleanup( m_key, m_handles[proc] );
|
||||
for( int port = 0; port < m_portCount; port++ )
|
||||
@@ -587,7 +587,7 @@ sample_rate_t LadspaEffect::maxSamplerate( const QString & _name )
|
||||
{
|
||||
return( __buggy_plugins[_name] );
|
||||
}
|
||||
return( engine::mixer()->processingSampleRate() );
|
||||
return( Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "LadspaSubPluginFeatures.h"
|
||||
#include "AudioDevice.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "LadspaBase.h"
|
||||
#include "Mixer.h"
|
||||
@@ -48,7 +48,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
const Key * _key ) const
|
||||
{
|
||||
const ladspa_key_t & lkey = subPluginKeyToLadspaKey( _key );
|
||||
ladspa2LMMS * lm = engine::getLADSPAManager();
|
||||
ladspa2LMMS * lm = Engine::getLADSPAManager();
|
||||
|
||||
QLabel * label = new QLabel( _parent );
|
||||
label->setText( QWidget::tr( "Name: " ) + lm->getName( lkey ) );
|
||||
@@ -119,7 +119,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
void LadspaSubPluginFeatures::listSubPluginKeys(
|
||||
const Plugin::Descriptor * _desc, KeyList & _kl ) const
|
||||
{
|
||||
ladspa2LMMS * lm = engine::getLADSPAManager();
|
||||
ladspa2LMMS * lm = Engine::getLADSPAManager();
|
||||
|
||||
l_sortable_plugin_t plugins;
|
||||
switch( m_type )
|
||||
@@ -145,7 +145,7 @@ void LadspaSubPluginFeatures::listSubPluginKeys(
|
||||
it != plugins.end(); ++it )
|
||||
{
|
||||
if( lm->getDescription( ( *it ).second )->inputChannels <=
|
||||
engine::mixer()->audioDev()->channels() )
|
||||
Engine::mixer()->audioDev()->channels() )
|
||||
{
|
||||
_kl.push_back( ladspaKeyToSubPluginKey( _desc, ( *it ).first, ( *it ).second ) );
|
||||
}
|
||||
|
||||
@@ -96,10 +96,10 @@ bool MidiImport::tryImport( TrackContainer* tc )
|
||||
}
|
||||
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
if( engine::hasGUI() &&
|
||||
if( Engine::hasGUI() &&
|
||||
ConfigManager::inst()->defaultSoundfont().isEmpty() )
|
||||
{
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
QMessageBox::information( Engine::mainWindow(),
|
||||
tr( "Setup incomplete" ),
|
||||
tr( "You do not have set up a default soundfont in "
|
||||
"the settings dialog (Edit->Settings). "
|
||||
@@ -268,7 +268,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
|
||||
const int preTrackSteps = 2;
|
||||
QProgressDialog pd( TrackContainer::tr( "Importing MIDI-file..." ),
|
||||
TrackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() );
|
||||
TrackContainer::tr( "Cancel" ), 0, preTrackSteps, Engine::mainWindow() );
|
||||
pd.setWindowTitle( TrackContainer::tr( "Please wait..." ) );
|
||||
pd.setWindowModality(Qt::WindowModal);
|
||||
pd.setMinimumDuration( 0 );
|
||||
@@ -285,7 +285,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 =
|
||||
|
||||
@@ -127,7 +127,7 @@ bool SpectrumAnalyzer::processAudioBuffer( sampleFrame* _buf, const fpp_t _frame
|
||||
|
||||
// hanming( m_buffer, FFT_BUFFER_SIZE, HAMMING );
|
||||
|
||||
const sample_rate_t sr = engine::mixer()->processingSampleRate();
|
||||
const sample_rate_t sr = Engine::mixer()->processingSampleRate();
|
||||
const int LOWEST_FREQ = 0;
|
||||
const int HIGHEST_FREQ = sr / 2;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
m_background( PLUGIN_NAME::getIconPixmap( "spectrum_background" ).toImage() )
|
||||
{
|
||||
setFixedSize( 249, 151 );
|
||||
connect( engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) );
|
||||
connect( Engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) );
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, true );
|
||||
}
|
||||
|
||||
|
||||
@@ -142,8 +142,8 @@ void VstEffect::openPlugin( const QString & _plugin )
|
||||
return;
|
||||
}
|
||||
|
||||
VstPlugin::connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin, SLOT( setTempo( bpm_t ) ) );
|
||||
m_plugin->setTempo( engine::getSong()->getTempo() );
|
||||
VstPlugin::connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin, SLOT( setTempo( bpm_t ) ) );
|
||||
m_plugin->setTempo( Engine::getSong()->getTempo() );
|
||||
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
|
||||
m_vi->m_scrollArea = new QScrollArea( widget );
|
||||
l = new QGridLayout( widget );
|
||||
|
||||
m_vi->m_subWindow = engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow |
|
||||
m_vi->m_subWindow = Engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow |
|
||||
Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
|
||||
m_vi->m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||
m_vi->m_subWindow->setFixedSize( 960, 300);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <samplerate.h>
|
||||
|
||||
#include "audio_file_processor.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -293,7 +293,7 @@ QString audioFileProcessor::nodeName( void ) const
|
||||
int audioFileProcessor::getBeatLen( NotePlayHandle * _n ) const
|
||||
{
|
||||
const float freq_factor = BaseFreq / _n->frequency() *
|
||||
engine::mixer()->processingSampleRate() / engine::mixer()->baseSampleRate();
|
||||
Engine::mixer()->processingSampleRate() / Engine::mixer()->baseSampleRate();
|
||||
|
||||
return static_cast<int>( floorf( ( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() ) * freq_factor ) );
|
||||
}
|
||||
@@ -708,7 +708,7 @@ void AudioFileProcessorView::openAudioFile( void )
|
||||
if( af != "" )
|
||||
{
|
||||
castModel<audioFileProcessor>()->setAudioFile( af );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "bit_invader.h"
|
||||
#include "base64.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "graph.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
@@ -279,7 +279,7 @@ void bitInvader::playNote( NotePlayHandle * _n,
|
||||
m_graph.length(),
|
||||
_n,
|
||||
m_interpolation.value(), factor,
|
||||
engine::mixer()->processingSampleRate() );
|
||||
Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
@@ -472,7 +472,7 @@ void bitInvaderView::modelChanged()
|
||||
void bitInvaderView::sinWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ void bitInvaderView::sinWaveClicked()
|
||||
void bitInvaderView::triangleWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ void bitInvaderView::triangleWaveClicked()
|
||||
void bitInvaderView::sawWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ void bitInvaderView::sawWaveClicked()
|
||||
void bitInvaderView::sqrWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -508,7 +508,7 @@ void bitInvaderView::sqrWaveClicked()
|
||||
void bitInvaderView::noiseWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToNoise();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ void bitInvaderView::usrWaveClicked()
|
||||
{
|
||||
QString fileName = m_graph->model()->setWaveToUser();
|
||||
toolTip::add( m_usrWaveBtn, fileName );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
/*
|
||||
m_graph->model()->setWaveToNoise();
|
||||
engine::getSong()->setModified();
|
||||
@@ -554,7 +554,7 @@ void bitInvaderView::usrWaveClicked()
|
||||
void bitInvaderView::smoothClicked()
|
||||
{
|
||||
m_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ void bitInvaderView::smoothClicked()
|
||||
void bitInvaderView::interpolationToggled( bool value )
|
||||
{
|
||||
m_graph->setGraphStyle( value ? graph::LinearStyle : graph::NearestStyle);
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ void bitInvaderView::interpolationToggled( bool value )
|
||||
|
||||
void bitInvaderView::normalizeToggled( bool value )
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "delaycontrols.h"
|
||||
#include "delayeffect.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
DelayControls::DelayControls( DelayEffect* effect ):
|
||||
@@ -37,7 +37,7 @@ DelayControls::DelayControls( DelayEffect* effect ):
|
||||
m_lfoTimeModel(2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Lfo Frequency" ) ),
|
||||
m_lfoAmountModel(0.0f,0.0f,0.1f,0.0001f, this, tr ( "Lfo Amount" ) )
|
||||
{
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "delayeffect.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ DelayEffect::DelayEffect( Model* parent, const Plugin::Descriptor::SubPluginFeat
|
||||
m_delayControls( this )
|
||||
{
|
||||
m_delay = 0;
|
||||
m_delay = new StereoDelay( 20, engine::mixer()->processingSampleRate() );
|
||||
m_lfo = new Lfo( engine::mixer()->processingSampleRate() );
|
||||
m_delay = new StereoDelay( 20, Engine::mixer()->processingSampleRate() );
|
||||
m_lfo = new Lfo( Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
double outSum = 0.0;
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
const float length = m_delayControls.m_delayTimeModel.value() * engine::mixer()->processingSampleRate();
|
||||
const float length = m_delayControls.m_delayTimeModel.value() * Engine::mixer()->processingSampleRate();
|
||||
m_lfo->setAmplitude( m_delayControls.m_lfoAmountModel.value() );
|
||||
m_lfo->setFrequency( 1.0 / m_delayControls.m_lfoTimeModel.value() );
|
||||
m_delay->setFeedback( m_delayControls.m_feedbackModel.value() );
|
||||
@@ -104,8 +104,8 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
|
||||
void DelayEffect::changeSampleRate()
|
||||
{
|
||||
m_lfo->setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
m_delay->setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
m_lfo->setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
m_delay->setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ dynProcEffect::dynProcEffect( Model * _parent,
|
||||
m_dpControls( this )
|
||||
{
|
||||
m_currentPeak[0] = m_currentPeak[1] = DYN_NOISE_FLOOR;
|
||||
m_rms[0] = new RmsHelper( 64 * engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[1] = new RmsHelper( 64 * engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[0] = new RmsHelper( 64 * Engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[1] = new RmsHelper( 64 * Engine::mixer()->processingSampleRate() / 44100 );
|
||||
calcAttack();
|
||||
calcRelease();
|
||||
}
|
||||
@@ -76,12 +76,12 @@ dynProcEffect::~dynProcEffect()
|
||||
|
||||
inline void dynProcEffect::calcAttack()
|
||||
{
|
||||
m_attCoeff = exp10( ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() );
|
||||
m_attCoeff = exp10( ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
inline void dynProcEffect::calcRelease()
|
||||
{
|
||||
m_relCoeff = exp10( ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() );
|
||||
m_relCoeff = exp10( ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ bool dynProcEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
|
||||
if( m_needsUpdate )
|
||||
{
|
||||
m_rms[0]->setSize( 64 * engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[1]->setSize( 64 * engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[0]->setSize( 64 * Engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[1]->setSize( 64 * Engine::mixer()->processingSampleRate() / 44100 );
|
||||
calcAttack();
|
||||
calcRelease();
|
||||
m_needsUpdate = false;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "dynamics_processor.h"
|
||||
#include "base64.h"
|
||||
#include "graph.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ dynProcControls::dynProcControls( dynProcEffect * _eff ) :
|
||||
{
|
||||
connect( &m_wavegraphModel, SIGNAL( samplesChanged( int, int ) ),
|
||||
this, SLOT( samplesChanged( int, int ) ) );
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
|
||||
setDefaultShape();
|
||||
|
||||
@@ -63,7 +63,7 @@ void dynProcControls::sampleRateChanged()
|
||||
|
||||
void dynProcControls::samplesChanged( int _begin, int _end)
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -126,13 +126,13 @@ void dynProcControls::setDefaultShape()
|
||||
void dynProcControls::resetClicked()
|
||||
{
|
||||
setDefaultShape();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::smoothClicked()
|
||||
{
|
||||
m_wavegraphModel.smoothNonCyclic();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::addOneClicked()
|
||||
@@ -141,7 +141,7 @@ void dynProcControls::addOneClicked()
|
||||
{
|
||||
m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] * onedB, 1.0f ) );
|
||||
}
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::subOneClicked()
|
||||
@@ -150,7 +150,7 @@ void dynProcControls::subOneClicked()
|
||||
{
|
||||
m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] / onedB, 1.0f ) );
|
||||
}
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "debug.h"
|
||||
#include "Effect.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "FxMixer.h"
|
||||
#include "FxMixerView.h"
|
||||
#include "group_box.h"
|
||||
@@ -767,8 +767,8 @@ bool FlpImport::tryImport( TrackContainer* tc )
|
||||
|
||||
int cur_channel = -1;
|
||||
|
||||
const bool is_journ = engine::projectJournal()->isJournalling();
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
const bool is_journ = Engine::projectJournal()->isJournalling();
|
||||
Engine::projectJournal()->setJournalling( false );
|
||||
|
||||
|
||||
while( file().atEnd() == false )
|
||||
@@ -1411,22 +1411,22 @@ else
|
||||
|
||||
|
||||
// now create a project from FL_Project data structure
|
||||
engine::getSong()->clearProject();
|
||||
Engine::getSong()->clearProject();
|
||||
|
||||
// configure the mixer
|
||||
for( int i=0; i<NumFLFxChannels; ++i )
|
||||
{
|
||||
engine::fxMixer()->createChannel();
|
||||
Engine::fxMixer()->createChannel();
|
||||
}
|
||||
engine::fxMixerView()->refreshDisplay();
|
||||
Engine::fxMixerView()->refreshDisplay();
|
||||
|
||||
// set global parameters
|
||||
engine::getSong()->setMasterVolume( p.mainVolume );
|
||||
engine::getSong()->setMasterPitch( p.mainPitch );
|
||||
engine::getSong()->setTempo( p.tempo );
|
||||
Engine::getSong()->setMasterVolume( p.mainVolume );
|
||||
Engine::getSong()->setMasterPitch( p.mainPitch );
|
||||
Engine::getSong()->setTempo( p.tempo );
|
||||
|
||||
// set project notes
|
||||
engine::getProjectNotes()->setText( p.projectNotes );
|
||||
Engine::getProjectNotes()->setText( p.projectNotes );
|
||||
|
||||
|
||||
progressDialog.setMaximum( p.maxPatterns + p.channels.size() +
|
||||
@@ -1437,11 +1437,11 @@ else
|
||||
QList<bbTrack *> bb_tracks;
|
||||
QList<InstrumentTrack *> i_tracks;
|
||||
|
||||
while( engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns )
|
||||
while( Engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns )
|
||||
{
|
||||
const int cur_pat = bb_tracks.size();
|
||||
bbTrack * bbt = dynamic_cast<bbTrack *>(
|
||||
Track::create( Track::BBTrack, engine::getSong() ) );
|
||||
Track::create( Track::BBTrack, Engine::getSong() ) );
|
||||
if( p.patternNames.contains( cur_pat ) )
|
||||
{
|
||||
bbt->setName( p.patternNames[cur_pat] );
|
||||
@@ -1457,8 +1457,8 @@ else
|
||||
{
|
||||
InstrumentTrack * t = dynamic_cast<InstrumentTrack *>(
|
||||
Track::create( Track::InstrumentTrack,
|
||||
engine::getBBTrackContainer() ) );
|
||||
engine::getBBTrackContainer()->updateAfterTrackAdd();
|
||||
Engine::getBBTrackContainer() ) );
|
||||
Engine::getBBTrackContainer()->updateAfterTrackAdd();
|
||||
i_tracks.push_back( t );
|
||||
switch( it->pluginType )
|
||||
{
|
||||
@@ -1657,7 +1657,7 @@ p->putValue( jt->pos, value, false );
|
||||
|
||||
for( int fx_ch = 0; fx_ch <= NumFLFxChannels ; ++fx_ch )
|
||||
{
|
||||
FxChannel * ch = engine::fxMixer()->effectChannel( fx_ch );
|
||||
FxChannel * ch = Engine::fxMixer()->effectChannel( fx_ch );
|
||||
if( !ch )
|
||||
{
|
||||
continue;
|
||||
@@ -1719,7 +1719,7 @@ p->putValue( jt->pos, value, false );
|
||||
{
|
||||
continue;
|
||||
}
|
||||
EffectChain * ec = &engine::fxMixer()->
|
||||
EffectChain * ec = &Engine::fxMixer()->
|
||||
effectChannel( it->fxChannel )->m_fxChain;
|
||||
qDebug( "adding %s to %d\n", effName.toUtf8().constData(),
|
||||
it->fxChannel );
|
||||
@@ -1763,14 +1763,14 @@ p->putValue( jt->pos, value, false );
|
||||
|
||||
|
||||
// set current pattern
|
||||
if( p.activeEditPattern < engine::getBBTrackContainer()->numOfBBs() )
|
||||
if( p.activeEditPattern < Engine::getBBTrackContainer()->numOfBBs() )
|
||||
{
|
||||
engine::getBBTrackContainer()->setCurrentBB(
|
||||
Engine::getBBTrackContainer()->setCurrentBB(
|
||||
p.activeEditPattern );
|
||||
}
|
||||
|
||||
// restore journalling settings
|
||||
engine::projectJournal()->setJournalling( is_journ );
|
||||
Engine::projectJournal()->setJournalling( is_journ );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QPainter>
|
||||
|
||||
#include "kicker.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -166,7 +166,7 @@ void kickerInstrument::playNote( NotePlayHandle * _n,
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
const float decfr = m_decayModel.value() *
|
||||
engine::mixer()->processingSampleRate() / 1000.0f;
|
||||
Engine::mixer()->processingSampleRate() / 1000.0f;
|
||||
const f_cnt_t tfp = _n->totalFramesPlayed();
|
||||
|
||||
if ( tfp == 0 )
|
||||
@@ -190,7 +190,7 @@ void kickerInstrument::playNote( NotePlayHandle * _n,
|
||||
}
|
||||
|
||||
SweepOsc * so = static_cast<SweepOsc *>( _n->m_pluginData );
|
||||
so->update( _working_buffer + offset, frames, engine::mixer()->processingSampleRate() );
|
||||
so->update( _working_buffer + offset, frames, Engine::mixer()->processingSampleRate() );
|
||||
|
||||
if( _n->isReleased() )
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "AudioDevice.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "Mixer.h"
|
||||
|
||||
@@ -41,7 +41,7 @@ ladspaDescription::ladspaDescription( QWidget * _parent,
|
||||
ladspaPluginType _type ) :
|
||||
QWidget( _parent )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
l_sortable_plugin_t plugins;
|
||||
switch( _type )
|
||||
@@ -74,7 +74,7 @@ ladspaDescription::ladspaDescription( QWidget * _parent,
|
||||
{
|
||||
if( _type != VALID ||
|
||||
manager->getDescription( ( *it ).second )->inputChannels
|
||||
<= engine::mixer()->audioDev()->channels() )
|
||||
<= Engine::mixer()->audioDev()->channels() )
|
||||
{
|
||||
pluginNames.push_back( ( *it ).first );
|
||||
m_pluginKeys.push_back( ( *it ).second );
|
||||
@@ -128,7 +128,7 @@ void ladspaDescription::update( const ladspa_key_t & _key )
|
||||
QVBoxLayout * layout = new QVBoxLayout( description );
|
||||
layout->setSizeConstraint( QLayout::SetFixedSize );
|
||||
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
QLabel * name = new QLabel( description );
|
||||
name->setText( QWidget::tr( "Name: " ) + manager->getName( _key ) );
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
#include <QTableWidget>
|
||||
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "Mixer.h"
|
||||
|
||||
|
||||
ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
setWindowIcon( embed::getIconPixmap( "ports" ) );
|
||||
setWindowTitle( tr( "Ports" ) );
|
||||
@@ -87,11 +87,11 @@ ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key )
|
||||
{
|
||||
if( min != NOHINT )
|
||||
{
|
||||
min *= engine::mixer()->processingSampleRate();
|
||||
min *= Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
if( max != NOHINT )
|
||||
{
|
||||
max *= engine::mixer()->processingSampleRate();
|
||||
max *= Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "lb302.h"
|
||||
#include "automatable_button.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
@@ -109,8 +109,8 @@ void lb302Filter::recalc()
|
||||
{
|
||||
vcf_e1 = exp(6.109 + 1.5876*(fs->envmod) + 2.1553*(fs->cutoff) - 1.2*(1.0-(fs->reso)));
|
||||
vcf_e0 = exp(5.613 - 0.8*(fs->envmod) + 2.1553*(fs->cutoff) - 0.7696*(1.0-(fs->reso)));
|
||||
vcf_e0*=M_PI/engine::mixer()->processingSampleRate();
|
||||
vcf_e1*=M_PI/engine::mixer()->processingSampleRate();
|
||||
vcf_e0*=M_PI/Engine::mixer()->processingSampleRate();
|
||||
vcf_e1*=M_PI/Engine::mixer()->processingSampleRate();
|
||||
vcf_e1 -= vcf_e0;
|
||||
|
||||
vcf_rescoeff = exp(-1.20 + 3.455*(fs->reso));
|
||||
@@ -226,14 +226,14 @@ void lb302Filter3Pole::envRecalc()
|
||||
w = vcf_e0 + vcf_c0;
|
||||
k = (fs->cutoff > 0.975)?0.975:fs->cutoff;
|
||||
kfco = 50.f + (k)*((2300.f-1600.f*(fs->envmod))+(w) *
|
||||
(700.f+1500.f*(k)+(1500.f+(k)*(engine::mixer()->processingSampleRate()/2.f-6000.f)) *
|
||||
(700.f+1500.f*(k)+(1500.f+(k)*(Engine::mixer()->processingSampleRate()/2.f-6000.f)) *
|
||||
(fs->envmod)) );
|
||||
//+iacc*(.3+.7*kfco*kenvmod)*kaccent*kaccurve*2000
|
||||
|
||||
|
||||
#ifdef LB_24_IGNORE_ENVELOPE
|
||||
// kfcn = fs->cutoff;
|
||||
kfcn = 2.0 * kfco / engine::mixer()->processingSampleRate();
|
||||
kfcn = 2.0 * kfco / Engine::mixer()->processingSampleRate();
|
||||
#else
|
||||
kfcn = w;
|
||||
#endif
|
||||
@@ -284,7 +284,7 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
|
||||
{
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged( ) ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged( ) ),
|
||||
this, SLOT ( filterChanged( ) ) );
|
||||
|
||||
connect( &vcf_cut_knob, SIGNAL( dataChanged( ) ),
|
||||
@@ -354,7 +354,7 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
filterChanged();
|
||||
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ void lb302Synth::filterChanged()
|
||||
|
||||
float d = 0.2 + (2.3*vcf_dec_knob.value());
|
||||
|
||||
d *= engine::mixer()->processingSampleRate(); // d *= smpl rate
|
||||
d *= Engine::mixer()->processingSampleRate(); // d *= smpl rate
|
||||
fs.envdecay = pow(0.1, 1.0/d * ENVINC); // decay is 0.1 to the 1/d * ENVINC
|
||||
// vcf_envdecay is now adjusted for both
|
||||
// sampling rate and ENVINC
|
||||
@@ -463,12 +463,12 @@ inline int MIN(int a, int b) {
|
||||
}
|
||||
|
||||
inline float GET_INC(float freq) {
|
||||
return freq/engine::mixer()->processingSampleRate(); // TODO: Use actual sampling rate.
|
||||
return freq/Engine::mixer()->processingSampleRate(); // TODO: Use actual sampling rate.
|
||||
}
|
||||
|
||||
int lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
{
|
||||
const float sampleRatio = 44100.f / engine::mixer()->processingSampleRate();
|
||||
const float sampleRatio = 44100.f / Engine::mixer()->processingSampleRate();
|
||||
float w;
|
||||
float samp;
|
||||
|
||||
@@ -643,7 +643,7 @@ int lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
// Handle Envelope
|
||||
if(vca_mode==0) {
|
||||
vca_a+=(vca_a0-vca_a)*vca_attack;
|
||||
if(sample_cnt>=0.5*engine::mixer()->processingSampleRate())
|
||||
if(sample_cnt>=0.5*Engine::mixer()->processingSampleRate())
|
||||
vca_mode = 2;
|
||||
}
|
||||
else if(vca_mode == 1) {
|
||||
@@ -793,7 +793,7 @@ void lb302Synth::play( sampleFrame * _working_buffer )
|
||||
processNote( m_notes.takeFirst() );
|
||||
};
|
||||
|
||||
const fpp_t frames = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
process( _working_buffer, frames );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, NULL );
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "Monstro.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "templates.h"
|
||||
#include "gui_templates.h"
|
||||
@@ -1012,9 +1012,9 @@ MonstroInstrument::MonstroInstrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
// updateSampleRate
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSamplerate() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSamplerate() ) );
|
||||
|
||||
m_fpp = engine::mixer()->framesPerPeriod();
|
||||
m_fpp = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
updateSamplerate();
|
||||
updateVolume1();
|
||||
@@ -1425,7 +1425,7 @@ void MonstroInstrument::updateLFOAtts()
|
||||
|
||||
void MonstroInstrument::updateSamplerate()
|
||||
{
|
||||
m_samplerate = engine::mixer()->processingSampleRate();
|
||||
m_samplerate = Engine::mixer()->processingSampleRate();
|
||||
|
||||
m_integrator = 0.5f - ( 0.5f - INTEGRATOR ) * 44100.0f / m_samplerate;
|
||||
m_fmCorrection = 44100.f / m_samplerate * FM_AMOUNT;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "Nes.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "templates.h"
|
||||
#include "tooltip.h"
|
||||
@@ -560,7 +560,7 @@ void NesInstrument::playNote( NotePlayHandle * n, sampleFrame * workingBuffer )
|
||||
|
||||
if ( n->totalFramesPlayed() == 0 || n->m_pluginData == NULL )
|
||||
{
|
||||
NesObject * nes = new NesObject( this, engine::mixer()->processingSampleRate(), n );
|
||||
NesObject * nes = new NesObject( this, Engine::mixer()->processingSampleRate(), n );
|
||||
n->m_pluginData = nes;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "mididata.h"
|
||||
#include "debug.h"
|
||||
#include "Instrument.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
@@ -139,14 +139,14 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
{
|
||||
// Connect the plugin to the mixer...
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
// Voices are laid out in a funny way...
|
||||
// adlib_opadd = {0x00, 0x01, 0x02, 0x08, 0x09, 0x0A, 0x10, 0x11, 0x12};
|
||||
|
||||
// Create an emulator - samplerate, 16 bit, mono
|
||||
emulatorMutex.lock();
|
||||
theEmulator = new CTemuopl(engine::mixer()->processingSampleRate(), true, false);
|
||||
theEmulator = new CTemuopl(Engine::mixer()->processingSampleRate(), true, false);
|
||||
theEmulator->init();
|
||||
// Enable waveform selection
|
||||
theEmulator->write(0x01,0x20);
|
||||
@@ -163,7 +163,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
updatePatch();
|
||||
|
||||
// Can the buffer size change suddenly? I bet that would break lots of stuff
|
||||
frameCount = engine::mixer()->framesPerPeriod();
|
||||
frameCount = Engine::mixer()->framesPerPeriod();
|
||||
renderbuffer = new short[frameCount];
|
||||
|
||||
// Some kind of sane defaults
|
||||
@@ -173,7 +173,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
tuneEqual(69, 440);
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( reloadEmulator() ) );
|
||||
// Connect knobs
|
||||
// This one's for testing...
|
||||
@@ -221,7 +221,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
opl2instrument::~opl2instrument() {
|
||||
delete theEmulator;
|
||||
engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
Engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
delete [] renderbuffer;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ opl2instrument::~opl2instrument() {
|
||||
void opl2instrument::reloadEmulator() {
|
||||
delete theEmulator;
|
||||
emulatorMutex.lock();
|
||||
theEmulator = new CTemuopl(engine::mixer()->processingSampleRate(), true, false);
|
||||
theEmulator = new CTemuopl(Engine::mixer()->processingSampleRate(), true, false);
|
||||
theEmulator->init();
|
||||
theEmulator->write(0x01,0x20);
|
||||
emulatorMutex.unlock();
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -143,7 +143,7 @@ organicInstrument::organicInstrument( InstrumentTrack * _instrument_track ) :
|
||||
}
|
||||
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( updateAllDetuning() ) );
|
||||
}
|
||||
|
||||
@@ -628,10 +628,10 @@ void OscillatorObject::updateDetuning()
|
||||
{
|
||||
m_detuningLeft = powf( 2.0f, organicInstrument::s_harmonics[ static_cast<int>( m_harmModel.value() ) ]
|
||||
+ (float)m_detuneModel.value() * CENT ) /
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
m_detuningRight = powf( 2.0f, organicInstrument::s_harmonics[ static_cast<int>( m_harmModel.value() ) ]
|
||||
- (float)m_detuneModel.value() * CENT ) /
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "NotePlayHandle.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "tooltip.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "graph.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
@@ -237,7 +237,7 @@ void papuInstrument::playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer )
|
||||
{
|
||||
const f_cnt_t tfp = _n->totalFramesPlayed();
|
||||
const int samplerate = engine::mixer()->processingSampleRate();
|
||||
const int samplerate = Engine::mixer()->processingSampleRate();
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "endian_handling.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -551,7 +551,7 @@ void PatmanView::openFile( void )
|
||||
if( f != "" )
|
||||
{
|
||||
m_pi->setFile( f );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ PeakControllerEffect::PeakControllerEffect(
|
||||
m_lastSample( 0 ),
|
||||
m_autoController( NULL )
|
||||
{
|
||||
m_autoController = new PeakController( engine::getSong(), this );
|
||||
engine::getSong()->addController( m_autoController );
|
||||
m_autoController = new PeakController( Engine::getSong(), this );
|
||||
Engine::getSong()->addController( m_autoController );
|
||||
PeakController::s_effects.append( this );
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ PeakControllerEffect::~PeakControllerEffect()
|
||||
if( idx >= 0 )
|
||||
{
|
||||
PeakController::s_effects.remove( idx );
|
||||
engine::getSong()->removeController( m_autoController );
|
||||
Engine::getSong()->removeController( m_autoController );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
* m_effectId is copied, then there would be two instruments
|
||||
* having the same id.
|
||||
*/
|
||||
if( engine::getSong()->isLoadingProject() == true )
|
||||
if( Engine::getSong()->isLoadingProject() == true )
|
||||
{
|
||||
m_effect->m_effectId = _this.attribute( "effectId" ).toInt();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "FileDialog.h"
|
||||
#include "sf2_player.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -119,7 +119,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
m_synth = new_fluid_synth( m_settings );
|
||||
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
loadFile( ConfigManager::inst()->defaultSoundfont() );
|
||||
|
||||
@@ -133,7 +133,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
connect( &m_bankNum, SIGNAL( dataChanged() ), this, SLOT( updatePatch() ) );
|
||||
connect( &m_patchNum, SIGNAL( dataChanged() ), this, SLOT( updatePatch() ) );
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) );
|
||||
|
||||
// Gain
|
||||
connect( &m_gain, SIGNAL( dataChanged() ), this, SLOT( updateGain() ) );
|
||||
@@ -158,7 +158,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
sf2Instrument::~sf2Instrument()
|
||||
{
|
||||
engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
Engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
freeFont();
|
||||
delete_fluid_synth( m_synth );
|
||||
delete_fluid_settings( m_settings );
|
||||
@@ -465,7 +465,7 @@ void sf2Instrument::updateSampleRate()
|
||||
double tempRate;
|
||||
|
||||
// Set & get, returns the true sample rate
|
||||
fluid_settings_setnum( m_settings, (char *) "synth.sample-rate", engine::mixer()->processingSampleRate() );
|
||||
fluid_settings_setnum( m_settings, (char *) "synth.sample-rate", Engine::mixer()->processingSampleRate() );
|
||||
fluid_settings_getnum( m_settings, (char *) "synth.sample-rate", &tempRate );
|
||||
m_internalSampleRate = static_cast<int>( tempRate );
|
||||
|
||||
@@ -495,7 +495,7 @@ void sf2Instrument::updateSampleRate()
|
||||
}
|
||||
|
||||
m_synthMutex.lock();
|
||||
if( engine::mixer()->currentQualitySettings().interpolation >=
|
||||
if( Engine::mixer()->currentQualitySettings().interpolation >=
|
||||
Mixer::qualitySettings::Interpolation_SincFastest )
|
||||
{
|
||||
fluid_synth_set_interp_method( m_synth, -1, FLUID_INTERP_7THORDER );
|
||||
@@ -505,7 +505,7 @@ void sf2Instrument::updateSampleRate()
|
||||
fluid_synth_set_interp_method( m_synth, -1, FLUID_INTERP_DEFAULT );
|
||||
}
|
||||
m_synthMutex.unlock();
|
||||
if( m_internalSampleRate < engine::mixer()->processingSampleRate() )
|
||||
if( m_internalSampleRate < Engine::mixer()->processingSampleRate() )
|
||||
{
|
||||
m_synthMutex.lock();
|
||||
if( m_srcState != NULL )
|
||||
@@ -513,7 +513,7 @@ void sf2Instrument::updateSampleRate()
|
||||
src_delete( m_srcState );
|
||||
}
|
||||
int error;
|
||||
m_srcState = src_new( engine::mixer()->currentQualitySettings().libsrcInterpolation(), DEFAULT_CHANNELS, &error );
|
||||
m_srcState = src_new( Engine::mixer()->currentQualitySettings().libsrcInterpolation(), DEFAULT_CHANNELS, &error );
|
||||
if( m_srcState == NULL || error )
|
||||
{
|
||||
qCritical( "error while creating libsamplerate data structure in Sf2Instrument::updateSampleRate()" );
|
||||
@@ -641,7 +641,7 @@ void sf2Instrument::noteOff( SF2PluginData * n )
|
||||
|
||||
void sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
{
|
||||
const fpp_t frames = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
// set midi pitch for this period
|
||||
const int currentMidiPitch = instrumentTrack()->midiPitch();
|
||||
@@ -722,10 +722,10 @@ void sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
void sf2Instrument::renderFrames( f_cnt_t frames, sampleFrame * buf )
|
||||
{
|
||||
m_synthMutex.lock();
|
||||
if( m_internalSampleRate < engine::mixer()->processingSampleRate() &&
|
||||
if( m_internalSampleRate < Engine::mixer()->processingSampleRate() &&
|
||||
m_srcState != NULL )
|
||||
{
|
||||
const fpp_t f = frames * m_internalSampleRate / engine::mixer()->processingSampleRate();
|
||||
const fpp_t f = frames * m_internalSampleRate / Engine::mixer()->processingSampleRate();
|
||||
#ifdef __GNUC__
|
||||
sampleFrame tmp[f];
|
||||
#else
|
||||
@@ -1084,7 +1084,7 @@ void sf2InstrumentView::showFileDialog()
|
||||
if( f != "" )
|
||||
{
|
||||
k->openFile( f );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ float frnd(float range)
|
||||
#include <QDomElement>
|
||||
|
||||
#include "sfxr.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -451,7 +451,7 @@ QString sfxrInstrument::nodeName() const
|
||||
|
||||
void sfxrInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
{
|
||||
float currentSampleRate = engine::mixer()->processingSampleRate();
|
||||
float currentSampleRate = Engine::mixer()->processingSampleRate();
|
||||
|
||||
fpp_t frameNum = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "sid.h"
|
||||
|
||||
#include "sid_instrument.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -230,7 +230,7 @@ QString sidInstrument::nodeName() const
|
||||
|
||||
f_cnt_t sidInstrument::desiredReleaseFrames() const
|
||||
{
|
||||
const float samplerate = engine::mixer()->processingSampleRate();
|
||||
const float samplerate = Engine::mixer()->processingSampleRate();
|
||||
int maxrel = 0;
|
||||
for( int i = 0 ; i < 3 ; ++i )
|
||||
{
|
||||
@@ -305,7 +305,7 @@ void sidInstrument::playNote( NotePlayHandle * _n,
|
||||
const f_cnt_t tfp = _n->totalFramesPlayed();
|
||||
|
||||
const int clockrate = C64_PAL_CYCLES_PER_SEC;
|
||||
const int samplerate = engine::mixer()->processingSampleRate();
|
||||
const int samplerate = Engine::mixer()->processingSampleRate();
|
||||
|
||||
if ( tfp == 0 )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "Effect.h"
|
||||
#include "DspEffectLibrary.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "stereoenhancer_controls.h"
|
||||
|
||||
class stereoEnhancerEffect : public Effect
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "TripleOscillator.h"
|
||||
#include "automatable_button.h"
|
||||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -175,7 +175,7 @@ void OscillatorObject::updateDetuningLeft()
|
||||
{
|
||||
m_detuningLeft = powf( 2.0f, ( (float)m_coarseModel.value() * 100.0f
|
||||
+ (float)m_fineLeftModel.value() ) / 1200.0f )
|
||||
/ engine::mixer()->processingSampleRate();
|
||||
/ Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ void OscillatorObject::updateDetuningRight()
|
||||
{
|
||||
m_detuningRight = powf( 2.0f, ( (float)m_coarseModel.value() * 100.0f
|
||||
+ (float)m_fineRightModel.value() ) / 1200.0f )
|
||||
/ engine::mixer()->processingSampleRate();
|
||||
/ Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ TripleOscillator::TripleOscillator( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
}
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( updateAllDetuning() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QMenu>
|
||||
#include <QDomElement>
|
||||
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
@@ -83,7 +83,7 @@ vestigeInstrument::vestigeInstrument( InstrumentTrack * _instrument_track ) :
|
||||
{
|
||||
// now we need a play-handle which cares for calling play()
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ vestigeInstrument::~vestigeInstrument()
|
||||
knobFModel = NULL;
|
||||
}
|
||||
|
||||
engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
Engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
closePlugin();
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ void vestigeInstrument::play( sampleFrame * _buf )
|
||||
|
||||
m_plugin->process( NULL, _buf );
|
||||
|
||||
const fpp_t frames = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
instrumentTrack()->processAudioBuffer( _buf, frames, NULL );
|
||||
|
||||
@@ -647,7 +647,7 @@ void VestigeInstrumentView::openPlugin()
|
||||
{
|
||||
return;
|
||||
}
|
||||
engine::mixer()->lock();
|
||||
Engine::mixer()->lock();
|
||||
|
||||
if (m_vi->p_subWindow != NULL) {
|
||||
delete m_vi->p_subWindow;
|
||||
@@ -655,7 +655,7 @@ void VestigeInstrumentView::openPlugin()
|
||||
}
|
||||
|
||||
m_vi->loadFile( ofd.selectedFiles()[0] );
|
||||
engine::mixer()->unlock();
|
||||
Engine::mixer()->unlock();
|
||||
if( m_vi->m_plugin && m_vi->m_plugin->pluginWidget() )
|
||||
{
|
||||
m_vi->m_plugin->pluginWidget()->setWindowIcon(
|
||||
@@ -881,7 +881,7 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
|
||||
widget = new QWidget(this);
|
||||
l = new QGridLayout( this );
|
||||
|
||||
m_vi->m_subWindow = engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow |
|
||||
m_vi->m_subWindow = Engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow |
|
||||
Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
|
||||
m_vi->m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::MinimumExpanding );
|
||||
m_vi->m_subWindow->setFixedWidth( 960 );
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QWhatsThis>
|
||||
|
||||
#include "vibed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "tooltip.h"
|
||||
@@ -277,7 +277,7 @@ void vibed::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL )
|
||||
{
|
||||
_n->m_pluginData = new stringContainer( _n->frequency(),
|
||||
engine::mixer()->processingSampleRate(),
|
||||
Engine::mixer()->processingSampleRate(),
|
||||
__sampleLength );
|
||||
|
||||
for( int i = 0; i < 9; ++i )
|
||||
@@ -690,7 +690,7 @@ void vibedView::showString( int _string )
|
||||
void vibedView::sinWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -698,7 +698,7 @@ void vibedView::sinWaveClicked()
|
||||
void vibedView::triangleWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -706,7 +706,7 @@ void vibedView::triangleWaveClicked()
|
||||
void vibedView::sawWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -714,7 +714,7 @@ void vibedView::sawWaveClicked()
|
||||
void vibedView::sqrWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -722,7 +722,7 @@ void vibedView::sqrWaveClicked()
|
||||
void vibedView::noiseWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToNoise();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -731,7 +731,7 @@ void vibedView::usrWaveClicked()
|
||||
{
|
||||
QString fileName = m_graph->model()->setWaveToUser();
|
||||
toolTip::add( m_usrWaveBtn, fileName );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -739,7 +739,7 @@ void vibedView::usrWaveClicked()
|
||||
void vibedView::smoothClicked()
|
||||
{
|
||||
m_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -747,7 +747,7 @@ void vibedView::smoothClicked()
|
||||
void vibedView::normalizeClicked()
|
||||
{
|
||||
m_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "templates.h"
|
||||
#include "interpolation.h"
|
||||
#include "Mixer.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
|
||||
|
||||
vibratingString::vibratingString( float _pitch,
|
||||
@@ -42,7 +42,7 @@ vibratingString::vibratingString( float _pitch,
|
||||
float _detune,
|
||||
bool _state ) :
|
||||
m_oversample( 2 * _oversample / (int)( _sample_rate /
|
||||
engine::mixer()->baseSampleRate() ) ),
|
||||
Engine::mixer()->baseSampleRate() ) ),
|
||||
m_randomize( _randomize ),
|
||||
m_stringLoss( 1.0f - _string_loss ),
|
||||
m_state( 0.1f )
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#endif
|
||||
|
||||
#include "ConfigManager.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "MainWindow.h"
|
||||
#include "Song.h"
|
||||
#include "templates.h"
|
||||
@@ -108,11 +108,11 @@ VstPlugin::VstPlugin( const QString & _plugin ) :
|
||||
}
|
||||
#endif
|
||||
|
||||
setTempo( engine::getSong()->getTempo() );
|
||||
setTempo( Engine::getSong()->getTempo() );
|
||||
|
||||
connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
this, SLOT( setTempo( bpm_t ) ) );
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( updateSampleRate() ) );
|
||||
|
||||
// update once per second
|
||||
@@ -237,7 +237,7 @@ void VstPlugin::showEditor( QWidget * _parent, bool isEffect )
|
||||
if( _parent == NULL )
|
||||
{
|
||||
vstSubWin * sw = new vstSubWin(
|
||||
engine::mainWindow()->workspace() );
|
||||
Engine::mainWindow()->workspace() );
|
||||
if( isEffect )
|
||||
{
|
||||
sw->setAttribute( Qt::WA_TranslucentBackground );
|
||||
@@ -377,7 +377,7 @@ void VstPlugin::updateSampleRate()
|
||||
{
|
||||
lock();
|
||||
sendMessage( message( IdSampleRateInformation ).
|
||||
addInt( engine::mixer()->processingSampleRate() ) );
|
||||
addInt( Engine::mixer()->processingSampleRate() ) );
|
||||
unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "Watsyn.h"
|
||||
#include "base64.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "templates.h"
|
||||
#include "tooltip.h"
|
||||
@@ -337,8 +337,8 @@ void WatsynInstrument::playNote( NotePlayHandle * _n,
|
||||
&B1_wave[0],
|
||||
&B2_wave[0],
|
||||
m_amod.value(), m_bmod.value(),
|
||||
engine::mixer()->processingSampleRate(), _n,
|
||||
engine::mixer()->framesPerPeriod(), this );
|
||||
Engine::mixer()->processingSampleRate(), _n,
|
||||
Engine::mixer()->framesPerPeriod(), this );
|
||||
|
||||
_n->m_pluginData = w;
|
||||
}
|
||||
@@ -983,19 +983,19 @@ void WatsynView::sinWaveClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1007,19 +1007,19 @@ void WatsynView::triWaveClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1031,19 +1031,19 @@ void WatsynView::sawWaveClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1055,19 +1055,19 @@ void WatsynView::sqrWaveClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1079,19 +1079,19 @@ void WatsynView::normalizeClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1103,19 +1103,19 @@ void WatsynView::invertClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->invert();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->invert();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->invert();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->invert();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1127,19 +1127,19 @@ void WatsynView::smoothClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1151,19 +1151,19 @@ void WatsynView::phaseLeftClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->shiftPhase( -15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->shiftPhase( -15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->shiftPhase( -15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->shiftPhase( -15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1175,19 +1175,19 @@ void WatsynView::phaseRightClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->shiftPhase( 15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->shiftPhase( 15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->shiftPhase( 15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->shiftPhase( 15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1200,19 +1200,19 @@ void WatsynView::loadClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToUser();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToUser();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToUser();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToUser();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "waveshaper.h"
|
||||
#include "base64.h"
|
||||
#include "graph.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ waveShaperControls::waveShaperControls( waveShaperEffect * _eff ) :
|
||||
|
||||
void waveShaperControls::samplesChanged( int _begin, int _end)
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -115,13 +115,13 @@ void waveShaperControls::setDefaultShape()
|
||||
void waveShaperControls::resetClicked()
|
||||
{
|
||||
setDefaultShape();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void waveShaperControls::smoothClicked()
|
||||
{
|
||||
m_wavegraphModel.smoothNonCyclic();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void waveShaperControls::addOneClicked()
|
||||
@@ -130,7 +130,7 @@ void waveShaperControls::addOneClicked()
|
||||
{
|
||||
m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] * onedB, 1.0f ) );
|
||||
}
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void waveShaperControls::subOneClicked()
|
||||
@@ -139,7 +139,7 @@ void waveShaperControls::subOneClicked()
|
||||
{
|
||||
m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] / onedB, 1.0f ) );
|
||||
}
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QPushButton>
|
||||
|
||||
#include "ZynAddSubFx.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "knob.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "DataFile.h"
|
||||
@@ -130,9 +130,9 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument(
|
||||
|
||||
// now we need a play-handle which cares for calling play()
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( reloadPlugin() ) );
|
||||
|
||||
connect( instrumentTrack()->pitchRangeModel(), SIGNAL( dataChanged() ),
|
||||
@@ -144,7 +144,7 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument(
|
||||
|
||||
ZynAddSubFxInstrument::~ZynAddSubFxInstrument()
|
||||
{
|
||||
engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
Engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
|
||||
m_pluginMutex.lock();
|
||||
delete m_plugin;
|
||||
@@ -333,7 +333,7 @@ void ZynAddSubFxInstrument::play( sampleFrame * _buf )
|
||||
m_plugin->processAudio( _buf );
|
||||
}
|
||||
m_pluginMutex.unlock();
|
||||
instrumentTrack()->processAudioBuffer( _buf, engine::mixer()->framesPerPeriod(), NULL );
|
||||
instrumentTrack()->processAudioBuffer( _buf, Engine::mixer()->framesPerPeriod(), NULL );
|
||||
}
|
||||
|
||||
|
||||
@@ -443,11 +443,11 @@ void ZynAddSubFxInstrument::initPlugin()
|
||||
QString( ConfigManager::inst()->factoryPresetsDir() +
|
||||
QDir::separator() + "ZynAddSubFX" ) ) ) );
|
||||
|
||||
m_remotePlugin->updateSampleRate( engine::mixer()->processingSampleRate() );
|
||||
m_remotePlugin->updateSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
// temporary workaround until the VST synchronization feature gets stripped out of the RemotePluginClient class
|
||||
// causing not to send buffer size information requests
|
||||
m_remotePlugin->sendMessage( RemotePlugin::message( IdBufferSizeInformation ).addInt( engine::mixer()->framesPerPeriod() ) );
|
||||
m_remotePlugin->sendMessage( RemotePlugin::message( IdBufferSizeInformation ).addInt( Engine::mixer()->framesPerPeriod() ) );
|
||||
|
||||
m_remotePlugin->showUI();
|
||||
m_remotePlugin->unlock();
|
||||
@@ -455,8 +455,8 @@ void ZynAddSubFxInstrument::initPlugin()
|
||||
else
|
||||
{
|
||||
m_plugin = new LocalZynAddSubFx;
|
||||
m_plugin->setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
m_plugin->setBufferSize( engine::mixer()->framesPerPeriod() );
|
||||
m_plugin->setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
m_plugin->setBufferSize( Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
Reference in New Issue
Block a user