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();
|
||||
|
||||
@@ -148,7 +148,7 @@ AudioEngine::AudioEngine( bool renderOnly ) :
|
||||
|
||||
for( int i = 0; i < m_numWorkers+1; ++i )
|
||||
{
|
||||
AudioEngineWorkerThread * wt = new AudioEngineWorkerThread( this );
|
||||
auto wt = new AudioEngineWorkerThread(this);
|
||||
if( i < m_numWorkers )
|
||||
{
|
||||
wt->start( QThread::TimeCriticalPriority );
|
||||
@@ -315,7 +315,7 @@ void AudioEngine::pushInputFrames( sampleFrame * _ab, const f_cnt_t _frames )
|
||||
if( frames + _frames > size )
|
||||
{
|
||||
size = qMax( size * 2, frames + _frames );
|
||||
sampleFrame * ab = new sampleFrame[ size ];
|
||||
auto ab = new sampleFrame[size];
|
||||
memcpy( ab, buf, frames * sizeof( sampleFrame ) );
|
||||
delete [] buf;
|
||||
|
||||
@@ -1113,7 +1113,7 @@ MidiClient * AudioEngine::tryMidiClients()
|
||||
#ifdef LMMS_HAVE_ALSA
|
||||
if( client_name == MidiAlsaSeq::name() || client_name == "" )
|
||||
{
|
||||
MidiAlsaSeq * malsas = new MidiAlsaSeq;
|
||||
auto malsas = new MidiAlsaSeq;
|
||||
if( malsas->isRunning() )
|
||||
{
|
||||
m_midiClientName = MidiAlsaSeq::name();
|
||||
@@ -1124,7 +1124,7 @@ MidiClient * AudioEngine::tryMidiClients()
|
||||
|
||||
if( client_name == MidiAlsaRaw::name() || client_name == "" )
|
||||
{
|
||||
MidiAlsaRaw * malsar = new MidiAlsaRaw;
|
||||
auto malsar = new MidiAlsaRaw;
|
||||
if( malsar->isRunning() )
|
||||
{
|
||||
m_midiClientName = MidiAlsaRaw::name();
|
||||
@@ -1137,7 +1137,7 @@ MidiClient * AudioEngine::tryMidiClients()
|
||||
#ifdef LMMS_HAVE_JACK
|
||||
if( client_name == MidiJack::name() || client_name == "" )
|
||||
{
|
||||
MidiJack * mjack = new MidiJack;
|
||||
auto mjack = new MidiJack;
|
||||
if( mjack->isRunning() )
|
||||
{
|
||||
m_midiClientName = MidiJack::name();
|
||||
@@ -1150,7 +1150,7 @@ MidiClient * AudioEngine::tryMidiClients()
|
||||
#ifdef LMMS_HAVE_OSS
|
||||
if( client_name == MidiOss::name() || client_name == "" )
|
||||
{
|
||||
MidiOss * moss = new MidiOss;
|
||||
auto moss = new MidiOss;
|
||||
if( moss->isRunning() )
|
||||
{
|
||||
m_midiClientName = MidiOss::name();
|
||||
@@ -1261,7 +1261,7 @@ void AudioEngine::fifoWriter::run()
|
||||
const fpp_t frames = m_audioEngine->framesPerPeriod();
|
||||
while( m_writing )
|
||||
{
|
||||
surroundSampleFrame * buffer = new surroundSampleFrame[frames];
|
||||
auto buffer = new surroundSampleFrame[frames];
|
||||
const surroundSampleFrame * b = m_audioEngine->renderNextBuffer();
|
||||
memcpy( buffer, b, frames * sizeof( surroundSampleFrame ) );
|
||||
write( buffer );
|
||||
|
||||
@@ -801,7 +801,7 @@ float FloatModel::getRoundedValue() const
|
||||
|
||||
int FloatModel::getDigitCount() const
|
||||
{
|
||||
float steptemp = step<float>();
|
||||
auto steptemp = step<float>();
|
||||
int digits = 0;
|
||||
while ( steptemp < 1 )
|
||||
{
|
||||
|
||||
@@ -211,7 +211,7 @@ TimePos AutomationClip::timeMapLength() const
|
||||
if (m_timeMap.isEmpty()) { return one_bar; }
|
||||
|
||||
timeMap::const_iterator it = m_timeMap.end();
|
||||
tick_t last_tick = static_cast<tick_t>(POS(it - 1));
|
||||
auto last_tick = static_cast<tick_t>(POS(it - 1));
|
||||
// if last_tick is 0 (single item at tick 0)
|
||||
// return length as a whole bar to prevent disappearing Clip
|
||||
if (last_tick == 0) { return one_bar; }
|
||||
@@ -374,8 +374,8 @@ void AutomationClip::removeNodes(const int tick0, const int tick1)
|
||||
return;
|
||||
}
|
||||
|
||||
TimePos start = TimePos(qMin(tick0, tick1));
|
||||
TimePos end = TimePos(qMax(tick0, tick1));
|
||||
auto start = TimePos(qMin(tick0, tick1));
|
||||
auto end = TimePos(qMax(tick0, tick1));
|
||||
|
||||
// Make a list of TimePos with nodes to be removed
|
||||
// because we can't simply remove the nodes from
|
||||
@@ -410,8 +410,8 @@ void AutomationClip::resetNodes(const int tick0, const int tick1)
|
||||
return;
|
||||
}
|
||||
|
||||
TimePos start = TimePos(qMin(tick0, tick1));
|
||||
TimePos end = TimePos(qMax(tick0, tick1));
|
||||
auto start = TimePos(qMin(tick0, tick1));
|
||||
auto end = TimePos(qMax(tick0, tick1));
|
||||
|
||||
for (auto it = m_timeMap.lowerBound(start), endIt = m_timeMap.upperBound(end); it != endIt; ++it)
|
||||
{
|
||||
@@ -610,7 +610,7 @@ float *AutomationClip::valuesAfter( const TimePos & _time ) const
|
||||
}
|
||||
|
||||
int numValues = POS(v + 1) - POS(v);
|
||||
float *ret = new float[numValues];
|
||||
auto ret = new float[numValues];
|
||||
|
||||
for( int i = 0; i < numValues; i++ )
|
||||
{
|
||||
@@ -698,7 +698,7 @@ void AutomationClip::flipX(int length)
|
||||
// We swap the inValue and outValue when flipping horizontally
|
||||
tempValue = OUTVAL(it);
|
||||
tempOutValue = INVAL(it);
|
||||
TimePos newTime = TimePos(length - POS(it));
|
||||
auto newTime = TimePos(length - POS(it));
|
||||
|
||||
tempMap[newTime] = AutomationNode(this, tempValue, tempOutValue, newTime);
|
||||
|
||||
@@ -740,7 +740,7 @@ void AutomationClip::flipX(int length)
|
||||
tempValue = OUTVAL(it);
|
||||
tempOutValue = INVAL(it);
|
||||
|
||||
TimePos newTime = TimePos(realLength - POS(it));
|
||||
auto newTime = TimePos(realLength - POS(it));
|
||||
tempMap[newTime] = AutomationNode(this, tempValue, tempOutValue, newTime);
|
||||
|
||||
++it;
|
||||
@@ -903,7 +903,7 @@ bool AutomationClip::isAutomated( const AutomatableModel * _m )
|
||||
const Track::clipVector & v = ( *it )->getClips();
|
||||
for( Track::clipVector::ConstIterator j = v.begin(); j != v.end(); ++j )
|
||||
{
|
||||
const AutomationClip * a = dynamic_cast<const AutomationClip *>( *j );
|
||||
const auto a = dynamic_cast<const AutomationClip*>(*j);
|
||||
if( a && a->hasAutomation() )
|
||||
{
|
||||
for( objectVector::const_iterator k = a->m_objects.begin(); k != a->m_objects.end(); ++k )
|
||||
@@ -945,7 +945,7 @@ QVector<AutomationClip *> AutomationClip::clipsForModel( const AutomatableModel
|
||||
// go through all the clips...
|
||||
for( Track::clipVector::ConstIterator j = v.begin(); j != v.end(); ++j )
|
||||
{
|
||||
AutomationClip * a = dynamic_cast<AutomationClip *>( *j );
|
||||
auto a = dynamic_cast<AutomationClip*>(*j);
|
||||
// check that the clip has automation
|
||||
if( a && a->hasAutomation() )
|
||||
{
|
||||
@@ -977,7 +977,7 @@ AutomationClip * AutomationClip::globalAutomationClip(
|
||||
Track::clipVector v = t->getClips();
|
||||
for( Track::clipVector::const_iterator j = v.begin(); j != v.end(); ++j )
|
||||
{
|
||||
AutomationClip * a = dynamic_cast<AutomationClip *>( *j );
|
||||
auto a = dynamic_cast<AutomationClip*>(*j);
|
||||
if( a )
|
||||
{
|
||||
for( objectVector::const_iterator k = a->m_objects.begin();
|
||||
@@ -991,7 +991,7 @@ AutomationClip * AutomationClip::globalAutomationClip(
|
||||
}
|
||||
}
|
||||
|
||||
AutomationClip * a = new AutomationClip( t );
|
||||
auto a = new AutomationClip(t);
|
||||
a->addObject( _m, false );
|
||||
return a;
|
||||
}
|
||||
@@ -1014,7 +1014,7 @@ void AutomationClip::resolveAllIDs()
|
||||
for( Track::clipVector::iterator j = v.begin();
|
||||
j != v.end(); ++j )
|
||||
{
|
||||
AutomationClip * a = dynamic_cast<AutomationClip *>( *j );
|
||||
auto a = dynamic_cast<AutomationClip*>(*j);
|
||||
if( a )
|
||||
{
|
||||
for( QVector<jo_id_t>::Iterator k = a->m_idsToResolve.begin();
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace lmms::Clipboard
|
||||
|
||||
void copyString( const QString & str, MimeType mT )
|
||||
{
|
||||
QMimeData *content = new QMimeData;
|
||||
auto content = new QMimeData;
|
||||
|
||||
content->setData( mimeType( mT ), str.toUtf8() );
|
||||
QApplication::clipboard()->setMimeData( content, QClipboard::Clipboard );
|
||||
@@ -71,7 +71,7 @@ namespace lmms::Clipboard
|
||||
{
|
||||
QString finalString = key + ":" + value;
|
||||
|
||||
QMimeData *content = new QMimeData;
|
||||
auto content = new QMimeData;
|
||||
content->setData( mimeType( MimeType::StringPair ), finalString.toUtf8() );
|
||||
QApplication::clipboard()->setMimeData( content, QClipboard::Clipboard );
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ bool Controller::hasModel( const Model * m ) const
|
||||
{
|
||||
for (QObject * c : children())
|
||||
{
|
||||
AutomatableModel * am = qobject_cast<AutomatableModel*>(c);
|
||||
auto am = qobject_cast<AutomatableModel*>(c);
|
||||
if( am != nullptr )
|
||||
{
|
||||
if( am == m )
|
||||
@@ -296,7 +296,7 @@ QString Controller::nodeName() const
|
||||
|
||||
gui::ControllerDialog * Controller::createDialog( QWidget * _parent )
|
||||
{
|
||||
gui::ControllerDialog * d = new gui::ControllerDialog( this, _parent );
|
||||
auto d = new gui::ControllerDialog(this, _parent);
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ bool DataFile::copyResources(const QString& resourcesDir)
|
||||
// repeating filenames
|
||||
std::list<QString> namesList;
|
||||
|
||||
ResourcesMap::const_iterator it = ELEMENTS_WITH_RESOURCES.begin();
|
||||
auto it = ELEMENTS_WITH_RESOURCES.begin();
|
||||
|
||||
// Copy resources and manipulate the DataFile to have local paths to them
|
||||
while (it != ELEMENTS_WITH_RESOURCES.end())
|
||||
@@ -439,7 +439,7 @@ bool DataFile::copyResources(const QString& resourcesDir)
|
||||
{
|
||||
QDomElement el = list.item(i).toElement();
|
||||
|
||||
std::vector<QString>::const_iterator res = it->second.begin();
|
||||
auto res = it->second.begin();
|
||||
|
||||
// Search for attributes that point to resources
|
||||
while (res != it->second.end())
|
||||
@@ -533,12 +533,7 @@ bool DataFile::hasLocalPlugins(QDomElement parent /* = QDomElement()*/, bool fir
|
||||
bool skipNode = false;
|
||||
// Skip the nodes allowed to have "local:" attributes, but
|
||||
// still check its children
|
||||
for
|
||||
(
|
||||
ResourcesMap::const_iterator it = ELEMENTS_WITH_RESOURCES.begin();
|
||||
it != ELEMENTS_WITH_RESOURCES.end();
|
||||
++it
|
||||
)
|
||||
for (auto it = ELEMENTS_WITH_RESOURCES.begin(); it != ELEMENTS_WITH_RESOURCES.end(); ++it)
|
||||
{
|
||||
if (childElement.tagName() == it->first)
|
||||
{
|
||||
|
||||
@@ -124,7 +124,7 @@ Effect * Effect::instantiate( const QString& pluginName,
|
||||
if( dynamic_cast<Effect *>( p ) != nullptr )
|
||||
{
|
||||
// everything ok, so return pointer
|
||||
Effect * effect = dynamic_cast<Effect *>( p );
|
||||
auto effect = dynamic_cast<Effect*>(p);
|
||||
effect->m_parent = dynamic_cast<EffectChain *>(_parent);
|
||||
return effect;
|
||||
}
|
||||
|
||||
@@ -60,10 +60,7 @@ void EffectChain::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
for( Effect* effect : m_effects)
|
||||
{
|
||||
if( DummyEffect* dummy = dynamic_cast<DummyEffect*>(effect) )
|
||||
{
|
||||
_this.appendChild( dummy->originalPluginData() );
|
||||
}
|
||||
if (auto dummy = dynamic_cast<DummyEffect*>(effect)) { _this.appendChild(dummy->originalPluginData()); }
|
||||
else
|
||||
{
|
||||
QDomElement ef = effect->saveState( _doc, _this );
|
||||
|
||||
@@ -404,16 +404,13 @@ void EnvelopeAndLfoParameters::updateSampleVars()
|
||||
Engine::audioEngine()->processingSampleRate();
|
||||
|
||||
// TODO: Remove the expKnobVals, time should be linear
|
||||
const f_cnt_t predelay_frames = static_cast<f_cnt_t>(
|
||||
frames_per_env_seg *
|
||||
expKnobVal( m_predelayModel.value() ) );
|
||||
const auto predelay_frames = static_cast<f_cnt_t>(frames_per_env_seg * expKnobVal(m_predelayModel.value()));
|
||||
|
||||
const f_cnt_t attack_frames = qMax( minimumFrames,
|
||||
static_cast<f_cnt_t>( frames_per_env_seg *
|
||||
expKnobVal( m_attackModel.value() ) ) );
|
||||
|
||||
const f_cnt_t hold_frames = static_cast<f_cnt_t>( frames_per_env_seg *
|
||||
expKnobVal( m_holdModel.value() ) );
|
||||
const auto hold_frames = static_cast<f_cnt_t>(frames_per_env_seg * expKnobVal(m_holdModel.value()));
|
||||
|
||||
const f_cnt_t decay_frames = qMax( minimumFrames,
|
||||
static_cast<f_cnt_t>( frames_per_env_seg *
|
||||
|
||||
@@ -368,8 +368,8 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
|
||||
const int total_range = range * cnphv.size();
|
||||
|
||||
// number of frames that every note should be played
|
||||
const f_cnt_t arp_frames = (f_cnt_t)( m_arpTimeModel.value() / 1000.0f * Engine::audioEngine()->processingSampleRate() );
|
||||
const f_cnt_t gated_frames = (f_cnt_t)( m_arpGateModel.value() * arp_frames / 100.0f );
|
||||
const auto arp_frames = (f_cnt_t)(m_arpTimeModel.value() / 1000.0f * Engine::audioEngine()->processingSampleRate());
|
||||
const auto gated_frames = (f_cnt_t)(m_arpGateModel.value() * arp_frames / 100.0f);
|
||||
|
||||
// used for calculating remaining frames for arp-note, we have to add
|
||||
// arp_frames-1, otherwise the first arp-note will not be setup
|
||||
|
||||
@@ -86,9 +86,7 @@ LadspaManager::LadspaManager()
|
||||
|
||||
if( plugin_lib.load() == true )
|
||||
{
|
||||
LADSPA_Descriptor_Function descriptorFunction =
|
||||
( LADSPA_Descriptor_Function ) plugin_lib.resolve(
|
||||
"ladspa_descriptor" );
|
||||
auto descriptorFunction = (LADSPA_Descriptor_Function)plugin_lib.resolve("ladspa_descriptor");
|
||||
if( descriptorFunction != nullptr )
|
||||
{
|
||||
addPlugins( descriptorFunction,
|
||||
@@ -158,8 +156,7 @@ void LadspaManager::addPlugins(
|
||||
continue;
|
||||
}
|
||||
|
||||
LadspaManagerDescription * plugIn =
|
||||
new LadspaManagerDescription;
|
||||
auto plugIn = new LadspaManagerDescription;
|
||||
plugIn->descriptorFunction = _descriptor_func;
|
||||
plugIn->index = pluginIndex;
|
||||
plugIn->inputChannels = getPluginInputs( descriptor );
|
||||
|
||||
@@ -293,7 +293,7 @@ void Mixer::deleteChannel( int index )
|
||||
{
|
||||
if( t->type() == Track::InstrumentTrack )
|
||||
{
|
||||
InstrumentTrack* inst = dynamic_cast<InstrumentTrack *>( t );
|
||||
auto inst = dynamic_cast<InstrumentTrack*>(t);
|
||||
int val = inst->mixerChannelModel()->value(0);
|
||||
if( val == index )
|
||||
{
|
||||
@@ -309,7 +309,7 @@ void Mixer::deleteChannel( int index )
|
||||
}
|
||||
else if( t->type() == Track::SampleTrack )
|
||||
{
|
||||
SampleTrack* strk = dynamic_cast<SampleTrack *>( t );
|
||||
auto strk = dynamic_cast<SampleTrack*>(t);
|
||||
int val = strk->mixerChannelModel()->value(0);
|
||||
if( val == index )
|
||||
{
|
||||
@@ -395,7 +395,7 @@ void Mixer::moveChannelLeft( int index )
|
||||
{
|
||||
if( trackList[i]->type() == Track::InstrumentTrack )
|
||||
{
|
||||
InstrumentTrack * inst = (InstrumentTrack *) trackList[i];
|
||||
auto inst = (InstrumentTrack*)trackList[i];
|
||||
int val = inst->mixerChannelModel()->value(0);
|
||||
if( val == a )
|
||||
{
|
||||
@@ -408,7 +408,7 @@ void Mixer::moveChannelLeft( int index )
|
||||
}
|
||||
else if( trackList[i]->type() == Track::SampleTrack )
|
||||
{
|
||||
SampleTrack * strk = (SampleTrack *) trackList[i];
|
||||
auto strk = (SampleTrack*)trackList[i];
|
||||
int val = strk->mixerChannelModel()->value(0);
|
||||
if( val == a )
|
||||
{
|
||||
@@ -469,7 +469,7 @@ MixerRoute * Mixer::createRoute( MixerChannel * from, MixerChannel * to, float a
|
||||
return nullptr;
|
||||
}
|
||||
Engine::audioEngine()->requestChangeInModel();
|
||||
MixerRoute * route = new MixerRoute( from, to, amount );
|
||||
auto route = new MixerRoute(from, to, amount);
|
||||
|
||||
// add us to from's sends
|
||||
from->m_sends.append( route );
|
||||
|
||||
@@ -459,7 +459,7 @@ int NotePlayHandle::index() const
|
||||
int idx = 0;
|
||||
for( PlayHandleList::ConstIterator it = playHandles.begin(); it != playHandles.end(); ++it )
|
||||
{
|
||||
const NotePlayHandle * nph = dynamic_cast<const NotePlayHandle *>( *it );
|
||||
const auto nph = dynamic_cast<const NotePlayHandle*>(*it);
|
||||
if( nph == nullptr || nph->m_instrumentTrack != m_instrumentTrack || nph->isReleased() || nph->hasParent() )
|
||||
{
|
||||
continue;
|
||||
@@ -483,7 +483,7 @@ ConstNotePlayHandleList NotePlayHandle::nphsOfInstrumentTrack( const InstrumentT
|
||||
|
||||
for( PlayHandleList::ConstIterator it = playHandles.begin(); it != playHandles.end(); ++it )
|
||||
{
|
||||
const NotePlayHandle * nph = dynamic_cast<const NotePlayHandle *>( *it );
|
||||
const auto nph = dynamic_cast<const NotePlayHandle*>(*it);
|
||||
if( nph != nullptr && nph->m_instrumentTrack == _it && ( ( nph->isReleased() == false && nph->hasParent() == false ) || _all_ph == true ) )
|
||||
{
|
||||
cnphv.push_back( nph );
|
||||
@@ -606,7 +606,7 @@ void NotePlayHandleManager::init()
|
||||
{
|
||||
s_available = MM_ALLOC<NotePlayHandle*>( INITIAL_NPH_CACHE );
|
||||
|
||||
NotePlayHandle * n = MM_ALLOC<NotePlayHandle>( INITIAL_NPH_CACHE );
|
||||
auto n = MM_ALLOC<NotePlayHandle>(INITIAL_NPH_CACHE);
|
||||
|
||||
for( int i=0; i < INITIAL_NPH_CACHE; ++i )
|
||||
{
|
||||
@@ -649,11 +649,11 @@ void NotePlayHandleManager::release( NotePlayHandle * nph )
|
||||
void NotePlayHandleManager::extend( int c )
|
||||
{
|
||||
s_size += c;
|
||||
NotePlayHandle ** tmp = MM_ALLOC<NotePlayHandle*>( s_size );
|
||||
auto tmp = MM_ALLOC<NotePlayHandle*>(s_size);
|
||||
MM_FREE( s_available );
|
||||
s_available = tmp;
|
||||
|
||||
NotePlayHandle * n = MM_ALLOC<NotePlayHandle>( c );
|
||||
auto n = MM_ALLOC<NotePlayHandle>(c);
|
||||
|
||||
for( int i=0; i < c; ++i )
|
||||
{
|
||||
|
||||
@@ -233,7 +233,7 @@ void ProjectRenderer::updateConsoleProgress()
|
||||
}
|
||||
prog[cols] = 0;
|
||||
|
||||
const char * activity = (const char *) "|/-\\";
|
||||
const auto activity = (const char*)"|/-\\";
|
||||
memset( buf, 0, sizeof( buf ) );
|
||||
sprintf( buf, "\r|%s| %3d%% %c ", prog, m_progress,
|
||||
activity[rot] );
|
||||
|
||||
@@ -380,7 +380,7 @@ bool RemotePlugin::process( const sampleFrame * _in_buf, sampleFrame * _out_buf
|
||||
}
|
||||
else
|
||||
{
|
||||
sampleFrame * o = (sampleFrame *) m_audioBuffer.get();
|
||||
auto o = (sampleFrame*)m_audioBuffer.get();
|
||||
for( ch_cnt_t ch = 0; ch < inputs; ++ch )
|
||||
{
|
||||
for( fpp_t frame = 0; frame < frames; ++frame )
|
||||
@@ -423,8 +423,7 @@ bool RemotePlugin::process( const sampleFrame * _in_buf, sampleFrame * _out_buf
|
||||
}
|
||||
else
|
||||
{
|
||||
sampleFrame * o = (sampleFrame *) ( m_audioBuffer.get() +
|
||||
m_inputCount*frames );
|
||||
auto o = (sampleFrame*)(m_audioBuffer.get() + m_inputCount * frames);
|
||||
// clear buffer, if plugin didn't fill up both channels
|
||||
BufferManager::clear( _out_buf, frames );
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ size_t qfileReadCallback(void * ptr, size_t size, size_t n, void * udata )
|
||||
|
||||
int qfileSeekCallback(void * udata, ogg_int64_t offset, int whence)
|
||||
{
|
||||
QFile * f = static_cast<QFile *>(udata);
|
||||
auto f = static_cast<QFile*>(udata);
|
||||
|
||||
if (whence == SEEK_CUR)
|
||||
{
|
||||
@@ -594,7 +594,7 @@ f_cnt_t SampleBuffer::decodeSampleOGGVorbis(
|
||||
|
||||
f_cnt_t frames = 0;
|
||||
|
||||
QFile * f = new QFile(fileName);
|
||||
auto f = new QFile(fileName);
|
||||
if (f->open(QFile::ReadOnly) == false)
|
||||
{
|
||||
delete f;
|
||||
@@ -727,9 +727,7 @@ bool SampleBuffer::play(
|
||||
m_sampleRate / Engine::audioEngine()->processingSampleRate();
|
||||
|
||||
// calculate how many frames we have in requested pitch
|
||||
const f_cnt_t totalFramesForCurrentPitch = static_cast<f_cnt_t>(
|
||||
(endFrame - startFrame) / freqFactor
|
||||
);
|
||||
const auto totalFramesForCurrentPitch = static_cast<f_cnt_t>((endFrame - startFrame) / freqFactor);
|
||||
|
||||
if (totalFramesForCurrentPitch == 0)
|
||||
{
|
||||
@@ -1331,8 +1329,8 @@ SampleBuffer * SampleBuffer::resample(const sample_rate_t srcSR, const sample_ra
|
||||
{
|
||||
sampleFrame * data = m_data;
|
||||
const f_cnt_t frames = m_frames;
|
||||
const f_cnt_t dstFrames = static_cast<f_cnt_t>((frames / (float) srcSR) * (float) dstSR);
|
||||
SampleBuffer * dstSB = new SampleBuffer(dstFrames);
|
||||
const auto dstFrames = static_cast<f_cnt_t>((frames / (float)srcSR) * (float)dstSR);
|
||||
auto dstSB = new SampleBuffer(dstFrames);
|
||||
sampleFrame * dstBuf = dstSB->m_origData;
|
||||
|
||||
// yeah, libsamplerate, let's rock with sinc-interpolation!
|
||||
|
||||
@@ -102,7 +102,7 @@ SampleClip::SampleClip(const SampleClip& orig) :
|
||||
|
||||
SampleClip::~SampleClip()
|
||||
{
|
||||
SampleTrack * sampletrack = dynamic_cast<SampleTrack*>( getTrack() );
|
||||
auto sampletrack = dynamic_cast<SampleTrack*>(getTrack());
|
||||
if ( sampletrack )
|
||||
{
|
||||
sampletrack->updateClips();
|
||||
@@ -180,7 +180,7 @@ void SampleClip::toggleRecord()
|
||||
void SampleClip::playbackPositionChanged()
|
||||
{
|
||||
Engine::audioEngine()->removePlayHandlesOfTypes( getTrack(), PlayHandle::TypeSamplePlayHandle );
|
||||
SampleTrack * st = dynamic_cast<SampleTrack*>( getTrack() );
|
||||
auto st = dynamic_cast<SampleTrack*>(getTrack());
|
||||
st->setPlayingClips( false );
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ void SampleClip::playbackPositionChanged()
|
||||
|
||||
void SampleClip::updateTrackClips()
|
||||
{
|
||||
SampleTrack * sampletrack = dynamic_cast<SampleTrack*>( getTrack() );
|
||||
auto sampletrack = dynamic_cast<SampleTrack*>(getTrack());
|
||||
if( sampletrack)
|
||||
{
|
||||
sampletrack->updateClips();
|
||||
|
||||
@@ -115,7 +115,7 @@ void SampleRecordHandle::createSampleBuffer( SampleBuffer** sampleBuf )
|
||||
{
|
||||
const f_cnt_t frames = framesRecorded();
|
||||
// create buffer to store all recorded buffers in
|
||||
sampleFrame * data = new sampleFrame[frames];
|
||||
auto data = new sampleFrame[frames];
|
||||
// make sure buffer is cleaned up properly at the end...
|
||||
sampleFrame * data_ptr = data;
|
||||
|
||||
@@ -140,7 +140,7 @@ void SampleRecordHandle::createSampleBuffer( SampleBuffer** sampleBuf )
|
||||
|
||||
void SampleRecordHandle::writeBuffer( const sampleFrame * _ab, const f_cnt_t _frames )
|
||||
{
|
||||
sampleFrame * buf = new sampleFrame[_frames];
|
||||
auto buf = new sampleFrame[_frames];
|
||||
for( f_cnt_t frame = 0; frame < _frames; ++frame )
|
||||
{
|
||||
for( ch_cnt_t chnl = 0; chnl < DEFAULT_CHANNELS; ++chnl )
|
||||
|
||||
@@ -146,12 +146,12 @@ void Song::masterVolumeChanged()
|
||||
void Song::setTempo()
|
||||
{
|
||||
Engine::audioEngine()->requestChangeInModel();
|
||||
const bpm_t tempo = ( bpm_t ) m_tempoModel.value();
|
||||
const auto tempo = (bpm_t)m_tempoModel.value();
|
||||
PlayHandleList & playHandles = Engine::audioEngine()->playHandles();
|
||||
for( PlayHandleList::Iterator it = playHandles.begin();
|
||||
it != playHandles.end(); ++it )
|
||||
{
|
||||
NotePlayHandle * nph = dynamic_cast<NotePlayHandle *>( *it );
|
||||
auto nph = dynamic_cast<NotePlayHandle*>(*it);
|
||||
if( nph && !nph->isReleased() )
|
||||
{
|
||||
nph->lock();
|
||||
@@ -321,7 +321,7 @@ void Song::processNextBuffer()
|
||||
}
|
||||
|
||||
const f_cnt_t framesUntilNextPeriod = framesPerPeriod - frameOffsetInPeriod;
|
||||
const f_cnt_t framesUntilNextTick = static_cast<f_cnt_t>(std::ceil(framesPerTick - frameOffsetInTick));
|
||||
const auto framesUntilNextTick = static_cast<f_cnt_t>(std::ceil(framesPerTick - frameOffsetInTick));
|
||||
|
||||
// We want to proceed to the next buffer or tick, whichever is closer
|
||||
const auto framesToPlay = std::min(framesUntilNextPeriod, framesUntilNextTick);
|
||||
|
||||
@@ -295,9 +295,9 @@ void AudioAlsa::applyQualitySettings()
|
||||
|
||||
void AudioAlsa::run()
|
||||
{
|
||||
surroundSampleFrame * temp = new surroundSampleFrame[audioEngine()->framesPerPeriod()];
|
||||
int_sample_t * outbuf = new int_sample_t[audioEngine()->framesPerPeriod() * channels()];
|
||||
int_sample_t * pcmbuf = new int_sample_t[m_periodSize * channels()];
|
||||
auto temp = new surroundSampleFrame[audioEngine()->framesPerPeriod()];
|
||||
auto outbuf = new int_sample_t[audioEngine()->framesPerPeriod() * channels()];
|
||||
auto pcmbuf = new int_sample_t[m_periodSize * channels()];
|
||||
|
||||
int outbuf_size = audioEngine()->framesPerPeriod() * channels();
|
||||
int outbuf_pos = 0;
|
||||
|
||||
@@ -104,7 +104,7 @@ void AudioFileWave::writeBuffer( const surroundSampleFrame * _ab,
|
||||
|
||||
if( bitDepth == OutputSettings::Depth_32Bit || bitDepth == OutputSettings::Depth_24Bit )
|
||||
{
|
||||
float * buf = new float[_frames*channels()];
|
||||
auto buf = new float[_frames * channels()];
|
||||
for( fpp_t frame = 0; frame < _frames; ++frame )
|
||||
{
|
||||
for( ch_cnt_t chnl = 0; chnl < channels(); ++chnl )
|
||||
@@ -118,7 +118,7 @@ void AudioFileWave::writeBuffer( const surroundSampleFrame * _ab,
|
||||
}
|
||||
else
|
||||
{
|
||||
int_sample_t * buf = new int_sample_t[_frames * channels()];
|
||||
auto buf = new int_sample_t[_frames * channels()];
|
||||
convertToS16( _ab, _frames, _master_gain, buf,
|
||||
!isLittleEndian() );
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ int AudioJack::staticProcessCallback( jack_nframes_t _nframes, void * _udata )
|
||||
|
||||
void AudioJack::shutdownCallback( void * _udata )
|
||||
{
|
||||
AudioJack * _this = static_cast<AudioJack *>( _udata );
|
||||
auto _this = static_cast<AudioJack*>(_udata);
|
||||
_this->m_client = nullptr;
|
||||
_this->zombified();
|
||||
}
|
||||
@@ -462,11 +462,11 @@ AudioJack::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
m_clientName = new QLineEdit( cn, this );
|
||||
m_clientName->setGeometry( 10, 20, 160, 20 );
|
||||
|
||||
QLabel * cn_lbl = new QLabel( tr( "Client name" ), this );
|
||||
auto cn_lbl = new QLabel(tr("Client name"), this);
|
||||
cn_lbl->setFont( pointSize<7>( cn_lbl->font() ) );
|
||||
cn_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ );
|
||||
auto m = new gui::LcdSpinBoxModel(/* this */);
|
||||
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
|
||||
m->setStep( 2 );
|
||||
m->setValue( ConfigManager::inst()->value( "audiojack",
|
||||
|
||||
@@ -292,8 +292,8 @@ void AudioOss::applyQualitySettings()
|
||||
|
||||
void AudioOss::run()
|
||||
{
|
||||
surroundSampleFrame * temp = new surroundSampleFrame[audioEngine()->framesPerPeriod()];
|
||||
int_sample_t * outbuf = new int_sample_t[audioEngine()->framesPerPeriod() * channels()];
|
||||
auto temp = new surroundSampleFrame[audioEngine()->framesPerPeriod()];
|
||||
auto outbuf = new int_sample_t[audioEngine()->framesPerPeriod() * channels()];
|
||||
|
||||
while( true )
|
||||
{
|
||||
@@ -323,11 +323,11 @@ AudioOss::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
m_device = new QLineEdit( probeDevice(), this );
|
||||
m_device->setGeometry( 10, 20, 160, 20 );
|
||||
|
||||
QLabel * dev_lbl = new QLabel( tr( "Device" ), this );
|
||||
auto dev_lbl = new QLabel(tr("Device"), this);
|
||||
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
|
||||
dev_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ );
|
||||
auto m = new gui::LcdSpinBoxModel(/* this */);
|
||||
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
|
||||
m->setStep( 2 );
|
||||
m->setValue( ConfigManager::inst()->value( "audiooss",
|
||||
|
||||
@@ -332,7 +332,7 @@ int AudioPortAudio::_process_callback(
|
||||
Q_UNUSED(_timeInfo);
|
||||
Q_UNUSED(_statusFlags);
|
||||
|
||||
AudioPortAudio * _this = static_cast<AudioPortAudio *> (_arg);
|
||||
auto _this = static_cast<AudioPortAudio*>(_arg);
|
||||
return _this->process_callback( (const float*)_inputBuffer,
|
||||
(float*)_outputBuffer, _framesPerBuffer );
|
||||
}
|
||||
@@ -422,14 +422,14 @@ AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
m_backend = new ComboBox( this, "BACKEND" );
|
||||
m_backend->setGeometry( 64, 15, 260, ComboBox::DEFAULT_HEIGHT );
|
||||
|
||||
QLabel * backend_lbl = new QLabel( tr( "Backend" ), this );
|
||||
auto backend_lbl = new QLabel(tr("Backend"), this);
|
||||
backend_lbl->setFont( pointSize<7>( backend_lbl->font() ) );
|
||||
backend_lbl->move( 8, 18 );
|
||||
|
||||
m_device = new ComboBox( this, "DEVICE" );
|
||||
m_device->setGeometry( 64, 35, 260, ComboBox::DEFAULT_HEIGHT );
|
||||
|
||||
QLabel * dev_lbl = new QLabel( tr( "Device" ), this );
|
||||
auto dev_lbl = new QLabel(tr("Device"), this);
|
||||
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
|
||||
dev_lbl->move( 8, 38 );
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ static void stream_state_callback( pa_stream *s, void * userdata )
|
||||
/* This is called whenever the context status changes */
|
||||
static void context_state_callback(pa_context *c, void *userdata)
|
||||
{
|
||||
AudioPulseAudio * _this = static_cast<AudioPulseAudio *>( userdata );
|
||||
auto _this = static_cast<AudioPulseAudio*>(userdata);
|
||||
switch( pa_context_get_state( c ) )
|
||||
{
|
||||
case PA_CONTEXT_CONNECTING:
|
||||
@@ -247,7 +247,7 @@ void AudioPulseAudio::run()
|
||||
else
|
||||
{
|
||||
const fpp_t fpp = audioEngine()->framesPerPeriod();
|
||||
surroundSampleFrame * temp = new surroundSampleFrame[fpp];
|
||||
auto temp = new surroundSampleFrame[fpp];
|
||||
while( getNextBuffer( temp ) )
|
||||
{
|
||||
}
|
||||
@@ -266,8 +266,8 @@ void AudioPulseAudio::run()
|
||||
void AudioPulseAudio::streamWriteCallback( pa_stream *s, size_t length )
|
||||
{
|
||||
const fpp_t fpp = audioEngine()->framesPerPeriod();
|
||||
surroundSampleFrame * temp = new surroundSampleFrame[fpp];
|
||||
int_sample_t* pcmbuf = (int_sample_t *)pa_xmalloc( fpp * channels() * sizeof(int_sample_t) );
|
||||
auto temp = new surroundSampleFrame[fpp];
|
||||
auto pcmbuf = (int_sample_t*)pa_xmalloc(fpp * channels() * sizeof(int_sample_t));
|
||||
|
||||
size_t fd = 0;
|
||||
while( fd < length/4 && m_quit == false )
|
||||
@@ -315,11 +315,11 @@ AudioPulseAudio::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
m_device = new QLineEdit( AudioPulseAudio::probeDevice(), this );
|
||||
m_device->setGeometry( 10, 20, 160, 20 );
|
||||
|
||||
QLabel * dev_lbl = new QLabel( tr( "Device" ), this );
|
||||
auto dev_lbl = new QLabel(tr("Device"), this);
|
||||
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
|
||||
dev_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ );
|
||||
auto m = new gui::LcdSpinBoxModel(/* this */);
|
||||
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
|
||||
m->setStep( 2 );
|
||||
m->setValue( ConfigManager::inst()->value( "audiopa",
|
||||
|
||||
@@ -75,7 +75,7 @@ void AudioSampleRecorder::createSampleBuffer( SampleBuffer** sampleBuf )
|
||||
{
|
||||
const f_cnt_t frames = framesRecorded();
|
||||
// create buffer to store all recorded buffers in
|
||||
sampleFrame * data = new sampleFrame[frames];
|
||||
auto data = new sampleFrame[frames];
|
||||
// make sure buffer is cleaned up properly at the end...
|
||||
sampleFrame * data_ptr = data;
|
||||
|
||||
@@ -102,7 +102,7 @@ void AudioSampleRecorder::createSampleBuffer( SampleBuffer** sampleBuf )
|
||||
void AudioSampleRecorder::writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames, const float )
|
||||
{
|
||||
sampleFrame * buf = new sampleFrame[_frames];
|
||||
auto buf = new sampleFrame[_frames];
|
||||
for( fpp_t frame = 0; frame < _frames; ++frame )
|
||||
{
|
||||
for( ch_cnt_t chnl = 0; chnl < DEFAULT_CHANNELS; ++chnl )
|
||||
|
||||
@@ -225,7 +225,7 @@ void AudioSdl::applyQualitySettings()
|
||||
|
||||
void AudioSdl::sdlAudioCallback( void * _udata, Uint8 * _buf, int _len )
|
||||
{
|
||||
AudioSdl * _this = static_cast<AudioSdl *>( _udata );
|
||||
auto _this = static_cast<AudioSdl*>(_udata);
|
||||
|
||||
_this->sdlAudioCallback( _buf, _len );
|
||||
}
|
||||
@@ -310,13 +310,13 @@ void AudioSdl::sdlAudioCallback( Uint8 * _buf, int _len )
|
||||
#ifdef LMMS_HAVE_SDL2
|
||||
|
||||
void AudioSdl::sdlInputAudioCallback(void *_udata, Uint8 *_buf, int _len) {
|
||||
AudioSdl * _this = static_cast<AudioSdl *>( _udata );
|
||||
auto _this = static_cast<AudioSdl*>(_udata);
|
||||
|
||||
_this->sdlInputAudioCallback( _buf, _len );
|
||||
}
|
||||
|
||||
void AudioSdl::sdlInputAudioCallback(Uint8 *_buf, int _len) {
|
||||
sampleFrame *samples_buffer = (sampleFrame *) _buf;
|
||||
auto samples_buffer = (sampleFrame*)_buf;
|
||||
fpp_t frames = _len / sizeof ( sampleFrame );
|
||||
|
||||
audioEngine()->pushInputFrames (samples_buffer, frames);
|
||||
@@ -331,7 +331,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
m_device = new QLineEdit( dev, this );
|
||||
m_device->setGeometry( 10, 20, 160, 20 );
|
||||
|
||||
QLabel * dev_lbl = new QLabel( tr( "Device" ), this );
|
||||
auto dev_lbl = new QLabel(tr("Device"), this);
|
||||
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
|
||||
dev_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
|
||||
@@ -57,8 +57,7 @@ LV2_Evbuf*
|
||||
lv2_evbuf_new(uint32_t capacity, uint32_t atom_Chunk, uint32_t atom_Sequence)
|
||||
{
|
||||
// FIXME: memory must be 64-bit aligned
|
||||
LV2_Evbuf* evbuf = (LV2_Evbuf*)malloc(
|
||||
sizeof(LV2_Evbuf) + sizeof(LV2_Atom_Sequence) + capacity);
|
||||
auto evbuf = (LV2_Evbuf*)malloc(sizeof(LV2_Evbuf) + sizeof(LV2_Atom_Sequence) + capacity);
|
||||
evbuf->capacity = capacity;
|
||||
evbuf->atom_Chunk = atom_Chunk;
|
||||
evbuf->atom_Sequence = atom_Sequence;
|
||||
@@ -155,8 +154,7 @@ lv2_evbuf_get(LV2_Evbuf_Iterator iter,
|
||||
}
|
||||
|
||||
LV2_Atom_Sequence* aseq = &iter.evbuf->buf;
|
||||
LV2_Atom_Event* aev = (LV2_Atom_Event*)(
|
||||
(char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq) + iter.offset);
|
||||
auto aev = (LV2_Atom_Event*)((char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq) + iter.offset);
|
||||
|
||||
*frames = aev->time.frames;
|
||||
*type = aev->body.type;
|
||||
@@ -179,8 +177,7 @@ lv2_evbuf_write(LV2_Evbuf_Iterator* iter,
|
||||
return false;
|
||||
}
|
||||
|
||||
LV2_Atom_Event* aev = (LV2_Atom_Event*)(
|
||||
(char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq) + iter->offset);
|
||||
auto aev = (LV2_Atom_Event*)((char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq) + iter->offset);
|
||||
|
||||
aev->time.frames = frames;
|
||||
aev->body.type = type;
|
||||
|
||||
@@ -500,7 +500,7 @@ void Lv2Proc::createPort(std::size_t portNum)
|
||||
{
|
||||
case Lv2Ports::Type::Control:
|
||||
{
|
||||
Lv2Ports::Control* ctrl = new Lv2Ports::Control;
|
||||
auto ctrl = new Lv2Ports::Control;
|
||||
if (meta.m_flow == Lv2Ports::Flow::Input)
|
||||
{
|
||||
AutoLilvNode node(lilv_port_get_name(m_plugin, lilvPort));
|
||||
@@ -542,9 +542,7 @@ void Lv2Proc::createPort(std::size_t portNum)
|
||||
break;
|
||||
case Lv2Ports::Vis::Enumeration:
|
||||
{
|
||||
ComboBoxModel* comboModel
|
||||
= new ComboBoxModel(
|
||||
nullptr, dispName);
|
||||
auto comboModel = new ComboBoxModel(nullptr, dispName);
|
||||
LilvScalePoints* sps =
|
||||
lilv_port_get_scale_points(m_plugin, lilvPort);
|
||||
LILV_FOREACH(scale_points, i, sps)
|
||||
@@ -578,18 +576,14 @@ void Lv2Proc::createPort(std::size_t portNum)
|
||||
}
|
||||
case Lv2Ports::Type::Audio:
|
||||
{
|
||||
Lv2Ports::Audio* audio =
|
||||
new Lv2Ports::Audio(
|
||||
static_cast<std::size_t>(
|
||||
Engine::audioEngine()->framesPerPeriod()),
|
||||
portIsSideChain(m_plugin, lilvPort)
|
||||
);
|
||||
auto audio = new Lv2Ports::Audio(static_cast<std::size_t>(Engine::audioEngine()->framesPerPeriod()),
|
||||
portIsSideChain(m_plugin, lilvPort));
|
||||
port = audio;
|
||||
break;
|
||||
}
|
||||
case Lv2Ports::Type::AtomSeq:
|
||||
{
|
||||
Lv2Ports::AtomSeq* atomPort = new Lv2Ports::AtomSeq;
|
||||
auto atomPort = new Lv2Ports::AtomSeq;
|
||||
|
||||
{
|
||||
AutoLilvNode uriAtomSupports(Engine::getLv2Manager()->uri(LV2_ATOM__supports));
|
||||
|
||||
@@ -72,23 +72,23 @@ void Lv2SubPluginFeatures::fillDescriptionWidget(QWidget *parent,
|
||||
{
|
||||
const LilvPlugin *plug = getPlugin(*k);
|
||||
|
||||
QLabel *label = new QLabel(parent);
|
||||
auto label = new QLabel(parent);
|
||||
label->setText(QWidget::tr("Name: ") + pluginName(plug));
|
||||
|
||||
QLabel *label2 = new QLabel(parent);
|
||||
auto label2 = new QLabel(parent);
|
||||
label2->setText(QWidget::tr("URI: ") +
|
||||
lilv_node_as_uri(lilv_plugin_get_uri(plug)));
|
||||
|
||||
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(
|
||||
qStringFromPluginNode(plug, lilv_plugin_get_author_name));
|
||||
maker_content->setWordWrap(true);
|
||||
@@ -96,17 +96,17 @@ void Lv2SubPluginFeatures::fillDescriptionWidget(QWidget *parent,
|
||||
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("<unknown>");
|
||||
copyright_content->setWordWrap(true);
|
||||
l->addWidget(copyright_label);
|
||||
|
||||
@@ -33,13 +33,13 @@ namespace lmms
|
||||
|
||||
static LV2_URID staticMap(LV2_URID_Map_Handle handle, const char* uri)
|
||||
{
|
||||
UridMap* map = static_cast<UridMap*>(handle);
|
||||
auto map = static_cast<UridMap*>(handle);
|
||||
return map->map(uri);
|
||||
}
|
||||
|
||||
static const char* staticUnmap(LV2_URID_Unmap_Handle handle, LV2_URID urid)
|
||||
{
|
||||
UridMap* map = static_cast<UridMap*>(handle);
|
||||
auto map = static_cast<UridMap*>(handle);
|
||||
return map->unmap(urid);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ void consoleMessageHandler(QtMsgType type,
|
||||
inline void loadTranslation( const QString & tname,
|
||||
const QString & dir = lmms::ConfigManager::inst()->localeDir() )
|
||||
{
|
||||
QTranslator * t = new QTranslator( QCoreApplication::instance() );
|
||||
auto t = new QTranslator(QCoreApplication::instance());
|
||||
QString name = tname + ".qm";
|
||||
|
||||
if (t->load(name, dir))
|
||||
@@ -829,12 +829,12 @@ int main( int argc, char * * argv )
|
||||
}
|
||||
|
||||
// create renderer
|
||||
RenderManager * r = new RenderManager( qs, os, eff, renderOut );
|
||||
auto r = new RenderManager(qs, os, eff, renderOut);
|
||||
QCoreApplication::instance()->connect( r,
|
||||
SIGNAL(finished()), SLOT(quit()));
|
||||
|
||||
// timer for progress-updates
|
||||
QTimer * t = new QTimer( r );
|
||||
auto t = new QTimer(r);
|
||||
r->connect( t, SIGNAL(timeout()),
|
||||
SLOT(updateConsoleProgress()));
|
||||
t->start( 200 );
|
||||
|
||||
@@ -164,7 +164,7 @@ void MidiAlsaSeq::processOutEvent( const MidiEvent& event, const TimePos& time,
|
||||
// HACK!!! - need a better solution which isn't that easy since we
|
||||
// cannot store const-ptrs in our map because we need to call non-const
|
||||
// methods of MIDI-port - it's a mess...
|
||||
MidiPort* p = const_cast<MidiPort *>( port );
|
||||
auto p = const_cast<MidiPort*>(port);
|
||||
|
||||
snd_seq_event_t ev;
|
||||
snd_seq_ev_clear( &ev );
|
||||
@@ -353,8 +353,7 @@ QString MidiAlsaSeq::sourcePortName( const MidiEvent & _event ) const
|
||||
{
|
||||
if( _event.sourcePort() )
|
||||
{
|
||||
const snd_seq_addr_t * addr =
|
||||
static_cast<const snd_seq_addr_t *>( _event.sourcePort() );
|
||||
const auto addr = static_cast<const snd_seq_addr_t*>(_event.sourcePort());
|
||||
return portName( m_seqHandle, addr );
|
||||
}
|
||||
return MidiClient::sourcePortName( _event );
|
||||
@@ -462,7 +461,7 @@ void MidiAlsaSeq::run()
|
||||
// watch the pipe and sequencer input events
|
||||
int pollfd_count = snd_seq_poll_descriptors_count( m_seqHandle,
|
||||
POLLIN );
|
||||
struct pollfd * pollfd_set = new struct pollfd[pollfd_count + 1];
|
||||
auto pollfd_set = new struct pollfd[pollfd_count + 1];
|
||||
snd_seq_poll_descriptors( m_seqHandle, pollfd_set + 1, pollfd_count,
|
||||
POLLIN );
|
||||
pollfd_set[0].fd = m_pipe[0];
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace lmms
|
||||
/* callback functions for jack */
|
||||
static int JackMidiProcessCallback(jack_nframes_t nframes, void *arg)
|
||||
{
|
||||
MidiJack *jmd = (MidiJack *)arg;
|
||||
auto jmd = (MidiJack*)arg;
|
||||
|
||||
if (nframes <= 0)
|
||||
return (0);
|
||||
|
||||
@@ -67,11 +67,11 @@ AudioAlsaSetupWidget::AudioAlsaSetupWidget( QWidget * _parent ) :
|
||||
SIGNAL(currentIndexChanged(int)),
|
||||
SLOT(onCurrentIndexChanged(int)));
|
||||
|
||||
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
|
||||
auto dev_lbl = new QLabel(tr("DEVICE"), this);
|
||||
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
|
||||
dev_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
|
||||
auto m = new LcdSpinBoxModel(/* this */);
|
||||
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
|
||||
m->setStep( 2 );
|
||||
m->setValue( ConfigManager::inst()->value( "audioalsa",
|
||||
|
||||
@@ -55,7 +55,7 @@ void AutomatableModelView::addDefaultActions( QMenu* menu )
|
||||
{
|
||||
AutomatableModel* model = modelUntyped();
|
||||
|
||||
AutomatableModelViewSlots* amvSlots = new AutomatableModelViewSlots( this, menu );
|
||||
auto amvSlots = new AutomatableModelViewSlots(this, menu);
|
||||
|
||||
menu->addAction( embed::getIconPixmap( "reload" ),
|
||||
AutomatableModel::tr( "&Reset (%1%2)" ).
|
||||
@@ -230,7 +230,7 @@ void AutomatableModelViewSlots::execConnectionDialog()
|
||||
// New
|
||||
else
|
||||
{
|
||||
ControllerConnection* cc = new ControllerConnection(d.chosenController());
|
||||
auto cc = new ControllerConnection(d.chosenController());
|
||||
m->setControllerConnection( cc );
|
||||
//cc->setTargetName( m->displayName() );
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ int ControlLayout::smartSpacing(QStyle::PixelMetric pm) const
|
||||
if (!parent) { return -1; }
|
||||
else if (parent->isWidgetType())
|
||||
{
|
||||
QWidget *pw = static_cast<QWidget *>(parent);
|
||||
auto pw = static_cast<QWidget*>(parent);
|
||||
return pw->style()->pixelMetric(pm, nullptr, pw);
|
||||
}
|
||||
else { return static_cast<QLayout *>(parent)->spacing(); }
|
||||
|
||||
@@ -53,7 +53,7 @@ ControllerRackView::ControllerRackView() :
|
||||
m_scrollArea->setPalette( QApplication::palette( m_scrollArea ) );
|
||||
m_scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||
|
||||
QWidget * scrollAreaWidget = new QWidget( m_scrollArea );
|
||||
auto scrollAreaWidget = new QWidget(m_scrollArea);
|
||||
m_scrollAreaLayout = new QVBoxLayout( scrollAreaWidget );
|
||||
m_scrollAreaLayout->addStretch();
|
||||
scrollAreaWidget->setLayout( m_scrollAreaLayout );
|
||||
@@ -71,7 +71,7 @@ ControllerRackView::ControllerRackView() :
|
||||
connect( song, SIGNAL(controllerAdded(lmms::Controller*)), SLOT(onControllerAdded(lmms::Controller*)));
|
||||
connect( song, SIGNAL(controllerRemoved(lmms::Controller*)), SLOT(onControllerRemoved(lmms::Controller*)));
|
||||
|
||||
QVBoxLayout * layout = new QVBoxLayout();
|
||||
auto layout = new QVBoxLayout();
|
||||
layout->addWidget( m_scrollArea );
|
||||
layout->addWidget( m_addButton );
|
||||
this->setLayout( layout );
|
||||
@@ -139,7 +139,7 @@ void ControllerRackView::onControllerAdded( Controller * controller )
|
||||
{
|
||||
QWidget * scrollAreaWidget = m_scrollArea->widget();
|
||||
|
||||
ControllerView * controllerView = new ControllerView( controller, scrollAreaWidget );
|
||||
auto controllerView = new ControllerView(controller, scrollAreaWidget);
|
||||
|
||||
connect( controllerView, SIGNAL(deleteController(lmms::gui::ControllerView*)),
|
||||
this, SLOT(deleteController(lmms::gui::ControllerView*)), Qt::QueuedConnection );
|
||||
|
||||
@@ -54,19 +54,19 @@ ControllerView::ControllerView( Controller * _model, QWidget * _parent ) :
|
||||
this->setFrameStyle( QFrame::StyledPanel );
|
||||
this->setFrameShadow( QFrame::Raised );
|
||||
|
||||
QVBoxLayout *vBoxLayout = new QVBoxLayout(this);
|
||||
auto vBoxLayout = new QVBoxLayout(this);
|
||||
|
||||
QHBoxLayout *hBox = new QHBoxLayout();
|
||||
auto hBox = new QHBoxLayout();
|
||||
vBoxLayout->addLayout(hBox);
|
||||
|
||||
QLabel *label = new QLabel( "<b>" + _model->displayName() + "</b>", this);
|
||||
auto label = new QLabel("<b>" + _model->displayName() + "</b>", this);
|
||||
QSizePolicy sizePolicy = label->sizePolicy();
|
||||
sizePolicy.setHorizontalStretch(1);
|
||||
label->setSizePolicy(sizePolicy);
|
||||
|
||||
hBox->addWidget(label);
|
||||
|
||||
QPushButton * controlsButton = new QPushButton( tr( "Controls" ), this );
|
||||
auto controlsButton = new QPushButton(tr("Controls"), this);
|
||||
connect( controlsButton, SIGNAL(clicked()), SLOT(editControls()));
|
||||
|
||||
hBox->addWidget(controlsButton);
|
||||
@@ -141,7 +141,7 @@ void ControllerView::deleteController()
|
||||
void ControllerView::renameController()
|
||||
{
|
||||
bool ok;
|
||||
Controller * c = castModel<Controller>();
|
||||
auto c = castModel<Controller>();
|
||||
QString new_name = QInputDialog::getText( this,
|
||||
tr( "Rename controller" ),
|
||||
tr( "Enter the new name for this controller" ),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user