clang-tidy: Apply modernize-use-auto everywhere (#6480)
Note: clang-tidy was run with `--format-style=file`.
This commit is contained in:
@@ -43,27 +43,27 @@ AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) :
|
||||
setPalette( pal );
|
||||
setFixedSize( 100, 110 );
|
||||
|
||||
Knob * volumeKnob = new Knob( knobBright_26, this);
|
||||
auto volumeKnob = new Knob(knobBright_26, this);
|
||||
volumeKnob -> move( 16, 10 );
|
||||
volumeKnob -> setVolumeKnob( true );
|
||||
volumeKnob->setModel( &controls->m_volumeModel );
|
||||
volumeKnob->setLabel( tr( "VOL" ) );
|
||||
volumeKnob->setHintText( tr( "Volume:" ) , "%" );
|
||||
|
||||
Knob * panKnob = new Knob( knobBright_26, this);
|
||||
auto panKnob = new Knob(knobBright_26, this);
|
||||
panKnob -> move( 57, 10 );
|
||||
panKnob->setModel( &controls->m_panModel );
|
||||
panKnob->setLabel( tr( "PAN" ) );
|
||||
panKnob->setHintText( tr( "Panning:" ) , "" );
|
||||
|
||||
Knob * leftKnob = new Knob( knobBright_26, this);
|
||||
auto leftKnob = new Knob(knobBright_26, this);
|
||||
leftKnob -> move( 16, 65 );
|
||||
leftKnob -> setVolumeKnob( true );
|
||||
leftKnob->setModel( &controls->m_leftModel );
|
||||
leftKnob->setLabel( tr( "LEFT" ) );
|
||||
leftKnob->setHintText( tr( "Left gain:" ) , "%" );
|
||||
|
||||
Knob * rightKnob = new Knob( knobBright_26, this);
|
||||
auto rightKnob = new Knob(knobBright_26, this);
|
||||
rightKnob -> move( 57, 65 );
|
||||
rightKnob -> setVolumeKnob( true );
|
||||
rightKnob->setModel( &controls->m_rightModel );
|
||||
|
||||
@@ -426,9 +426,9 @@ void AudioFileProcessor::loopPointChanged()
|
||||
|
||||
void AudioFileProcessor::pointChanged()
|
||||
{
|
||||
const f_cnt_t f_start = static_cast<f_cnt_t>( m_startPointModel.value() * m_sampleBuffer.frames() );
|
||||
const f_cnt_t f_end = static_cast<f_cnt_t>( m_endPointModel.value() * m_sampleBuffer.frames() );
|
||||
const f_cnt_t f_loop = static_cast<f_cnt_t>( m_loopPointModel.value() * m_sampleBuffer.frames() );
|
||||
const auto f_start = static_cast<f_cnt_t>(m_startPointModel.value() * m_sampleBuffer.frames());
|
||||
const auto f_end = static_cast<f_cnt_t>(m_endPointModel.value() * m_sampleBuffer.frames());
|
||||
const auto f_loop = static_cast<f_cnt_t>(m_loopPointModel.value() * m_sampleBuffer.frames());
|
||||
|
||||
m_nextPlayStartPoint = f_start;
|
||||
m_nextPlayBackwards = false;
|
||||
@@ -479,7 +479,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
|
||||
// loop button group
|
||||
|
||||
PixmapButton * m_loopOffButton = new PixmapButton( this );
|
||||
auto m_loopOffButton = new PixmapButton(this);
|
||||
m_loopOffButton->setCheckable( true );
|
||||
m_loopOffButton->move( 190, 105 );
|
||||
m_loopOffButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
@@ -488,8 +488,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
"loop_off_off" ) );
|
||||
m_loopOffButton->setToolTip(tr("Disable loop"));
|
||||
|
||||
|
||||
PixmapButton * m_loopOnButton = new PixmapButton( this );
|
||||
auto m_loopOnButton = new PixmapButton(this);
|
||||
m_loopOnButton->setCheckable( true );
|
||||
m_loopOnButton->move( 190, 124 );
|
||||
m_loopOnButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
@@ -498,7 +497,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
"loop_on_off" ) );
|
||||
m_loopOnButton->setToolTip(tr("Enable loop"));
|
||||
|
||||
PixmapButton * m_loopPingPongButton = new PixmapButton( this );
|
||||
auto m_loopPingPongButton = new PixmapButton(this);
|
||||
m_loopPingPongButton->setCheckable( true );
|
||||
m_loopPingPongButton->move( 216, 124 );
|
||||
m_loopPingPongButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
@@ -645,9 +644,9 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * )
|
||||
|
||||
p.drawPixmap( 0, 0, *s_artwork );
|
||||
|
||||
AudioFileProcessor * a = castModel<AudioFileProcessor>();
|
||||
auto a = castModel<AudioFileProcessor>();
|
||||
|
||||
QString file_name = "";
|
||||
QString file_name = "";
|
||||
int idx = a->m_sampleBuffer.audioFile().length();
|
||||
|
||||
p.setFont( pointSize<8>( font() ) );
|
||||
@@ -702,7 +701,7 @@ void AudioFileProcessorView::openAudioFile()
|
||||
|
||||
void AudioFileProcessorView::modelChanged()
|
||||
{
|
||||
AudioFileProcessor * a = castModel<AudioFileProcessor>();
|
||||
auto a = castModel<AudioFileProcessor>();
|
||||
connect( &a->m_sampleBuffer, SIGNAL( sampleUpdated() ),
|
||||
this, SLOT( sampleUpdated() ) );
|
||||
m_ampKnob->setModel( &a->m_ampModel );
|
||||
|
||||
@@ -45,22 +45,22 @@ BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* control
|
||||
setPalette( pal );
|
||||
setFixedSize( 120, 60 );
|
||||
|
||||
QVBoxLayout * tl = new QVBoxLayout( this );
|
||||
auto tl = new QVBoxLayout(this);
|
||||
tl->addSpacing( 4 );
|
||||
|
||||
QHBoxLayout * l = new QHBoxLayout;
|
||||
auto l = new QHBoxLayout;
|
||||
|
||||
Knob * freqKnob = new Knob( knobBright_26, this);
|
||||
auto freqKnob = new Knob(knobBright_26, this);
|
||||
freqKnob->setModel( &controls->m_freqModel );
|
||||
freqKnob->setLabel( tr( "FREQ" ) );
|
||||
freqKnob->setHintText( tr( "Frequency:" ) , "Hz" );
|
||||
|
||||
Knob * gainKnob = new Knob( knobBright_26, this );
|
||||
auto gainKnob = new Knob(knobBright_26, this);
|
||||
gainKnob->setModel( &controls->m_gainModel );
|
||||
gainKnob->setLabel( tr( "GAIN" ) );
|
||||
gainKnob->setHintText( tr( "Gain:" ) , "" );
|
||||
|
||||
Knob * ratioKnob = new Knob( knobBright_26, this );
|
||||
auto ratioKnob = new Knob(knobBright_26, this);
|
||||
ratioKnob->setModel( &controls->m_ratioModel );
|
||||
ratioKnob->setLabel( tr( "RATIO" ) );
|
||||
ratioKnob->setHintText( tr( "Ratio:" ) , "" );
|
||||
|
||||
@@ -103,10 +103,8 @@ BSynth::~BSynth()
|
||||
|
||||
sample_t BSynth::nextStringSample( float sample_length )
|
||||
{
|
||||
float sample_step =
|
||||
static_cast<float>( sample_length / ( sample_rate / nph->frequency() ) );
|
||||
auto sample_step = static_cast<float>(sample_length / (sample_rate / nph->frequency()));
|
||||
|
||||
|
||||
// check overflow
|
||||
while (sample_realindex >= sample_length) {
|
||||
sample_realindex -= sample_length;
|
||||
@@ -299,7 +297,7 @@ void BitInvader::playNote( NotePlayHandle * _n,
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
|
||||
BSynth * ps = static_cast<BSynth *>( _n->m_pluginData );
|
||||
auto ps = static_cast<BSynth*>(_n->m_pluginData);
|
||||
for( fpp_t frame = offset; frame < frames + offset; ++frame )
|
||||
{
|
||||
const sample_t cur = ps->nextStringSample( m_graph.length() );
|
||||
@@ -472,7 +470,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
|
||||
|
||||
void BitInvaderView::modelChanged()
|
||||
{
|
||||
BitInvader * b = castModel<BitInvader>();
|
||||
auto b = castModel<BitInvader>();
|
||||
|
||||
m_graph->setModel( &b->m_graph );
|
||||
m_sampleLengthKnob->setModel( &b->m_sampleLength );
|
||||
|
||||
32
plugins/Bitcrush/BitcrushControlDialog.cpp
Executable file → Normal file
32
plugins/Bitcrush/BitcrushControlDialog.cpp
Executable file → Normal file
@@ -46,20 +46,20 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
setFixedSize( 181, 128 );
|
||||
|
||||
// labels
|
||||
QLabel * inLabel = new QLabel( tr( "IN" ), this );
|
||||
auto inLabel = new QLabel(tr("IN"), this);
|
||||
inLabel->move( 24, 15 );
|
||||
|
||||
QLabel * outLabel = new QLabel( tr( "OUT" ), this );
|
||||
|
||||
auto outLabel = new QLabel(tr("OUT"), this);
|
||||
outLabel->move( 139, 15 );
|
||||
|
||||
// input knobs
|
||||
Knob * inGain = new Knob( knobBright_26, this );
|
||||
auto inGain = new Knob(knobBright_26, this);
|
||||
inGain->move( 16, 32 );
|
||||
inGain->setModel( & controls->m_inGain );
|
||||
inGain->setLabel( tr( "GAIN" ) );
|
||||
inGain->setHintText( tr( "Input gain:" ) , " dBFS" );
|
||||
|
||||
Knob * inNoise = new Knob( knobBright_26, this );
|
||||
|
||||
auto inNoise = new Knob(knobBright_26, this);
|
||||
inNoise->move( 14, 76 );
|
||||
inNoise->setModel( & controls->m_inNoise );
|
||||
inNoise->setLabel( tr( "NOISE" ) );
|
||||
@@ -67,13 +67,13 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
|
||||
|
||||
// output knobs
|
||||
Knob * outGain = new Knob( knobBright_26, this );
|
||||
auto outGain = new Knob(knobBright_26, this);
|
||||
outGain->move( 138, 32 );
|
||||
outGain->setModel( & controls->m_outGain );
|
||||
outGain->setLabel( tr( "GAIN" ) );
|
||||
outGain->setHintText( tr( "Output gain:" ) , " dBFS" );
|
||||
|
||||
Knob * outClip = new Knob( knobBright_26, this );
|
||||
|
||||
auto outClip = new Knob(knobBright_26, this);
|
||||
outClip->move( 138, 76 );
|
||||
outClip->setModel( & controls->m_outClip );
|
||||
outClip->setLabel( tr( "CLIP" ) );
|
||||
@@ -82,25 +82,25 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
|
||||
|
||||
// leds
|
||||
LedCheckBox * rateEnabled = new LedCheckBox( "", this, tr( "Rate enabled" ), LedCheckBox::Green );
|
||||
auto rateEnabled = new LedCheckBox("", this, tr("Rate enabled"), LedCheckBox::Green);
|
||||
rateEnabled->move( 64, 14 );
|
||||
rateEnabled->setModel( & controls->m_rateEnabled );
|
||||
rateEnabled->setToolTip(tr("Enable sample-rate crushing"));
|
||||
|
||||
LedCheckBox * depthEnabled = new LedCheckBox( "", this, tr( "Depth enabled" ), LedCheckBox::Green );
|
||||
|
||||
auto depthEnabled = new LedCheckBox("", this, tr("Depth enabled"), LedCheckBox::Green);
|
||||
depthEnabled->move( 101, 14 );
|
||||
depthEnabled->setModel( & controls->m_depthEnabled );
|
||||
depthEnabled->setToolTip(tr("Enable bit-depth crushing"));
|
||||
|
||||
|
||||
// rate crushing knobs
|
||||
Knob * rate = new Knob( knobBright_26, this );
|
||||
auto rate = new Knob(knobBright_26, this);
|
||||
rate->move( 59, 32 );
|
||||
rate->setModel( & controls->m_rate );
|
||||
rate->setLabel( tr( "FREQ" ) );
|
||||
rate->setHintText( tr( "Sample rate:" ) , " Hz" );
|
||||
|
||||
Knob * stereoDiff = new Knob( knobBright_26, this );
|
||||
|
||||
auto stereoDiff = new Knob(knobBright_26, this);
|
||||
stereoDiff->move( 72, 76 );
|
||||
stereoDiff->setModel( & controls->m_stereoDiff );
|
||||
stereoDiff->setLabel( tr( "STEREO" ) );
|
||||
@@ -108,7 +108,7 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
|
||||
|
||||
// depth crushing knob
|
||||
Knob * levels = new Knob( knobBright_26, this );
|
||||
auto levels = new Knob(knobBright_26, this);
|
||||
levels->move( 92, 32 );
|
||||
levels->setModel( & controls->m_levels );
|
||||
levels->setLabel( tr( "QUANT" ) );
|
||||
|
||||
@@ -194,8 +194,8 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D
|
||||
fDescriptor->activate(fHandle);
|
||||
|
||||
// we need a play-handle which cares for calling play()
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, instrumentTrack );
|
||||
Engine::audioEngine()->addPlayHandle( iph );
|
||||
auto iph = new InstrumentPlayHandle(this, instrumentTrack);
|
||||
Engine::audioEngine()->addPlayHandle( iph );
|
||||
|
||||
#if CARLA_VERSION_HEX >= CARLA_MIN_PARAM_VERSION
|
||||
// text filter completion
|
||||
@@ -625,8 +625,8 @@ CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWid
|
||||
pal.setBrush(backgroundRole(), instrument->kIsPatchbay ? PLUGIN_NAME::getIconPixmap("artwork-patchbay") : PLUGIN_NAME::getIconPixmap("artwork-rack"));
|
||||
setPalette(pal);
|
||||
|
||||
QHBoxLayout* l = new QHBoxLayout(this);
|
||||
l->setContentsMargins( 20, 180, 10, 10 );
|
||||
auto l = new QHBoxLayout(this);
|
||||
l->setContentsMargins( 20, 180, 10, 10 );
|
||||
l->setSpacing(3);
|
||||
l->setAlignment(Qt::AlignTop);
|
||||
|
||||
@@ -750,8 +750,8 @@ CarlaParamsView::CarlaParamsView(CarlaInstrumentView* const instrumentView, QWid
|
||||
m_curOutColumn(0),
|
||||
m_curOutRow(0)
|
||||
{
|
||||
QWidget* centralWidget = new QWidget(this);
|
||||
QVBoxLayout* verticalLayout = new QVBoxLayout(centralWidget);
|
||||
auto centralWidget = new QWidget(this);
|
||||
auto verticalLayout = new QVBoxLayout(centralWidget);
|
||||
|
||||
// -- Toolbar
|
||||
m_toolBarLayout = new QHBoxLayout();
|
||||
@@ -794,9 +794,9 @@ CarlaParamsView::CarlaParamsView(CarlaInstrumentView* const instrumentView, QWid
|
||||
m_toolBarLayout->addWidget(m_groupFilterCombo);
|
||||
|
||||
// -- Input params
|
||||
QFrame* inputFrame = new QFrame(this);
|
||||
QVBoxLayout* inputLayout = new QVBoxLayout(inputFrame);
|
||||
QLabel* inputLabel = new QLabel("Input parameters", inputFrame);
|
||||
auto inputFrame = new QFrame(this);
|
||||
auto inputLayout = new QVBoxLayout(inputFrame);
|
||||
auto inputLabel = new QLabel("Input parameters", inputFrame);
|
||||
|
||||
m_inputScrollArea = new QScrollArea(inputFrame);
|
||||
m_inputScrollAreaWidgetContent = new QWidget();
|
||||
@@ -820,9 +820,9 @@ CarlaParamsView::CarlaParamsView(CarlaInstrumentView* const instrumentView, QWid
|
||||
inputLayout->addWidget(m_inputScrollArea);
|
||||
|
||||
// -- Output params
|
||||
QFrame* outputFrame = new QFrame(this);
|
||||
QVBoxLayout* outputLayout = new QVBoxLayout(outputFrame);
|
||||
QLabel* outputLabel = new QLabel("Output parameters", outputFrame);
|
||||
auto outputFrame = new QFrame(this);
|
||||
auto outputLayout = new QVBoxLayout(outputFrame);
|
||||
auto outputLabel = new QLabel("Output parameters", outputFrame);
|
||||
|
||||
m_outputScrollArea = new QScrollArea(outputFrame);
|
||||
m_outputScrollAreaWidgetContent = new QWidget();
|
||||
@@ -846,7 +846,7 @@ CarlaParamsView::CarlaParamsView(CarlaInstrumentView* const instrumentView, QWid
|
||||
outputLayout->addWidget(m_outputScrollArea);
|
||||
|
||||
// -- QSplitter
|
||||
QSplitter* splitter = new QSplitter(Qt::Vertical, this);
|
||||
auto splitter = new QSplitter(Qt::Vertical, this);
|
||||
|
||||
// -- Add layout and widgets.
|
||||
verticalLayout->addLayout(m_toolBarLayout);
|
||||
@@ -866,8 +866,8 @@ CarlaParamsView::CarlaParamsView(CarlaInstrumentView* const instrumentView, QWid
|
||||
#endif
|
||||
|
||||
// -- Sub window
|
||||
CarlaParamsSubWindow* win = new CarlaParamsSubWindow(getGUI()->mainWindow()->workspace()->viewport(), Qt::SubWindow |
|
||||
Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
|
||||
auto win = new CarlaParamsSubWindow(getGUI()->mainWindow()->workspace()->viewport(),
|
||||
Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
|
||||
m_carlaInstrumentView->m_paramsSubWindow = getGUI()->mainWindow()->workspace()->addSubWindow(win);
|
||||
m_carlaInstrumentView->m_paramsSubWindow->setSizePolicy(
|
||||
QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
@@ -976,7 +976,7 @@ void CarlaParamsView::filterKnobs()
|
||||
}
|
||||
|
||||
// Add spacer so all knobs go to top
|
||||
QSpacerItem* verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
auto verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
m_inputScrollAreaLayout->addItem(verticalSpacer, m_curRow+1, 0, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,19 +46,19 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro
|
||||
setFixedSize( 167, 178 );
|
||||
|
||||
// knobs
|
||||
Knob * xover12 = new Knob( knobBright_26, this );
|
||||
auto xover12 = new Knob(knobBright_26, this);
|
||||
xover12->move( 29, 11 );
|
||||
xover12->setModel( & controls->m_xover12 );
|
||||
xover12->setLabel( "1/2" );
|
||||
xover12->setHintText( tr( "Band 1/2 crossover:" ), " Hz" );
|
||||
|
||||
Knob * xover23 = new Knob( knobBright_26, this );
|
||||
|
||||
auto xover23 = new Knob(knobBright_26, this);
|
||||
xover23->move( 69, 11 );
|
||||
xover23->setModel( & controls->m_xover23 );
|
||||
xover23->setLabel( "2/3" );
|
||||
xover23->setHintText( tr( "Band 2/3 crossover:" ), " Hz" );
|
||||
|
||||
Knob * xover34 = new Knob( knobBright_26, this );
|
||||
|
||||
auto xover34 = new Knob(knobBright_26, this);
|
||||
xover34->move( 109, 11 );
|
||||
xover34->setModel( & controls->m_xover34 );
|
||||
xover34->setLabel( "3/4" );
|
||||
@@ -69,47 +69,43 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro
|
||||
m_fader_knob = QPixmap( PLUGIN_NAME::getIconPixmap( "fader_knob2" ) );
|
||||
|
||||
// faders
|
||||
Fader * gain1 = new Fader( &controls->m_gain1, tr( "Band 1 gain" ), this,
|
||||
&m_fader_bg, &m_fader_empty, &m_fader_knob );
|
||||
auto gain1 = new Fader(&controls->m_gain1, tr("Band 1 gain"), this, &m_fader_bg, &m_fader_empty, &m_fader_knob);
|
||||
gain1->move( 7, 56 );
|
||||
gain1->setDisplayConversion( false );
|
||||
gain1->setHintText( tr( "Band 1 gain:" ), " dBFS" );
|
||||
|
||||
Fader * gain2 = new Fader( &controls->m_gain2, tr( "Band 2 gain" ), this,
|
||||
&m_fader_bg, &m_fader_empty, &m_fader_knob );
|
||||
|
||||
auto gain2 = new Fader(&controls->m_gain2, tr("Band 2 gain"), this, &m_fader_bg, &m_fader_empty, &m_fader_knob);
|
||||
gain2->move( 47, 56 );
|
||||
gain2->setDisplayConversion( false );
|
||||
gain2->setHintText( tr( "Band 2 gain:" ), " dBFS" );
|
||||
|
||||
Fader * gain3 = new Fader( &controls->m_gain3, tr( "Band 3 gain" ), this,
|
||||
&m_fader_bg, &m_fader_empty, &m_fader_knob );
|
||||
|
||||
auto gain3 = new Fader(&controls->m_gain3, tr("Band 3 gain"), this, &m_fader_bg, &m_fader_empty, &m_fader_knob);
|
||||
gain3->move( 87, 56 );
|
||||
gain3->setDisplayConversion( false );
|
||||
gain3->setHintText( tr( "Band 3 gain:" ), " dBFS" );
|
||||
|
||||
Fader * gain4 = new Fader( &controls->m_gain4, tr( "Band 4 gain" ), this,
|
||||
&m_fader_bg, &m_fader_empty, &m_fader_knob );
|
||||
|
||||
auto gain4 = new Fader(&controls->m_gain4, tr("Band 4 gain"), this, &m_fader_bg, &m_fader_empty, &m_fader_knob);
|
||||
gain4->move( 127, 56 );
|
||||
gain4->setDisplayConversion( false );
|
||||
gain4->setHintText( tr( "Band 4 gain:" ), " dBFS" );
|
||||
|
||||
// leds
|
||||
LedCheckBox * mute1 = new LedCheckBox( "", this, tr( "Band 1 mute" ), LedCheckBox::Green );
|
||||
auto mute1 = new LedCheckBox("", this, tr("Band 1 mute"), LedCheckBox::Green);
|
||||
mute1->move( 15, 154 );
|
||||
mute1->setModel( & controls->m_mute1 );
|
||||
mute1->setToolTip(tr("Mute band 1"));
|
||||
|
||||
LedCheckBox * mute2 = new LedCheckBox( "", this, tr( "Band 2 mute" ), LedCheckBox::Green );
|
||||
|
||||
auto mute2 = new LedCheckBox("", this, tr("Band 2 mute"), LedCheckBox::Green);
|
||||
mute2->move( 55, 154 );
|
||||
mute2->setModel( & controls->m_mute2 );
|
||||
mute2->setToolTip(tr("Mute band 2"));
|
||||
|
||||
LedCheckBox * mute3 = new LedCheckBox( "", this, tr( "Band 3 mute" ), LedCheckBox::Green );
|
||||
|
||||
auto mute3 = new LedCheckBox("", this, tr("Band 3 mute"), LedCheckBox::Green);
|
||||
mute3->move( 95, 154 );
|
||||
mute3->setModel( & controls->m_mute3 );
|
||||
mute3->setToolTip(tr("Mute band 3"));
|
||||
|
||||
LedCheckBox * mute4 = new LedCheckBox( "", this, tr( "Band 4 mute" ), LedCheckBox::Green );
|
||||
|
||||
auto mute4 = new LedCheckBox("", this, tr("Band 4 mute"), LedCheckBox::Green);
|
||||
mute4->move( 135, 154 );
|
||||
mute4->setModel( & controls->m_mute4 );
|
||||
mute4->setToolTip(tr("Mute band 4"));
|
||||
|
||||
14
plugins/Delay/DelayControlsDialog.cpp
Executable file → Normal file
14
plugins/Delay/DelayControlsDialog.cpp
Executable file → Normal file
@@ -44,42 +44,42 @@ DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) :
|
||||
setPalette( pal );
|
||||
setFixedSize( 300, 208 );
|
||||
|
||||
TempoSyncKnob* sampleDelayKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
auto sampleDelayKnob = new TempoSyncKnob(knobBright_26, this);
|
||||
sampleDelayKnob->move( 10,14 );
|
||||
sampleDelayKnob->setVolumeKnob( false );
|
||||
sampleDelayKnob->setModel( &controls->m_delayTimeModel );
|
||||
sampleDelayKnob->setLabel( tr( "DELAY" ) );
|
||||
sampleDelayKnob->setHintText( tr( "Delay time" ) + " ", " s" );
|
||||
|
||||
Knob * feedbackKnob = new Knob( knobBright_26, this );
|
||||
auto feedbackKnob = new Knob(knobBright_26, this);
|
||||
feedbackKnob->move( 11, 58 );
|
||||
feedbackKnob->setVolumeKnob( true) ;
|
||||
feedbackKnob->setModel( &controls->m_feedbackModel);
|
||||
feedbackKnob->setLabel( tr( "FDBK" ) );
|
||||
feedbackKnob->setHintText( tr ( "Feedback amount" ) + " " , "" );
|
||||
|
||||
TempoSyncKnob * lfoFreqKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
auto lfoFreqKnob = new TempoSyncKnob(knobBright_26, this);
|
||||
lfoFreqKnob->move( 11, 119 );
|
||||
lfoFreqKnob->setVolumeKnob( false );
|
||||
lfoFreqKnob->setModel( &controls->m_lfoTimeModel );
|
||||
lfoFreqKnob->setLabel( tr( "RATE" ) );
|
||||
lfoFreqKnob->setHintText( tr ( "LFO frequency") + " ", " s" );
|
||||
|
||||
TempoSyncKnob * lfoAmtKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
auto lfoAmtKnob = new TempoSyncKnob(knobBright_26, this);
|
||||
lfoAmtKnob->move( 11, 159 );
|
||||
lfoAmtKnob->setVolumeKnob( false );
|
||||
lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
|
||||
lfoAmtKnob->setLabel( tr( "AMNT" ) );
|
||||
lfoAmtKnob->setHintText( tr ( "LFO amount" ) + " " , " s" );
|
||||
|
||||
EqFader * outFader = new EqFader( &controls->m_outGainModel,tr( "Out gain" ),
|
||||
this, &controls->m_outPeakL, &controls->m_outPeakR );
|
||||
auto outFader
|
||||
= new EqFader(&controls->m_outGainModel, tr("Out gain"), this, &controls->m_outPeakL, &controls->m_outPeakR);
|
||||
outFader->setMaximumHeight( 196 );
|
||||
outFader->move( 263, 45 );
|
||||
outFader->setDisplayConversion( false );
|
||||
outFader->setHintText( tr( "Gain" ), "dBFS" );
|
||||
|
||||
XyPad * pad = new XyPad( this, &controls->m_feedbackModel, &controls->m_delayTimeModel );
|
||||
auto pad = new XyPad(this, &controls->m_feedbackModel, &controls->m_delayTimeModel);
|
||||
pad->resize( 200, 200 );
|
||||
pad->move( 50, 5 );
|
||||
}
|
||||
|
||||
10
plugins/DualFilter/DualFilterControlDialog.cpp
Executable file → Normal file
10
plugins/DualFilter/DualFilterControlDialog.cpp
Executable file → Normal file
@@ -64,10 +64,8 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls )
|
||||
gain1Knob-> setVolumeKnob( true );
|
||||
gain2Knob-> setVolumeKnob( true );
|
||||
|
||||
LedCheckBox * enabled1Toggle = new LedCheckBox( "", this,
|
||||
tr( "Filter 1 enabled" ), LedCheckBox::Green );
|
||||
LedCheckBox * enabled2Toggle = new LedCheckBox( "", this,
|
||||
tr( "Filter 2 enabled" ), LedCheckBox::Green );
|
||||
auto enabled1Toggle = new LedCheckBox("", this, tr("Filter 1 enabled"), LedCheckBox::Green);
|
||||
auto enabled2Toggle = new LedCheckBox("", this, tr("Filter 2 enabled"), LedCheckBox::Green);
|
||||
|
||||
enabled1Toggle -> move( 12, 11 );
|
||||
enabled1Toggle -> setModel( &controls -> m_enabled1Model );
|
||||
@@ -76,12 +74,12 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls )
|
||||
enabled2Toggle -> setModel( &controls -> m_enabled2Model );
|
||||
enabled2Toggle->setToolTip(tr("Enable/disable filter 2"));
|
||||
|
||||
ComboBox * m_filter1ComboBox = new ComboBox( this );
|
||||
auto m_filter1ComboBox = new ComboBox(this);
|
||||
m_filter1ComboBox->setGeometry( 19, 70, 137, ComboBox::DEFAULT_HEIGHT );
|
||||
m_filter1ComboBox->setFont( pointSize<8>( m_filter1ComboBox->font() ) );
|
||||
m_filter1ComboBox->setModel( &controls->m_filter1Model );
|
||||
|
||||
ComboBox * m_filter2ComboBox = new ComboBox( this );
|
||||
auto m_filter2ComboBox = new ComboBox(this);
|
||||
m_filter2ComboBox->setGeometry( 217, 70, 137, ComboBox::DEFAULT_HEIGHT );
|
||||
m_filter2ComboBox->setFont( pointSize<8>( m_filter2ComboBox->font() ) );
|
||||
m_filter2ComboBox->setModel( &controls->m_filter2Model );
|
||||
|
||||
@@ -47,7 +47,7 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
setPalette( pal );
|
||||
setFixedSize( 224, 319 );
|
||||
|
||||
Graph * waveGraph = new Graph( this, Graph::LinearNonCyclicStyle, 204, 205 );
|
||||
auto waveGraph = new Graph(this, Graph::LinearNonCyclicStyle, 204, 205);
|
||||
waveGraph -> move( 10, 6 );
|
||||
waveGraph -> setModel( &_controls -> m_wavegraphModel );
|
||||
waveGraph -> setAutoFillBackground( true );
|
||||
@@ -58,7 +58,7 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
waveGraph->setGraphColor( QColor( 85, 204, 145 ) );
|
||||
waveGraph -> setMaximumSize( 204, 205 );
|
||||
|
||||
Knob * inputKnob = new Knob( knobBright_26, this);
|
||||
auto inputKnob = new Knob(knobBright_26, this);
|
||||
inputKnob -> setVolumeKnob( true );
|
||||
inputKnob -> setVolumeRatio( 1.0 );
|
||||
inputKnob -> move( 26, 223 );
|
||||
@@ -66,21 +66,21 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
inputKnob->setLabel( tr( "INPUT" ) );
|
||||
inputKnob->setHintText( tr( "Input gain:" ) , "" );
|
||||
|
||||
Knob * outputKnob = new Knob( knobBright_26, this );
|
||||
auto outputKnob = new Knob(knobBright_26, this);
|
||||
outputKnob -> setVolumeKnob( true );
|
||||
outputKnob -> setVolumeRatio( 1.0 );
|
||||
outputKnob -> move( 76, 223 );
|
||||
outputKnob->setModel( &_controls->m_outputModel );
|
||||
outputKnob->setLabel( tr( "OUTPUT" ) );
|
||||
outputKnob->setHintText( tr( "Output gain:" ) , "" );
|
||||
|
||||
Knob * attackKnob = new Knob( knobBright_26, this);
|
||||
|
||||
auto attackKnob = new Knob(knobBright_26, this);
|
||||
attackKnob -> move( 24, 268 );
|
||||
attackKnob->setModel( &_controls->m_attackModel );
|
||||
attackKnob->setLabel( tr( "ATTACK" ) );
|
||||
attackKnob->setHintText( tr( "Peak attack time:" ) , "ms" );
|
||||
|
||||
Knob * releaseKnob = new Knob( knobBright_26, this );
|
||||
auto releaseKnob = new Knob(knobBright_26, this);
|
||||
releaseKnob -> move( 74, 268 );
|
||||
releaseKnob->setModel( &_controls->m_releaseModel );
|
||||
releaseKnob->setLabel( tr( "RELEASE" ) );
|
||||
@@ -88,28 +88,28 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
|
||||
//wavegraph control buttons
|
||||
|
||||
PixmapButton * resetButton = new PixmapButton( this, tr("Reset wavegraph") );
|
||||
auto resetButton = new PixmapButton(this, tr("Reset wavegraph"));
|
||||
resetButton -> move( 162, 223 );
|
||||
resetButton -> resize( 13, 48 );
|
||||
resetButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_active" ) );
|
||||
resetButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_inactive" ) );
|
||||
resetButton->setToolTip(tr("Reset wavegraph"));
|
||||
|
||||
PixmapButton * smoothButton = new PixmapButton( this, tr("Smooth wavegraph") );
|
||||
auto smoothButton = new PixmapButton(this, tr("Smooth wavegraph"));
|
||||
smoothButton -> move( 162, 239 );
|
||||
smoothButton -> resize( 13, 48 );
|
||||
smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) );
|
||||
smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) );
|
||||
smoothButton->setToolTip(tr("Smooth wavegraph"));
|
||||
|
||||
PixmapButton * addOneButton = new PixmapButton( this, tr("Increase wavegraph amplitude by 1 dB") );
|
||||
auto addOneButton = new PixmapButton(this, tr("Increase wavegraph amplitude by 1 dB"));
|
||||
addOneButton -> move( 131, 223 );
|
||||
addOneButton -> resize( 13, 29 );
|
||||
addOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_active" ) );
|
||||
addOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_inactive" ) );
|
||||
addOneButton->setToolTip(tr("Increase wavegraph amplitude by 1 dB"));
|
||||
|
||||
PixmapButton * subOneButton = new PixmapButton( this, tr("Decrease wavegraph amplitude by 1 dB") );
|
||||
auto subOneButton = new PixmapButton(this, tr("Decrease wavegraph amplitude by 1 dB"));
|
||||
subOneButton -> move( 131, 239 );
|
||||
subOneButton -> resize( 13, 29 );
|
||||
subOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_active" ) );
|
||||
@@ -117,28 +117,28 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
subOneButton->setToolTip(tr("Decrease wavegraph amplitude by 1 dB"));
|
||||
|
||||
//stereomode switches
|
||||
PixmapButton * smMaxButton = new PixmapButton( this, tr( "Stereo mode: maximum" ) );
|
||||
auto smMaxButton = new PixmapButton(this, tr("Stereo mode: maximum"));
|
||||
smMaxButton -> move( 131, 257 );
|
||||
smMaxButton -> resize( 78, 17 );
|
||||
smMaxButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "max_active" ) );
|
||||
smMaxButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "max_inactive" ) );
|
||||
smMaxButton->setToolTip(tr("Process based on the maximum of both stereo channels"));
|
||||
|
||||
PixmapButton * smAvgButton = new PixmapButton( this, tr( "Stereo mode: average" ) );
|
||||
|
||||
auto smAvgButton = new PixmapButton(this, tr("Stereo mode: average"));
|
||||
smAvgButton -> move( 131, 274 );
|
||||
smAvgButton -> resize( 78, 16 );
|
||||
smAvgButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "avg_active" ) );
|
||||
smAvgButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "avg_inactive" ) );
|
||||
smAvgButton->setToolTip(tr("Process based on the average of both stereo channels"));
|
||||
|
||||
PixmapButton * smUnlButton = new PixmapButton( this, tr( "Stereo mode: unlinked" ) );
|
||||
auto smUnlButton = new PixmapButton(this, tr("Stereo mode: unlinked"));
|
||||
smUnlButton -> move( 131, 290 );
|
||||
smUnlButton -> resize( 78, 17 );
|
||||
smUnlButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "unl_active" ) );
|
||||
smUnlButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "unl_inactive" ) );
|
||||
smUnlButton->setToolTip(tr("Process each stereo channel independently"));
|
||||
|
||||
automatableButtonGroup * smGroup = new automatableButtonGroup( this );
|
||||
|
||||
auto smGroup = new automatableButtonGroup(this);
|
||||
smGroup -> addButton( smMaxButton );
|
||||
smGroup -> addButton( smAvgButton );
|
||||
smGroup -> addButton( smUnlButton );
|
||||
|
||||
@@ -52,11 +52,11 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
|
||||
setPalette( pal );
|
||||
setFixedSize( 500, 500 );
|
||||
|
||||
EqSpectrumView * inSpec = new EqSpectrumView( &controls->m_inFftBands, this );
|
||||
auto inSpec = new EqSpectrumView(&controls->m_inFftBands, this);
|
||||
inSpec->move( 26, 17 );
|
||||
inSpec->setColor( QColor( 77, 101, 242, 150 ) );
|
||||
|
||||
EqSpectrumView * outSpec = new EqSpectrumView( &controls->m_outFftBands, this );
|
||||
auto outSpec = new EqSpectrumView(&controls->m_outFftBands, this);
|
||||
outSpec->setColor( QColor( 0, 255, 239, 150 ) );
|
||||
outSpec->move( 26, 17 );
|
||||
|
||||
@@ -72,16 +72,18 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
|
||||
setBand( 6, &controls->m_highShelfActiveModel, &controls->m_highShelfFreqModel, &controls->m_highShelfResModel, &controls->m_highShelfGainModel, QColor(255 ,255, 255), tr( "High-shelf" ), &controls->m_highShelfPeakL, &controls->m_highShelfPeakR,0,0,0,0,0,0 );
|
||||
setBand( 7, &controls->m_lpActiveModel, &controls->m_lpFreqModel, &controls->m_lpResModel, 0, QColor(255 ,255, 255), tr( "LP" ) ,0,0,0,0,0, &controls->m_lp12Model, &controls->m_lp24Model, &controls->m_lp48Model);
|
||||
|
||||
QPixmap * faderBg = new QPixmap( PLUGIN_NAME::getIconPixmap( "faderback" ) );
|
||||
QPixmap * faderLeds = new QPixmap( PLUGIN_NAME::getIconPixmap( "faderleds" ) );
|
||||
QPixmap * faderKnob = new QPixmap( PLUGIN_NAME::getIconPixmap( "faderknob" ) );
|
||||
auto faderBg = new QPixmap(PLUGIN_NAME::getIconPixmap("faderback"));
|
||||
auto faderLeds = new QPixmap(PLUGIN_NAME::getIconPixmap("faderleds"));
|
||||
auto faderKnob = new QPixmap(PLUGIN_NAME::getIconPixmap("faderknob"));
|
||||
|
||||
EqFader * GainFaderIn = new EqFader( &controls->m_inGainModel, tr( "Input gain" ), this, faderBg, faderLeds, faderKnob, &controls->m_inPeakL, &controls->m_inPeakR );
|
||||
auto GainFaderIn = new EqFader(&controls->m_inGainModel, tr("Input gain"), this, faderBg, faderLeds, faderKnob,
|
||||
&controls->m_inPeakL, &controls->m_inPeakR);
|
||||
GainFaderIn->move( 23, 295 );
|
||||
GainFaderIn->setDisplayConversion( false );
|
||||
GainFaderIn->setHintText( tr( "Gain" ), "dBv");
|
||||
|
||||
EqFader * GainFaderOut = new EqFader( &controls->m_outGainModel, tr( "Output gain" ), this, faderBg, faderLeds, faderKnob, &controls->m_outPeakL, &controls->m_outPeakR );
|
||||
auto GainFaderOut = new EqFader(&controls->m_outGainModel, tr("Output gain"), this, faderBg, faderLeds, faderKnob,
|
||||
&controls->m_outPeakL, &controls->m_outPeakR);
|
||||
GainFaderOut->move( 453, 295);
|
||||
GainFaderOut->setDisplayConversion( false );
|
||||
GainFaderOut->setHintText( tr( "Gain" ), "dBv" );
|
||||
@@ -90,7 +92,8 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
|
||||
int distance = 126;
|
||||
for( int i = 1; i < m_parameterWidget->bandCount() - 1; i++ )
|
||||
{
|
||||
EqFader * gainFader = new EqFader( m_parameterWidget->getBandModels( i )->gain, tr( "" ), this, faderBg, faderLeds, faderKnob, m_parameterWidget->getBandModels( i )->peakL, m_parameterWidget->getBandModels( i )->peakR );
|
||||
auto gainFader = new EqFader(m_parameterWidget->getBandModels(i)->gain, tr(""), this, faderBg, faderLeds,
|
||||
faderKnob, m_parameterWidget->getBandModels(i)->peakL, m_parameterWidget->getBandModels(i)->peakR);
|
||||
gainFader->move( distance, 295 );
|
||||
distance += 44;
|
||||
gainFader->setMinimumHeight(80);
|
||||
@@ -103,21 +106,21 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
|
||||
distance = 81;
|
||||
for( int i = 0; i < m_parameterWidget->bandCount() ; i++ )
|
||||
{
|
||||
Knob * resKnob = new Knob( knobBright_26, this );
|
||||
auto resKnob = new Knob(knobBright_26, this);
|
||||
resKnob->move( distance, 440 );
|
||||
resKnob->setVolumeKnob(false);
|
||||
resKnob->setModel( m_parameterWidget->getBandModels( i )->res );
|
||||
if(i > 1 && i < 6) { resKnob->setHintText( tr( "Bandwidth: " ) , tr( " Octave" ) ); }
|
||||
else { resKnob->setHintText( tr( "Resonance : " ) , "" ); }
|
||||
|
||||
Knob * freqKnob = new Knob( knobBright_26, this );
|
||||
auto freqKnob = new Knob(knobBright_26, this);
|
||||
freqKnob->move( distance, 396 );
|
||||
freqKnob->setVolumeKnob( false );
|
||||
freqKnob->setModel( m_parameterWidget->getBandModels( i )->freq );
|
||||
freqKnob->setHintText( tr( "Frequency:" ), "Hz" );
|
||||
|
||||
// adds the Number Active buttons
|
||||
PixmapButton * activeButton = new PixmapButton( this, nullptr );
|
||||
auto activeButton = new PixmapButton(this, nullptr);
|
||||
activeButton->setCheckable(true);
|
||||
activeButton->setModel( m_parameterWidget->getBandModels( i )->active );
|
||||
|
||||
@@ -140,48 +143,48 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
|
||||
|
||||
|
||||
// adds the buttons for Spectrum analyser on/off
|
||||
LedCheckBox * inSpecButton = new LedCheckBox( this );
|
||||
auto inSpecButton = new LedCheckBox(this);
|
||||
inSpecButton->setCheckable(true);
|
||||
inSpecButton->setModel( &controls->m_analyseInModel );
|
||||
inSpecButton->move( 172, 240 );
|
||||
LedCheckBox * outSpecButton = new LedCheckBox( this );
|
||||
auto outSpecButton = new LedCheckBox(this);
|
||||
outSpecButton->setCheckable(true);
|
||||
outSpecButton->setModel( &controls->m_analyseOutModel );
|
||||
outSpecButton->move( 302, 240 );
|
||||
|
||||
//hp filter type
|
||||
PixmapButton * hp12Button = new PixmapButton( this , nullptr );
|
||||
auto hp12Button = new PixmapButton(this, nullptr);
|
||||
hp12Button->setModel( m_parameterWidget->getBandModels( 0 )->hp12 );
|
||||
hp12Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "12dB" ) );
|
||||
hp12Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "12dBoff" ) );
|
||||
hp12Button->move( 79, 298 );
|
||||
PixmapButton * hp24Button = new PixmapButton( this , nullptr );
|
||||
auto hp24Button = new PixmapButton(this, nullptr);
|
||||
hp24Button->setModel(m_parameterWidget->getBandModels( 0 )->hp24 );
|
||||
hp24Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "24dB" ) );
|
||||
hp24Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "24dBoff" ) );
|
||||
|
||||
hp24Button->move( 79 , 328 );
|
||||
PixmapButton * hp48Button = new PixmapButton( this , nullptr );
|
||||
auto hp48Button = new PixmapButton(this, nullptr);
|
||||
hp48Button->setModel( m_parameterWidget->getBandModels(0)->hp48 );
|
||||
hp48Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "48dB" ) );
|
||||
hp48Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "48dBoff" ) );
|
||||
|
||||
hp48Button->move( 79, 358 );
|
||||
//LP filter type
|
||||
PixmapButton * lp12Button = new PixmapButton( this , nullptr );
|
||||
auto lp12Button = new PixmapButton(this, nullptr);
|
||||
lp12Button->setModel( m_parameterWidget->getBandModels( 7 )->lp12 );
|
||||
lp12Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "12dB" ) );
|
||||
lp12Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "12dBoff" ) );
|
||||
|
||||
lp12Button->move( 387, 298 );
|
||||
PixmapButton * lp24Button = new PixmapButton( this , nullptr );
|
||||
auto lp24Button = new PixmapButton(this, nullptr);
|
||||
lp24Button->setModel( m_parameterWidget->getBandModels( 7 )->lp24 );
|
||||
lp24Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "24dB" ) );
|
||||
lp24Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "24dBoff" ) );
|
||||
|
||||
lp24Button->move( 387, 328 );
|
||||
|
||||
PixmapButton * lp48Button = new PixmapButton( this , nullptr );
|
||||
auto lp48Button = new PixmapButton(this, nullptr);
|
||||
lp48Button->setModel( m_parameterWidget->getBandModels( 7 )->lp48 );
|
||||
lp48Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "48dB" ) );
|
||||
lp48Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "48dBoff" ) );
|
||||
@@ -196,13 +199,13 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
|
||||
QObject::connect( m_parameterWidget->getBandModels( 7 )->lp24 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
|
||||
QObject::connect( m_parameterWidget->getBandModels( 7 )->lp48 , SIGNAL ( dataChanged() ), m_parameterWidget, SLOT( updateHandle()));
|
||||
|
||||
automatableButtonGroup *lpBtnGrp = new automatableButtonGroup( this, tr( "LP group" ) );
|
||||
auto lpBtnGrp = new automatableButtonGroup(this, tr("LP group"));
|
||||
lpBtnGrp->addButton( lp12Button );
|
||||
lpBtnGrp->addButton( lp24Button );
|
||||
lpBtnGrp->addButton( lp48Button );
|
||||
lpBtnGrp->setModel(&m_controls->m_lpTypeModel);
|
||||
|
||||
automatableButtonGroup *hpBtnGrp = new automatableButtonGroup( this, tr( "HP group" ) );
|
||||
auto hpBtnGrp = new automatableButtonGroup(this, tr("HP group"));
|
||||
hpBtnGrp->addButton( hp12Button );
|
||||
hpBtnGrp->addButton( hp24Button );
|
||||
hpBtnGrp->addButton( hp48Button );
|
||||
|
||||
@@ -56,9 +56,9 @@ EqParameterWidget::EqParameterWidget( QWidget *parent, EqControls * controls ) :
|
||||
m_pixelsPerOctave = EqHandle::freqToXPixel( 10000, m_displayWidth ) - EqHandle::freqToXPixel( 5000, m_displayWidth );
|
||||
|
||||
//GraphicsScene and GraphicsView stuff
|
||||
QGraphicsScene *scene = new QGraphicsScene();
|
||||
auto scene = new QGraphicsScene();
|
||||
scene->setSceneRect( 0, 0, m_displayWidth, m_displayHeigth );
|
||||
QGraphicsView *view = new QGraphicsView( this );
|
||||
auto view = new QGraphicsView(this);
|
||||
view->setStyleSheet( "border-style: none; background: transparent;" );
|
||||
view->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||
view->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||
|
||||
@@ -42,49 +42,49 @@ FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) :
|
||||
setPalette( pal );
|
||||
setFixedSize( 233, 75 );
|
||||
|
||||
Knob* delayKnob = new Knob( knobBright_26, this );
|
||||
auto delayKnob = new Knob(knobBright_26, this);
|
||||
delayKnob->move( 10,10 );
|
||||
delayKnob->setVolumeKnob( false );
|
||||
delayKnob->setModel( &controls->m_delayTimeModel );
|
||||
delayKnob->setLabel( tr( "DELAY" ) );
|
||||
delayKnob->setHintText( tr( "Delay time:" ) + " ", "s" );
|
||||
|
||||
TempoSyncKnob * lfoFreqKnob = new TempoSyncKnob( knobBright_26, this );
|
||||
auto lfoFreqKnob = new TempoSyncKnob(knobBright_26, this);
|
||||
lfoFreqKnob->move( 48,10 );
|
||||
lfoFreqKnob->setVolumeKnob( false );
|
||||
lfoFreqKnob->setModel( &controls->m_lfoFrequencyModel );
|
||||
lfoFreqKnob->setLabel( tr( "RATE" ) );
|
||||
lfoFreqKnob->setHintText( tr( "Period:" ) , " Sec" );
|
||||
|
||||
Knob * lfoAmtKnob = new Knob( knobBright_26, this );
|
||||
auto lfoAmtKnob = new Knob(knobBright_26, this);
|
||||
lfoAmtKnob->move( 85,10 );
|
||||
lfoAmtKnob->setVolumeKnob( false );
|
||||
lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
|
||||
lfoAmtKnob->setLabel( tr( "AMNT" ) );
|
||||
lfoAmtKnob->setHintText( tr( "Amount:" ) , "" );
|
||||
|
||||
Knob * lfoPhaseKnob = new Knob( knobBright_26, this );
|
||||
auto lfoPhaseKnob = new Knob(knobBright_26, this);
|
||||
lfoPhaseKnob->move( 123,10 );
|
||||
lfoPhaseKnob->setVolumeKnob( false );
|
||||
lfoPhaseKnob->setModel( &controls->m_lfoPhaseModel );
|
||||
lfoPhaseKnob->setLabel( tr( "PHASE" ) );
|
||||
lfoPhaseKnob->setHintText( tr( "Phase:" ) , " degrees" );
|
||||
|
||||
Knob * feedbackKnob = new Knob( knobBright_26, this );
|
||||
auto feedbackKnob = new Knob(knobBright_26, this);
|
||||
feedbackKnob->move( 160,10 );
|
||||
feedbackKnob->setVolumeKnob( true) ;
|
||||
feedbackKnob->setModel( &controls->m_feedbackModel );
|
||||
feedbackKnob->setLabel( tr( "FDBK" ) );
|
||||
feedbackKnob->setHintText( tr( "Feedback amount:" ) , "" );
|
||||
|
||||
Knob * whiteNoiseKnob = new Knob( knobBright_26, this );
|
||||
auto whiteNoiseKnob = new Knob(knobBright_26, this);
|
||||
whiteNoiseKnob->move( 196,10 );
|
||||
whiteNoiseKnob->setVolumeKnob( true) ;
|
||||
whiteNoiseKnob->setModel( &controls->m_whiteNoiseAmountModel );
|
||||
whiteNoiseKnob->setLabel( tr( "NOISE" ) );
|
||||
whiteNoiseKnob->setHintText( tr( "White noise amount:" ) , "" );
|
||||
|
||||
LedCheckBox * invertCb = new LedCheckBox( tr( "Invert" ), this );
|
||||
auto invertCb = new LedCheckBox(tr("Invert"), this);
|
||||
invertCb->move( 10,53 );
|
||||
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ void FreeBoyInstrument::playNote( NotePlayHandle * _n,
|
||||
|
||||
if ( tfp == 0 )
|
||||
{
|
||||
Gb_Apu_Buffer *papu = new Gb_Apu_Buffer();
|
||||
auto papu = new Gb_Apu_Buffer();
|
||||
papu->set_sample_rate( samplerate, CLOCK_RATE );
|
||||
|
||||
// Master sound circuitry power control
|
||||
@@ -282,7 +282,7 @@ void FreeBoyInstrument::playNote( NotePlayHandle * _n,
|
||||
_n->m_pluginData = papu;
|
||||
}
|
||||
|
||||
Gb_Apu_Buffer *papu = static_cast<Gb_Apu_Buffer *>( _n->m_pluginData );
|
||||
auto papu = static_cast<Gb_Apu_Buffer*>(_n->m_pluginData);
|
||||
|
||||
papu->treble_eq( m_trebleModel.value() );
|
||||
papu->bass_freq( m_bassModel.value() );
|
||||
@@ -681,7 +681,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument,
|
||||
|
||||
void FreeBoyInstrumentView::modelChanged()
|
||||
{
|
||||
FreeBoyInstrument * p = castModel<FreeBoyInstrument>();
|
||||
auto p = castModel<FreeBoyInstrument>();
|
||||
|
||||
m_ch1SweepTimeKnob->setModel( &p->m_ch1SweepTimeModel );
|
||||
m_ch1SweepDirButton->setModel( &p->m_ch1SweepDirModel );
|
||||
|
||||
@@ -92,7 +92,7 @@ GigInstrument::GigInstrument( InstrumentTrack * _instrument_track ) :
|
||||
m_RandomSeed( 0 ),
|
||||
m_currentKeyDimension( 0 )
|
||||
{
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
auto iph = new InstrumentPlayHandle(this, _instrument_track);
|
||||
Engine::audioEngine()->addPlayHandle( iph );
|
||||
|
||||
updateSampleRate();
|
||||
@@ -305,7 +305,7 @@ void GigInstrument::playNote( NotePlayHandle * _n, sampleFrame * )
|
||||
|
||||
if( tfp == 0 )
|
||||
{
|
||||
GIGPluginData * pluginData = new GIGPluginData;
|
||||
auto pluginData = new GIGPluginData;
|
||||
pluginData->midiNote = midiNote;
|
||||
_n->m_pluginData = pluginData;
|
||||
|
||||
@@ -593,7 +593,7 @@ void GigInstrument::loadSample( GigSample& sample, sampleFrame* sampleData, f_cn
|
||||
// Convert from 16 or 24 bit into 32-bit float
|
||||
if( sample.sample->BitDepth == 24 ) // 24 bit
|
||||
{
|
||||
uint8_t * pInt = reinterpret_cast<uint8_t*>( &buffer );
|
||||
auto pInt = reinterpret_cast<uint8_t*>(&buffer);
|
||||
|
||||
for( f_cnt_t i = 0; i < samples; ++i )
|
||||
{
|
||||
@@ -625,7 +625,7 @@ void GigInstrument::loadSample( GigSample& sample, sampleFrame* sampleData, f_cn
|
||||
}
|
||||
else // 16 bit
|
||||
{
|
||||
int16_t * pInt = reinterpret_cast<int16_t*>( &buffer );
|
||||
auto pInt = reinterpret_cast<int16_t*>(&buffer);
|
||||
|
||||
for( f_cnt_t i = 0; i < samples; ++i )
|
||||
{
|
||||
@@ -684,7 +684,7 @@ f_cnt_t GigInstrument::getPingPongIndex( f_cnt_t index, f_cnt_t startf, f_cnt_t
|
||||
// A key has been released
|
||||
void GigInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
{
|
||||
GIGPluginData * pluginData = static_cast<GIGPluginData *>( _n->m_pluginData );
|
||||
auto pluginData = static_cast<GIGPluginData*>(_n->m_pluginData);
|
||||
QMutexLocker locker( &m_notesMutex );
|
||||
|
||||
// Mark the note as being released, but only if it was playing or was just
|
||||
@@ -931,7 +931,7 @@ public:
|
||||
GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _parent ) :
|
||||
InstrumentViewFixedSize( _instrument, _parent )
|
||||
{
|
||||
GigInstrument * k = castModel<GigInstrument>();
|
||||
auto k = castModel<GigInstrument>();
|
||||
|
||||
connect( &k->m_bankNum, SIGNAL( dataChanged() ), this, SLOT( updatePatchName() ) );
|
||||
connect( &k->m_patchNum, SIGNAL( dataChanged() ), this, SLOT( updatePatchName() ) );
|
||||
@@ -990,7 +990,7 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren
|
||||
|
||||
void GigInstrumentView::modelChanged()
|
||||
{
|
||||
GigInstrument * k = castModel<GigInstrument>();
|
||||
auto k = castModel<GigInstrument>();
|
||||
m_bankNumLcd->setModel( &k->m_bankNum );
|
||||
m_patchNumLcd->setModel( &k->m_patchNum );
|
||||
|
||||
@@ -1007,7 +1007,7 @@ void GigInstrumentView::modelChanged()
|
||||
|
||||
void GigInstrumentView::updateFilename()
|
||||
{
|
||||
GigInstrument * i = castModel<GigInstrument>();
|
||||
auto i = castModel<GigInstrument>();
|
||||
QFontMetrics fm( m_filenameLabel->font() );
|
||||
QString file = i->m_filename.endsWith( ".gig", Qt::CaseInsensitive ) ?
|
||||
i->m_filename.left( i->m_filename.length() - 4 ) :
|
||||
@@ -1025,7 +1025,7 @@ void GigInstrumentView::updateFilename()
|
||||
|
||||
void GigInstrumentView::updatePatchName()
|
||||
{
|
||||
GigInstrument * i = castModel<GigInstrument>();
|
||||
auto i = castModel<GigInstrument>();
|
||||
QFontMetrics fm( font() );
|
||||
QString patch = i->getCurrentPatchName();
|
||||
m_patchLabel->setText( fm.elidedText( patch, Qt::ElideLeft, m_patchLabel->width() ) );
|
||||
@@ -1046,7 +1046,7 @@ void GigInstrumentView::invalidateFile()
|
||||
|
||||
void GigInstrumentView::showFileDialog()
|
||||
{
|
||||
GigInstrument * k = castModel<GigInstrument>();
|
||||
auto k = castModel<GigInstrument>();
|
||||
|
||||
FileDialog ofd( nullptr, tr( "Open GIG file" ) );
|
||||
ofd.setFileMode( FileDialog::ExistingFiles );
|
||||
@@ -1087,7 +1087,7 @@ void GigInstrumentView::showFileDialog()
|
||||
|
||||
void GigInstrumentView::showPatchDialog()
|
||||
{
|
||||
GigInstrument * k = castModel<GigInstrument>();
|
||||
auto k = castModel<GigInstrument>();
|
||||
PatchesDialog pd( this );
|
||||
pd.setup( k->m_instance, 1, k->instrumentTrack()->name(), &k->m_bankNum, &k->m_patchNum, m_patchLabel );
|
||||
pd.exec();
|
||||
|
||||
@@ -276,7 +276,7 @@ bool HydrogenImport::readSong()
|
||||
QString instrId = LocalFileMng::readXmlString( noteNode, "instrument", 0,false, false );
|
||||
int i = pattern_count - 1 + existing_patterns;
|
||||
pattern_id[sName] = pattern_count - 1;
|
||||
MidiClip*p = dynamic_cast<MidiClip*>( drum_track[instrId]->getClip( i ) );
|
||||
auto p = dynamic_cast<MidiClip*>(drum_track[instrId]->getClip(i));
|
||||
Note n;
|
||||
n.setPos( nPosition );
|
||||
if ( (nPosition + 48) <= nSize )
|
||||
|
||||
@@ -185,7 +185,7 @@ void KickerInstrument::playNote( NotePlayHandle * _n,
|
||||
_n->noteOff();
|
||||
}
|
||||
|
||||
SweepOsc * so = static_cast<SweepOsc *>( _n->m_pluginData );
|
||||
auto so = static_cast<SweepOsc*>(_n->m_pluginData);
|
||||
so->update( _working_buffer + offset, frames, Engine::audioEngine()->processingSampleRate() );
|
||||
|
||||
if( _n->isReleased() )
|
||||
@@ -334,7 +334,7 @@ KickerInstrumentView::KickerInstrumentView( Instrument * _instrument,
|
||||
|
||||
void KickerInstrumentView::modelChanged()
|
||||
{
|
||||
KickerInstrument * k = castModel<KickerInstrument>();
|
||||
auto k = castModel<KickerInstrument>();
|
||||
m_startFreqKnob->setModel( &k->m_startFreqModel );
|
||||
m_endFreqKnob->setModel( &k->m_endFreqModel );
|
||||
m_decayKnob->setModel( &k->m_decayModel );
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace gui
|
||||
LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) :
|
||||
ToolPluginView( _tool )
|
||||
{
|
||||
QHBoxLayout * hlayout = new QHBoxLayout( this );
|
||||
auto hlayout = new QHBoxLayout(this);
|
||||
hlayout->setSpacing( 0 );
|
||||
hlayout->setMargin( 0 );
|
||||
|
||||
@@ -104,7 +104,7 @@ LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) :
|
||||
m_tabBar->setExclusive( true );
|
||||
m_tabBar->setFixedWidth( 72 );
|
||||
|
||||
QWidget * ws = new QWidget( this );
|
||||
auto ws = new QWidget(this);
|
||||
ws->setFixedSize( 500, 480 );
|
||||
|
||||
QWidget * available = createTab( ws, tr( "Available Effects" ), VALID );
|
||||
@@ -162,14 +162,14 @@ LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) :
|
||||
QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
LadspaPluginType _type )
|
||||
{
|
||||
QWidget * tab = new QWidget( _parent );
|
||||
auto tab = new QWidget(_parent);
|
||||
tab->setFixedSize( 500, 400 );
|
||||
QVBoxLayout * layout = new QVBoxLayout( tab );
|
||||
auto layout = new QVBoxLayout(tab);
|
||||
layout->setSpacing( 0 );
|
||||
layout->setMargin( 0 );
|
||||
|
||||
const QString type = "<b>" + tr( "Type:" ) + "</b> ";
|
||||
QLabel * title = new QLabel( type + _txt, tab );
|
||||
auto title = new QLabel(type + _txt, tab);
|
||||
QFont f = title->font();
|
||||
f.setBold( true );
|
||||
title->setFont( pointSize<12>( f ) );
|
||||
@@ -178,7 +178,7 @@ QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
|
||||
layout->addWidget( title );
|
||||
layout->addSpacing( 10 );
|
||||
|
||||
LadspaDescription * description = new LadspaDescription( tab, _type );
|
||||
auto description = new LadspaDescription(tab, _type);
|
||||
connect( description, SIGNAL( doubleClicked( const ::lmms::ladspa_key_t & ) ),
|
||||
SLOT( showPorts( const ::lmms::ladspa_key_t & ) ) );
|
||||
layout->addWidget( description, 1 );
|
||||
|
||||
@@ -84,8 +84,8 @@ LadspaDescription::LadspaDescription( QWidget * _parent,
|
||||
}
|
||||
}
|
||||
|
||||
QGroupBox * pluginsBox = new QGroupBox( tr( "Plugins" ), this );
|
||||
QListWidget * pluginList = new QListWidget( pluginsBox );
|
||||
auto pluginsBox = new QGroupBox(tr("Plugins"), this);
|
||||
auto pluginList = new QListWidget(pluginsBox);
|
||||
pluginList->addItems( pluginNames );
|
||||
connect( pluginList, SIGNAL( currentRowChanged( int ) ),
|
||||
SLOT( rowChanged( int ) ) );
|
||||
@@ -93,15 +93,15 @@ LadspaDescription::LadspaDescription( QWidget * _parent,
|
||||
SLOT( onDoubleClicked( QListWidgetItem * ) ) );
|
||||
( new QVBoxLayout( pluginsBox ) )->addWidget( pluginList );
|
||||
|
||||
QGroupBox * descriptionBox = new QGroupBox( tr( "Description" ), this );
|
||||
QVBoxLayout * descriptionLayout = new QVBoxLayout( descriptionBox );
|
||||
auto descriptionBox = new QGroupBox(tr("Description"), this);
|
||||
auto descriptionLayout = new QVBoxLayout(descriptionBox);
|
||||
descriptionLayout->setSpacing( 0 );
|
||||
descriptionLayout->setMargin( 0 );
|
||||
|
||||
m_scrollArea = new QScrollArea( descriptionBox );
|
||||
descriptionLayout->addWidget( m_scrollArea );
|
||||
|
||||
QVBoxLayout * layout = new QVBoxLayout( this );
|
||||
auto layout = new QVBoxLayout(this);
|
||||
layout->addWidget( pluginsBox );
|
||||
layout->addWidget( descriptionBox );
|
||||
|
||||
@@ -118,76 +118,76 @@ LadspaDescription::LadspaDescription( QWidget * _parent,
|
||||
|
||||
void LadspaDescription::update( const ladspa_key_t & _key )
|
||||
{
|
||||
QWidget * description = new QWidget;
|
||||
auto description = new QWidget;
|
||||
m_scrollArea->setWidget( description );
|
||||
|
||||
QVBoxLayout * layout = new QVBoxLayout( description );
|
||||
auto layout = new QVBoxLayout(description);
|
||||
layout->setSizeConstraint( QLayout::SetFixedSize );
|
||||
|
||||
Ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
QLabel * name = new QLabel( description );
|
||||
auto name = new QLabel(description);
|
||||
name->setText( QWidget::tr( "Name: " ) + manager->getName( _key ) );
|
||||
layout->addWidget( name );
|
||||
|
||||
QWidget * maker = new QWidget( description );
|
||||
QHBoxLayout * makerLayout = new QHBoxLayout( maker );
|
||||
auto maker = new QWidget(description);
|
||||
auto makerLayout = new QHBoxLayout(maker);
|
||||
makerLayout->setMargin( 0 );
|
||||
makerLayout->setSpacing( 0 );
|
||||
layout->addWidget( maker );
|
||||
|
||||
QLabel * maker_label = new QLabel( maker );
|
||||
auto maker_label = new QLabel(maker);
|
||||
maker_label->setText( QWidget::tr( "Maker: " ) );
|
||||
maker_label->setAlignment( Qt::AlignTop );
|
||||
QLabel * maker_content = new QLabel( maker );
|
||||
auto maker_content = new QLabel(maker);
|
||||
maker_content->setText( manager->getMaker( _key ) );
|
||||
maker_content->setWordWrap( true );
|
||||
makerLayout->addWidget( maker_label );
|
||||
makerLayout->addWidget( maker_content, 1 );
|
||||
|
||||
QWidget * copyright = new QWidget( description );
|
||||
QHBoxLayout * copyrightLayout = new QHBoxLayout( copyright );
|
||||
auto copyright = new QWidget(description);
|
||||
auto copyrightLayout = new QHBoxLayout(copyright);
|
||||
copyrightLayout->setMargin( 0 );
|
||||
copyrightLayout->setSpacing( 0 );
|
||||
layout->addWidget( copyright );
|
||||
|
||||
QLabel * copyright_label = new QLabel( copyright );
|
||||
auto copyright_label = new QLabel(copyright);
|
||||
copyright_label->setText( QWidget::tr( "Copyright: " ) );
|
||||
copyright_label->setAlignment( Qt::AlignTop );
|
||||
|
||||
QLabel * copyright_content = new QLabel( copyright );
|
||||
auto copyright_content = new QLabel(copyright);
|
||||
copyright_content->setText( manager->getCopyright( _key ) );
|
||||
copyright_content->setWordWrap( true );
|
||||
copyrightLayout->addWidget( copyright_label );
|
||||
copyrightLayout->addWidget( copyright_content, 1 );
|
||||
|
||||
QLabel * requiresRealTime = new QLabel( description );
|
||||
auto requiresRealTime = new QLabel(description);
|
||||
requiresRealTime->setText( QWidget::tr( "Requires Real Time: " ) +
|
||||
( manager->hasRealTimeDependency( _key ) ?
|
||||
QWidget::tr( "Yes" ) :
|
||||
QWidget::tr( "No" ) ) );
|
||||
layout->addWidget( requiresRealTime );
|
||||
|
||||
QLabel * realTimeCapable = new QLabel( description );
|
||||
auto realTimeCapable = new QLabel(description);
|
||||
realTimeCapable->setText( QWidget::tr( "Real Time Capable: " ) +
|
||||
( manager->isRealTimeCapable( _key ) ?
|
||||
QWidget::tr( "Yes" ) :
|
||||
QWidget::tr( "No" ) ) );
|
||||
layout->addWidget( realTimeCapable );
|
||||
|
||||
QLabel * inplaceBroken = new QLabel( description );
|
||||
auto inplaceBroken = new QLabel(description);
|
||||
inplaceBroken->setText( QWidget::tr( "In Place Broken: " ) +
|
||||
( manager->isInplaceBroken( _key ) ?
|
||||
QWidget::tr( "Yes" ) :
|
||||
QWidget::tr( "No" ) ) );
|
||||
layout->addWidget( inplaceBroken );
|
||||
|
||||
QLabel * channelsIn = new QLabel( description );
|
||||
auto channelsIn = new QLabel(description);
|
||||
channelsIn->setText( QWidget::tr( "Channels In: " ) + QString::number(
|
||||
manager->getDescription( _key )->inputChannels ) );
|
||||
layout->addWidget( channelsIn );
|
||||
|
||||
QLabel * channelsOut = new QLabel( description );
|
||||
auto channelsOut = new QLabel(description);
|
||||
channelsOut->setText( QWidget::tr( "Channels Out: " ) + QString::number(
|
||||
manager->getDescription( _key )->outputChannels ) );
|
||||
layout->addWidget( channelsOut );
|
||||
|
||||
@@ -45,13 +45,13 @@ LadspaPortDialog::LadspaPortDialog( const ladspa_key_t & _key )
|
||||
setWindowTitle( tr( "Ports" ) );
|
||||
setModal( true );
|
||||
|
||||
QVBoxLayout * vlayout = new QVBoxLayout( this );
|
||||
auto vlayout = new QVBoxLayout(this);
|
||||
vlayout->setSpacing( 0 );
|
||||
vlayout->setMargin( 0 );
|
||||
|
||||
int pc = manager->getPortCount( _key );
|
||||
|
||||
QTableWidget * settings = new QTableWidget( pc, 7, this );
|
||||
auto settings = new QTableWidget(pc, 7, this);
|
||||
|
||||
QStringList ports;
|
||||
ports.append( tr( "Name" ) );
|
||||
@@ -67,7 +67,7 @@ LadspaPortDialog::LadspaPortDialog( const ladspa_key_t & _key )
|
||||
{
|
||||
for( int col = 0; col < 7; ++col )
|
||||
{
|
||||
QTableWidgetItem * item = new QTableWidgetItem;
|
||||
auto item = new QTableWidgetItem;
|
||||
item->setFlags(QFlag(0));
|
||||
settings->setItem( row, col, item );
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ LadspaControlDialog::LadspaControlDialog( LadspaControls * _ctl ) :
|
||||
m_effectLayout( nullptr ),
|
||||
m_stereoLink( nullptr )
|
||||
{
|
||||
QVBoxLayout * mainLay = new QVBoxLayout( this );
|
||||
auto mainLay = new QVBoxLayout(this);
|
||||
|
||||
m_effectLayout = new QHBoxLayout();
|
||||
mainLay->addLayout( m_effectLayout );
|
||||
@@ -56,7 +56,7 @@ LadspaControlDialog::LadspaControlDialog( LadspaControls * _ctl ) :
|
||||
if( _ctl->m_processors > 1 )
|
||||
{
|
||||
mainLay->addSpacing( 3 );
|
||||
QHBoxLayout * center = new QHBoxLayout();
|
||||
auto center = new QHBoxLayout();
|
||||
mainLay->addLayout( center );
|
||||
m_stereoLink = new LedCheckBox( tr( "Link Channels" ), this );
|
||||
m_stereoLink->setModel( &_ctl->m_stereoLinkModel );
|
||||
@@ -101,7 +101,7 @@ void LadspaControlDialog::updateEffectView( LadspaControls * _ctl )
|
||||
grouper = new QGroupBox( this );
|
||||
}
|
||||
|
||||
QGridLayout * gl = new QGridLayout( grouper );
|
||||
auto gl = new QGridLayout(grouper);
|
||||
grouper->setLayout( gl );
|
||||
grouper->setAlignment( Qt::Vertical );
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ void LadspaEffect::pluginInstantiation()
|
||||
multi_proc_t ports;
|
||||
for( int port = 0; port < m_portCount; port++ )
|
||||
{
|
||||
port_desc_t * p = new port_desc_t;
|
||||
auto p = new port_desc_t;
|
||||
|
||||
p->name = manager->getPortName( m_key, port );
|
||||
p->proc = proc;
|
||||
|
||||
@@ -63,65 +63,65 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
const ladspa_key_t & lkey = subPluginKeyToLadspaKey( _key );
|
||||
Ladspa2LMMS * lm = Engine::getLADSPAManager();
|
||||
|
||||
QLabel * label = new QLabel( _parent );
|
||||
auto label = new QLabel(_parent);
|
||||
label->setText( QWidget::tr( "Name: " ) + lm->getName( lkey ) );
|
||||
|
||||
QLabel* fileInfo = new QLabel( _parent );
|
||||
auto fileInfo = new QLabel(_parent);
|
||||
fileInfo->setText( QWidget::tr( "File: %1" ).arg( lkey.first ) );
|
||||
|
||||
QWidget * maker = new QWidget( _parent );
|
||||
QHBoxLayout * l = new QHBoxLayout( maker );
|
||||
auto maker = new QWidget(_parent);
|
||||
auto l = new QHBoxLayout(maker);
|
||||
l->setMargin( 0 );
|
||||
l->setSpacing( 0 );
|
||||
|
||||
QLabel * maker_label = new QLabel( maker );
|
||||
auto maker_label = new QLabel(maker);
|
||||
maker_label->setText( QWidget::tr( "Maker: " ) );
|
||||
maker_label->setAlignment( Qt::AlignTop );
|
||||
QLabel * maker_content = new QLabel( maker );
|
||||
auto maker_content = new QLabel(maker);
|
||||
maker_content->setText( lm->getMaker( lkey ) );
|
||||
maker_content->setWordWrap( true );
|
||||
l->addWidget( maker_label );
|
||||
l->addWidget( maker_content, 1 );
|
||||
|
||||
QWidget * copyright = new QWidget( _parent );
|
||||
auto copyright = new QWidget(_parent);
|
||||
l = new QHBoxLayout( copyright );
|
||||
l->setMargin( 0 );
|
||||
l->setSpacing( 0 );
|
||||
|
||||
copyright->setMinimumWidth( _parent->minimumWidth() );
|
||||
QLabel * copyright_label = new QLabel( copyright );
|
||||
auto copyright_label = new QLabel(copyright);
|
||||
copyright_label->setText( QWidget::tr( "Copyright: " ) );
|
||||
copyright_label->setAlignment( Qt::AlignTop );
|
||||
|
||||
QLabel * copyright_content = new QLabel( copyright );
|
||||
auto copyright_content = new QLabel(copyright);
|
||||
copyright_content->setText( lm->getCopyright( lkey ) );
|
||||
copyright_content->setWordWrap( true );
|
||||
l->addWidget( copyright_label );
|
||||
l->addWidget( copyright_content, 1 );
|
||||
|
||||
QLabel * requiresRealTime = new QLabel( _parent );
|
||||
auto requiresRealTime = new QLabel(_parent);
|
||||
requiresRealTime->setText( QWidget::tr( "Requires Real Time: " ) +
|
||||
( lm->hasRealTimeDependency( lkey ) ?
|
||||
QWidget::tr( "Yes" ) :
|
||||
QWidget::tr( "No" ) ) );
|
||||
|
||||
QLabel * realTimeCapable = new QLabel( _parent );
|
||||
auto realTimeCapable = new QLabel(_parent);
|
||||
realTimeCapable->setText( QWidget::tr( "Real Time Capable: " ) +
|
||||
( lm->isRealTimeCapable( lkey ) ?
|
||||
QWidget::tr( "Yes" ) :
|
||||
QWidget::tr( "No" ) ) );
|
||||
|
||||
QLabel * inplaceBroken = new QLabel( _parent );
|
||||
auto inplaceBroken = new QLabel(_parent);
|
||||
inplaceBroken->setText( QWidget::tr( "In Place Broken: " ) +
|
||||
( lm->isInplaceBroken( lkey ) ?
|
||||
QWidget::tr( "Yes" ) :
|
||||
QWidget::tr( "No" ) ) );
|
||||
|
||||
QLabel * channelsIn = new QLabel( _parent );
|
||||
|
||||
auto channelsIn = new QLabel(_parent);
|
||||
channelsIn->setText( QWidget::tr( "Channels In: " ) +
|
||||
QString::number( lm->getDescription( lkey )->inputChannels ) );
|
||||
|
||||
QLabel * channelsOut = new QLabel( _parent );
|
||||
auto channelsOut = new QLabel(_parent);
|
||||
channelsOut->setText( QWidget::tr( "Channels Out: " ) +
|
||||
QString::number( lm->getDescription( lkey )->outputChannels ) );
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ Lb302Synth::Lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
|
||||
filterChanged();
|
||||
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack );
|
||||
auto iph = new InstrumentPlayHandle(this, _instrumentTrack);
|
||||
Engine::audioEngine()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
@@ -869,7 +869,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
// move to 120,75
|
||||
const int waveBtnX = 10;
|
||||
const int waveBtnY = 96;
|
||||
PixmapButton * sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) );
|
||||
auto sawWaveBtn = new PixmapButton(this, tr("Saw wave"));
|
||||
sawWaveBtn->move( waveBtnX, waveBtnY );
|
||||
sawWaveBtn->setActiveGraphic( embed::getIconPixmap(
|
||||
"saw_wave_active" ) );
|
||||
@@ -878,8 +878,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
sawWaveBtn->setToolTip(
|
||||
tr( "Click here for a saw-wave." ) );
|
||||
|
||||
PixmapButton * triangleWaveBtn =
|
||||
new PixmapButton( this, tr( "Triangle wave" ) );
|
||||
auto triangleWaveBtn = new PixmapButton(this, tr("Triangle wave"));
|
||||
triangleWaveBtn->move( waveBtnX+(16*1), waveBtnY );
|
||||
triangleWaveBtn->setActiveGraphic(
|
||||
embed::getIconPixmap( "triangle_wave_active" ) );
|
||||
@@ -888,7 +887,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
triangleWaveBtn->setToolTip(
|
||||
tr( "Click here for a triangle-wave." ) );
|
||||
|
||||
PixmapButton * sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) );
|
||||
auto sqrWaveBtn = new PixmapButton(this, tr("Square wave"));
|
||||
sqrWaveBtn->move( waveBtnX+(16*2), waveBtnY );
|
||||
sqrWaveBtn->setActiveGraphic( embed::getIconPixmap(
|
||||
"square_wave_active" ) );
|
||||
@@ -897,8 +896,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
sqrWaveBtn->setToolTip(
|
||||
tr( "Click here for a square-wave." ) );
|
||||
|
||||
PixmapButton * roundSqrWaveBtn =
|
||||
new PixmapButton( this, tr( "Rounded square wave" ) );
|
||||
auto roundSqrWaveBtn = new PixmapButton(this, tr("Rounded square wave"));
|
||||
roundSqrWaveBtn->move( waveBtnX+(16*3), waveBtnY );
|
||||
roundSqrWaveBtn->setActiveGraphic( embed::getIconPixmap(
|
||||
"round_square_wave_active" ) );
|
||||
@@ -907,8 +905,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
roundSqrWaveBtn->setToolTip(
|
||||
tr( "Click here for a square-wave with a rounded end." ) );
|
||||
|
||||
PixmapButton * moogWaveBtn =
|
||||
new PixmapButton( this, tr( "Moog wave" ) );
|
||||
auto moogWaveBtn = new PixmapButton(this, tr("Moog wave"));
|
||||
moogWaveBtn->move( waveBtnX+(16*4), waveBtnY );
|
||||
moogWaveBtn->setActiveGraphic(
|
||||
embed::getIconPixmap( "moog_saw_wave_active" ) );
|
||||
@@ -917,7 +914,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
moogWaveBtn->setToolTip(
|
||||
tr( "Click here for a moog-like wave." ) );
|
||||
|
||||
PixmapButton * sinWaveBtn = new PixmapButton( this, tr( "Sine wave" ) );
|
||||
auto sinWaveBtn = new PixmapButton(this, tr("Sine wave"));
|
||||
sinWaveBtn->move( waveBtnX+(16*5), waveBtnY );
|
||||
sinWaveBtn->setActiveGraphic( embed::getIconPixmap(
|
||||
"sin_wave_active" ) );
|
||||
@@ -926,8 +923,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
sinWaveBtn->setToolTip(
|
||||
tr( "Click for a sine-wave." ) );
|
||||
|
||||
PixmapButton * exponentialWaveBtn =
|
||||
new PixmapButton( this, tr( "White noise wave" ) );
|
||||
auto exponentialWaveBtn = new PixmapButton(this, tr("White noise wave"));
|
||||
exponentialWaveBtn->move( waveBtnX+(16*6), waveBtnY );
|
||||
exponentialWaveBtn->setActiveGraphic(
|
||||
embed::getIconPixmap( "exp_wave_active" ) );
|
||||
@@ -936,9 +932,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
exponentialWaveBtn->setToolTip(
|
||||
tr( "Click here for an exponential wave." ) );
|
||||
|
||||
|
||||
PixmapButton * whiteNoiseWaveBtn =
|
||||
new PixmapButton( this, tr( "White noise wave" ) );
|
||||
auto whiteNoiseWaveBtn = new PixmapButton(this, tr("White noise wave"));
|
||||
whiteNoiseWaveBtn->move( waveBtnX+(16*7), waveBtnY );
|
||||
whiteNoiseWaveBtn->setActiveGraphic(
|
||||
embed::getIconPixmap( "white_noise_wave_active" ) );
|
||||
@@ -947,8 +941,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
whiteNoiseWaveBtn->setToolTip(
|
||||
tr( "Click here for white-noise." ) );
|
||||
|
||||
PixmapButton * blSawWaveBtn =
|
||||
new PixmapButton( this, tr( "Bandlimited saw wave" ) );
|
||||
auto blSawWaveBtn = new PixmapButton(this, tr("Bandlimited saw wave"));
|
||||
blSawWaveBtn->move( waveBtnX+(16*9)-8, waveBtnY );
|
||||
blSawWaveBtn->setActiveGraphic(
|
||||
embed::getIconPixmap( "saw_wave_active" ) );
|
||||
@@ -957,8 +950,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
blSawWaveBtn->setToolTip(
|
||||
tr( "Click here for bandlimited saw wave." ) );
|
||||
|
||||
PixmapButton * blSquareWaveBtn =
|
||||
new PixmapButton( this, tr( "Bandlimited square wave" ) );
|
||||
auto blSquareWaveBtn = new PixmapButton(this, tr("Bandlimited square wave"));
|
||||
blSquareWaveBtn->move( waveBtnX+(16*10)-8, waveBtnY );
|
||||
blSquareWaveBtn->setActiveGraphic(
|
||||
embed::getIconPixmap( "square_wave_active" ) );
|
||||
@@ -967,8 +959,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
blSquareWaveBtn->setToolTip(
|
||||
tr( "Click here for bandlimited square wave." ) );
|
||||
|
||||
PixmapButton * blTriangleWaveBtn =
|
||||
new PixmapButton( this, tr( "Bandlimited triangle wave" ) );
|
||||
auto blTriangleWaveBtn = new PixmapButton(this, tr("Bandlimited triangle wave"));
|
||||
blTriangleWaveBtn->move( waveBtnX+(16*11)-8, waveBtnY );
|
||||
blTriangleWaveBtn->setActiveGraphic(
|
||||
embed::getIconPixmap( "triangle_wave_active" ) );
|
||||
@@ -977,8 +968,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
blTriangleWaveBtn->setToolTip(
|
||||
tr( "Click here for bandlimited triangle wave." ) );
|
||||
|
||||
PixmapButton * blMoogWaveBtn =
|
||||
new PixmapButton( this, tr( "Bandlimited moog saw wave" ) );
|
||||
auto blMoogWaveBtn = new PixmapButton(this, tr("Bandlimited moog saw wave"));
|
||||
blMoogWaveBtn->move( waveBtnX+(16*12)-8, waveBtnY );
|
||||
blMoogWaveBtn->setActiveGraphic(
|
||||
embed::getIconPixmap( "moog_saw_wave_active" ) );
|
||||
@@ -1012,7 +1002,7 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
|
||||
void Lb302SynthView::modelChanged()
|
||||
{
|
||||
Lb302Synth * syn = castModel<Lb302Synth>();
|
||||
auto syn = castModel<Lb302Synth>();
|
||||
|
||||
m_vcfCutKnob->setModel( &syn->vcf_cut_knob );
|
||||
m_vcfResKnob->setModel( &syn->vcf_res_knob );
|
||||
|
||||
@@ -90,8 +90,8 @@ bool Lv2Effect::processAudioBuffer(sampleFrame *buf, const fpp_t frames)
|
||||
{
|
||||
buf[f][0] = d * buf[f][0] + w * m_tmpOutputSmps[f][0];
|
||||
buf[f][1] = d * buf[f][1] + w * m_tmpOutputSmps[f][1];
|
||||
double l = static_cast<double>(buf[f][0]);
|
||||
double r = static_cast<double>(buf[f][1]);
|
||||
auto l = static_cast<double>(buf[f][0]);
|
||||
auto r = static_cast<double>(buf[f][1]);
|
||||
outSum += l*l + r*r;
|
||||
}
|
||||
checkGate(outSum / frames);
|
||||
@@ -109,7 +109,7 @@ extern "C"
|
||||
PLUGIN_EXPORT Plugin *lmms_plugin_main(Model *_parent, void *_data)
|
||||
{
|
||||
using KeyType = Plugin::Descriptor::SubPluginFeatures::Key;
|
||||
Lv2Effect* eff = new Lv2Effect(_parent, static_cast<const KeyType*>(_data));
|
||||
auto eff = new Lv2Effect(_parent, static_cast<const KeyType*>(_data));
|
||||
if (!eff->isValid()) { delete eff; eff = nullptr; }
|
||||
return eff;
|
||||
}
|
||||
|
||||
@@ -87,8 +87,7 @@ Lv2Instrument::Lv2Instrument(InstrumentTrack *instrumentTrackArg,
|
||||
this, [this](){Lv2ControlBase::reloadPlugin();});
|
||||
|
||||
// now we need a play-handle which cares for calling play()
|
||||
InstrumentPlayHandle *iph =
|
||||
new InstrumentPlayHandle(this, instrumentTrackArg);
|
||||
auto iph = new InstrumentPlayHandle(this, instrumentTrackArg);
|
||||
Engine::audioEngine()->addPlayHandle(iph);
|
||||
}
|
||||
}
|
||||
@@ -299,9 +298,7 @@ extern "C"
|
||||
PLUGIN_EXPORT Plugin *lmms_plugin_main(Model *_parent, void *_data)
|
||||
{
|
||||
using KeyType = Plugin::Descriptor::SubPluginFeatures::Key;
|
||||
Lv2Instrument* ins = new Lv2Instrument(
|
||||
static_cast<InstrumentTrack*>(_parent),
|
||||
static_cast<KeyType*>(_data ));
|
||||
auto ins = new Lv2Instrument(static_cast<InstrumentTrack*>(_parent), static_cast<KeyType*>(_data));
|
||||
if (!ins->isValid()) { delete ins; ins = nullptr; }
|
||||
return ins;
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
pd.setValue( 0 );
|
||||
|
||||
std::istringstream stream(readAllData().toStdString());
|
||||
Alg_seq_ptr seq = new Alg_seq(stream, true);
|
||||
auto seq = new Alg_seq(stream, true);
|
||||
seq->convert_to_beats();
|
||||
|
||||
pd.setMaximum( seq->tracks() + preTrackSteps );
|
||||
@@ -328,18 +328,14 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
// NOTE: unordered_map::operator[] creates a new element if none exists
|
||||
|
||||
MeterModel & timeSigMM = Engine::getSong()->getTimeSigModel();
|
||||
AutomationTrack * nt = dynamic_cast<AutomationTrack*>(
|
||||
Track::create(Track::AutomationTrack, Engine::getSong()));
|
||||
auto nt = dynamic_cast<AutomationTrack*>(Track::create(Track::AutomationTrack, Engine::getSong()));
|
||||
nt->setName(tr("MIDI Time Signature Numerator"));
|
||||
AutomationTrack * dt = dynamic_cast<AutomationTrack*>(
|
||||
Track::create(Track::AutomationTrack, Engine::getSong()));
|
||||
auto dt = dynamic_cast<AutomationTrack*>(Track::create(Track::AutomationTrack, Engine::getSong()));
|
||||
dt->setName(tr("MIDI Time Signature Denominator"));
|
||||
AutomationClip * timeSigNumeratorPat =
|
||||
new AutomationClip(nt);
|
||||
auto timeSigNumeratorPat = new AutomationClip(nt);
|
||||
timeSigNumeratorPat->setDisplayName(tr("Numerator"));
|
||||
timeSigNumeratorPat->addObject(&timeSigMM.numeratorModel());
|
||||
AutomationClip * timeSigDenominatorPat =
|
||||
new AutomationClip(dt);
|
||||
auto timeSigDenominatorPat = new AutomationClip(dt);
|
||||
timeSigDenominatorPat->setDisplayName(tr("Denominator"));
|
||||
timeSigDenominatorPat->addObject(&timeSigMM.denominatorModel());
|
||||
|
||||
@@ -448,7 +444,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
else if (evt->is_note())
|
||||
{
|
||||
smfMidiChannel * ch = chs[evt->chan].create( tc, trackName );
|
||||
Alg_note_ptr noteEvt = dynamic_cast<Alg_note_ptr>( evt );
|
||||
auto noteEvt = dynamic_cast<Alg_note_ptr>(evt);
|
||||
int ticks = noteEvt->get_duration() * ticksPerBeat;
|
||||
Note n( (ticks < 1 ? 1 : ticks ),
|
||||
noteEvt->get_start_time() * ticksPerBeat,
|
||||
|
||||
@@ -87,7 +87,7 @@ MonstroSynth::MonstroSynth( MonstroInstrument * _i, NotePlayHandle * _nph ) :
|
||||
|
||||
m_lfo_next[0] = Oscillator::noiseSample( 0.0f );
|
||||
m_lfo_next[1] = Oscillator::noiseSample( 0.0f );
|
||||
|
||||
|
||||
m_osc1l_last = 0.0f;
|
||||
m_osc1r_last = 0.0f;
|
||||
|
||||
@@ -652,14 +652,14 @@ inline void MonstroSynth::updateModulators( float * env1, float * env2, float *
|
||||
{
|
||||
// frames played before
|
||||
const f_cnt_t tfp = m_nph->totalFramesPlayed();
|
||||
|
||||
|
||||
float * lfo [2];
|
||||
float * env [2];
|
||||
lfo[0] = lfo1;
|
||||
lfo[1] = lfo2;
|
||||
env[0] = env1;
|
||||
env[1] = env2;
|
||||
|
||||
|
||||
for( int i = 0; i < 2; ++i )
|
||||
{
|
||||
switch( m_lfovalue[i] )
|
||||
@@ -740,7 +740,7 @@ inline void MonstroSynth::updateModulators( float * env1, float * env2, float *
|
||||
{
|
||||
const f_cnt_t tm = ( tfp + f ) % static_cast<int>( m_lfo_rate[i] );
|
||||
if( tm == 0 )
|
||||
{
|
||||
{
|
||||
m_lfo_last[i] = m_lfo_next[i];
|
||||
m_lfo_next[i] = Oscillator::noiseSample( 0.0f );
|
||||
}
|
||||
@@ -755,9 +755,9 @@ inline void MonstroSynth::updateModulators( float * env1, float * env2, float *
|
||||
{
|
||||
if( tfp + f < m_lfoatt[i] ) lfo[i][f] *= ( static_cast<sample_t>( tfp ) / m_lfoatt[i] );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// //
|
||||
// //
|
||||
@@ -765,7 +765,7 @@ inline void MonstroSynth::updateModulators( float * env1, float * env2, float *
|
||||
// //
|
||||
// //
|
||||
/////////////////////////////////////////////
|
||||
|
||||
|
||||
for( f_cnt_t f = 0; f < frames; ++f )
|
||||
{
|
||||
if( m_env_phase[i] < 4.0f && m_nph->isReleased() && f >= m_nph->framesBeforeRelease() )
|
||||
@@ -1035,7 +1035,7 @@ void MonstroInstrument::playNote( NotePlayHandle * _n,
|
||||
_n->m_pluginData = new MonstroSynth( this, _n );
|
||||
}
|
||||
|
||||
MonstroSynth * ms = static_cast<MonstroSynth *>( _n->m_pluginData );
|
||||
auto ms = static_cast<MonstroSynth*>(_n->m_pluginData);
|
||||
|
||||
ms->renderOutput( frames, _working_buffer + offset );
|
||||
|
||||
@@ -1414,7 +1414,7 @@ void MonstroInstrument::updateLFOAtts()
|
||||
void MonstroInstrument::updateSamplerate()
|
||||
{
|
||||
m_samplerate = Engine::audioEngine()->processingSampleRate();
|
||||
|
||||
|
||||
m_integrator = 0.5f - ( 0.5f - INTEGRATOR ) * 44100.0f / m_samplerate;
|
||||
m_fmCorrection = 44100.f / m_samplerate * FM_AMOUNT;
|
||||
m_counterMax = ( m_samplerate * 5 ) / 44100;
|
||||
@@ -1459,13 +1459,13 @@ MonstroView::MonstroView( Instrument * _instrument,
|
||||
|
||||
// "tab buttons"
|
||||
|
||||
PixmapButton * m_opViewButton = new PixmapButton( this, nullptr );
|
||||
auto m_opViewButton = new PixmapButton(this, nullptr);
|
||||
m_opViewButton -> move( 0,0 );
|
||||
m_opViewButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "opview_active" ) );
|
||||
m_opViewButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "opview_inactive" ) );
|
||||
m_opViewButton->setToolTip(tr("Operators view"));
|
||||
|
||||
PixmapButton * m_matViewButton = new PixmapButton( this, nullptr );
|
||||
auto m_matViewButton = new PixmapButton(this, nullptr);
|
||||
m_matViewButton -> move( 125,0 );
|
||||
m_matViewButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "matview_active" ) );
|
||||
m_matViewButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "matview_inactive" ) );
|
||||
@@ -1498,7 +1498,7 @@ void MonstroView::updateLayout()
|
||||
|
||||
void MonstroView::modelChanged()
|
||||
{
|
||||
MonstroInstrument * m = castModel<MonstroInstrument>();
|
||||
auto m = castModel<MonstroInstrument>();
|
||||
|
||||
m_osc1VolKnob-> setModel( &m-> m_osc1Vol );
|
||||
m_osc1PanKnob-> setModel( &m-> m_osc1Pan );
|
||||
@@ -1631,7 +1631,7 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent )
|
||||
{
|
||||
// operators view
|
||||
|
||||
QWidget * view = new QWidget( _parent );
|
||||
auto view = new QWidget(_parent);
|
||||
view-> setFixedSize( 250, 250 );
|
||||
|
||||
makeknob( m_osc1VolKnob, KNOBCOL1, O1ROW, tr( "Volume" ), "%", "osc1Knob" )
|
||||
@@ -1694,46 +1694,47 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent )
|
||||
m_lfo2WaveBox -> setGeometry( 127, LFOROW + 7, 42, ComboBox::DEFAULT_HEIGHT );
|
||||
m_lfo2WaveBox->setFont( pointSize<8>( m_lfo2WaveBox->font() ) );
|
||||
|
||||
maketsknob( m_lfo2AttKnob, LFOCOL4, LFOROW, tr( "Attack" ), " ms", "lfoKnob" )
|
||||
maketsknob( m_lfo2RateKnob, LFOCOL5, LFOROW, tr( "Rate" ), " ms", "lfoKnob" )
|
||||
makeknob( m_lfo2PhsKnob, LFOCOL6, LFOROW, tr( "Phase" ), tr( " deg" ), "lfoKnob" )
|
||||
maketsknob(m_lfo2AttKnob, LFOCOL4, LFOROW, tr("Attack"), " ms", "lfoKnob")
|
||||
maketsknob(m_lfo2RateKnob, LFOCOL5, LFOROW, tr("Rate"), " ms", "lfoKnob")
|
||||
makeknob(m_lfo2PhsKnob, LFOCOL6, LFOROW, tr("Phase"), tr(" deg"), "lfoKnob")
|
||||
|
||||
maketsknob( m_env1PreKnob, KNOBCOL1, E1ROW, tr( "Pre-delay" ), " ms", "envKnob" )
|
||||
maketsknob( m_env1AttKnob, KNOBCOL2, E1ROW, tr( "Attack" ), " ms", "envKnob" )
|
||||
maketsknob( m_env1HoldKnob, KNOBCOL3, E1ROW, tr( "Hold" ), " ms", "envKnob" )
|
||||
maketsknob( m_env1DecKnob, KNOBCOL4, E1ROW, tr( "Decay" ), " ms", "envKnob" )
|
||||
makeknob( m_env1SusKnob, KNOBCOL5, E1ROW, tr( "Sustain" ), "", "envKnob" )
|
||||
maketsknob( m_env1RelKnob, KNOBCOL6, E1ROW, tr( "Release" ), " ms", "envKnob" )
|
||||
makeknob( m_env1SlopeKnob, KNOBCOL7, E1ROW, tr( "Slope" ), "", "envKnob" )
|
||||
maketsknob(m_env1PreKnob, KNOBCOL1, E1ROW, tr("Pre-delay"), " ms", "envKnob")
|
||||
maketsknob(m_env1AttKnob, KNOBCOL2, E1ROW, tr("Attack"), " ms", "envKnob")
|
||||
maketsknob(m_env1HoldKnob, KNOBCOL3, E1ROW, tr("Hold"), " ms", "envKnob")
|
||||
maketsknob(m_env1DecKnob, KNOBCOL4, E1ROW, tr("Decay"), " ms", "envKnob")
|
||||
|
||||
maketsknob( m_env2PreKnob, KNOBCOL1, E2ROW, tr( "Pre-delay" ), " ms", "envKnob" )
|
||||
maketsknob( m_env2AttKnob, KNOBCOL2, E2ROW, tr( "Attack" ), " ms", "envKnob" )
|
||||
maketsknob( m_env2HoldKnob, KNOBCOL3, E2ROW, tr( "Hold" ), " ms", "envKnob" )
|
||||
maketsknob( m_env2DecKnob, KNOBCOL4, E2ROW, tr( "Decay" ), " ms", "envKnob" )
|
||||
makeknob( m_env2SusKnob, KNOBCOL5, E2ROW, tr( "Sustain" ), "", "envKnob" )
|
||||
maketsknob( m_env2RelKnob, KNOBCOL6, E2ROW, tr( "Release" ), " ms", "envKnob" )
|
||||
makeknob( m_env2SlopeKnob, KNOBCOL7, E2ROW, tr( "Slope" ), "", "envKnob" )
|
||||
makeknob(m_env1SusKnob, KNOBCOL5, E1ROW, tr("Sustain"), "", "envKnob")
|
||||
maketsknob(m_env1RelKnob, KNOBCOL6, E1ROW, tr("Release"), " ms", "envKnob")
|
||||
makeknob(m_env1SlopeKnob, KNOBCOL7, E1ROW, tr("Slope"), "", "envKnob")
|
||||
|
||||
maketsknob(m_env2PreKnob, KNOBCOL1, E2ROW, tr("Pre-delay"), " ms", "envKnob")
|
||||
maketsknob(m_env2AttKnob, KNOBCOL2, E2ROW, tr("Attack"), " ms", "envKnob")
|
||||
maketsknob(m_env2HoldKnob, KNOBCOL3, E2ROW, tr("Hold"), " ms", "envKnob")
|
||||
maketsknob(m_env2DecKnob, KNOBCOL4, E2ROW, tr("Decay"), " ms", "envKnob")
|
||||
makeknob(m_env2SusKnob, KNOBCOL5, E2ROW, tr("Sustain"), "", "envKnob")
|
||||
maketsknob(m_env2RelKnob, KNOBCOL6, E2ROW, tr("Release"), " ms", "envKnob")
|
||||
makeknob(m_env2SlopeKnob, KNOBCOL7, E2ROW, tr("Slope"), "", "envKnob")
|
||||
|
||||
// mod selector
|
||||
PixmapButton * m_mixButton = new PixmapButton( view, nullptr );
|
||||
auto m_mixButton = new PixmapButton(view, nullptr);
|
||||
m_mixButton -> move( 225, 185 );
|
||||
m_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_active" ) );
|
||||
m_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_inactive" ) );
|
||||
m_mixButton->setToolTip(tr("Mix osc 2 with osc 3"));
|
||||
|
||||
PixmapButton * m_amButton = new PixmapButton( view, nullptr );
|
||||
auto m_amButton = new PixmapButton(view, nullptr);
|
||||
m_amButton -> move( 225, 185 + 15 );
|
||||
m_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "am_active" ) );
|
||||
m_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "am_inactive" ) );
|
||||
m_amButton->setToolTip(tr("Modulate amplitude of osc 3 by osc 2"));
|
||||
|
||||
PixmapButton * m_fmButton = new PixmapButton( view, nullptr );
|
||||
auto m_fmButton = new PixmapButton(view, nullptr);
|
||||
m_fmButton -> move( 225, 185 + 15*2 );
|
||||
m_fmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_active" ) );
|
||||
m_fmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_inactive" ) );
|
||||
m_fmButton->setToolTip(tr("Modulate frequency of osc 3 by osc 2"));
|
||||
|
||||
PixmapButton * m_pmButton = new PixmapButton( view, nullptr );
|
||||
auto m_pmButton = new PixmapButton(view, nullptr);
|
||||
m_pmButton -> move( 225, 185 + 15*3 );
|
||||
m_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_active" ) );
|
||||
m_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_inactive" ) );
|
||||
@@ -1755,7 +1756,7 @@ QWidget * MonstroView::setupMatrixView( QWidget * _parent )
|
||||
{
|
||||
// matrix view
|
||||
|
||||
QWidget * view = new QWidget( _parent );
|
||||
auto view = new QWidget(_parent);
|
||||
view-> setFixedSize( 250, 250 );
|
||||
|
||||
makeknob( m_vol1env1Knob, MATCOL1, MATROW1, tr( "Modulation amount" ), "", "matrixKnob" )
|
||||
|
||||
@@ -47,10 +47,10 @@ MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * con
|
||||
setFixedSize( 245, 300 );
|
||||
|
||||
// graph widgets
|
||||
|
||||
Graph * ampGraph = new Graph( this, Graph::BarStyle, 204, 105 );
|
||||
Graph * lpGraph = new Graph( this, Graph::BarStyle, 204, 105 );
|
||||
|
||||
|
||||
auto ampGraph = new Graph(this, Graph::BarStyle, 204, 105);
|
||||
auto lpGraph = new Graph(this, Graph::BarStyle, 204, 105);
|
||||
|
||||
ampGraph->move( 30, 10 );
|
||||
lpGraph->move( 30, 125 );
|
||||
|
||||
@@ -71,33 +71,33 @@ MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * con
|
||||
lpGraph -> setMaximumSize( 204, 105 );
|
||||
|
||||
// steps spinbox
|
||||
|
||||
LcdSpinBox * steps = new LcdSpinBox( 2, this, "Steps" );
|
||||
|
||||
auto steps = new LcdSpinBox(2, this, "Steps");
|
||||
steps->move( 20, 245 );
|
||||
steps->setModel( & controls->m_steps );
|
||||
|
||||
// knobs
|
||||
|
||||
TempoSyncKnob * stepLength = new TempoSyncKnob( knobBright_26, this );
|
||||
auto stepLength = new TempoSyncKnob(knobBright_26, this);
|
||||
stepLength->move( 100, 245 );
|
||||
stepLength->setModel( & controls->m_stepLength );
|
||||
stepLength->setLabel( tr( "Length" ) );
|
||||
stepLength->setHintText( tr( "Step length:" ) , " ms" );
|
||||
|
||||
Knob * dryGain = new Knob( knobBright_26, this );
|
||||
|
||||
auto dryGain = new Knob(knobBright_26, this);
|
||||
dryGain->move( 150, 245 );
|
||||
dryGain->setModel( & controls->m_dryGain );
|
||||
dryGain->setLabel( tr( "Dry" ) );
|
||||
dryGain->setHintText( tr( "Dry gain:" ) , " dBFS" );
|
||||
|
||||
Knob * stages = new Knob( knobBright_26, this );
|
||||
auto stages = new Knob(knobBright_26, this);
|
||||
stages->move( 200, 245 );
|
||||
stages->setModel( & controls->m_stages );
|
||||
stages->setLabel( tr( "Stages" ) );
|
||||
stages->setHintText( tr( "Low-pass stages:" ) , "x" );
|
||||
// switch led
|
||||
|
||||
LedCheckBox * swapInputs = new LedCheckBox( "Swap inputs", this, tr( "Swap inputs" ), LedCheckBox::Green );
|
||||
|
||||
auto swapInputs = new LedCheckBox("Swap inputs", this, tr("Swap inputs"), LedCheckBox::Green);
|
||||
swapInputs->move( 20, 275 );
|
||||
swapInputs->setModel( & controls->m_swapInputs );
|
||||
swapInputs->setToolTip(tr("Swap left and right input channels for reflections"));
|
||||
|
||||
@@ -385,9 +385,9 @@ void NesObject::renderOutput( sampleFrame * buf, fpp_t frames )
|
||||
// //
|
||||
// final stage - mixing //
|
||||
// //
|
||||
////////////////////////////////
|
||||
|
||||
float pin1 = static_cast<float>( ch1 + ch2 );
|
||||
////////////////////////////////
|
||||
|
||||
auto pin1 = static_cast<float>(ch1 + ch2);
|
||||
// add dithering noise
|
||||
pin1 *= 1.0 + ( Oscillator::noiseSample( 0.0f ) * DITHER_AMP );
|
||||
pin1 = pin1 / 30.0f;
|
||||
@@ -405,8 +405,7 @@ void NesObject::renderOutput( sampleFrame * buf, fpp_t frames )
|
||||
|
||||
pin1 *= NES_MIXING_12;
|
||||
|
||||
|
||||
float pin2 = static_cast<float>( ch3 + ch4 );
|
||||
auto pin2 = static_cast<float>(ch3 + ch4);
|
||||
// add dithering noise
|
||||
pin2 *= 1.0 + ( Oscillator::noiseSample( 0.0f ) * DITHER_AMP );
|
||||
pin2 = pin2 / 30.0f;
|
||||
@@ -552,13 +551,13 @@ void NesInstrument::playNote( NotePlayHandle * n, sampleFrame * workingBuffer )
|
||||
const f_cnt_t offset = n->noteOffset();
|
||||
|
||||
if ( n->totalFramesPlayed() == 0 || n->m_pluginData == nullptr )
|
||||
{
|
||||
NesObject * nes = new NesObject( this, Engine::audioEngine()->processingSampleRate(), n );
|
||||
{
|
||||
auto nes = new NesObject(this, Engine::audioEngine()->processingSampleRate(), n);
|
||||
n->m_pluginData = nes;
|
||||
}
|
||||
|
||||
NesObject * nes = static_cast<NesObject *>( n->m_pluginData );
|
||||
|
||||
|
||||
auto nes = static_cast<NesObject*>(n->m_pluginData);
|
||||
|
||||
nes->renderOutput( workingBuffer + offset, frames );
|
||||
|
||||
applyRelease( workingBuffer, n );
|
||||
@@ -846,7 +845,7 @@ NesInstrumentView::NesInstrumentView( Instrument * instrument, QWidget * parent
|
||||
|
||||
void NesInstrumentView::modelChanged()
|
||||
{
|
||||
NesInstrument * nes = castModel<NesInstrument>();
|
||||
auto nes = castModel<NesInstrument>();
|
||||
|
||||
m_ch1EnabledBtn->setModel( &nes->m_ch1Enabled );
|
||||
m_ch1CrsKnob->setModel( &nes->m_ch1Crs );
|
||||
|
||||
@@ -215,7 +215,7 @@ OpulenzInstrument::OpulenzInstrument( InstrumentTrack * _instrument_track ) :
|
||||
MOD_CON( trem_depth_mdl );
|
||||
|
||||
// Connect the plugin to the audio engine...
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
auto iph = new InstrumentPlayHandle(this, _instrument_track);
|
||||
Engine::audioEngine()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
@@ -798,8 +798,7 @@ void OpulenzInstrumentView::updateKnobHints()
|
||||
-12, 0, 12, 19, 24, 28, 31, 34, 36, 38, 40, 40, 43, 43, 47, 47
|
||||
};
|
||||
|
||||
OpulenzInstrument * m = castModel<OpulenzInstrument>();
|
||||
|
||||
auto m = castModel<OpulenzInstrument>();
|
||||
|
||||
op1_a_kn->setHintText( tr( "Attack" ),
|
||||
" (" + knobHintHelper(attack_times[(int)m->op1_a_mdl.value()]) + ")");
|
||||
@@ -821,7 +820,7 @@ void OpulenzInstrumentView::updateKnobHints()
|
||||
|
||||
void OpulenzInstrumentView::modelChanged()
|
||||
{
|
||||
OpulenzInstrument * m = castModel<OpulenzInstrument>();
|
||||
auto m = castModel<OpulenzInstrument>();
|
||||
// m_patch->setModel( &m->m_patchModel );
|
||||
|
||||
op1_a_kn->setModel( &m->op1_a_mdl );
|
||||
|
||||
@@ -422,7 +422,7 @@ OrganicInstrumentView::OrganicInstrumentView( Instrument * _instrument,
|
||||
InstrumentViewFixedSize( _instrument, _parent ),
|
||||
m_oscKnobs( nullptr )
|
||||
{
|
||||
OrganicInstrument * oi = castModel<OrganicInstrument>();
|
||||
auto oi = castModel<OrganicInstrument>();
|
||||
|
||||
setAutoFillBackground( true );
|
||||
QPalette pal;
|
||||
@@ -474,8 +474,8 @@ OrganicInstrumentView::~OrganicInstrumentView()
|
||||
|
||||
void OrganicInstrumentView::modelChanged()
|
||||
{
|
||||
OrganicInstrument * oi = castModel<OrganicInstrument>();
|
||||
|
||||
auto oi = castModel<OrganicInstrument>();
|
||||
|
||||
const float y=91.0f;
|
||||
const float rowHeight = 26.0f;
|
||||
const float x=53.0f;
|
||||
@@ -512,7 +512,7 @@ void OrganicInstrumentView::modelChanged()
|
||||
oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg( i + 1 ), QString() );
|
||||
|
||||
// setup volume-knob
|
||||
Knob * volKnob = new Knob( knobStyled, this );
|
||||
auto volKnob = new Knob(knobStyled, this);
|
||||
volKnob->setVolumeKnob( true );
|
||||
volKnob->move( x + i * colWidth, y + rowHeight*1 );
|
||||
volKnob->setFixedSize( 21, 21 );
|
||||
@@ -547,7 +547,7 @@ void OrganicInstrumentView::modelChanged()
|
||||
|
||||
void OrganicInstrumentView::updateKnobHint()
|
||||
{
|
||||
OrganicInstrument * oi = castModel<OrganicInstrument>();
|
||||
auto oi = castModel<OrganicInstrument>();
|
||||
for( int i = 0; i < m_numOscillators; ++i )
|
||||
{
|
||||
const float harm = oi->m_osc[i]->m_harmModel.value();
|
||||
|
||||
@@ -148,7 +148,7 @@ void PatmanInstrument::playNote( NotePlayHandle * _n,
|
||||
{
|
||||
selectSample( _n );
|
||||
}
|
||||
handle_data * hdata = (handle_data *)_n->m_pluginData;
|
||||
auto hdata = (handle_data*)_n->m_pluginData;
|
||||
|
||||
float play_freq = hdata->tuned ? _n->frequency() :
|
||||
hdata->sample->frequency();
|
||||
@@ -171,7 +171,7 @@ void PatmanInstrument::playNote( NotePlayHandle * _n,
|
||||
|
||||
void PatmanInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
{
|
||||
handle_data * hdata = (handle_data *)_n->m_pluginData;
|
||||
auto hdata = (handle_data*)_n->m_pluginData;
|
||||
sharedObject::unref( hdata->sample );
|
||||
delete hdata->state;
|
||||
delete hdata;
|
||||
@@ -347,7 +347,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
}
|
||||
}
|
||||
|
||||
sampleFrame * data = new sampleFrame[frames];
|
||||
auto data = new sampleFrame[frames];
|
||||
|
||||
for( f_cnt_t frame = 0; frame < frames; ++frame )
|
||||
{
|
||||
@@ -358,7 +358,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
}
|
||||
}
|
||||
|
||||
SampleBuffer* psample = new SampleBuffer( data, frames );
|
||||
auto psample = new SampleBuffer(data, frames);
|
||||
psample->setFrequency( root_freq / 1000.0f );
|
||||
psample->setSampleRate( sample_rate );
|
||||
|
||||
@@ -412,7 +412,7 @@ void PatmanInstrument::selectSample( NotePlayHandle * _n )
|
||||
}
|
||||
}
|
||||
|
||||
handle_data * hdata = new handle_data;
|
||||
auto hdata = new handle_data;
|
||||
hdata->tuned = m_tunedModel.value();
|
||||
if( sample )
|
||||
{
|
||||
|
||||
@@ -85,9 +85,9 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
|
||||
m_absLed = new LedCheckBox( tr( "Absolute value" ), this );
|
||||
m_absLed->setModel( &_controls->m_absModel );
|
||||
|
||||
QVBoxLayout * mainLayout = new QVBoxLayout();
|
||||
QHBoxLayout * knobLayout = new QHBoxLayout();
|
||||
QHBoxLayout * ledLayout = new QHBoxLayout();
|
||||
auto mainLayout = new QVBoxLayout();
|
||||
auto knobLayout = new QHBoxLayout();
|
||||
auto ledLayout = new QHBoxLayout();
|
||||
|
||||
knobLayout->addWidget( m_baseKnob );
|
||||
knobLayout->addWidget( m_amountKnob );
|
||||
|
||||
@@ -98,12 +98,10 @@ bool ReverbSCEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
{
|
||||
sample_t s[2] = { buf[f][0], buf[f][1] };
|
||||
|
||||
const SPFLOAT inGain = (SPFLOAT)DB2LIN((inGainBuf ?
|
||||
inGainBuf->values()[f]
|
||||
: m_reverbSCControls.m_inputGainModel.value()));
|
||||
const SPFLOAT outGain = (SPFLOAT)DB2LIN((outGainBuf ?
|
||||
outGainBuf->values()[f]
|
||||
: m_reverbSCControls.m_outputGainModel.value()));
|
||||
const auto inGain
|
||||
= (SPFLOAT)DB2LIN((inGainBuf ? inGainBuf->values()[f] : m_reverbSCControls.m_inputGainModel.value()));
|
||||
const auto outGain
|
||||
= (SPFLOAT)DB2LIN((outGainBuf ? outGainBuf->values()[f] : m_reverbSCControls.m_outputGainModel.value()));
|
||||
|
||||
s[0] *= inGain;
|
||||
s[1] *= inGain;
|
||||
|
||||
@@ -41,26 +41,26 @@ ReverbSCControlDialog::ReverbSCControlDialog( ReverbSCControls* controls ) :
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
setFixedSize( 185, 55 );
|
||||
|
||||
Knob * inputGainKnob = new Knob( knobBright_26, this);
|
||||
|
||||
auto inputGainKnob = new Knob(knobBright_26, this);
|
||||
inputGainKnob -> move( 16, 10 );
|
||||
inputGainKnob->setModel( &controls->m_inputGainModel );
|
||||
inputGainKnob->setLabel( tr( "Input" ) );
|
||||
inputGainKnob->setHintText( tr( "Input gain:" ) , "dB" );
|
||||
|
||||
Knob * sizeKnob = new Knob( knobBright_26, this);
|
||||
auto sizeKnob = new Knob(knobBright_26, this);
|
||||
sizeKnob -> move( 57, 10 );
|
||||
sizeKnob->setModel( &controls->m_sizeModel );
|
||||
sizeKnob->setLabel( tr( "Size" ) );
|
||||
sizeKnob->setHintText( tr( "Size:" ) , "" );
|
||||
|
||||
Knob * colorKnob = new Knob( knobBright_26, this);
|
||||
auto colorKnob = new Knob(knobBright_26, this);
|
||||
colorKnob -> move( 98, 10 );
|
||||
colorKnob->setModel( &controls->m_colorModel );
|
||||
colorKnob->setLabel( tr( "Color" ) );
|
||||
colorKnob->setHintText( tr( "Color:" ) , "" );
|
||||
|
||||
Knob * outputGainKnob = new Knob( knobBright_26, this);
|
||||
auto outputGainKnob = new Knob(knobBright_26, this);
|
||||
outputGainKnob -> move( 139, 10 );
|
||||
outputGainKnob->setModel( &controls->m_outputGainModel );
|
||||
outputGainKnob->setLabel( tr( "Output" ) );
|
||||
|
||||
@@ -186,7 +186,7 @@ Sf2Instrument::Sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
connect( &m_chorusSpeed, SIGNAL( dataChanged() ), this, SLOT( updateChorus() ) );
|
||||
connect( &m_chorusDepth, SIGNAL( dataChanged() ), this, SLOT( updateChorus() ) );
|
||||
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
auto iph = new InstrumentPlayHandle(this, _instrument_track);
|
||||
Engine::audioEngine()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ void Sf2Instrument::playNote( NotePlayHandle * _n, sampleFrame * )
|
||||
}
|
||||
const int baseVelocity = instrumentTrack()->midiPort()->baseVelocity();
|
||||
|
||||
Sf2PluginData * pluginData = new Sf2PluginData;
|
||||
auto pluginData = new Sf2PluginData;
|
||||
pluginData->midiNote = midiNote;
|
||||
pluginData->lastPanning = 0;
|
||||
pluginData->lastVelocity = _n->midiVelocity( baseVelocity );
|
||||
@@ -658,7 +658,7 @@ void Sf2Instrument::playNote( NotePlayHandle * _n, sampleFrame * )
|
||||
}
|
||||
else if( _n->isReleased() && ! _n->instrumentTrack()->isSustainPedalPressed() ) // note is released during this period
|
||||
{
|
||||
Sf2PluginData * pluginData = static_cast<Sf2PluginData *>( _n->m_pluginData );
|
||||
auto pluginData = static_cast<Sf2PluginData*>(_n->m_pluginData);
|
||||
pluginData->offset = _n->framesBeforeRelease();
|
||||
pluginData->isNew = false;
|
||||
|
||||
@@ -766,8 +766,8 @@ void Sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
NotePlayHandle * currentNote = m_playingNotes[0];
|
||||
for( int i = 1; i < m_playingNotes.size(); ++i )
|
||||
{
|
||||
Sf2PluginData * currentData = static_cast<Sf2PluginData *>( currentNote->m_pluginData );
|
||||
Sf2PluginData * iData = static_cast<Sf2PluginData *>( m_playingNotes[i]->m_pluginData );
|
||||
auto currentData = static_cast<Sf2PluginData*>(currentNote->m_pluginData);
|
||||
auto iData = static_cast<Sf2PluginData*>(m_playingNotes[i]->m_pluginData);
|
||||
if( currentData->offset > iData->offset )
|
||||
{
|
||||
currentNote = m_playingNotes[i];
|
||||
@@ -776,7 +776,7 @@ void Sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
|
||||
// process the current note:
|
||||
// first see if we're synced in frame count
|
||||
Sf2PluginData * currentData = static_cast<Sf2PluginData *>( currentNote->m_pluginData );
|
||||
auto currentData = static_cast<Sf2PluginData*>(currentNote->m_pluginData);
|
||||
if( currentData->offset > currentFrame )
|
||||
{
|
||||
renderFrames( currentData->offset - currentFrame, _working_buffer + currentFrame );
|
||||
@@ -860,7 +860,7 @@ void Sf2Instrument::renderFrames( f_cnt_t frames, sampleFrame * buf )
|
||||
|
||||
void Sf2Instrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
{
|
||||
Sf2PluginData * pluginData = static_cast<Sf2PluginData *>( _n->m_pluginData );
|
||||
auto pluginData = static_cast<Sf2PluginData*>(_n->m_pluginData);
|
||||
if( ! pluginData->noteOffSent ) // if we for some reason haven't noteoffed the note before it gets deleted,
|
||||
// do it here
|
||||
{
|
||||
@@ -908,37 +908,36 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren
|
||||
// QVBoxLayout * vl = new QVBoxLayout( this );
|
||||
// QHBoxLayout * hl = new QHBoxLayout();
|
||||
|
||||
Sf2Instrument* k = castModel<Sf2Instrument>();
|
||||
auto k = castModel<Sf2Instrument>();
|
||||
|
||||
connect( &k->m_bankNum, SIGNAL( dataChanged() ), this, SLOT( updatePatchName() ) );
|
||||
connect( &k->m_patchNum, SIGNAL( dataChanged() ), this, SLOT( updatePatchName() ) );
|
||||
connect(&k->m_bankNum, SIGNAL(dataChanged()), this, SLOT(updatePatchName()));
|
||||
connect(&k->m_patchNum, SIGNAL(dataChanged()), this, SLOT(updatePatchName()));
|
||||
|
||||
// File Button
|
||||
m_fileDialogButton = new PixmapButton( this );
|
||||
m_fileDialogButton->setCursor( QCursor( Qt::PointingHandCursor ) );
|
||||
m_fileDialogButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fileselect_on" ) );
|
||||
m_fileDialogButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fileselect_off" ) );
|
||||
m_fileDialogButton->move( 217, 107 );
|
||||
m_fileDialogButton = new PixmapButton(this);
|
||||
m_fileDialogButton->setCursor(QCursor(Qt::PointingHandCursor));
|
||||
m_fileDialogButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("fileselect_on"));
|
||||
m_fileDialogButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("fileselect_off"));
|
||||
m_fileDialogButton->move(217, 107);
|
||||
|
||||
connect( m_fileDialogButton, SIGNAL( clicked() ), this, SLOT( showFileDialog() ) );
|
||||
connect(m_fileDialogButton, SIGNAL(clicked()), this, SLOT(showFileDialog()));
|
||||
|
||||
m_fileDialogButton->setToolTip(tr("Open SoundFont file"));
|
||||
|
||||
// Patch Button
|
||||
m_patchDialogButton = new PixmapButton( this );
|
||||
m_patchDialogButton->setCursor( QCursor( Qt::PointingHandCursor ) );
|
||||
m_patchDialogButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "patches_on" ) );
|
||||
m_patchDialogButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "patches_off" ) );
|
||||
m_patchDialogButton->setEnabled( false );
|
||||
m_patchDialogButton->move( 217, 125 );
|
||||
m_patchDialogButton = new PixmapButton(this);
|
||||
m_patchDialogButton->setCursor(QCursor(Qt::PointingHandCursor));
|
||||
m_patchDialogButton->setActiveGraphic(PLUGIN_NAME::getIconPixmap("patches_on"));
|
||||
m_patchDialogButton->setInactiveGraphic(PLUGIN_NAME::getIconPixmap("patches_off"));
|
||||
m_patchDialogButton->setEnabled(false);
|
||||
m_patchDialogButton->move(217, 125);
|
||||
|
||||
connect( m_patchDialogButton, SIGNAL( clicked() ), this, SLOT( showPatchDialog() ) );
|
||||
connect(m_patchDialogButton, SIGNAL(clicked()), this, SLOT(showPatchDialog()));
|
||||
|
||||
m_patchDialogButton->setToolTip(tr("Choose patch"));
|
||||
|
||||
|
||||
// LCDs
|
||||
m_bankNumLcd = new LcdSpinBox( 3, "21pink", this );
|
||||
m_bankNumLcd = new LcdSpinBox(3, "21pink", this);
|
||||
m_bankNumLcd->move(131, 62);
|
||||
// m_bankNumLcd->addTextForValue( -1, "---" );
|
||||
// m_bankNumLcd->setEnabled( false );
|
||||
@@ -1057,7 +1056,7 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren
|
||||
|
||||
void Sf2InstrumentView::modelChanged()
|
||||
{
|
||||
Sf2Instrument * k = castModel<Sf2Instrument>();
|
||||
auto k = castModel<Sf2Instrument>();
|
||||
m_bankNumLcd->setModel( &k->m_bankNum );
|
||||
m_patchNumLcd->setModel( &k->m_patchNum );
|
||||
|
||||
@@ -1088,7 +1087,7 @@ void Sf2InstrumentView::modelChanged()
|
||||
|
||||
void Sf2InstrumentView::updateFilename()
|
||||
{
|
||||
Sf2Instrument * i = castModel<Sf2Instrument>();
|
||||
auto i = castModel<Sf2Instrument>();
|
||||
QFontMetrics fm( m_filenameLabel->font() );
|
||||
QString file = i->m_filename.endsWith( ".sf2", Qt::CaseInsensitive ) ?
|
||||
i->m_filename.left( i->m_filename.length() - 4 ) :
|
||||
@@ -1108,7 +1107,7 @@ void Sf2InstrumentView::updateFilename()
|
||||
|
||||
void Sf2InstrumentView::updatePatchName()
|
||||
{
|
||||
Sf2Instrument * i = castModel<Sf2Instrument>();
|
||||
auto i = castModel<Sf2Instrument>();
|
||||
QFontMetrics fm( font() );
|
||||
QString patch = i->getCurrentPatchName();
|
||||
m_patchLabel->setText( fm.elidedText( patch, Qt::ElideLeft, m_patchLabel->width() ) );
|
||||
@@ -1130,7 +1129,7 @@ void Sf2InstrumentView::invalidateFile()
|
||||
|
||||
void Sf2InstrumentView::showFileDialog()
|
||||
{
|
||||
Sf2Instrument * k = castModel<Sf2Instrument>();
|
||||
auto k = castModel<Sf2Instrument>();
|
||||
|
||||
FileDialog ofd( nullptr, tr( "Open SoundFont file" ) );
|
||||
ofd.setFileMode( FileDialog::ExistingFiles );
|
||||
@@ -1170,7 +1169,7 @@ void Sf2InstrumentView::showFileDialog()
|
||||
|
||||
void Sf2InstrumentView::showPatchDialog()
|
||||
{
|
||||
Sf2Instrument * k = castModel<Sf2Instrument>();
|
||||
auto k = castModel<Sf2Instrument>();
|
||||
|
||||
PatchesDialog pd( this );
|
||||
|
||||
|
||||
@@ -464,7 +464,7 @@ void SfxrInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffe
|
||||
// debug code
|
||||
// qDebug( "pFN %d", pitchedFrameNum );
|
||||
|
||||
sampleFrame * pitchedBuffer = new sampleFrame[pitchedFrameNum];
|
||||
auto pitchedBuffer = new sampleFrame[pitchedFrameNum];
|
||||
static_cast<SfxrSynth*>(_n->m_pluginData)->update( pitchedBuffer, pitchedFrameNum );
|
||||
for( fpp_t i=0; i<frameNum; i++ )
|
||||
{
|
||||
@@ -709,7 +709,7 @@ SfxrInstrumentView::SfxrInstrumentView( Instrument * _instrument,
|
||||
|
||||
void SfxrInstrumentView::modelChanged()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
|
||||
m_attKnob->setModel( &s->m_attModel );
|
||||
m_holdKnob->setModel( &s->m_holdModel );
|
||||
@@ -748,7 +748,7 @@ void SfxrInstrumentView::modelChanged()
|
||||
|
||||
void SfxrInstrumentView::genPickup()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
s->resetModels();
|
||||
s->m_startFreqModel.setValue( 0.4f+frnd(0.5f) );
|
||||
s->m_attModel.setValue( 0.0f );
|
||||
@@ -768,7 +768,7 @@ void SfxrInstrumentView::genPickup()
|
||||
|
||||
void SfxrInstrumentView::genLaser()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
s->resetModels();
|
||||
|
||||
s->m_waveFormModel.setValue( rnd(2) );
|
||||
@@ -827,7 +827,7 @@ void SfxrInstrumentView::genLaser()
|
||||
|
||||
void SfxrInstrumentView::genExplosion()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
s->resetModels();
|
||||
|
||||
s->m_waveFormModel.setValue( 3 );
|
||||
@@ -882,7 +882,7 @@ void SfxrInstrumentView::genExplosion()
|
||||
|
||||
void SfxrInstrumentView::genPowerup()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
s->resetModels();
|
||||
|
||||
if(rnd(1))
|
||||
@@ -916,7 +916,7 @@ void SfxrInstrumentView::genPowerup()
|
||||
|
||||
void SfxrInstrumentView::genHit()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
s->resetModels();
|
||||
|
||||
s->m_waveFormModel.setValue( rnd(2) );
|
||||
@@ -946,7 +946,7 @@ void SfxrInstrumentView::genHit()
|
||||
|
||||
void SfxrInstrumentView::genJump()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
s->resetModels();
|
||||
|
||||
s->m_waveFormModel.setValue( 0 );
|
||||
@@ -976,7 +976,7 @@ void SfxrInstrumentView::genJump()
|
||||
|
||||
void SfxrInstrumentView::genBlip()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
s->resetModels();
|
||||
|
||||
s->m_waveFormModel.setValue( rnd(1) );
|
||||
@@ -998,7 +998,7 @@ void SfxrInstrumentView::genBlip()
|
||||
|
||||
void SfxrInstrumentView::randomize()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
|
||||
s->m_startFreqModel.setValue( pow(frnd(2.0f)-1.0f, 2.0f) );
|
||||
if(rnd(1))
|
||||
@@ -1059,7 +1059,7 @@ void SfxrInstrumentView::randomize()
|
||||
|
||||
void SfxrInstrumentView::mutate()
|
||||
{
|
||||
SfxrInstrument * s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
|
||||
if(rnd(1)) s->m_startFreqModel.setValue( s->m_startFreqModel.value()+frnd(0.1f)-0.05f );
|
||||
// if(rnd(1)) s->m_minFreqModel.setValue( s->m_minFreqModel.value()+frnd(0.1f)-0.05f );
|
||||
@@ -1099,7 +1099,7 @@ void SfxrInstrumentView::mutate()
|
||||
|
||||
void SfxrInstrumentView::previewSound()
|
||||
{
|
||||
SfxrInstrument* s = castModel<SfxrInstrument>();
|
||||
auto s = castModel<SfxrInstrument>();
|
||||
InstrumentTrack* it = s->instrumentTrack();
|
||||
it->silenceAllNotes();
|
||||
it->processInEvent( MidiEvent( MidiNoteOn, 0, it->baseNoteModel()->value(), MidiDefaultVelocity ) );
|
||||
|
||||
@@ -317,7 +317,7 @@ void SidInstrument::playNote( NotePlayHandle * _n,
|
||||
SID *sid = static_cast<SID *>( _n->m_pluginData );
|
||||
int delta_t = clockrate * frames / samplerate + 4;
|
||||
// avoid variable length array for msvc compat
|
||||
short* buf = reinterpret_cast<short*>(_working_buffer + offset);
|
||||
auto buf = reinterpret_cast<short*>(_working_buffer + offset);
|
||||
unsigned char sidreg[NUMSIDREGS];
|
||||
|
||||
for (int c = 0; c < NUMSIDREGS; c++)
|
||||
@@ -498,19 +498,19 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
m_cutKnob->setHintText( tr( "Cutoff frequency:" ), " Hz" );
|
||||
m_cutKnob->move( 7 + 2*28, 64 );
|
||||
|
||||
PixmapButton * hp_btn = new PixmapButton( this, nullptr );
|
||||
auto hp_btn = new PixmapButton(this, nullptr);
|
||||
hp_btn->move( 140, 77 );
|
||||
hp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "hpred" ) );
|
||||
hp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "hp" ) );
|
||||
hp_btn->setToolTip(tr("High-pass filter "));
|
||||
|
||||
PixmapButton * bp_btn = new PixmapButton( this, nullptr );
|
||||
auto bp_btn = new PixmapButton(this, nullptr);
|
||||
bp_btn->move( 164, 77 );
|
||||
bp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bpred" ) );
|
||||
bp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bp" ) );
|
||||
bp_btn->setToolTip(tr("Band-pass filter "));
|
||||
|
||||
PixmapButton * lp_btn = new PixmapButton( this, nullptr );
|
||||
auto lp_btn = new PixmapButton(this, nullptr);
|
||||
lp_btn->move( 185, 77 );
|
||||
lp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "lpred" ) );
|
||||
lp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "lp" ) );
|
||||
@@ -528,13 +528,13 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
m_offButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "3off" ) );
|
||||
m_offButton->setToolTip(tr("Voice 3 off "));
|
||||
|
||||
PixmapButton * mos6581_btn = new PixmapButton( this, nullptr );
|
||||
auto mos6581_btn = new PixmapButton(this, nullptr);
|
||||
mos6581_btn->move( 170, 59 );
|
||||
mos6581_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "6581red" ) );
|
||||
mos6581_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "6581" ) );
|
||||
mos6581_btn->setToolTip(tr("MOS6581 SID "));
|
||||
|
||||
PixmapButton * mos8580_btn = new PixmapButton( this, nullptr );
|
||||
auto mos8580_btn = new PixmapButton(this, nullptr);
|
||||
mos8580_btn->move( 207, 59 );
|
||||
mos8580_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "8580red" ) );
|
||||
mos8580_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "8580" ) );
|
||||
@@ -570,7 +570,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
crsk->setHintText( tr("Coarse:"), " semitones" );
|
||||
crsk->move( 147, 114 + i*50 );
|
||||
|
||||
PixmapButton * pulse_btn = new PixmapButton( this, nullptr );
|
||||
auto pulse_btn = new PixmapButton(this, nullptr);
|
||||
pulse_btn->move( 187, 101 + i*50 );
|
||||
pulse_btn->setActiveGraphic(
|
||||
PLUGIN_NAME::getIconPixmap( "pulsered" ) );
|
||||
@@ -578,7 +578,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
PLUGIN_NAME::getIconPixmap( "pulse" ) );
|
||||
pulse_btn->setToolTip(tr("Pulse wave"));
|
||||
|
||||
PixmapButton * triangle_btn = new PixmapButton( this, nullptr );
|
||||
auto triangle_btn = new PixmapButton(this, nullptr);
|
||||
triangle_btn->move( 168, 101 + i*50 );
|
||||
triangle_btn->setActiveGraphic(
|
||||
PLUGIN_NAME::getIconPixmap( "trianglered" ) );
|
||||
@@ -586,7 +586,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
PLUGIN_NAME::getIconPixmap( "triangle" ) );
|
||||
triangle_btn->setToolTip(tr("Triangle wave"));
|
||||
|
||||
PixmapButton * saw_btn = new PixmapButton( this, nullptr );
|
||||
auto saw_btn = new PixmapButton(this, nullptr);
|
||||
saw_btn->move( 207, 101 + i*50 );
|
||||
saw_btn->setActiveGraphic(
|
||||
PLUGIN_NAME::getIconPixmap( "sawred" ) );
|
||||
@@ -594,7 +594,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
PLUGIN_NAME::getIconPixmap( "saw" ) );
|
||||
saw_btn->setToolTip(tr("Saw wave"));
|
||||
|
||||
PixmapButton * noise_btn = new PixmapButton( this, nullptr );
|
||||
auto noise_btn = new PixmapButton(this, nullptr);
|
||||
noise_btn->move( 226, 101 + i*50 );
|
||||
noise_btn->setActiveGraphic(
|
||||
PLUGIN_NAME::getIconPixmap( "noisered" ) );
|
||||
@@ -602,15 +602,14 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
PLUGIN_NAME::getIconPixmap( "noise" ) );
|
||||
noise_btn->setToolTip(tr("Noise"));
|
||||
|
||||
automatableButtonGroup * wfbg =
|
||||
new automatableButtonGroup( this );
|
||||
auto wfbg = new automatableButtonGroup(this);
|
||||
|
||||
wfbg->addButton( pulse_btn );
|
||||
wfbg->addButton( triangle_btn );
|
||||
wfbg->addButton( saw_btn );
|
||||
wfbg->addButton( noise_btn );
|
||||
|
||||
PixmapButton * sync_btn = new PixmapButton( this, nullptr );
|
||||
auto sync_btn = new PixmapButton(this, nullptr);
|
||||
sync_btn->setCheckable( true );
|
||||
sync_btn->move( 207, 134 + i*50 );
|
||||
sync_btn->setActiveGraphic(
|
||||
@@ -619,7 +618,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
PLUGIN_NAME::getIconPixmap( "sync" ) );
|
||||
sync_btn->setToolTip(tr("Sync"));
|
||||
|
||||
PixmapButton * ringMod_btn = new PixmapButton( this, nullptr );
|
||||
auto ringMod_btn = new PixmapButton(this, nullptr);
|
||||
ringMod_btn->setCheckable( true );
|
||||
ringMod_btn->move( 170, 116 + i*50 );
|
||||
ringMod_btn->setActiveGraphic(
|
||||
@@ -628,7 +627,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
PLUGIN_NAME::getIconPixmap( "ring" ) );
|
||||
ringMod_btn->setToolTip(tr("Ring modulation"));
|
||||
|
||||
PixmapButton * filter_btn = new PixmapButton( this, nullptr );
|
||||
auto filter_btn = new PixmapButton(this, nullptr);
|
||||
filter_btn->setCheckable( true );
|
||||
filter_btn->move( 207, 116 + i*50 );
|
||||
filter_btn->setActiveGraphic(
|
||||
@@ -637,7 +636,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
PLUGIN_NAME::getIconPixmap( "filter" ) );
|
||||
filter_btn->setToolTip(tr("Filtered"));
|
||||
|
||||
PixmapButton * test_btn = new PixmapButton( this, nullptr );
|
||||
auto test_btn = new PixmapButton(this, nullptr);
|
||||
test_btn->setCheckable( true );
|
||||
test_btn->move( 170, 134 + i*50 );
|
||||
test_btn->setActiveGraphic(
|
||||
@@ -654,7 +653,7 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument,
|
||||
|
||||
void SidInstrumentView::updateKnobHint()
|
||||
{
|
||||
SidInstrument * k = castModel<SidInstrument>();
|
||||
auto k = castModel<SidInstrument>();
|
||||
|
||||
for( int i = 0; i < 3; ++i )
|
||||
{
|
||||
@@ -695,7 +694,7 @@ void SidInstrumentView::updateKnobHint()
|
||||
|
||||
void SidInstrumentView::updateKnobToolTip()
|
||||
{
|
||||
SidInstrument * k = castModel<SidInstrument>();
|
||||
auto k = castModel<SidInstrument>();
|
||||
for( int i = 0; i < 3; ++i )
|
||||
{
|
||||
m_voiceKnobs[i].m_sustKnob->setToolTip(
|
||||
@@ -715,7 +714,7 @@ void SidInstrumentView::updateKnobToolTip()
|
||||
|
||||
void SidInstrumentView::modelChanged()
|
||||
{
|
||||
SidInstrument * k = castModel<SidInstrument>();
|
||||
auto k = castModel<SidInstrument>();
|
||||
|
||||
m_volKnob->setModel( &k->m_volumeModel );
|
||||
m_resKnob->setModel( &k->m_filterResonanceModel );
|
||||
|
||||
@@ -52,15 +52,15 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
m_processor(processor)
|
||||
{
|
||||
// Top level placement of sections is handled by QSplitter widget.
|
||||
QHBoxLayout *master_layout = new QHBoxLayout;
|
||||
QSplitter *display_splitter = new QSplitter(Qt::Vertical);
|
||||
auto master_layout = new QHBoxLayout;
|
||||
auto display_splitter = new QSplitter(Qt::Vertical);
|
||||
master_layout->addWidget(display_splitter);
|
||||
master_layout->setContentsMargins(2, 6, 2, 8);
|
||||
setLayout(master_layout);
|
||||
|
||||
// Display splitter top: controls section
|
||||
QWidget *controls_widget = new QWidget;
|
||||
QHBoxLayout *controls_layout = new QHBoxLayout;
|
||||
auto controls_widget = new QWidget;
|
||||
auto controls_layout = new QHBoxLayout;
|
||||
controls_layout->setContentsMargins(0, 0, 0, 0);
|
||||
controls_widget->setLayout(controls_layout);
|
||||
controls_widget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
@@ -69,8 +69,8 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
|
||||
|
||||
// Basic configuration
|
||||
QWidget *config_widget = new QWidget;
|
||||
QGridLayout *config_layout = new QGridLayout;
|
||||
auto config_widget = new QWidget;
|
||||
auto config_layout = new QGridLayout;
|
||||
config_widget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
config_widget->setMaximumHeight(m_configHeight);
|
||||
config_widget->setLayout(config_layout);
|
||||
@@ -87,10 +87,12 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
|
||||
|
||||
// pause and freeze buttons
|
||||
PixmapButton *pauseButton = new PixmapButton(this, tr("Pause"));
|
||||
auto pauseButton = new PixmapButton(this, tr("Pause"));
|
||||
pauseButton->setToolTip(tr("Pause data acquisition"));
|
||||
QPixmap *pauseOnPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("play").scaled(buttonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
QPixmap *pauseOffPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("pause").scaled(buttonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto pauseOnPixmap = new QPixmap(
|
||||
PLUGIN_NAME::getIconPixmap("play").scaled(buttonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto pauseOffPixmap = new QPixmap(
|
||||
PLUGIN_NAME::getIconPixmap("pause").scaled(buttonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
pauseOnPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
pauseOffPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
pauseButton->setActiveGraphic(*pauseOnPixmap);
|
||||
@@ -99,10 +101,12 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
pauseButton->setModel(&controls->m_pauseModel);
|
||||
config_layout->addWidget(pauseButton, 0, 0, 2, 1, Qt::AlignHCenter);
|
||||
|
||||
PixmapButton *refFreezeButton = new PixmapButton(this, tr("Reference freeze"));
|
||||
auto refFreezeButton = new PixmapButton(this, tr("Reference freeze"));
|
||||
refFreezeButton->setToolTip(tr("Freeze current input as a reference / disable falloff in peak-hold mode."));
|
||||
QPixmap *freezeOnPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("freeze").scaled(buttonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
QPixmap *freezeOffPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("freeze_off").scaled(buttonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto freezeOnPixmap = new QPixmap(
|
||||
PLUGIN_NAME::getIconPixmap("freeze").scaled(buttonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto freezeOffPixmap = new QPixmap(
|
||||
PLUGIN_NAME::getIconPixmap("freeze_off").scaled(buttonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
freezeOnPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
freezeOffPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
refFreezeButton->setActiveGraphic(*freezeOnPixmap);
|
||||
@@ -112,28 +116,28 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
config_layout->addWidget(refFreezeButton, 2, 0, 2, 1, Qt::AlignHCenter);
|
||||
|
||||
// misc configuration switches
|
||||
LedCheckBox *waterfallButton = new LedCheckBox(tr("Waterfall"), this);
|
||||
auto waterfallButton = new LedCheckBox(tr("Waterfall"), this);
|
||||
waterfallButton->setToolTip(tr("Display real-time spectrogram"));
|
||||
waterfallButton->setCheckable(true);
|
||||
waterfallButton->setMinimumSize(70, 12);
|
||||
waterfallButton->setModel(&controls->m_waterfallModel);
|
||||
config_layout->addWidget(waterfallButton, 0, 1);
|
||||
|
||||
LedCheckBox *smoothButton = new LedCheckBox(tr("Averaging"), this);
|
||||
auto smoothButton = new LedCheckBox(tr("Averaging"), this);
|
||||
smoothButton->setToolTip(tr("Enable exponential moving average"));
|
||||
smoothButton->setCheckable(true);
|
||||
smoothButton->setMinimumSize(70, 12);
|
||||
smoothButton->setModel(&controls->m_smoothModel);
|
||||
config_layout->addWidget(smoothButton, 1, 1);
|
||||
|
||||
LedCheckBox *stereoButton = new LedCheckBox(tr("Stereo"), this);
|
||||
auto stereoButton = new LedCheckBox(tr("Stereo"), this);
|
||||
stereoButton->setToolTip(tr("Display stereo channels separately"));
|
||||
stereoButton->setCheckable(true);
|
||||
stereoButton->setMinimumSize(70, 12);
|
||||
stereoButton->setModel(&controls->m_stereoModel);
|
||||
config_layout->addWidget(stereoButton, 2, 1);
|
||||
|
||||
LedCheckBox *peakHoldButton = new LedCheckBox(tr("Peak hold"), this);
|
||||
auto peakHoldButton = new LedCheckBox(tr("Peak hold"), this);
|
||||
peakHoldButton->setToolTip(tr("Display envelope of peak values"));
|
||||
peakHoldButton->setCheckable(true);
|
||||
peakHoldButton->setMinimumSize(70, 12);
|
||||
@@ -141,10 +145,12 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
config_layout->addWidget(peakHoldButton, 3, 1);
|
||||
|
||||
// frequency: linear / log. switch and range selector
|
||||
PixmapButton *logXButton = new PixmapButton(this, tr("Logarithmic frequency"));
|
||||
auto logXButton = new PixmapButton(this, tr("Logarithmic frequency"));
|
||||
logXButton->setToolTip(tr("Switch between logarithmic and linear frequency scale"));
|
||||
QPixmap *logXOnPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("x_log").scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
QPixmap *logXOffPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("x_linear").scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto logXOnPixmap = new QPixmap(
|
||||
PLUGIN_NAME::getIconPixmap("x_log").scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto logXOffPixmap = new QPixmap(
|
||||
PLUGIN_NAME::getIconPixmap("x_linear").scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
logXOnPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
logXOffPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
logXButton->setActiveGraphic(*logXOnPixmap);
|
||||
@@ -153,7 +159,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
logXButton->setModel(&controls->m_logXModel);
|
||||
config_layout->addWidget(logXButton, 0, 2, 2, 1, Qt::AlignRight);
|
||||
|
||||
ComboBox *freqRangeCombo = new ComboBox(this, tr("Frequency range"));
|
||||
auto freqRangeCombo = new ComboBox(this, tr("Frequency range"));
|
||||
freqRangeCombo->setToolTip(tr("Frequency range"));
|
||||
freqRangeCombo->setMinimumSize(100, ComboBox::DEFAULT_HEIGHT);
|
||||
freqRangeCombo->setMaximumSize(200, ComboBox::DEFAULT_HEIGHT);
|
||||
@@ -161,10 +167,12 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
config_layout->addWidget(freqRangeCombo, 0, 3, 2, 1);
|
||||
|
||||
// amplitude: linear / log switch and range selector
|
||||
PixmapButton *logYButton = new PixmapButton(this, tr("Logarithmic amplitude"));
|
||||
auto logYButton = new PixmapButton(this, tr("Logarithmic amplitude"));
|
||||
logYButton->setToolTip(tr("Switch between logarithmic and linear amplitude scale"));
|
||||
QPixmap *logYOnPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("y_log").scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
QPixmap *logYOffPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("y_linear").scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto logYOnPixmap = new QPixmap(
|
||||
PLUGIN_NAME::getIconPixmap("y_log").scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto logYOffPixmap = new QPixmap(
|
||||
PLUGIN_NAME::getIconPixmap("y_linear").scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
logYOnPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
logYOffPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
logYButton->setActiveGraphic(*logYOnPixmap);
|
||||
@@ -173,7 +181,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
logYButton->setModel(&controls->m_logYModel);
|
||||
config_layout->addWidget(logYButton, 2, 2, 2, 1, Qt::AlignRight);
|
||||
|
||||
ComboBox *ampRangeCombo = new ComboBox(this, tr("Amplitude range"));
|
||||
auto ampRangeCombo = new ComboBox(this, tr("Amplitude range"));
|
||||
ampRangeCombo->setToolTip(tr("Amplitude range"));
|
||||
ampRangeCombo->setMinimumSize(100, ComboBox::DEFAULT_HEIGHT);
|
||||
ampRangeCombo->setMaximumSize(200, ComboBox::DEFAULT_HEIGHT);
|
||||
@@ -181,13 +189,13 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
config_layout->addWidget(ampRangeCombo, 2, 3, 2, 1);
|
||||
|
||||
// FFT: block size: icon and selector
|
||||
QLabel *blockSizeLabel = new QLabel("", this);
|
||||
QPixmap *blockSizeIcon = new QPixmap(PLUGIN_NAME::getIconPixmap("block_size"));
|
||||
auto blockSizeLabel = new QLabel("", this);
|
||||
auto blockSizeIcon = new QPixmap(PLUGIN_NAME::getIconPixmap("block_size"));
|
||||
blockSizeIcon->setDevicePixelRatio(devicePixelRatio());
|
||||
blockSizeLabel->setPixmap(blockSizeIcon->scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
config_layout->addWidget(blockSizeLabel, 0, 4, 2, 1, Qt::AlignRight);
|
||||
|
||||
ComboBox *blockSizeCombo = new ComboBox(this, tr("FFT block size"));
|
||||
auto blockSizeCombo = new ComboBox(this, tr("FFT block size"));
|
||||
blockSizeCombo->setToolTip(tr("FFT block size"));
|
||||
blockSizeCombo->setMinimumSize(100, 22);
|
||||
blockSizeCombo->setMaximumSize(200, 22);
|
||||
@@ -197,13 +205,13 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
connect(&controls->m_blockSizeModel, &ComboBoxModel::dataChanged, [=] {processor->reallocateBuffers();});
|
||||
|
||||
// FFT: window type: icon and selector
|
||||
QLabel *windowLabel = new QLabel("", this);
|
||||
QPixmap *windowIcon = new QPixmap(PLUGIN_NAME::getIconPixmap("window"));
|
||||
auto windowLabel = new QLabel("", this);
|
||||
auto windowIcon = new QPixmap(PLUGIN_NAME::getIconPixmap("window"));
|
||||
windowIcon->setDevicePixelRatio(devicePixelRatio());
|
||||
windowLabel->setPixmap(windowIcon->scaled(iconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
config_layout->addWidget(windowLabel, 2, 4, 2, 1, Qt::AlignRight);
|
||||
|
||||
ComboBox *windowCombo = new ComboBox(this, tr("FFT window type"));
|
||||
auto windowCombo = new ComboBox(this, tr("FFT window type"));
|
||||
windowCombo->setToolTip(tr("FFT window type"));
|
||||
windowCombo->setMinimumSize(100, ComboBox::DEFAULT_HEIGHT);
|
||||
windowCombo->setMaximumSize(200, ComboBox::DEFAULT_HEIGHT);
|
||||
@@ -218,8 +226,8 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
|
||||
|
||||
// Advanced configuration
|
||||
QWidget *advanced_widget = new QWidget;
|
||||
QGridLayout *advanced_layout = new QGridLayout;
|
||||
auto advanced_widget = new QWidget;
|
||||
auto advanced_layout = new QGridLayout;
|
||||
advanced_widget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
advanced_widget->setMaximumHeight(m_configHeight);
|
||||
advanced_widget->setLayout(advanced_layout);
|
||||
@@ -228,7 +236,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
controls_layout->setStretchFactor(advanced_widget, 10);
|
||||
|
||||
// Peak envelope resolution
|
||||
Knob *envelopeResolutionKnob = new Knob(knobSmall_17, this);
|
||||
auto envelopeResolutionKnob = new Knob(knobSmall_17, this);
|
||||
envelopeResolutionKnob->setModel(&controls->m_envelopeResolutionModel);
|
||||
envelopeResolutionKnob->setLabel(tr("Envelope res."));
|
||||
envelopeResolutionKnob->setToolTip(tr("Increase envelope resolution for better details, decrease for better GUI performance."));
|
||||
@@ -236,7 +244,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(envelopeResolutionKnob, 0, 0, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// Spectrum graph resolution
|
||||
Knob *spectrumResolutionKnob = new Knob(knobSmall_17, this);
|
||||
auto spectrumResolutionKnob = new Knob(knobSmall_17, this);
|
||||
spectrumResolutionKnob->setModel(&controls->m_spectrumResolutionModel);
|
||||
spectrumResolutionKnob->setLabel(tr("Spectrum res."));
|
||||
spectrumResolutionKnob->setToolTip(tr("Increase spectrum resolution for better details, decrease for better GUI performance."));
|
||||
@@ -244,7 +252,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(spectrumResolutionKnob, 1, 0, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// Peak falloff speed
|
||||
Knob *peakDecayFactorKnob = new Knob(knobSmall_17, this);
|
||||
auto peakDecayFactorKnob = new Knob(knobSmall_17, this);
|
||||
peakDecayFactorKnob->setModel(&controls->m_peakDecayFactorModel);
|
||||
peakDecayFactorKnob->setLabel(tr("Falloff factor"));
|
||||
peakDecayFactorKnob->setToolTip(tr("Decrease to make peaks fall faster."));
|
||||
@@ -252,7 +260,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(peakDecayFactorKnob, 0, 1, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// Averaging weight
|
||||
Knob *averagingWeightKnob = new Knob(knobSmall_17, this);
|
||||
auto averagingWeightKnob = new Knob(knobSmall_17, this);
|
||||
averagingWeightKnob->setModel(&controls->m_averagingWeightModel);
|
||||
averagingWeightKnob->setLabel(tr("Averaging weight"));
|
||||
averagingWeightKnob->setToolTip(tr("Decrease to make averaging slower and smoother."));
|
||||
@@ -260,7 +268,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(averagingWeightKnob, 1, 1, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// Waterfall history size
|
||||
Knob *waterfallHeightKnob = new Knob(knobSmall_17, this);
|
||||
auto waterfallHeightKnob = new Knob(knobSmall_17, this);
|
||||
waterfallHeightKnob->setModel(&controls->m_waterfallHeightModel);
|
||||
waterfallHeightKnob->setLabel(tr("Waterfall height"));
|
||||
waterfallHeightKnob->setToolTip(tr("Increase to get slower scrolling, decrease to see fast transitions better. Warning: medium CPU usage."));
|
||||
@@ -270,7 +278,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
connect(&controls->m_waterfallHeightModel, &FloatModel::dataChanged, [=] {processor->reallocateBuffers();});
|
||||
|
||||
// Waterfall gamma correction
|
||||
Knob *waterfallGammaKnob = new Knob(knobSmall_17, this);
|
||||
auto waterfallGammaKnob = new Knob(knobSmall_17, this);
|
||||
waterfallGammaKnob->setModel(&controls->m_waterfallGammaModel);
|
||||
waterfallGammaKnob->setLabel(tr("Waterfall gamma"));
|
||||
waterfallGammaKnob->setToolTip(tr("Decrease to see very weak signals, increase to get better contrast."));
|
||||
@@ -278,7 +286,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(waterfallGammaKnob, 1, 2, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// FFT window overlap
|
||||
Knob *windowOverlapKnob = new Knob(knobSmall_17, this);
|
||||
auto windowOverlapKnob = new Knob(knobSmall_17, this);
|
||||
windowOverlapKnob->setModel(&controls->m_windowOverlapModel);
|
||||
windowOverlapKnob->setLabel(tr("Window overlap"));
|
||||
windowOverlapKnob->setToolTip(tr("Increase to prevent missing fast transitions arriving near FFT window edges. Warning: high CPU usage."));
|
||||
@@ -286,7 +294,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(windowOverlapKnob, 0, 3, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// FFT zero padding
|
||||
Knob *zeroPaddingKnob = new Knob(knobSmall_17, this);
|
||||
auto zeroPaddingKnob = new Knob(knobSmall_17, this);
|
||||
zeroPaddingKnob->setModel(&controls->m_zeroPaddingModel);
|
||||
zeroPaddingKnob->setLabel(tr("Zero padding"));
|
||||
zeroPaddingKnob->setToolTip(tr("Increase to get smoother-looking spectrum. Warning: high CPU usage."));
|
||||
@@ -297,10 +305,12 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
|
||||
|
||||
// Advanced settings button
|
||||
PixmapButton *advancedButton = new PixmapButton(this, tr("Advanced settings"));
|
||||
auto advancedButton = new PixmapButton(this, tr("Advanced settings"));
|
||||
advancedButton->setToolTip(tr("Access advanced settings"));
|
||||
QPixmap *advancedOnPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("advanced_on").scaled(advButtonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
QPixmap *advancedOffPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("advanced_off").scaled(advButtonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto advancedOnPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("advanced_on")
|
||||
.scaled(advButtonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
auto advancedOffPixmap = new QPixmap(PLUGIN_NAME::getIconPixmap("advanced_off")
|
||||
.scaled(advButtonSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
advancedOnPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
advancedOffPixmap->setDevicePixelRatio(devicePixelRatio());
|
||||
advancedButton->setActiveGraphic(*advancedOnPixmap);
|
||||
|
||||
@@ -199,7 +199,7 @@ void SaProcessor::analyze(LocklessRingBuffer<sampleFrame> &ring_buffer)
|
||||
if (m_waterfallActive && m_waterfallNotEmpty)
|
||||
{
|
||||
// move waterfall history one line down and clear the top line
|
||||
QRgb *pixel = (QRgb *)m_history_work.data();
|
||||
auto pixel = (QRgb*)m_history_work.data();
|
||||
std::copy(pixel,
|
||||
pixel + waterfallWidth() * m_waterfallHeight - waterfallWidth(),
|
||||
pixel + waterfallWidth());
|
||||
|
||||
@@ -38,9 +38,9 @@ StereoEnhancerControlDialog::StereoEnhancerControlDialog(
|
||||
StereoEnhancerControls * _controls ) :
|
||||
EffectControlDialog( _controls )
|
||||
{
|
||||
QHBoxLayout * l = new QHBoxLayout( this );
|
||||
auto l = new QHBoxLayout(this);
|
||||
|
||||
Knob * widthKnob = new Knob( knobBright_26, this );
|
||||
auto widthKnob = new Knob(knobBright_26, this);
|
||||
widthKnob->setModel( &_controls->m_widthModel );
|
||||
widthKnob->setLabel( tr( "WIDTH" ) );
|
||||
widthKnob->setHintText( tr( "Width:" ) , " samples" );
|
||||
|
||||
@@ -48,23 +48,22 @@ StereoMatrixControlDialog::StereoMatrixControlDialog(
|
||||
PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
|
||||
|
||||
Knob * llKnob = new Knob( knobBright_26, this );
|
||||
auto llKnob = new Knob(knobBright_26, this);
|
||||
llKnob->setModel( &_controls->m_llModel );
|
||||
llKnob->setHintText( tr( "Left to Left Vol:" ) , "" );
|
||||
llKnob->move( 10, 79 );
|
||||
|
||||
Knob * lrKnob = new Knob( knobBright_26, this );
|
||||
auto lrKnob = new Knob(knobBright_26, this);
|
||||
lrKnob->setModel( &_controls->m_lrModel );
|
||||
lrKnob->setHintText( tr( "Left to Right Vol:" ) , "" );
|
||||
lrKnob->move( 48, 79 );
|
||||
|
||||
Knob * rlKnob = new Knob( knobBright_26, this );
|
||||
auto rlKnob = new Knob(knobBright_26, this);
|
||||
rlKnob->setModel( &_controls->m_rlModel );
|
||||
rlKnob->setHintText( tr( "Right to Left Vol:" ) , "" );
|
||||
rlKnob->move( 85, 79 );
|
||||
|
||||
Knob * rrKnob = new Knob( knobBright_26, this );
|
||||
auto rrKnob = new Knob(knobBright_26, this);
|
||||
rrKnob->setModel( &_controls->m_rrModel );
|
||||
rrKnob->setHintText( tr( "Right to Right Vol:" ) , "" );
|
||||
rrKnob->move( 123, 79 );
|
||||
|
||||
@@ -342,7 +342,7 @@ void MalletsInstrument::playNote( NotePlayHandle * _n,
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
|
||||
MalletsSynth * ps = static_cast<MalletsSynth *>( _n->m_pluginData );
|
||||
auto ps = static_cast<MalletsSynth*>(_n->m_pluginData);
|
||||
ps->setFrequency( freq );
|
||||
p = ps->presetIndex();
|
||||
|
||||
@@ -442,7 +442,7 @@ void MalletsInstrumentView::setWidgetBackground( QWidget * _widget, const QStrin
|
||||
|
||||
QWidget * MalletsInstrumentView::setupModalBarControls( QWidget * _parent )
|
||||
{
|
||||
QWidget * widget = new QWidget( _parent );
|
||||
auto widget = new QWidget(_parent);
|
||||
widget->setFixedSize( 250, 250 );
|
||||
|
||||
m_hardnessKnob = new Knob( knobVintage_32, widget );
|
||||
@@ -478,7 +478,7 @@ QWidget * MalletsInstrumentView::setupModalBarControls( QWidget * _parent )
|
||||
|
||||
QWidget * MalletsInstrumentView::setupTubeBellControls( QWidget * _parent )
|
||||
{
|
||||
QWidget * widget = new QWidget( _parent );
|
||||
auto widget = new QWidget(_parent);
|
||||
widget->setFixedSize( 250, 250 );
|
||||
|
||||
m_modulatorKnob = new Knob( knobVintage_32, widget );
|
||||
@@ -515,7 +515,7 @@ QWidget * MalletsInstrumentView::setupTubeBellControls( QWidget * _parent )
|
||||
QWidget * MalletsInstrumentView::setupBandedWGControls( QWidget * _parent )
|
||||
{
|
||||
// BandedWG
|
||||
QWidget * widget = new QWidget( _parent );
|
||||
auto widget = new QWidget(_parent);
|
||||
widget->setFixedSize( 250, 250 );
|
||||
|
||||
/* m_strikeLED = new LedCheckBox( tr( "Bowed" ), widget );
|
||||
@@ -549,7 +549,7 @@ QWidget * MalletsInstrumentView::setupBandedWGControls( QWidget * _parent )
|
||||
|
||||
void MalletsInstrumentView::modelChanged()
|
||||
{
|
||||
MalletsInstrument * inst = castModel<MalletsInstrument>();
|
||||
auto inst = castModel<MalletsInstrument>();
|
||||
m_hardnessKnob->setModel( &inst->m_hardnessModel );
|
||||
m_positionKnob->setModel( &inst->m_positionModel );
|
||||
m_vibratoGainKnob->setModel( &inst->m_vibratoGainModel );
|
||||
@@ -574,7 +574,7 @@ void MalletsInstrumentView::modelChanged()
|
||||
|
||||
void MalletsInstrumentView::changePreset()
|
||||
{
|
||||
MalletsInstrument * inst = castModel<MalletsInstrument>();
|
||||
auto inst = castModel<MalletsInstrument>();
|
||||
int _preset = inst->m_presetsModel.value();
|
||||
|
||||
if( _preset < 9 )
|
||||
|
||||
@@ -452,7 +452,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
const int osc_h = 52;
|
||||
|
||||
// TODO: clean rewrite using layouts and all that...
|
||||
PixmapButton * pm_osc1_btn = new PixmapButton( this, nullptr );
|
||||
auto pm_osc1_btn = new PixmapButton(this, nullptr);
|
||||
pm_osc1_btn->move( mod_x, mod1_y );
|
||||
pm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"pm_active" ) );
|
||||
@@ -460,7 +460,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
"pm_inactive" ) );
|
||||
pm_osc1_btn->setToolTip(tr("Modulate phase of oscillator 1 by oscillator 2"));
|
||||
|
||||
PixmapButton * am_osc1_btn = new PixmapButton( this, nullptr );
|
||||
auto am_osc1_btn = new PixmapButton(this, nullptr);
|
||||
am_osc1_btn->move( mod_x + 35, mod1_y );
|
||||
am_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"am_active" ) );
|
||||
@@ -468,7 +468,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
"am_inactive" ) );
|
||||
am_osc1_btn->setToolTip(tr("Modulate amplitude of oscillator 1 by oscillator 2"));
|
||||
|
||||
PixmapButton * mix_osc1_btn = new PixmapButton( this, nullptr );
|
||||
auto mix_osc1_btn = new PixmapButton(this, nullptr);
|
||||
mix_osc1_btn->move( mod_x + 70, mod1_y );
|
||||
mix_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"mix_active" ) );
|
||||
@@ -476,7 +476,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
"mix_inactive" ) );
|
||||
mix_osc1_btn->setToolTip(tr("Mix output of oscillators 1 & 2"));
|
||||
|
||||
PixmapButton * sync_osc1_btn = new PixmapButton( this, nullptr );
|
||||
auto sync_osc1_btn = new PixmapButton(this, nullptr);
|
||||
sync_osc1_btn->move( mod_x + 105, mod1_y );
|
||||
sync_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"sync_active" ) );
|
||||
@@ -485,7 +485,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
sync_osc1_btn->setToolTip(tr("Synchronize oscillator 1 with "
|
||||
"oscillator 2" ) );
|
||||
|
||||
PixmapButton * fm_osc1_btn = new PixmapButton( this, nullptr );
|
||||
auto fm_osc1_btn = new PixmapButton(this, nullptr);
|
||||
fm_osc1_btn->move( mod_x + 140, mod1_y );
|
||||
fm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"fm_active" ) );
|
||||
@@ -500,9 +500,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
m_mod1BtnGrp->addButton( sync_osc1_btn );
|
||||
m_mod1BtnGrp->addButton( fm_osc1_btn );
|
||||
|
||||
|
||||
|
||||
PixmapButton * pm_osc2_btn = new PixmapButton( this, nullptr );
|
||||
auto pm_osc2_btn = new PixmapButton(this, nullptr);
|
||||
pm_osc2_btn->move( mod_x, mod2_y );
|
||||
pm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"pm_active" ) );
|
||||
@@ -510,7 +508,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
"pm_inactive" ) );
|
||||
pm_osc2_btn->setToolTip(tr("Modulate phase of oscillator 2 by oscillator 3"));
|
||||
|
||||
PixmapButton * am_osc2_btn = new PixmapButton( this, nullptr );
|
||||
auto am_osc2_btn = new PixmapButton(this, nullptr);
|
||||
am_osc2_btn->move( mod_x + 35, mod2_y );
|
||||
am_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"am_active" ) );
|
||||
@@ -518,7 +516,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
"am_inactive" ) );
|
||||
am_osc2_btn->setToolTip(tr("Modulate amplitude of oscillator 2 by oscillator 3"));
|
||||
|
||||
PixmapButton * mix_osc2_btn = new PixmapButton( this, nullptr );
|
||||
auto mix_osc2_btn = new PixmapButton(this, nullptr);
|
||||
mix_osc2_btn->move( mod_x + 70, mod2_y );
|
||||
mix_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"mix_active" ) );
|
||||
@@ -526,7 +524,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
"mix_inactive" ) );
|
||||
mix_osc2_btn->setToolTip(tr("Mix output of oscillators 2 & 3"));
|
||||
|
||||
PixmapButton * sync_osc2_btn = new PixmapButton( this, nullptr );
|
||||
auto sync_osc2_btn = new PixmapButton(this, nullptr);
|
||||
sync_osc2_btn->move( mod_x + 105, mod2_y );
|
||||
sync_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"sync_active" ) );
|
||||
@@ -534,7 +532,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
"sync_inactive" ) );
|
||||
sync_osc2_btn->setToolTip(tr("Synchronize oscillator 2 with oscillator 3"));
|
||||
|
||||
PixmapButton * fm_osc2_btn = new PixmapButton( this, nullptr );
|
||||
auto fm_osc2_btn = new PixmapButton(this, nullptr);
|
||||
fm_osc2_btn->move( mod_x + 140, mod2_y );
|
||||
fm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"fm_active" ) );
|
||||
@@ -556,7 +554,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
int knob_y = osc_y + i * osc_h;
|
||||
|
||||
// setup volume-knob
|
||||
Knob * vk = new Knob( knobStyled, this );
|
||||
auto vk = new Knob(knobStyled, this);
|
||||
vk->setVolumeKnob( true );
|
||||
vk->setFixedSize( 28, 35 );
|
||||
vk->move( 6, knob_y );
|
||||
@@ -604,7 +602,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
|
||||
int btn_y = 96 + i * osc_h;
|
||||
|
||||
PixmapButton * sin_wave_btn = new PixmapButton( this, nullptr );
|
||||
auto sin_wave_btn = new PixmapButton(this, nullptr);
|
||||
sin_wave_btn->move( 128, btn_y );
|
||||
sin_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"sin_shape_active" ) );
|
||||
@@ -613,8 +611,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
sin_wave_btn->setToolTip(
|
||||
tr( "Sine wave" ) );
|
||||
|
||||
PixmapButton * triangle_wave_btn =
|
||||
new PixmapButton( this, nullptr );
|
||||
auto triangle_wave_btn = new PixmapButton(this, nullptr);
|
||||
triangle_wave_btn->move( 143, btn_y );
|
||||
triangle_wave_btn->setActiveGraphic(
|
||||
PLUGIN_NAME::getIconPixmap( "triangle_shape_active" ) );
|
||||
@@ -623,7 +620,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
triangle_wave_btn->setToolTip(
|
||||
tr( "Triangle wave") );
|
||||
|
||||
PixmapButton * saw_wave_btn = new PixmapButton( this, nullptr );
|
||||
auto saw_wave_btn = new PixmapButton(this, nullptr);
|
||||
saw_wave_btn->move( 158, btn_y );
|
||||
saw_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"saw_shape_active" ) );
|
||||
@@ -632,7 +629,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
saw_wave_btn->setToolTip(
|
||||
tr( "Saw wave" ) );
|
||||
|
||||
PixmapButton * sqr_wave_btn = new PixmapButton( this, nullptr );
|
||||
auto sqr_wave_btn = new PixmapButton(this, nullptr);
|
||||
sqr_wave_btn->move( 173, btn_y );
|
||||
sqr_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"square_shape_active" ) );
|
||||
@@ -641,8 +638,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
sqr_wave_btn->setToolTip(
|
||||
tr( "Square wave" ) );
|
||||
|
||||
PixmapButton * moog_saw_wave_btn =
|
||||
new PixmapButton( this, nullptr );
|
||||
auto moog_saw_wave_btn = new PixmapButton(this, nullptr);
|
||||
moog_saw_wave_btn->move( 188, btn_y );
|
||||
moog_saw_wave_btn->setActiveGraphic(
|
||||
PLUGIN_NAME::getIconPixmap( "moog_saw_shape_active" ) );
|
||||
@@ -651,7 +647,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
moog_saw_wave_btn->setToolTip(
|
||||
tr( "Moog-like saw wave" ) );
|
||||
|
||||
PixmapButton * exp_wave_btn = new PixmapButton( this, nullptr );
|
||||
auto exp_wave_btn = new PixmapButton(this, nullptr);
|
||||
exp_wave_btn->move( 203, btn_y );
|
||||
exp_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"exp_shape_active" ) );
|
||||
@@ -660,7 +656,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
exp_wave_btn->setToolTip(
|
||||
tr( "Exponential wave" ) );
|
||||
|
||||
PixmapButton * white_noise_btn = new PixmapButton( this, nullptr );
|
||||
auto white_noise_btn = new PixmapButton(this, nullptr);
|
||||
white_noise_btn->move( 218, btn_y );
|
||||
white_noise_btn->setActiveGraphic(
|
||||
PLUGIN_NAME::getIconPixmap( "white_noise_shape_active" ) );
|
||||
@@ -669,7 +665,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
white_noise_btn->setToolTip(
|
||||
tr( "White noise" ) );
|
||||
|
||||
PixmapButton * uwb = new PixmapButton( this, nullptr );
|
||||
auto uwb = new PixmapButton(this, nullptr);
|
||||
uwb->move( 233, btn_y );
|
||||
uwb->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"usr_shape_active" ) );
|
||||
@@ -677,7 +673,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
"usr_shape_inactive" ) );
|
||||
uwb->setToolTip(tr("User-defined wave"));
|
||||
|
||||
PixmapButton * uwt = new PixmapButton( this, nullptr );
|
||||
auto uwt = new PixmapButton(this, nullptr);
|
||||
uwt->move( 110, btn_y );
|
||||
uwt->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
|
||||
"wavetable_active" ) );
|
||||
@@ -686,8 +682,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
uwt->setCheckable(true);
|
||||
uwt->setToolTip(tr("Use alias-free wavetable oscillators."));
|
||||
|
||||
automatableButtonGroup * wsbg =
|
||||
new automatableButtonGroup( this );
|
||||
auto wsbg = new automatableButtonGroup(this);
|
||||
|
||||
wsbg->addButton( sin_wave_btn );
|
||||
wsbg->addButton( triangle_wave_btn );
|
||||
@@ -709,7 +704,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
|
||||
void TripleOscillatorView::modelChanged()
|
||||
{
|
||||
TripleOscillator * t = castModel<TripleOscillator>();
|
||||
auto t = castModel<TripleOscillator>();
|
||||
m_mod1BtnGrp->setModel( &t->m_osc[0]->m_modulationAlgoModel );
|
||||
m_mod2BtnGrp->setModel( &t->m_osc[1]->m_modulationAlgoModel );
|
||||
|
||||
|
||||
@@ -43,25 +43,25 @@ VecControlsDialog::VecControlsDialog(VecControls *controls) :
|
||||
EffectControlDialog(controls),
|
||||
m_controls(controls)
|
||||
{
|
||||
QVBoxLayout *master_layout = new QVBoxLayout;
|
||||
auto master_layout = new QVBoxLayout;
|
||||
master_layout->setContentsMargins(0, 2, 0, 0);
|
||||
setLayout(master_layout);
|
||||
|
||||
// Visualizer widget
|
||||
// The size of 768 pixels seems to offer a good balance of speed, accuracy and trace thickness.
|
||||
VectorView *display = new VectorView(controls, m_controls->m_effect->getBuffer(), 768, this);
|
||||
auto display = new VectorView(controls, m_controls->m_effect->getBuffer(), 768, this);
|
||||
master_layout->addWidget(display);
|
||||
|
||||
// Config area located inside visualizer
|
||||
QVBoxLayout *internal_layout = new QVBoxLayout(display);
|
||||
QHBoxLayout *config_layout = new QHBoxLayout();
|
||||
QVBoxLayout *switch_layout = new QVBoxLayout();
|
||||
auto internal_layout = new QVBoxLayout(display);
|
||||
auto config_layout = new QHBoxLayout();
|
||||
auto switch_layout = new QVBoxLayout();
|
||||
internal_layout->addStretch();
|
||||
internal_layout->addLayout(config_layout);
|
||||
config_layout->addLayout(switch_layout);
|
||||
|
||||
// High-quality switch
|
||||
LedCheckBox *highQualityButton = new LedCheckBox(tr("HQ"), this);
|
||||
auto highQualityButton = new LedCheckBox(tr("HQ"), this);
|
||||
highQualityButton->setToolTip(tr("Double the resolution and simulate continuous analog-like trace."));
|
||||
highQualityButton->setCheckable(true);
|
||||
highQualityButton->setMinimumSize(70, 12);
|
||||
@@ -69,7 +69,7 @@ VecControlsDialog::VecControlsDialog(VecControls *controls) :
|
||||
switch_layout->addWidget(highQualityButton);
|
||||
|
||||
// Log. scale switch
|
||||
LedCheckBox *logarithmicButton = new LedCheckBox(tr("Log. scale"), this);
|
||||
auto logarithmicButton = new LedCheckBox(tr("Log. scale"), this);
|
||||
logarithmicButton->setToolTip(tr("Display amplitude on logarithmic scale to better see small values."));
|
||||
logarithmicButton->setCheckable(true);
|
||||
logarithmicButton->setMinimumSize(70, 12);
|
||||
@@ -79,7 +79,7 @@ VecControlsDialog::VecControlsDialog(VecControls *controls) :
|
||||
config_layout->addStretch();
|
||||
|
||||
// Persistence knob
|
||||
Knob *persistenceKnob = new Knob(knobSmall_17, this);
|
||||
auto persistenceKnob = new Knob(knobSmall_17, this);
|
||||
persistenceKnob->setModel(&controls->m_persistenceModel);
|
||||
persistenceKnob->setLabel(tr("Persist."));
|
||||
persistenceKnob->setToolTip(tr("Trace persistence: higher amount means the trace will stay bright for longer time."));
|
||||
|
||||
@@ -307,7 +307,7 @@ void VectorView::periodicUpdate()
|
||||
// More of an Easter egg, to avoid cluttering the interface with non-essential functionality.
|
||||
void VectorView::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
{
|
||||
ColorChooser *colorDialog = new ColorChooser(m_controls->m_colorFG, this);
|
||||
auto colorDialog = new ColorChooser(m_controls->m_colorFG, this);
|
||||
if (colorDialog->exec())
|
||||
{
|
||||
m_controls->m_colorFG = colorDialog->currentColor();
|
||||
|
||||
@@ -161,7 +161,7 @@ VestigeInstrument::VestigeInstrument( InstrumentTrack * _instrument_track ) :
|
||||
p_subWindow( nullptr )
|
||||
{
|
||||
// now we need a play-handle which cares for calling play()
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
auto iph = new InstrumentPlayHandle(this, _instrument_track);
|
||||
Engine::audioEngine()->addPlayHandle( iph );
|
||||
|
||||
connect( ConfigManager::inst(), SIGNAL( valueChanged(QString,QString,QString) ),
|
||||
@@ -588,7 +588,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument,
|
||||
m_selPresetButton = new QPushButton( tr( "" ), this );
|
||||
m_selPresetButton->setGeometry( 228, 201, 16, 16 );
|
||||
|
||||
QMenu *menu = new QMenu;
|
||||
auto menu = new QMenu;
|
||||
|
||||
connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateMenu() ) );
|
||||
|
||||
@@ -605,8 +605,9 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument,
|
||||
connect( m_toggleGUIButton, SIGNAL( clicked() ), this,
|
||||
SLOT( toggleGUI() ) );
|
||||
|
||||
QPushButton * note_off_all_btn = new QPushButton( tr( "Turn off all "
|
||||
"notes" ), this );
|
||||
auto note_off_all_btn = new QPushButton(tr("Turn off all "
|
||||
"notes"),
|
||||
this);
|
||||
note_off_all_btn->setGeometry( 20, 160, 200, 24 );
|
||||
note_off_all_btn->setIcon( embed::getIconPixmap( "stop" ) );
|
||||
note_off_all_btn->setFont( pointSize<8>( note_off_all_btn->font() ) );
|
||||
@@ -797,14 +798,13 @@ void VestigeInstrumentView::previousProgram()
|
||||
|
||||
void VestigeInstrumentView::selPreset( void )
|
||||
{
|
||||
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
if (action)
|
||||
if ( m_vi->m_plugin != nullptr ) {
|
||||
auto action = qobject_cast<QAction*>(sender());
|
||||
if (action && m_vi->m_plugin != nullptr)
|
||||
{
|
||||
lastPosInMenu = action->data().toInt();
|
||||
m_vi->m_plugin->setProgram( action->data().toInt() );
|
||||
m_vi->m_plugin->setProgram(action->data().toInt());
|
||||
QWidget::update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -301,8 +301,7 @@ void Vibed::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
StringContainer * ps = static_cast<StringContainer *>(
|
||||
_n->m_pluginData );
|
||||
auto ps = static_cast<StringContainer*>(_n->m_pluginData);
|
||||
|
||||
for( fpp_t i = offset; i < frames + offset; ++i )
|
||||
{
|
||||
@@ -583,8 +582,8 @@ void VibedView::modelChanged()
|
||||
|
||||
void VibedView::showString( int _string )
|
||||
{
|
||||
Vibed * v = castModel<Vibed>();
|
||||
|
||||
auto v = castModel<Vibed>();
|
||||
|
||||
m_pickKnob->setModel( v->m_pickKnobs[_string] );
|
||||
m_pickupKnob->setModel( v->m_pickupKnobs[_string] );
|
||||
m_stiffnessKnob->setModel( v->m_stiffnessKnobs[_string] );
|
||||
|
||||
@@ -95,7 +95,7 @@ VibratingString::VibratingString( float _pitch,
|
||||
VibratingString::delayLine * VibratingString::initDelayLine( int _len,
|
||||
int _pick )
|
||||
{
|
||||
delayLine * dl = new VibratingString::delayLine[_len];
|
||||
auto dl = new VibratingString::delayLine[_len];
|
||||
dl->length = _len;
|
||||
if( _len > 0 )
|
||||
{
|
||||
|
||||
@@ -1048,7 +1048,7 @@ void RemoteVstPlugin::process( const sampleFrame * _in, sampleFrame * _out )
|
||||
return a.deltaFrames < b.deltaFrames;
|
||||
} );
|
||||
|
||||
VstEvents* events = (VstEvents *) eventsBuffer;
|
||||
auto events = (VstEvents*)eventsBuffer;
|
||||
events->reserved = 0;
|
||||
events->numEvents = m_midiEvents.size();
|
||||
|
||||
@@ -1425,7 +1425,7 @@ struct sBank
|
||||
void RemoteVstPlugin::savePreset( const std::string & _file )
|
||||
{
|
||||
unsigned int chunk_size = 0;
|
||||
sBank * pBank = ( sBank* ) new char[ sizeof( sBank ) ];
|
||||
auto pBank = (sBank*)new char[sizeof(sBank)];
|
||||
char progName[ 128 ] = { 0 };
|
||||
char* data = nullptr;
|
||||
const bool chunky = ( m_plugin->flags & ( 1 << 5 ) ) != 0;
|
||||
@@ -1444,11 +1444,11 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
|
||||
if (isPreset) {
|
||||
chunk_size = m_plugin->numParams * sizeof( float );
|
||||
data = new char[ chunk_size ];
|
||||
unsigned int* toUIntArray = reinterpret_cast<unsigned int*>( data );
|
||||
auto toUIntArray = reinterpret_cast<unsigned int*>(data);
|
||||
for ( int i = 0; i < m_plugin->numParams; i++ )
|
||||
{
|
||||
float value = m_plugin->getParameter( m_plugin, i );
|
||||
unsigned int * pValue = ( unsigned int * ) &value;
|
||||
auto pValue = (unsigned int*)&value;
|
||||
toUIntArray[ i ] = endian_swap( *pValue );
|
||||
}
|
||||
} else chunk_size = (((m_plugin->numParams * sizeof( float )) + 56)*m_plugin->numPrograms);
|
||||
@@ -1463,7 +1463,7 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
|
||||
if (!isPreset &&!chunky) pBank->fxMagic = 0x6B427846;
|
||||
|
||||
pBank->version = 0x01000000;
|
||||
unsigned int uIntToFile = (unsigned int) m_plugin->uniqueID;
|
||||
auto uIntToFile = (unsigned int)m_plugin->uniqueID;
|
||||
pBank->fxID = endian_swap( uIntToFile );
|
||||
uIntToFile = (unsigned int) pluginVersion();
|
||||
pBank->fxVersion = endian_swap( uIntToFile );
|
||||
@@ -1526,9 +1526,9 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
|
||||
void RemoteVstPlugin::loadPresetFile( const std::string & _file )
|
||||
{
|
||||
void * chunk = nullptr;
|
||||
unsigned int * pLen = new unsigned int[ 1 ];
|
||||
auto pLen = new unsigned int[1];
|
||||
unsigned int len = 0;
|
||||
sBank * pBank = (sBank*) new char[ sizeof( sBank ) ];
|
||||
auto pBank = (sBank*)new char[sizeof(sBank)];
|
||||
FILE * stream = F_OPEN_UTF8( _file, "rb" );
|
||||
if (!stream)
|
||||
{
|
||||
@@ -1580,7 +1580,7 @@ void RemoteVstPlugin::loadPresetFile( const std::string & _file )
|
||||
pluginDispatch( 24, 1, len, chunk );
|
||||
else
|
||||
{
|
||||
unsigned int* toUIntArray = reinterpret_cast<unsigned int*>( chunk );
|
||||
auto toUIntArray = reinterpret_cast<unsigned int*>(chunk);
|
||||
for (int i = 0; i < pBank->numPrograms; i++ )
|
||||
{
|
||||
toUInt = endian_swap( toUIntArray[ i ] );
|
||||
@@ -1634,7 +1634,7 @@ void RemoteVstPlugin::loadPresetFile( const std::string & _file )
|
||||
|
||||
void RemoteVstPlugin::loadChunkFromFile( const std::string & _file, int _len )
|
||||
{
|
||||
char * chunk = new char[_len];
|
||||
auto chunk = new char[_len];
|
||||
|
||||
FILE* fp = F_OPEN_UTF8( _file, "rb" );
|
||||
if (!fp)
|
||||
|
||||
@@ -791,7 +791,7 @@ void VstPlugin::createUI( QWidget * parent )
|
||||
{
|
||||
parent->setAttribute(Qt::WA_NativeWindow);
|
||||
}
|
||||
QX11EmbedContainer * embedContainer = new QX11EmbedContainer( parent );
|
||||
auto embedContainer = new QX11EmbedContainer(parent);
|
||||
connect(embedContainer, SIGNAL(clientIsEmbedded()), this, SLOT(handleClientEmbed()));
|
||||
embedContainer->embedClient( m_pluginWindowID );
|
||||
container = embedContainer;
|
||||
|
||||
@@ -48,7 +48,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
m_plugin( nullptr ),
|
||||
tbLabel( nullptr )
|
||||
{
|
||||
QGridLayout * l = new QGridLayout( this );
|
||||
auto l = new QGridLayout(this);
|
||||
l->setContentsMargins( 10, 10, 10, 10 );
|
||||
l->setVerticalSpacing( 2 );
|
||||
l->setHorizontalSpacing( 2 );
|
||||
@@ -73,7 +73,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
{
|
||||
setWindowTitle( m_plugin->name() );
|
||||
|
||||
QPushButton * btn = new QPushButton( tr( "Show/hide" ));
|
||||
auto btn = new QPushButton(tr("Show/hide"));
|
||||
|
||||
if (embed_vst) {
|
||||
btn->setCheckable( true );
|
||||
@@ -173,7 +173,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
_ctl->m_selPresetButton->setCursor( Qt::PointingHandCursor );
|
||||
_ctl->m_selPresetButton->setIcon( embed::getIconPixmap( "stepper-down" ) );
|
||||
|
||||
QMenu * menu = new QMenu;
|
||||
auto menu = new QMenu;
|
||||
connect( menu, SIGNAL( aboutToShow() ), _ctl, SLOT( updateMenu() ) );
|
||||
|
||||
_ctl->m_selPresetButton->setMenu(menu);
|
||||
@@ -206,11 +206,11 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
}
|
||||
newSize = std::max(newSize, 250);
|
||||
|
||||
QWidget* resize = new QWidget(this);
|
||||
auto resize = new QWidget(this);
|
||||
resize->resize( newSize, 10 );
|
||||
QWidget* space0 = new QWidget(this);
|
||||
auto space0 = new QWidget(this);
|
||||
space0->resize(8, 10);
|
||||
QWidget* space1 = new QWidget(this);
|
||||
auto space1 = new QWidget(this);
|
||||
space1->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
QFont f( "Arial", 10 );
|
||||
|
||||
@@ -223,7 +223,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
l->setRowStretch( 5, 1 );
|
||||
l->setColumnStretch( 1, 1 );
|
||||
|
||||
QToolBar * tb = new QToolBar( this );
|
||||
auto tb = new QToolBar(this);
|
||||
tb->resize( newSize , 32 );
|
||||
tb->addWidget(space0);
|
||||
tb->addWidget( m_rolLPresetButton );
|
||||
|
||||
@@ -170,7 +170,7 @@ gui::EffectControlDialog* VstEffectControls::createView()
|
||||
void VstEffectControls::managePlugin()
|
||||
{
|
||||
if ( m_effect->m_plugin != nullptr && m_subWindow == nullptr ) {
|
||||
gui::ManageVSTEffectView * tt = new gui::ManageVSTEffectView( m_effect, this);
|
||||
auto tt = new gui::ManageVSTEffectView(m_effect, this);
|
||||
ctrHandle = (QObject *)tt;
|
||||
} else if (m_subWindow != nullptr) {
|
||||
if (m_subWindow->widget()->isVisible() == false ) {
|
||||
@@ -221,8 +221,8 @@ void VstEffectControls::updateMenu()
|
||||
to_menu->clear();
|
||||
|
||||
for (int i = 0; i < list1.size(); i++) {
|
||||
QAction* presetAction = new QAction(this);
|
||||
connect(presetAction, SIGNAL(triggered()), this, SLOT(selPreset()));
|
||||
auto presetAction = new QAction(this);
|
||||
connect(presetAction, SIGNAL(triggered()), this, SLOT(selPreset()));
|
||||
|
||||
presetAction->setText(QString("%1. %2").arg(QString::number(i+1), list1.at(i)));
|
||||
presetAction->setData(i);
|
||||
@@ -290,14 +290,13 @@ void VstEffectControls::rolrPreset()
|
||||
|
||||
void VstEffectControls::selPreset()
|
||||
{
|
||||
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
if (action)
|
||||
if ( m_effect->m_plugin != nullptr ) {
|
||||
auto action = qobject_cast<QAction*>(sender());
|
||||
if (action && m_effect->m_plugin != nullptr)
|
||||
{
|
||||
lastPosInMenu = action->data().toInt();
|
||||
m_effect->m_plugin->setProgram( lastPosInMenu );
|
||||
//QWidget::update();
|
||||
}
|
||||
m_effect->m_plugin->setProgram(lastPosInMenu);
|
||||
// QWidget::update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void VstSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
void VstSubPluginFeatures::listSubPluginKeys( const Plugin::Descriptor * _desc,
|
||||
KeyList & _kl ) const
|
||||
{
|
||||
QStringList *dlls = new QStringList();
|
||||
auto dlls = new QStringList();
|
||||
const QString path = QString("");
|
||||
addPluginsFromDir(dlls, path );
|
||||
// TODO: eval m_type
|
||||
|
||||
@@ -331,14 +331,8 @@ void WatsynInstrument::playNote( NotePlayHandle * _n,
|
||||
{
|
||||
if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == nullptr )
|
||||
{
|
||||
WatsynObject * w = new WatsynObject(
|
||||
&A1_wave[0],
|
||||
&A2_wave[0],
|
||||
&B1_wave[0],
|
||||
&B2_wave[0],
|
||||
m_amod.value(), m_bmod.value(),
|
||||
Engine::audioEngine()->processingSampleRate(), _n,
|
||||
Engine::audioEngine()->framesPerPeriod(), this );
|
||||
auto w = new WatsynObject(&A1_wave[0], &A2_wave[0], &B1_wave[0], &B2_wave[0], m_amod.value(), m_bmod.value(),
|
||||
Engine::audioEngine()->processingSampleRate(), _n, Engine::audioEngine()->framesPerPeriod(), this);
|
||||
|
||||
_n->m_pluginData = w;
|
||||
}
|
||||
@@ -347,7 +341,7 @@ void WatsynInstrument::playNote( NotePlayHandle * _n,
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
sampleFrame * buffer = _working_buffer + offset;
|
||||
|
||||
WatsynObject * w = static_cast<WatsynObject *>( _n->m_pluginData );
|
||||
auto w = static_cast<WatsynObject*>(_n->m_pluginData);
|
||||
|
||||
sampleFrame * abuf = w->abuf();
|
||||
sampleFrame * bbuf = w->bbuf();
|
||||
@@ -360,7 +354,7 @@ void WatsynInstrument::playNote( NotePlayHandle * _n,
|
||||
const float envHold = ( m_envHold.value() * w->samplerate() ) / 1000.0f;
|
||||
const float envDec = ( m_envDec.value() * w->samplerate() ) / 1000.0f;
|
||||
const float envLen = envAtt + envDec + envHold;
|
||||
const float tfp_ = static_cast<float>( _n->totalFramesPlayed() );
|
||||
const auto tfp_ = static_cast<float>(_n->totalFramesPlayed());
|
||||
|
||||
// if sample-exact is enabled, use sample-exact calculations...
|
||||
// disabled pending proper implementation of sample-exactness
|
||||
@@ -723,25 +717,25 @@ WatsynView::WatsynView( Instrument * _instrument,
|
||||
|
||||
// button groups next.
|
||||
// graph select buttons
|
||||
PixmapButton * a1_selectButton = new PixmapButton( this, nullptr );
|
||||
auto a1_selectButton = new PixmapButton(this, nullptr);
|
||||
a1_selectButton -> move( 4, 121 );
|
||||
a1_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "a1_active" ) );
|
||||
a1_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "a1_inactive" ) );
|
||||
a1_selectButton->setToolTip(tr("Select oscillator A1"));
|
||||
|
||||
PixmapButton * a2_selectButton = new PixmapButton( this, nullptr );
|
||||
auto a2_selectButton = new PixmapButton(this, nullptr);
|
||||
a2_selectButton -> move( 44, 121 );
|
||||
a2_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "a2_active" ) );
|
||||
a2_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "a2_inactive" ) );
|
||||
a2_selectButton->setToolTip(tr("Select oscillator A2"));
|
||||
|
||||
PixmapButton * b1_selectButton = new PixmapButton( this, nullptr );
|
||||
auto b1_selectButton = new PixmapButton(this, nullptr);
|
||||
b1_selectButton -> move( 84, 121 );
|
||||
b1_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "b1_active" ) );
|
||||
b1_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "b1_inactive" ) );
|
||||
b1_selectButton->setToolTip(tr("Select oscillator B1"));
|
||||
|
||||
PixmapButton * b2_selectButton = new PixmapButton( this, nullptr );
|
||||
auto b2_selectButton = new PixmapButton(this, nullptr);
|
||||
b2_selectButton -> move( 124, 121 );
|
||||
b2_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "b2_active" ) );
|
||||
b2_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "b2_inactive" ) );
|
||||
@@ -752,29 +746,29 @@ WatsynView::WatsynView( Instrument * _instrument,
|
||||
m_selectedGraphGroup -> addButton( a2_selectButton );
|
||||
m_selectedGraphGroup -> addButton( b1_selectButton );
|
||||
m_selectedGraphGroup -> addButton( b2_selectButton );
|
||||
WatsynInstrument * w = castModel<WatsynInstrument>();
|
||||
auto w = castModel<WatsynInstrument>();
|
||||
m_selectedGraphGroup -> setModel( &w -> m_selectedGraph);
|
||||
|
||||
// A-modulation button group
|
||||
PixmapButton * amod_mixButton = new PixmapButton( this, nullptr );
|
||||
auto amod_mixButton = new PixmapButton(this, nullptr);
|
||||
amod_mixButton -> move( 4, 50 );
|
||||
amod_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "amix_active" ) );
|
||||
amod_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "amix_inactive" ) );
|
||||
amod_mixButton->setToolTip(tr("Mix output of A2 to A1"));
|
||||
|
||||
PixmapButton * amod_amButton = new PixmapButton( this, nullptr );
|
||||
auto amod_amButton = new PixmapButton(this, nullptr);
|
||||
amod_amButton -> move( 4, 66 );
|
||||
amod_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "aam_active" ) );
|
||||
amod_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "aam_inactive" ) );
|
||||
amod_amButton->setToolTip(tr("Modulate amplitude of A1 by output of A2"));
|
||||
|
||||
PixmapButton * amod_rmButton = new PixmapButton( this, nullptr );
|
||||
auto amod_rmButton = new PixmapButton(this, nullptr);
|
||||
amod_rmButton -> move( 4, 82 );
|
||||
amod_rmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "arm_active" ) );
|
||||
amod_rmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "arm_inactive" ) );
|
||||
amod_rmButton->setToolTip(tr("Ring modulate A1 and A2"));
|
||||
|
||||
PixmapButton * amod_pmButton = new PixmapButton( this, nullptr );
|
||||
auto amod_pmButton = new PixmapButton(this, nullptr);
|
||||
amod_pmButton -> move( 4, 98 );
|
||||
amod_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "apm_active" ) );
|
||||
amod_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "apm_inactive" ) );
|
||||
@@ -787,25 +781,25 @@ WatsynView::WatsynView( Instrument * _instrument,
|
||||
m_aModGroup -> addButton( amod_pmButton );
|
||||
|
||||
// B-modulation button group
|
||||
PixmapButton * bmod_mixButton = new PixmapButton( this, nullptr );
|
||||
auto bmod_mixButton = new PixmapButton(this, nullptr);
|
||||
bmod_mixButton -> move( 44, 50 );
|
||||
bmod_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bmix_active" ) );
|
||||
bmod_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bmix_inactive" ) );
|
||||
bmod_mixButton->setToolTip(tr("Mix output of B2 to B1"));
|
||||
|
||||
PixmapButton * bmod_amButton = new PixmapButton( this, nullptr );
|
||||
auto bmod_amButton = new PixmapButton(this, nullptr);
|
||||
bmod_amButton -> move( 44, 66 );
|
||||
bmod_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bam_active" ) );
|
||||
bmod_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bam_inactive" ) );
|
||||
bmod_amButton->setToolTip(tr("Modulate amplitude of B1 by output of B2"));
|
||||
|
||||
PixmapButton * bmod_rmButton = new PixmapButton( this, nullptr );
|
||||
auto bmod_rmButton = new PixmapButton(this, nullptr);
|
||||
bmod_rmButton -> move( 44, 82 );
|
||||
bmod_rmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "brm_active" ) );
|
||||
bmod_rmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "brm_inactive" ) );
|
||||
bmod_rmButton->setToolTip(tr("Ring modulate B1 and B2"));
|
||||
|
||||
PixmapButton * bmod_pmButton = new PixmapButton( this, nullptr );
|
||||
auto bmod_pmButton = new PixmapButton(this, nullptr);
|
||||
bmod_pmButton -> move( 44, 98 );
|
||||
bmod_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bpm_active" ) );
|
||||
bmod_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bpm_inactive" ) );
|
||||
@@ -1218,7 +1212,7 @@ void WatsynView::loadClicked()
|
||||
|
||||
void WatsynView::modelChanged()
|
||||
{
|
||||
WatsynInstrument * w = castModel<WatsynInstrument>();
|
||||
auto w = castModel<WatsynInstrument>();
|
||||
|
||||
a1_volKnob -> setModel( &w -> a1_vol );
|
||||
a2_volKnob -> setModel( &w -> a2_vol );
|
||||
|
||||
@@ -48,7 +48,7 @@ WaveShaperControlDialog::WaveShaperControlDialog(
|
||||
setPalette( pal );
|
||||
setFixedSize( 224, 274 );
|
||||
|
||||
Graph * waveGraph = new Graph( this, Graph::LinearNonCyclicStyle, 204, 205 );
|
||||
auto waveGraph = new Graph(this, Graph::LinearNonCyclicStyle, 204, 205);
|
||||
waveGraph -> move( 10, 6 );
|
||||
waveGraph -> setModel( &_controls -> m_wavegraphModel );
|
||||
waveGraph -> setAutoFillBackground( true );
|
||||
@@ -59,7 +59,7 @@ WaveShaperControlDialog::WaveShaperControlDialog(
|
||||
waveGraph->setGraphColor( QColor( 85, 204, 145 ) );
|
||||
waveGraph -> setMaximumSize( 204, 205 );
|
||||
|
||||
Knob * inputKnob = new Knob( knobBright_26, this);
|
||||
auto inputKnob = new Knob(knobBright_26, this);
|
||||
inputKnob -> setVolumeKnob( true );
|
||||
inputKnob -> setVolumeRatio( 1.0 );
|
||||
inputKnob -> move( 26, 225 );
|
||||
@@ -67,7 +67,7 @@ WaveShaperControlDialog::WaveShaperControlDialog(
|
||||
inputKnob->setLabel( tr( "INPUT" ) );
|
||||
inputKnob->setHintText( tr( "Input gain:" ) , "" );
|
||||
|
||||
Knob * outputKnob = new Knob( knobBright_26, this );
|
||||
auto outputKnob = new Knob(knobBright_26, this);
|
||||
outputKnob -> setVolumeKnob( true );
|
||||
outputKnob -> setVolumeRatio( 1.0 );
|
||||
outputKnob -> move( 76, 225 );
|
||||
@@ -75,36 +75,35 @@ WaveShaperControlDialog::WaveShaperControlDialog(
|
||||
outputKnob->setLabel( tr( "OUTPUT" ) );
|
||||
outputKnob->setHintText( tr( "Output gain:" ), "" );
|
||||
|
||||
PixmapButton * resetButton = new PixmapButton( this, tr("Reset wavegraph") );
|
||||
auto resetButton = new PixmapButton(this, tr("Reset wavegraph"));
|
||||
resetButton -> move( 162, 221 );
|
||||
resetButton -> resize( 13, 46 );
|
||||
resetButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_active" ) );
|
||||
resetButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_inactive" ) );
|
||||
resetButton->setToolTip(tr("Reset wavegraph"));
|
||||
|
||||
PixmapButton * smoothButton = new PixmapButton( this, tr("Smooth wavegraph") );
|
||||
auto smoothButton = new PixmapButton(this, tr("Smooth wavegraph"));
|
||||
smoothButton -> move( 162, 237 );
|
||||
smoothButton -> resize( 13, 46 );
|
||||
smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) );
|
||||
smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) );
|
||||
smoothButton->setToolTip(tr("Smooth wavegraph"));
|
||||
|
||||
PixmapButton * addOneButton = new PixmapButton( this, tr("Increase wavegraph amplitude by 1 dB") );
|
||||
auto addOneButton = new PixmapButton(this, tr("Increase wavegraph amplitude by 1 dB"));
|
||||
addOneButton -> move( 131, 221 );
|
||||
addOneButton -> resize( 13, 29 );
|
||||
addOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_active" ) );
|
||||
addOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_inactive" ) );
|
||||
addOneButton->setToolTip(tr("Increase wavegraph amplitude by 1 dB"));
|
||||
|
||||
PixmapButton * subOneButton = new PixmapButton( this, tr("Decrease wavegraph amplitude by 1 dB") );
|
||||
auto subOneButton = new PixmapButton(this, tr("Decrease wavegraph amplitude by 1 dB"));
|
||||
subOneButton -> move( 131, 237 );
|
||||
subOneButton -> resize( 13, 29 );
|
||||
subOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_active" ) );
|
||||
subOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_inactive" ) );
|
||||
subOneButton->setToolTip(tr("Decrease wavegraph amplitude by 1 dB"));
|
||||
|
||||
LedCheckBox * clipInputToggle = new LedCheckBox( "Clip input", this,
|
||||
tr( "Clip input" ), LedCheckBox::Green );
|
||||
auto clipInputToggle = new LedCheckBox("Clip input", this, tr("Clip input"), LedCheckBox::Green);
|
||||
clipInputToggle -> move( 131, 252 );
|
||||
clipInputToggle -> setModel( &_controls -> m_clipModel );
|
||||
clipInputToggle->setToolTip(tr("Clip input signal to 0 dB"));
|
||||
|
||||
@@ -312,7 +312,7 @@ struct RandomVectorSeedFunction : public exprtk::ifunction<float>
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
const unsigned int xi = (unsigned int)index;
|
||||
const auto xi = (unsigned int)index;
|
||||
const unsigned int si = irseed % data_size;
|
||||
const unsigned int sa = irseed / data_size;
|
||||
unsigned int res=rotateLeft(random_data[(xi + 23 * si + 1) % data_size] ^ random_data[(xi / data_size + sa) % data_size],sa % 31 + 1);
|
||||
@@ -634,13 +634,13 @@ bool ExprFront::add_cyclic_vector(const char* name, const float* data, size_t le
|
||||
{
|
||||
if (interp)
|
||||
{
|
||||
WaveValueFunctionInterpolate<float> *wvf = new WaveValueFunctionInterpolate<float>(data, length);
|
||||
auto wvf = new WaveValueFunctionInterpolate<float>(data, length);
|
||||
m_data->m_cyclics_interp.push_back(wvf);
|
||||
return m_data->m_symbol_table.add_function(name, *wvf);
|
||||
}
|
||||
else
|
||||
{
|
||||
WaveValueFunction<float> *wvf = new WaveValueFunction<float>(data, length);
|
||||
auto wvf = new WaveValueFunction<float>(data, length);
|
||||
m_data->m_cyclics.push_back(wvf);
|
||||
return m_data->m_symbol_table.add_function(name, *wvf);
|
||||
}
|
||||
|
||||
@@ -203,8 +203,9 @@ void Xpressive::playNote(NotePlayHandle* nph, sampleFrame* working_buffer) {
|
||||
|
||||
if (nph->totalFramesPlayed() == 0 || nph->m_pluginData == nullptr) {
|
||||
|
||||
ExprFront *exprO1 = new ExprFront(m_outputExpression[0].constData(),Engine::audioEngine()->processingSampleRate());//give the "last" function a whole second
|
||||
ExprFront *exprO2 = new ExprFront(m_outputExpression[1].constData(),Engine::audioEngine()->processingSampleRate());
|
||||
auto exprO1 = new ExprFront(m_outputExpression[0].constData(),
|
||||
Engine::audioEngine()->processingSampleRate()); // give the "last" function a whole second
|
||||
auto exprO2 = new ExprFront(m_outputExpression[1].constData(), Engine::audioEngine()->processingSampleRate());
|
||||
|
||||
auto init_expression_step1 = [this, nph](ExprFront* e) { //lambda function to init exprO1 and exprO2
|
||||
//add the constants and the variables to the expression.
|
||||
@@ -227,10 +228,7 @@ void Xpressive::playNote(NotePlayHandle* nph, sampleFrame* working_buffer) {
|
||||
Engine::audioEngine()->processingSampleRate(), &m_panning1, &m_panning2, m_relTransition.value());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ExprSynth *ps = static_cast<ExprSynth*>(nph->m_pluginData);
|
||||
auto ps = static_cast<ExprSynth*>(nph->m_pluginData);
|
||||
const fpp_t frames = nph->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = nph->noteOffset();
|
||||
|
||||
@@ -257,7 +255,7 @@ void Xpressive::smooth(float smoothness,const graphModel * in,graphModel * out)
|
||||
const int guass_center = guass_size/2;
|
||||
const float delta = smoothness;
|
||||
const float a= 1.0f / (sqrtf(2.0f * F_PI) * delta);
|
||||
float * const guassian = new float [guass_size];
|
||||
auto const guassian = new float[guass_size];
|
||||
float sum = 0.0f;
|
||||
float temp = 0.0f;
|
||||
int i;
|
||||
@@ -390,7 +388,7 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) :
|
||||
m_selectedGraphGroup->addButton(m_o1Btn);
|
||||
m_selectedGraphGroup->addButton(m_o2Btn);
|
||||
|
||||
Xpressive *e = castModel<Xpressive>();
|
||||
auto e = castModel<Xpressive>();
|
||||
m_selectedGraphGroup->setModel(&e->selectedGraph());
|
||||
|
||||
m_sinWaveBtn = new PixmapButton(this, tr("Sine wave"));
|
||||
@@ -536,7 +534,7 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) :
|
||||
|
||||
|
||||
void XpressiveView::expressionChanged() {
|
||||
Xpressive * e = castModel<Xpressive>();
|
||||
auto e = castModel<Xpressive>();
|
||||
QByteArray text = m_expressionEditor->toPlainText().toLatin1();
|
||||
|
||||
switch (m_selectedGraphGroup->model()->value()) {
|
||||
@@ -592,7 +590,7 @@ void XpressiveView::expressionChanged() {
|
||||
if (parse_ok) {
|
||||
e->exprValid().setValue(0);
|
||||
const int length = m_raw_graph->length();
|
||||
float * const samples = new float[length];
|
||||
auto const samples = new float[length];
|
||||
for (i = 0; i < length; i++) {
|
||||
t = i / (float) length;
|
||||
samples[i] = expr.evaluate();
|
||||
@@ -627,8 +625,8 @@ void XpressiveView::expressionChanged() {
|
||||
|
||||
void XpressiveView::smoothChanged()
|
||||
{
|
||||
|
||||
Xpressive * e = castModel<Xpressive>();
|
||||
|
||||
auto e = castModel<Xpressive>();
|
||||
float smoothness=0;
|
||||
switch (m_selectedGraphGroup->model()->value()) {
|
||||
case W1_EXPR:
|
||||
@@ -660,7 +658,7 @@ void XpressiveView::smoothChanged()
|
||||
void XpressiveView::graphDrawn()
|
||||
{
|
||||
m_raw_graph->setSamples(m_graph->model()->samples());
|
||||
Xpressive * e = castModel<Xpressive>();
|
||||
auto e = castModel<Xpressive>();
|
||||
switch (m_selectedGraphGroup->model()->value()) {
|
||||
case W1_EXPR:
|
||||
e->W1().copyFrom(m_graph->model());
|
||||
@@ -676,7 +674,7 @@ void XpressiveView::graphDrawn()
|
||||
}
|
||||
|
||||
void XpressiveView::modelChanged() {
|
||||
Xpressive * b = castModel<Xpressive>();
|
||||
auto b = castModel<Xpressive>();
|
||||
|
||||
m_expressionValidToggle->setModel( &b->exprValid() );
|
||||
m_generalPurposeKnob[0]->setModel( &b->parameterA1() );
|
||||
@@ -692,7 +690,7 @@ void XpressiveView::modelChanged() {
|
||||
}
|
||||
|
||||
void XpressiveView::updateLayout() {
|
||||
Xpressive * e = castModel<Xpressive>();
|
||||
auto e = castModel<Xpressive>();
|
||||
m_output_expr=false;
|
||||
m_wave_expr=false;
|
||||
switch (m_selectedGraphGroup->model()->value()) {
|
||||
|
||||
@@ -146,8 +146,7 @@ public:
|
||||
|
||||
static void * messageLoop( void * _arg )
|
||||
{
|
||||
RemoteZynAddSubFx * _this =
|
||||
static_cast<RemoteZynAddSubFx *>( _arg );
|
||||
auto _this = static_cast<RemoteZynAddSubFx*>(_arg);
|
||||
|
||||
_this->messageLoop();
|
||||
|
||||
@@ -285,7 +284,7 @@ int main( int _argc, char * * _argv )
|
||||
RemoteZynAddSubFx * remoteZASF =
|
||||
new RemoteZynAddSubFx( _argv[1], _argv[2] );
|
||||
#else
|
||||
RemoteZynAddSubFx * remoteZASF = new RemoteZynAddSubFx( _argv[1] );
|
||||
auto remoteZASF = new RemoteZynAddSubFx(_argv[1]);
|
||||
#endif
|
||||
|
||||
remoteZASF->guiLoop();
|
||||
|
||||
@@ -135,7 +135,7 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument(
|
||||
this, SLOT( updateResBandwidth() ), Qt::DirectConnection );
|
||||
|
||||
// now we need a play-handle which cares for calling play()
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack );
|
||||
auto iph = new InstrumentPlayHandle(this, _instrumentTrack);
|
||||
Engine::audioEngine()->addPlayHandle( iph );
|
||||
|
||||
connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ),
|
||||
@@ -503,7 +503,7 @@ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent )
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
|
||||
QGridLayout * l = new QGridLayout( this );
|
||||
auto l = new QGridLayout(this);
|
||||
l->setContentsMargins( 20, 80, 10, 10 );
|
||||
l->setVerticalSpacing( 16 );
|
||||
l->setHorizontalSpacing( 10 );
|
||||
@@ -611,7 +611,7 @@ void ZynAddSubFxView::dropEvent( QDropEvent * _de )
|
||||
|
||||
void ZynAddSubFxView::modelChanged()
|
||||
{
|
||||
ZynAddSubFxInstrument * m = castModel<ZynAddSubFxInstrument>();
|
||||
auto m = castModel<ZynAddSubFxInstrument>();
|
||||
|
||||
// set models for controller knobs
|
||||
m_portamento->setModel( &m->m_portamentoModel );
|
||||
@@ -632,7 +632,7 @@ void ZynAddSubFxView::modelChanged()
|
||||
|
||||
void ZynAddSubFxView::toggleUI()
|
||||
{
|
||||
ZynAddSubFxInstrument * model = castModel<ZynAddSubFxInstrument>();
|
||||
auto model = castModel<ZynAddSubFxInstrument>();
|
||||
if( model->m_hasGUI != m_toggleUIButton->isChecked() )
|
||||
{
|
||||
model->m_hasGUI = m_toggleUIButton->isChecked();
|
||||
|
||||
Reference in New Issue
Block a user