Classier enums (#6760)
This commit is contained in:
@@ -41,7 +41,7 @@ Plugin::Descriptor PLUGIN_EXPORT amplifier_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "A native amplifier plugin" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -43,27 +43,27 @@ AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) :
|
||||
setPalette( pal );
|
||||
setFixedSize( 100, 110 );
|
||||
|
||||
auto volumeKnob = new Knob(knobBright_26, this);
|
||||
auto volumeKnob = new Knob(KnobType::Bright26, this);
|
||||
volumeKnob -> move( 16, 10 );
|
||||
volumeKnob -> setVolumeKnob( true );
|
||||
volumeKnob->setModel( &controls->m_volumeModel );
|
||||
volumeKnob->setLabel( tr( "VOL" ) );
|
||||
volumeKnob->setHintText( tr( "Volume:" ) , "%" );
|
||||
|
||||
auto panKnob = new Knob(knobBright_26, this);
|
||||
auto panKnob = new Knob(KnobType::Bright26, this);
|
||||
panKnob -> move( 57, 10 );
|
||||
panKnob->setModel( &controls->m_panModel );
|
||||
panKnob->setLabel( tr( "PAN" ) );
|
||||
panKnob->setHintText( tr( "Panning:" ) , "" );
|
||||
|
||||
auto leftKnob = new Knob(knobBright_26, this);
|
||||
auto leftKnob = new Knob(KnobType::Bright26, this);
|
||||
leftKnob -> move( 16, 65 );
|
||||
leftKnob -> setVolumeKnob( true );
|
||||
leftKnob->setModel( &controls->m_leftModel );
|
||||
leftKnob->setLabel( tr( "LEFT" ) );
|
||||
leftKnob->setHintText( tr( "Left gain:" ) , "%" );
|
||||
|
||||
auto rightKnob = new Knob(knobBright_26, this);
|
||||
auto rightKnob = new Knob(KnobType::Bright26, this);
|
||||
rightKnob -> move( 57, 65 );
|
||||
rightKnob -> setVolumeKnob( true );
|
||||
rightKnob->setModel( &controls->m_rightModel );
|
||||
|
||||
@@ -64,7 +64,7 @@ Plugin::Descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
|
||||
"instrument-track" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"wav,ogg,ds,spx,au,voc,aif,aiff,flac,raw",
|
||||
nullptr,
|
||||
@@ -516,7 +516,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
|
||||
m_stutterButton->setToolTip(
|
||||
tr( "Continue sample playback across notes" ) );
|
||||
|
||||
m_ampKnob = new Knob( knobBright_26, this );
|
||||
m_ampKnob = new Knob( KnobType::Bright26, this );
|
||||
m_ampKnob->setVolumeKnob( true );
|
||||
m_ampKnob->move( 5, 108 );
|
||||
m_ampKnob->setHintText( tr( "Amplify:" ), "%" );
|
||||
@@ -567,7 +567,7 @@ void AudioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
QString txt = _dee->mimeData()->data(
|
||||
mimeType( MimeType::StringPair ) );
|
||||
if( txt.section( ':', 0, 0 ) == QString( "clip_%1" ).arg(
|
||||
Track::SampleTrack ) )
|
||||
static_cast<int>(Track::Type::Sample) ) )
|
||||
{
|
||||
_dee->acceptProposedAction();
|
||||
}
|
||||
@@ -619,7 +619,7 @@ void AudioFileProcessorView::dropEvent( QDropEvent * _de )
|
||||
newWaveView();
|
||||
return;
|
||||
}
|
||||
else if( type == QString( "clip_%1" ).arg( Track::SampleTrack ) )
|
||||
else if( type == QString( "clip_%1" ).arg( static_cast<int>(Track::Type::Sample) ) )
|
||||
{
|
||||
DataFile dataFile( value.toUtf8() );
|
||||
castModel<AudioFileProcessor>()->setAudioFile( dataFile.content().firstChild().toElement().attribute( "src" ) );
|
||||
@@ -787,9 +787,9 @@ void AudioFileProcessorWaveView::mousePressEvent( QMouseEvent * _me )
|
||||
const int end_dist = qAbs( m_endFrameX - x );
|
||||
const int loop_dist = qAbs( m_loopFrameX - x );
|
||||
|
||||
draggingType dt = sample_loop; int md = loop_dist;
|
||||
if( start_dist < loop_dist ) { dt = sample_start; md = start_dist; }
|
||||
else if( end_dist < loop_dist ) { dt = sample_end; md = end_dist; }
|
||||
DraggingType dt = DraggingType::SampleLoop; int md = loop_dist;
|
||||
if( start_dist < loop_dist ) { dt = DraggingType::SampleStart; md = start_dist; }
|
||||
else if( end_dist < loop_dist ) { dt = DraggingType::SampleEnd; md = end_dist; }
|
||||
|
||||
if( md < 4 )
|
||||
{
|
||||
@@ -797,7 +797,7 @@ void AudioFileProcessorWaveView::mousePressEvent( QMouseEvent * _me )
|
||||
}
|
||||
else
|
||||
{
|
||||
m_draggingType = wave;
|
||||
m_draggingType = DraggingType::Wave;
|
||||
updateCursor(_me);
|
||||
}
|
||||
}
|
||||
@@ -808,7 +808,7 @@ void AudioFileProcessorWaveView::mousePressEvent( QMouseEvent * _me )
|
||||
void AudioFileProcessorWaveView::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
m_isDragging = false;
|
||||
if( m_draggingType == wave )
|
||||
if( m_draggingType == DraggingType::Wave )
|
||||
{
|
||||
updateCursor(_me);
|
||||
}
|
||||
@@ -828,16 +828,16 @@ void AudioFileProcessorWaveView::mouseMoveEvent( QMouseEvent * _me )
|
||||
const int step = _me->x() - m_draggingLastPoint.x();
|
||||
switch( m_draggingType )
|
||||
{
|
||||
case sample_start:
|
||||
slideSamplePointByPx( start, step );
|
||||
case DraggingType::SampleStart:
|
||||
slideSamplePointByPx( Point::Start, step );
|
||||
break;
|
||||
case sample_end:
|
||||
slideSamplePointByPx( end, step );
|
||||
case DraggingType::SampleEnd:
|
||||
slideSamplePointByPx( Point::End, step );
|
||||
break;
|
||||
case sample_loop:
|
||||
slideSamplePointByPx( loop, step );
|
||||
case DraggingType::SampleLoop:
|
||||
slideSamplePointByPx( Point::Loop, step );
|
||||
break;
|
||||
case wave:
|
||||
case DraggingType::Wave:
|
||||
default:
|
||||
if( qAbs( _me->y() - m_draggingLastPoint.y() )
|
||||
< 2 * qAbs( _me->x() - m_draggingLastPoint.x() ) )
|
||||
@@ -983,7 +983,7 @@ void AudioFileProcessorWaveView::updateGraph()
|
||||
if( m_to == 1 )
|
||||
{
|
||||
m_to = m_sampleBuffer.frames() * 0.7;
|
||||
slideSamplePointToFrames( end, m_to * 0.7 );
|
||||
slideSamplePointToFrames( Point::End, m_to * 0.7 );
|
||||
}
|
||||
|
||||
if( m_from > m_sampleBuffer.startFrame() )
|
||||
@@ -1110,7 +1110,7 @@ void AudioFileProcessorWaveView::setKnobs( knob * _start, knob * _end, knob * _l
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::slideSamplePointByPx( knobType _point, int _px )
|
||||
void AudioFileProcessorWaveView::slideSamplePointByPx( Point _point, int _px )
|
||||
{
|
||||
slideSamplePointByFrames(
|
||||
_point,
|
||||
@@ -1121,18 +1121,18 @@ void AudioFileProcessorWaveView::slideSamplePointByPx( knobType _point, int _px
|
||||
|
||||
|
||||
|
||||
void AudioFileProcessorWaveView::slideSamplePointByFrames( knobType _point, f_cnt_t _frames, bool _slide_to )
|
||||
void AudioFileProcessorWaveView::slideSamplePointByFrames( Point _point, f_cnt_t _frames, bool _slide_to )
|
||||
{
|
||||
knob * a_knob = m_startKnob;
|
||||
switch( _point )
|
||||
{
|
||||
case end:
|
||||
case Point::End:
|
||||
a_knob = m_endKnob;
|
||||
break;
|
||||
case loop:
|
||||
case Point::Loop:
|
||||
a_knob = m_loopKnob;
|
||||
break;
|
||||
case start:
|
||||
case Point::Start:
|
||||
break;
|
||||
}
|
||||
if( a_knob == nullptr )
|
||||
@@ -1196,7 +1196,7 @@ void AudioFileProcessorWaveView::reverse()
|
||||
|
||||
void AudioFileProcessorWaveView::updateCursor( QMouseEvent * _me )
|
||||
{
|
||||
bool const waveIsDragged = m_isDragging && (m_draggingType == wave);
|
||||
bool const waveIsDragged = m_isDragging && (m_draggingType == DraggingType::Wave);
|
||||
bool const pointerCloseToStartEndOrLoop = (_me != nullptr ) &&
|
||||
( isCloseTo( _me->x(), m_startFrameX ) ||
|
||||
isCloseTo( _me->x(), m_endFrameX ) ||
|
||||
|
||||
@@ -177,11 +177,11 @@ protected:
|
||||
|
||||
|
||||
public:
|
||||
enum knobType
|
||||
enum class Point
|
||||
{
|
||||
start,
|
||||
end,
|
||||
loop
|
||||
Start,
|
||||
End,
|
||||
Loop
|
||||
} ;
|
||||
|
||||
class knob : public Knob
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
|
||||
public:
|
||||
knob( QWidget * _parent ) :
|
||||
Knob( knobBright_26, _parent ),
|
||||
Knob( KnobType::Bright26, _parent ),
|
||||
m_waveView( 0 ),
|
||||
m_relatedKnob( 0 )
|
||||
{
|
||||
@@ -239,12 +239,12 @@ public slots:
|
||||
private:
|
||||
static const int s_padding = 2;
|
||||
|
||||
enum draggingType
|
||||
enum class DraggingType
|
||||
{
|
||||
wave,
|
||||
sample_start,
|
||||
sample_end,
|
||||
sample_loop
|
||||
Wave,
|
||||
SampleStart,
|
||||
SampleEnd,
|
||||
SampleLoop
|
||||
} ;
|
||||
|
||||
SampleBuffer& m_sampleBuffer;
|
||||
@@ -262,7 +262,7 @@ private:
|
||||
f_cnt_t m_loopFrameX;
|
||||
bool m_isDragging;
|
||||
QPoint m_draggingLastPoint;
|
||||
draggingType m_draggingType;
|
||||
DraggingType m_draggingType;
|
||||
bool m_reversed;
|
||||
f_cnt_t m_framesPlayed;
|
||||
bool m_animation;
|
||||
@@ -276,11 +276,11 @@ public:
|
||||
private:
|
||||
void zoom( const bool _out = false );
|
||||
void slide( int _px );
|
||||
void slideSamplePointByPx( knobType _point, int _px );
|
||||
void slideSamplePointByFrames( knobType _point, f_cnt_t _frames, bool _slide_to = false );
|
||||
void slideSamplePointByPx( Point _point, int _px );
|
||||
void slideSamplePointByFrames( Point _point, f_cnt_t _frames, bool _slide_to = false );
|
||||
void slideSampleByFrames( f_cnt_t _frames );
|
||||
|
||||
void slideSamplePointToFrames( knobType _point, f_cnt_t _frames )
|
||||
void slideSamplePointToFrames( Point _point, f_cnt_t _frames )
|
||||
{
|
||||
slideSamplePointByFrames( _point, _frames, true );
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ Plugin::Descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "Boost your bass the fast and simple way" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -50,17 +50,17 @@ BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* control
|
||||
|
||||
auto l = new QHBoxLayout;
|
||||
|
||||
auto freqKnob = new Knob(knobBright_26, this);
|
||||
auto freqKnob = new Knob(KnobType::Bright26, this);
|
||||
freqKnob->setModel( &controls->m_freqModel );
|
||||
freqKnob->setLabel( tr( "FREQ" ) );
|
||||
freqKnob->setHintText( tr( "Frequency:" ) , "Hz" );
|
||||
|
||||
auto gainKnob = new Knob(knobBright_26, this);
|
||||
auto gainKnob = new Knob(KnobType::Bright26, this);
|
||||
gainKnob->setModel( &controls->m_gainModel );
|
||||
gainKnob->setLabel( tr( "GAIN" ) );
|
||||
gainKnob->setHintText( tr( "Gain:" ) , "" );
|
||||
|
||||
auto ratioKnob = new Knob(knobBright_26, this);
|
||||
auto ratioKnob = new Knob(KnobType::Bright26, this);
|
||||
ratioKnob->setModel( &controls->m_ratioModel );
|
||||
ratioKnob->setLabel( tr( "RATIO" ) );
|
||||
ratioKnob->setHintText( tr( "Ratio:" ) , "" );
|
||||
|
||||
@@ -60,7 +60,7 @@ Plugin::Descriptor PLUGIN_EXPORT bitinvader_plugin_descriptor =
|
||||
"Customizable wavetable synthesizer" ),
|
||||
"Andreas Brandmaier <andreas/at/brandmaier/dot/de>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -345,11 +345,11 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
|
||||
m_sampleLengthKnob = new Knob( knobDark_28, this );
|
||||
m_sampleLengthKnob = new Knob( KnobType::Dark28, this );
|
||||
m_sampleLengthKnob->move( 6, 201 );
|
||||
m_sampleLengthKnob->setHintText( tr( "Sample length" ), "" );
|
||||
|
||||
m_graph = new Graph( this, Graph::NearestStyle, 204, 134 );
|
||||
m_graph = new Graph( this, Graph::Style::Nearest, 204, 134 );
|
||||
m_graph->move(23,59); // 55,120 - 2px border
|
||||
m_graph->setAutoFillBackground( true );
|
||||
m_graph->setGraphColor( QColor( 255, 255, 255 ) );
|
||||
@@ -431,12 +431,12 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
|
||||
|
||||
|
||||
m_interpolationToggle = new LedCheckBox( "Interpolation", this,
|
||||
tr( "Interpolation" ), LedCheckBox::Yellow );
|
||||
tr( "Interpolation" ), LedCheckBox::LedColor::Yellow );
|
||||
m_interpolationToggle->move( 131, 221 );
|
||||
|
||||
|
||||
m_normalizeToggle = new LedCheckBox( "Normalize", this,
|
||||
tr( "Normalize" ), LedCheckBox::Green );
|
||||
tr( "Normalize" ), LedCheckBox::LedColor::Green );
|
||||
m_normalizeToggle->move( 131, 236 );
|
||||
|
||||
|
||||
@@ -556,7 +556,7 @@ void BitInvaderView::smoothClicked()
|
||||
|
||||
void BitInvaderView::interpolationToggled( bool value )
|
||||
{
|
||||
m_graph->setGraphStyle( value ? Graph::LinearStyle : Graph::NearestStyle);
|
||||
m_graph->setGraphStyle( value ? Graph::Style::Linear : Graph::Style::Nearest);
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Plugin::Descriptor PLUGIN_EXPORT bitcrush_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "An oversampling bitcrusher" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -53,13 +53,13 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
outLabel->move( 139, 15 );
|
||||
|
||||
// input knobs
|
||||
auto inGain = new Knob(knobBright_26, this);
|
||||
auto inGain = new Knob(KnobType::Bright26, this);
|
||||
inGain->move( 16, 32 );
|
||||
inGain->setModel( & controls->m_inGain );
|
||||
inGain->setLabel( tr( "GAIN" ) );
|
||||
inGain->setHintText( tr( "Input gain:" ) , " dBFS" );
|
||||
|
||||
auto inNoise = new Knob(knobBright_26, this);
|
||||
auto inNoise = new Knob(KnobType::Bright26, this);
|
||||
inNoise->move( 14, 76 );
|
||||
inNoise->setModel( & controls->m_inNoise );
|
||||
inNoise->setLabel( tr( "NOISE" ) );
|
||||
@@ -67,13 +67,13 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
|
||||
|
||||
// output knobs
|
||||
auto outGain = new Knob(knobBright_26, this);
|
||||
auto outGain = new Knob(KnobType::Bright26, this);
|
||||
outGain->move( 138, 32 );
|
||||
outGain->setModel( & controls->m_outGain );
|
||||
outGain->setLabel( tr( "GAIN" ) );
|
||||
outGain->setHintText( tr( "Output gain:" ) , " dBFS" );
|
||||
|
||||
auto outClip = new Knob(knobBright_26, this);
|
||||
auto outClip = new Knob(KnobType::Bright26, this);
|
||||
outClip->move( 138, 76 );
|
||||
outClip->setModel( & controls->m_outClip );
|
||||
outClip->setLabel( tr( "CLIP" ) );
|
||||
@@ -82,25 +82,25 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
|
||||
|
||||
|
||||
// leds
|
||||
auto rateEnabled = new LedCheckBox("", this, tr("Rate enabled"), LedCheckBox::Green);
|
||||
auto rateEnabled = new LedCheckBox("", this, tr("Rate enabled"), LedCheckBox::LedColor::Green);
|
||||
rateEnabled->move( 64, 14 );
|
||||
rateEnabled->setModel( & controls->m_rateEnabled );
|
||||
rateEnabled->setToolTip(tr("Enable sample-rate crushing"));
|
||||
|
||||
auto depthEnabled = new LedCheckBox("", this, tr("Depth enabled"), LedCheckBox::Green);
|
||||
auto depthEnabled = new LedCheckBox("", this, tr("Depth enabled"), LedCheckBox::LedColor::Green);
|
||||
depthEnabled->move( 101, 14 );
|
||||
depthEnabled->setModel( & controls->m_depthEnabled );
|
||||
depthEnabled->setToolTip(tr("Enable bit-depth crushing"));
|
||||
|
||||
|
||||
// rate crushing knobs
|
||||
auto rate = new Knob(knobBright_26, this);
|
||||
auto rate = new Knob(KnobType::Bright26, this);
|
||||
rate->move( 59, 32 );
|
||||
rate->setModel( & controls->m_rate );
|
||||
rate->setLabel( tr( "FREQ" ) );
|
||||
rate->setHintText( tr( "Sample rate:" ) , " Hz" );
|
||||
|
||||
auto stereoDiff = new Knob(knobBright_26, this);
|
||||
auto stereoDiff = new Knob(KnobType::Bright26, 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
|
||||
auto levels = new Knob(knobBright_26, this);
|
||||
auto levels = new Knob(KnobType::Bright26, this);
|
||||
levels->move( 92, 32 );
|
||||
levels->setModel( & controls->m_levels );
|
||||
levels->setLabel( tr( "QUANT" ) );
|
||||
|
||||
@@ -220,7 +220,7 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D
|
||||
|
||||
CarlaInstrument::~CarlaInstrument()
|
||||
{
|
||||
Engine::audioEngine()->removePlayHandlesOfTypes(instrumentTrack(), PlayHandle::TypeNotePlayHandle | PlayHandle::TypeInstrumentPlayHandle);
|
||||
Engine::audioEngine()->removePlayHandlesOfTypes(instrumentTrack(), PlayHandle::Type::NotePlayHandle | PlayHandle::Type::InstrumentPlayHandle);
|
||||
|
||||
if (fHost.resourceDir != nullptr)
|
||||
{
|
||||
@@ -345,7 +345,7 @@ intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opco
|
||||
|
||||
Instrument::Flags CarlaInstrument::flags() const
|
||||
{
|
||||
return IsSingleStreamed|IsMidiBased|IsNotBendable;
|
||||
return Flag::IsSingleStreamed | Flag::IsMidiBased | Flag::IsNotBendable;
|
||||
}
|
||||
|
||||
QString CarlaInstrument::nodeName() const
|
||||
@@ -1015,7 +1015,7 @@ void CarlaParamsView::refreshKnobs()
|
||||
for (uint32_t i=0; i < m_carlaInstrument->m_paramModels.count(); ++i)
|
||||
{
|
||||
bool enabled = m_carlaInstrument->m_paramModels[i]->enabled();
|
||||
m_knobs.push_back(new Knob(knobDark_28, m_inputScrollAreaWidgetContent));
|
||||
m_knobs.push_back(new Knob(KnobType::Dark28, m_inputScrollAreaWidgetContent));
|
||||
QString name = (*m_carlaInstrument->m_paramModels[i]).displayName();
|
||||
m_knobs[i]->setHintText(name, "");
|
||||
m_knobs[i]->setLabel(name);
|
||||
|
||||
@@ -43,7 +43,7 @@ Plugin::Descriptor PLUGIN_EXPORT carlapatchbay_plugin_descriptor =
|
||||
"Carla Patchbay Instrument" ),
|
||||
"falkTX <falktx/at/falktx.com>",
|
||||
CARLA_VERSION_HEX,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -43,7 +43,7 @@ Plugin::Descriptor PLUGIN_EXPORT carlarack_plugin_descriptor =
|
||||
"Carla Rack Instrument" ),
|
||||
"falkTX <falktx/at/falktx.com>",
|
||||
CARLA_VERSION_HEX,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -43,7 +43,7 @@ Plugin::Descriptor PLUGIN_EXPORT compressor_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP("PluginBrowser", "A dynamic range compressor."),
|
||||
"Lost Robot <r94231@gmail.com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -442,28 +442,28 @@ bool CompressorEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frames)
|
||||
m_gainResult[i] = qMax(m_rangeVal, m_gainResult[i]);
|
||||
}
|
||||
|
||||
switch (stereoLink)
|
||||
switch (static_cast<StereoLinkMode>(stereoLink))
|
||||
{
|
||||
case Unlinked:
|
||||
case StereoLinkMode::Unlinked:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case Maximum:
|
||||
case StereoLinkMode::Maximum:
|
||||
{
|
||||
m_gainResult[0] = m_gainResult[1] = qMin(m_gainResult[0], m_gainResult[1]);
|
||||
break;
|
||||
}
|
||||
case Average:
|
||||
case StereoLinkMode::Average:
|
||||
{
|
||||
m_gainResult[0] = m_gainResult[1] = (m_gainResult[0] + m_gainResult[1]) * 0.5f;
|
||||
break;
|
||||
}
|
||||
case Minimum:
|
||||
case StereoLinkMode::Minimum:
|
||||
{
|
||||
m_gainResult[0] = m_gainResult[1] = qMax(m_gainResult[0], m_gainResult[1]);
|
||||
break;
|
||||
}
|
||||
case Blend:
|
||||
case StereoLinkMode::Blend:
|
||||
{
|
||||
if (blend > 0)// 0 is unlinked
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
inline int realmod(int k, int n);
|
||||
inline float realfmod(float k, float n);
|
||||
|
||||
enum StereoLinkModes { Unlinked, Maximum, Average, Minimum, Blend };
|
||||
enum class StereoLinkMode { Unlinked, Maximum, Average, Minimum, Blend };
|
||||
|
||||
std::vector<float> m_preLookaheadBuf[2];
|
||||
int m_preLookaheadBufLoc[2] = {0};
|
||||
|
||||
@@ -95,92 +95,92 @@ CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) :
|
||||
m_ratioEnabledLabel->setPixmap(PLUGIN_NAME::getIconPixmap("knob_enabled_large"));
|
||||
m_ratioEnabledLabel->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
|
||||
m_thresholdKnob = new Knob(knobStyled, this);
|
||||
m_thresholdKnob = new Knob(KnobType::Styled, this);
|
||||
makeLargeKnob(m_thresholdKnob, tr("Threshold:") , " dBFS");
|
||||
m_thresholdKnob->setModel(&controls->m_thresholdModel);
|
||||
m_thresholdKnob->setToolTip(tr("Volume at which the compression begins to take place"));
|
||||
|
||||
m_ratioKnob = new Knob(knobStyled, this);
|
||||
m_ratioKnob = new Knob(KnobType::Styled, this);
|
||||
makeLargeKnob(m_ratioKnob, tr("Ratio:") , ":1");
|
||||
m_ratioKnob->setModel(&controls->m_ratioModel);
|
||||
m_ratioKnob->setToolTip(tr("How far the compressor must turn the volume down after crossing the threshold"));
|
||||
|
||||
m_attackKnob = new Knob(knobStyled, this);
|
||||
m_attackKnob = new Knob(KnobType::Styled, this);
|
||||
makeLargeKnob(m_attackKnob, tr("Attack:") , " ms");
|
||||
m_attackKnob->setModel(&controls->m_attackModel);
|
||||
m_attackKnob->setToolTip(tr("Speed at which the compressor starts to compress the audio"));
|
||||
|
||||
m_releaseKnob = new Knob(knobStyled, this);
|
||||
m_releaseKnob = new Knob(KnobType::Styled, this);
|
||||
makeLargeKnob(m_releaseKnob, tr("Release:") , " ms");
|
||||
m_releaseKnob->setModel(&controls->m_releaseModel);
|
||||
m_releaseKnob->setToolTip(tr("Speed at which the compressor ceases to compress the audio"));
|
||||
|
||||
m_kneeKnob = new Knob(knobStyled, this);
|
||||
m_kneeKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_kneeKnob, tr("Knee:") , " dB");
|
||||
m_kneeKnob->setModel(&controls->m_kneeModel);
|
||||
m_kneeKnob->setToolTip(tr("Smooth out the gain reduction curve around the threshold"));
|
||||
|
||||
m_rangeKnob = new Knob(knobStyled, this);
|
||||
m_rangeKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_rangeKnob, tr("Range:") , " dBFS");
|
||||
m_rangeKnob->setModel(&controls->m_rangeModel);
|
||||
m_rangeKnob->setToolTip(tr("Maximum gain reduction"));
|
||||
|
||||
m_lookaheadLengthKnob = new Knob(knobStyled, this);
|
||||
m_lookaheadLengthKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_lookaheadLengthKnob, tr("Lookahead Length:") , " ms");
|
||||
m_lookaheadLengthKnob->setModel(&controls->m_lookaheadLengthModel);
|
||||
m_lookaheadLengthKnob->setToolTip(tr("How long the compressor has to react to the sidechain signal ahead of time"));
|
||||
|
||||
m_holdKnob = new Knob(knobStyled, this);
|
||||
m_holdKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_holdKnob, tr("Hold:") , " ms");
|
||||
m_holdKnob->setModel(&controls->m_holdModel);
|
||||
m_holdKnob->setToolTip(tr("Delay between attack and release stages"));
|
||||
|
||||
m_rmsKnob = new Knob(knobStyled, this);
|
||||
m_rmsKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_rmsKnob, tr("RMS Size:") , "");
|
||||
m_rmsKnob->setModel(&controls->m_rmsModel);
|
||||
m_rmsKnob->setToolTip(tr("Size of the RMS buffer"));
|
||||
|
||||
m_inBalanceKnob = new Knob(knobStyled, this);
|
||||
m_inBalanceKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_inBalanceKnob, tr("Input Balance:") , "");
|
||||
m_inBalanceKnob->setModel(&controls->m_inBalanceModel);
|
||||
m_inBalanceKnob->setToolTip(tr("Bias the input audio to the left/right or mid/side"));
|
||||
|
||||
m_outBalanceKnob = new Knob(knobStyled, this);
|
||||
m_outBalanceKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_outBalanceKnob, tr("Output Balance:") , "");
|
||||
m_outBalanceKnob->setModel(&controls->m_outBalanceModel);
|
||||
m_outBalanceKnob->setToolTip(tr("Bias the output audio to the left/right or mid/side"));
|
||||
|
||||
m_stereoBalanceKnob = new Knob(knobStyled, this);
|
||||
m_stereoBalanceKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_stereoBalanceKnob, tr("Stereo Balance:") , "");
|
||||
m_stereoBalanceKnob->setModel(&controls->m_stereoBalanceModel);
|
||||
m_stereoBalanceKnob->setToolTip(tr("Bias the sidechain signal to the left/right or mid/side"));
|
||||
|
||||
m_blendKnob = new Knob(knobStyled, this);
|
||||
m_blendKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_blendKnob, tr("Stereo Link Blend:") , "");
|
||||
m_blendKnob->setModel(&controls->m_blendModel);
|
||||
m_blendKnob->setToolTip(tr("Blend between unlinked/maximum/average/minimum stereo linking modes"));
|
||||
|
||||
m_tiltKnob = new Knob(knobStyled, this);
|
||||
m_tiltKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_tiltKnob, tr("Tilt Gain:") , " dB");
|
||||
m_tiltKnob->setModel(&controls->m_tiltModel);
|
||||
m_tiltKnob->setToolTip(tr("Bias the sidechain signal to the low or high frequencies. -6 db is lowpass, 6 db is highpass."));
|
||||
|
||||
m_tiltFreqKnob = new Knob(knobStyled, this);
|
||||
m_tiltFreqKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_tiltFreqKnob, tr("Tilt Frequency:") , " Hz");
|
||||
m_tiltFreqKnob->setModel(&controls->m_tiltFreqModel);
|
||||
m_tiltFreqKnob->setToolTip(tr("Center frequency of sidechain tilt filter"));
|
||||
|
||||
m_mixKnob = new Knob(knobStyled, this);
|
||||
m_mixKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_mixKnob, tr("Mix:") , "%");
|
||||
m_mixKnob->setModel(&controls->m_mixModel);
|
||||
m_mixKnob->setToolTip(tr("Balance between wet and dry signals"));
|
||||
|
||||
m_autoAttackKnob = new Knob(knobStyled, this);
|
||||
m_autoAttackKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_autoAttackKnob, tr("Auto Attack:") , "%");
|
||||
m_autoAttackKnob->setModel(&controls->m_autoAttackModel);
|
||||
m_autoAttackKnob->setToolTip(tr("Automatically control attack value depending on crest factor"));
|
||||
|
||||
m_autoReleaseKnob = new Knob(knobStyled, this);
|
||||
m_autoReleaseKnob = new Knob(KnobType::Styled, this);
|
||||
makeSmallKnob(m_autoReleaseKnob, tr("Auto Release:") , "%");
|
||||
m_autoReleaseKnob->setModel(&controls->m_autoReleaseModel);
|
||||
m_autoReleaseKnob->setToolTip(tr("Automatically control release value depending on crest factor"));
|
||||
|
||||
@@ -43,7 +43,7 @@ Plugin::Descriptor PLUGIN_EXPORT crossovereq_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "A 4-band Crossover Equalizer" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -46,19 +46,19 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro
|
||||
setFixedSize( 167, 178 );
|
||||
|
||||
// knobs
|
||||
auto xover12 = new Knob(knobBright_26, this);
|
||||
auto xover12 = new Knob(KnobType::Bright26, this);
|
||||
xover12->move( 29, 11 );
|
||||
xover12->setModel( & controls->m_xover12 );
|
||||
xover12->setLabel( "1/2" );
|
||||
xover12->setHintText( tr( "Band 1/2 crossover:" ), " Hz" );
|
||||
|
||||
auto xover23 = new Knob(knobBright_26, this);
|
||||
auto xover23 = new Knob(KnobType::Bright26, this);
|
||||
xover23->move( 69, 11 );
|
||||
xover23->setModel( & controls->m_xover23 );
|
||||
xover23->setLabel( "2/3" );
|
||||
xover23->setHintText( tr( "Band 2/3 crossover:" ), " Hz" );
|
||||
|
||||
auto xover34 = new Knob(knobBright_26, this);
|
||||
auto xover34 = new Knob(KnobType::Bright26, this);
|
||||
xover34->move( 109, 11 );
|
||||
xover34->setModel( & controls->m_xover34 );
|
||||
xover34->setLabel( "3/4" );
|
||||
@@ -90,22 +90,22 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro
|
||||
gain4->setHintText( tr( "Band 4 gain:" ), " dBFS" );
|
||||
|
||||
// leds
|
||||
auto mute1 = new LedCheckBox("", this, tr("Band 1 mute"), LedCheckBox::Green);
|
||||
auto mute1 = new LedCheckBox("", this, tr("Band 1 mute"), LedCheckBox::LedColor::Green);
|
||||
mute1->move( 15, 154 );
|
||||
mute1->setModel( & controls->m_mute1 );
|
||||
mute1->setToolTip(tr("Mute band 1"));
|
||||
|
||||
auto mute2 = new LedCheckBox("", this, tr("Band 2 mute"), LedCheckBox::Green);
|
||||
auto mute2 = new LedCheckBox("", this, tr("Band 2 mute"), LedCheckBox::LedColor::Green);
|
||||
mute2->move( 55, 154 );
|
||||
mute2->setModel( & controls->m_mute2 );
|
||||
mute2->setToolTip(tr("Mute band 2"));
|
||||
|
||||
auto mute3 = new LedCheckBox("", this, tr("Band 3 mute"), LedCheckBox::Green);
|
||||
auto mute3 = new LedCheckBox("", this, tr("Band 3 mute"), LedCheckBox::LedColor::Green);
|
||||
mute3->move( 95, 154 );
|
||||
mute3->setModel( & controls->m_mute3 );
|
||||
mute3->setToolTip(tr("Mute band 3"));
|
||||
|
||||
auto mute4 = new LedCheckBox("", this, tr("Band 4 mute"), LedCheckBox::Green);
|
||||
auto mute4 = new LedCheckBox("", this, tr("Band 4 mute"), LedCheckBox::LedColor::Green);
|
||||
mute4->move( 135, 154 );
|
||||
mute4->setModel( & controls->m_mute4 );
|
||||
mute4->setToolTip(tr("Mute band 4"));
|
||||
|
||||
@@ -44,28 +44,28 @@ DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) :
|
||||
setPalette( pal );
|
||||
setFixedSize( 300, 208 );
|
||||
|
||||
auto sampleDelayKnob = new TempoSyncKnob(knobBright_26, this);
|
||||
auto sampleDelayKnob = new TempoSyncKnob(KnobType::Bright26, this);
|
||||
sampleDelayKnob->move( 10,14 );
|
||||
sampleDelayKnob->setVolumeKnob( false );
|
||||
sampleDelayKnob->setModel( &controls->m_delayTimeModel );
|
||||
sampleDelayKnob->setLabel( tr( "DELAY" ) );
|
||||
sampleDelayKnob->setHintText( tr( "Delay time" ) + " ", " s" );
|
||||
|
||||
auto feedbackKnob = new Knob(knobBright_26, this);
|
||||
auto feedbackKnob = new Knob(KnobType::Bright26, this);
|
||||
feedbackKnob->move( 11, 58 );
|
||||
feedbackKnob->setVolumeKnob( true) ;
|
||||
feedbackKnob->setModel( &controls->m_feedbackModel);
|
||||
feedbackKnob->setLabel( tr( "FDBK" ) );
|
||||
feedbackKnob->setHintText( tr ( "Feedback amount" ) + " " , "" );
|
||||
|
||||
auto lfoFreqKnob = new TempoSyncKnob(knobBright_26, this);
|
||||
auto lfoFreqKnob = new TempoSyncKnob(KnobType::Bright26, this);
|
||||
lfoFreqKnob->move( 11, 119 );
|
||||
lfoFreqKnob->setVolumeKnob( false );
|
||||
lfoFreqKnob->setModel( &controls->m_lfoTimeModel );
|
||||
lfoFreqKnob->setLabel( tr( "RATE" ) );
|
||||
lfoFreqKnob->setHintText( tr ( "LFO frequency") + " ", " s" );
|
||||
|
||||
auto lfoAmtKnob = new TempoSyncKnob(knobBright_26, this);
|
||||
auto lfoAmtKnob = new TempoSyncKnob(KnobType::Bright26, this);
|
||||
lfoAmtKnob->move( 11, 159 );
|
||||
lfoAmtKnob->setVolumeKnob( false );
|
||||
lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
|
||||
|
||||
@@ -44,7 +44,7 @@ Plugin::Descriptor PLUGIN_EXPORT delay_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "A native delay plugin" ),
|
||||
"Dave French <contact/dot/dave/dot/french3/at/googlemail/dot/com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -40,7 +40,7 @@ Plugin::Descriptor PLUGIN_EXPORT dispersion_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP("PluginBrowser", "An all-pass filter allowing for extremely high orders."),
|
||||
"Lost Robot <r94231/at/gmail/dot/com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr
|
||||
|
||||
@@ -51,19 +51,19 @@ DispersionControlDialog::DispersionControlDialog(DispersionControls* controls) :
|
||||
m_amountBox->setLabel(tr("AMOUNT"));
|
||||
m_amountBox->setToolTip(tr("Number of all-pass filters"));
|
||||
|
||||
Knob * freqKnob = new Knob(knobBright_26, this);
|
||||
Knob * freqKnob = new Knob(KnobType::Bright26, this);
|
||||
freqKnob->move(59, 8);
|
||||
freqKnob->setModel(&controls->m_freqModel);
|
||||
freqKnob->setLabel(tr("FREQ"));
|
||||
freqKnob->setHintText(tr("Frequency:") , " Hz");
|
||||
|
||||
Knob * resoKnob = new Knob(knobBright_26, this);
|
||||
Knob * resoKnob = new Knob(KnobType::Bright26, this);
|
||||
resoKnob->move(99, 8);
|
||||
resoKnob->setModel(&controls->m_resoModel);
|
||||
resoKnob->setLabel(tr("RESO"));
|
||||
resoKnob->setHintText(tr("Resonance:") , " octaves");
|
||||
|
||||
Knob * feedbackKnob = new Knob(knobBright_26, this);
|
||||
Knob * feedbackKnob = new Knob(KnobType::Bright26, this);
|
||||
feedbackKnob->move(139, 8);
|
||||
feedbackKnob->setModel(&controls->m_feedbackModel);
|
||||
feedbackKnob->setLabel(tr("FEED"));
|
||||
|
||||
@@ -43,7 +43,7 @@ Plugin::Descriptor PLUGIN_EXPORT dualfilter_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "A Dual filter plugin" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -90,12 +90,12 @@ bool DualFilterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
|
||||
|
||||
if( m_dfControls.m_filter1Model.isValueChanged() || m_filter1changed )
|
||||
{
|
||||
m_filter1->setFilterType( m_dfControls.m_filter1Model.value() );
|
||||
m_filter1->setFilterType( static_cast<BasicFilters<2>::FilterType>(m_dfControls.m_filter1Model.value()) );
|
||||
m_filter1changed = true;
|
||||
}
|
||||
if( m_dfControls.m_filter2Model.isValueChanged() || m_filter2changed )
|
||||
{
|
||||
m_filter2->setFilterType( m_dfControls.m_filter2Model.value() );
|
||||
m_filter2->setFilterType( static_cast<BasicFilters<2>::FilterType>(m_dfControls.m_filter2Model.value()) );
|
||||
m_filter2changed = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace lmms::gui
|
||||
|
||||
|
||||
#define makeknob( name, x, y, model, label, hint, unit ) \
|
||||
Knob * name = new Knob( knobBright_26, this); \
|
||||
Knob * name = new Knob( KnobType::Bright26, this); \
|
||||
(name) -> move( x, y ); \
|
||||
(name) ->setModel( &controls-> model ); \
|
||||
(name) ->setLabel( label ); \
|
||||
@@ -64,8 +64,8 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls )
|
||||
gain1Knob-> setVolumeKnob( true );
|
||||
gain2Knob-> setVolumeKnob( true );
|
||||
|
||||
auto enabled1Toggle = new LedCheckBox("", this, tr("Filter 1 enabled"), LedCheckBox::Green);
|
||||
auto enabled2Toggle = new LedCheckBox("", this, tr("Filter 2 enabled"), LedCheckBox::Green);
|
||||
auto enabled1Toggle = new LedCheckBox("", this, tr("Filter 1 enabled"), LedCheckBox::LedColor::Green);
|
||||
auto enabled2Toggle = new LedCheckBox("", this, tr("Filter 2 enabled"), LedCheckBox::LedColor::Green);
|
||||
|
||||
enabled1Toggle -> move( 12, 11 );
|
||||
enabled1Toggle -> setModel( &controls -> m_enabled1Model );
|
||||
|
||||
@@ -47,7 +47,7 @@ Plugin::Descriptor PLUGIN_EXPORT dynamicsprocessor_plugin_descriptor =
|
||||
"plugin for processing dynamics in a flexible way" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -167,19 +167,19 @@ bool DynProcEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
}
|
||||
|
||||
// account for stereo mode
|
||||
switch( stereoMode )
|
||||
switch( static_cast<DynProcControls::StereoMode>(stereoMode) )
|
||||
{
|
||||
case DynProcControls::SM_Maximum:
|
||||
case DynProcControls::StereoMode::Maximum:
|
||||
{
|
||||
sm_peak[0] = sm_peak[1] = qMax( m_currentPeak[0], m_currentPeak[1] );
|
||||
break;
|
||||
}
|
||||
case DynProcControls::SM_Average:
|
||||
case DynProcControls::StereoMode::Average:
|
||||
{
|
||||
sm_peak[0] = sm_peak[1] = ( m_currentPeak[0] + m_currentPeak[1] ) * 0.5;
|
||||
break;
|
||||
}
|
||||
case DynProcControls::SM_Unlinked:
|
||||
case DynProcControls::StereoMode::Unlinked:
|
||||
{
|
||||
sm_peak[0] = m_currentPeak[0];
|
||||
sm_peak[1] = m_currentPeak[1];
|
||||
|
||||
@@ -47,7 +47,7 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
setPalette( pal );
|
||||
setFixedSize( 224, 319 );
|
||||
|
||||
auto waveGraph = new Graph(this, Graph::LinearNonCyclicStyle, 204, 205);
|
||||
auto waveGraph = new Graph(this, Graph::Style::LinearNonCyclic, 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 );
|
||||
|
||||
auto inputKnob = new Knob(knobBright_26, this);
|
||||
auto inputKnob = new Knob(KnobType::Bright26, this);
|
||||
inputKnob -> setVolumeKnob( true );
|
||||
inputKnob -> setVolumeRatio( 1.0 );
|
||||
inputKnob -> move( 26, 223 );
|
||||
@@ -66,7 +66,7 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
inputKnob->setLabel( tr( "INPUT" ) );
|
||||
inputKnob->setHintText( tr( "Input gain:" ) , "" );
|
||||
|
||||
auto outputKnob = new Knob(knobBright_26, this);
|
||||
auto outputKnob = new Knob(KnobType::Bright26, this);
|
||||
outputKnob -> setVolumeKnob( true );
|
||||
outputKnob -> setVolumeRatio( 1.0 );
|
||||
outputKnob -> move( 76, 223 );
|
||||
@@ -74,13 +74,13 @@ DynProcControlDialog::DynProcControlDialog(
|
||||
outputKnob->setLabel( tr( "OUTPUT" ) );
|
||||
outputKnob->setHintText( tr( "Output gain:" ) , "" );
|
||||
|
||||
auto attackKnob = new Knob(knobBright_26, this);
|
||||
auto attackKnob = new Knob(KnobType::Bright26, this);
|
||||
attackKnob -> move( 24, 268 );
|
||||
attackKnob->setModel( &_controls->m_attackModel );
|
||||
attackKnob->setLabel( tr( "ATTACK" ) );
|
||||
attackKnob->setHintText( tr( "Peak attack time:" ) , "ms" );
|
||||
|
||||
auto releaseKnob = new Knob(knobBright_26, this);
|
||||
auto releaseKnob = new Knob(KnobType::Bright26, this);
|
||||
releaseKnob -> move( 74, 268 );
|
||||
releaseKnob->setModel( &_controls->m_releaseModel );
|
||||
releaseKnob->setLabel( tr( "RELEASE" ) );
|
||||
|
||||
@@ -41,12 +41,11 @@ class DynProcControls : public EffectControls
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum StereoModes
|
||||
enum class StereoMode
|
||||
{
|
||||
SM_Maximum,
|
||||
SM_Average,
|
||||
SM_Unlinked,
|
||||
NumStereoModes
|
||||
Maximum,
|
||||
Average,
|
||||
Unlinked
|
||||
};
|
||||
DynProcControls( DynProcEffect * _eff );
|
||||
~DynProcControls() override = default;
|
||||
|
||||
@@ -106,14 +106,14 @@ EqControlsDialog::EqControlsDialog( EqControls *controls ) :
|
||||
distance = 81;
|
||||
for( int i = 0; i < m_parameterWidget->bandCount() ; i++ )
|
||||
{
|
||||
auto resKnob = new Knob(knobBright_26, this);
|
||||
auto resKnob = new Knob(KnobType::Bright26, 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 : " ) , "" ); }
|
||||
|
||||
auto freqKnob = new Knob(knobBright_26, this);
|
||||
auto freqKnob = new Knob(KnobType::Bright26, this);
|
||||
freqKnob->move( distance, 396 );
|
||||
freqKnob->setVolumeKnob( false );
|
||||
freqKnob->setModel( m_parameterWidget->getBandModels( i )->freq );
|
||||
|
||||
@@ -137,7 +137,7 @@ void EqHandle::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QRectF textRect2 = QRectF ( rectX+1, rectY+1, 80, 30 );
|
||||
QString freq = QString::number( xPixelToFreq( EqHandle::x(), m_width ) );
|
||||
QString res;
|
||||
if ( getType() != para )
|
||||
if ( getType() != EqHandleType::Para )
|
||||
{
|
||||
res = tr( "Reso: ") + QString::number( getResonance() );
|
||||
}
|
||||
@@ -171,11 +171,11 @@ QPainterPath EqHandle::getCurvePath()
|
||||
float y = m_heigth * 0.5;
|
||||
for ( float x = 0 ; x < m_width; x++ )
|
||||
{
|
||||
if ( m_type == highpass ) y = getLowCutCurve( x );
|
||||
if ( m_type == lowshelf ) y = getLowShelfCurve( x );
|
||||
if ( m_type == para ) y = getPeakCurve( x );
|
||||
if ( m_type == highshelf ) y = getHighShelfCurve( x );
|
||||
if ( m_type == lowpass ) y = getHighCutCurve( x );
|
||||
if ( m_type == EqHandleType::HighPass ) y = getLowCutCurve( x );
|
||||
if ( m_type == EqHandleType::LowShelf ) y = getLowShelfCurve( x );
|
||||
if ( m_type == EqHandleType::Para ) y = getPeakCurve( x );
|
||||
if ( m_type == EqHandleType::HighShelf ) y = getHighShelfCurve( x );
|
||||
if ( m_type == EqHandleType::LowPass ) y = getHighCutCurve( x );
|
||||
if ( x == 0 ) path.moveTo( x, y ); // sets the begin of Path
|
||||
path.lineTo( x, y );
|
||||
}
|
||||
@@ -410,7 +410,7 @@ int EqHandle::getNum()
|
||||
|
||||
|
||||
|
||||
void EqHandle::setType( int t )
|
||||
void EqHandle::setType( EqHandleType t )
|
||||
{
|
||||
EqHandle::m_type = t;
|
||||
}
|
||||
@@ -442,7 +442,7 @@ void EqHandle::setMouseHover( bool d )
|
||||
|
||||
|
||||
|
||||
int EqHandle::getType()
|
||||
EqHandleType EqHandle::getType()
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
@@ -569,7 +569,7 @@ void EqHandle::mouseReleaseEvent( QGraphicsSceneMouseEvent *event )
|
||||
void EqHandle::wheelEvent( QGraphicsSceneWheelEvent *wevent )
|
||||
{
|
||||
float highestBandwich;
|
||||
if( m_type != para )
|
||||
if( m_type != EqHandleType::Para )
|
||||
{
|
||||
highestBandwich = 10;
|
||||
}
|
||||
@@ -631,7 +631,7 @@ QVariant EqHandle::itemChange( QGraphicsItem::GraphicsItemChange change, const Q
|
||||
if( change == ItemPositionChange )
|
||||
{
|
||||
// pass filter don't move in y direction
|
||||
if ( m_type == highpass || m_type == lowpass )
|
||||
if ( m_type == EqHandleType::HighPass || m_type == EqHandleType::LowPass )
|
||||
{
|
||||
float newX = value.toPointF().x();
|
||||
if( newX < 0 )
|
||||
@@ -714,23 +714,23 @@ void EqCurve::paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
{
|
||||
for ( int x = 0; x < m_width ; x=x+1 )
|
||||
{
|
||||
if ( m_handle->at( thatHandle )->getType() == highpass )
|
||||
if ( m_handle->at( thatHandle )->getType() == EqHandleType::HighPass )
|
||||
{
|
||||
mainCurve[x]= ( mainCurve[x] + ( m_handle->at( thatHandle )->getLowCutCurve( x ) * ( activeHandles ) ) - ( ( activeHandles * ( m_heigth/2 ) ) - m_heigth ) );
|
||||
}
|
||||
if ( m_handle->at(thatHandle)->getType() == lowshelf )
|
||||
if ( m_handle->at(thatHandle)->getType() == EqHandleType::LowShelf )
|
||||
{
|
||||
mainCurve[x]= ( mainCurve[x] + ( m_handle->at( thatHandle )->getLowShelfCurve( x ) * ( activeHandles ) ) - ( ( activeHandles * ( m_heigth/2 ) ) - m_heigth ) );
|
||||
}
|
||||
if ( m_handle->at( thatHandle )->getType() == para )
|
||||
if ( m_handle->at( thatHandle )->getType() == EqHandleType::Para )
|
||||
{
|
||||
mainCurve[x]= ( mainCurve[x] + ( m_handle->at( thatHandle )->getPeakCurve( x ) * ( activeHandles ) ) - ( ( activeHandles * ( m_heigth/2 ) ) - m_heigth ) );
|
||||
}
|
||||
if ( m_handle->at( thatHandle )->getType() == highshelf )
|
||||
if ( m_handle->at( thatHandle )->getType() == EqHandleType::HighShelf )
|
||||
{
|
||||
mainCurve[x]= ( mainCurve[x] + ( m_handle->at( thatHandle )->getHighShelfCurve( x ) * ( activeHandles ) ) - ( ( activeHandles * ( m_heigth/2 ) ) - m_heigth ) );
|
||||
}
|
||||
if ( m_handle->at(thatHandle)->getType() == lowpass )
|
||||
if ( m_handle->at(thatHandle)->getType() == EqHandleType::LowPass )
|
||||
{
|
||||
mainCurve[x]= ( mainCurve[x] + ( m_handle->at( thatHandle )->getHighCutCurve( x ) * ( activeHandles ) ) - ( ( activeHandles * ( m_heigth/2 ) ) - m_heigth ) );
|
||||
}
|
||||
|
||||
@@ -32,12 +32,12 @@ namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
enum{
|
||||
highpass=1,
|
||||
lowshelf,
|
||||
para,
|
||||
highshelf,
|
||||
lowpass
|
||||
enum class EqHandleType {
|
||||
HighPass=1,
|
||||
LowShelf,
|
||||
Para,
|
||||
HighShelf,
|
||||
LowPass
|
||||
};
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ public:
|
||||
float getHighCutCurve( float x );
|
||||
float getResonance();
|
||||
int getNum();
|
||||
int getType();
|
||||
void setType( int t );
|
||||
EqHandleType getType();
|
||||
void setType( EqHandleType t );
|
||||
void setResonance( float r );
|
||||
bool isMouseHover();
|
||||
void setMouseHover( bool d );
|
||||
@@ -104,7 +104,8 @@ private:
|
||||
bool m_lp24;
|
||||
bool m_lp48;
|
||||
bool m_mouseHover;
|
||||
int m_type, m_numb;
|
||||
EqHandleType m_type;
|
||||
int m_numb;
|
||||
float m_width, m_heigth;
|
||||
float m_resonance;
|
||||
bool m_mousePressed;
|
||||
|
||||
@@ -44,7 +44,7 @@ Plugin::Descriptor PLUGIN_EXPORT eq_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "A native eq plugin" ),
|
||||
"Dave French <contact/dot/dave/dot/french3/at/googlemail/dot/com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -164,35 +164,35 @@ void EqParameterWidget::changeHandle( int i )
|
||||
switch ( i )
|
||||
{
|
||||
case 0 :
|
||||
m_handleList->at( i )->setType( highpass );
|
||||
m_handleList->at( i )->setType( EqHandleType::HighPass );
|
||||
m_handleList->at( i )->setPos( x, m_displayHeigth / 2 );
|
||||
break;
|
||||
case 1:
|
||||
m_handleList->at( i )->setType( lowshelf );
|
||||
m_handleList->at( i )->setType( EqHandleType::LowShelf );
|
||||
m_handleList->at( i )->setPos( x, y );
|
||||
break;
|
||||
case 2:
|
||||
m_handleList->at( i )->setType( para );
|
||||
m_handleList->at( i )->setType( EqHandleType::Para );
|
||||
m_handleList->at( i )->setPos( x, y );
|
||||
break;
|
||||
case 3:
|
||||
m_handleList->at( i )->setType( para );
|
||||
m_handleList->at( i )->setType( EqHandleType::Para );
|
||||
m_handleList->at( i )->setPos( x, y );
|
||||
break;
|
||||
case 4:
|
||||
m_handleList->at( i )->setType( para );
|
||||
m_handleList->at( i )->setType( EqHandleType::Para );
|
||||
m_handleList->at( i )->setPos( x, y );
|
||||
break;
|
||||
case 5:
|
||||
m_handleList->at( i )->setType( para );
|
||||
m_handleList->at( i )->setType( EqHandleType::Para );
|
||||
m_handleList->at( i )->setPos( x, y );
|
||||
break;
|
||||
case 6:
|
||||
m_handleList->at( i )->setType( highshelf );
|
||||
m_handleList->at( i )->setType( EqHandleType::HighShelf );
|
||||
m_handleList->at( i )->setPos( x, y );
|
||||
break;
|
||||
case 7:
|
||||
m_handleList->at( i )->setType( lowpass );
|
||||
m_handleList->at( i )->setType( EqHandleType::LowPass );
|
||||
m_handleList->at( i )->setPos( QPointF( x, m_displayHeigth / 2 ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -42,42 +42,42 @@ FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) :
|
||||
setPalette( pal );
|
||||
setFixedSize( 233, 75 );
|
||||
|
||||
auto delayKnob = new Knob(knobBright_26, this);
|
||||
auto delayKnob = new Knob(KnobType::Bright26, this);
|
||||
delayKnob->move( 10,10 );
|
||||
delayKnob->setVolumeKnob( false );
|
||||
delayKnob->setModel( &controls->m_delayTimeModel );
|
||||
delayKnob->setLabel( tr( "DELAY" ) );
|
||||
delayKnob->setHintText( tr( "Delay time:" ) + " ", "s" );
|
||||
|
||||
auto lfoFreqKnob = new TempoSyncKnob(knobBright_26, this);
|
||||
auto lfoFreqKnob = new TempoSyncKnob(KnobType::Bright26, this);
|
||||
lfoFreqKnob->move( 48,10 );
|
||||
lfoFreqKnob->setVolumeKnob( false );
|
||||
lfoFreqKnob->setModel( &controls->m_lfoFrequencyModel );
|
||||
lfoFreqKnob->setLabel( tr( "RATE" ) );
|
||||
lfoFreqKnob->setHintText( tr( "Period:" ) , " Sec" );
|
||||
|
||||
auto lfoAmtKnob = new Knob(knobBright_26, this);
|
||||
auto lfoAmtKnob = new Knob(KnobType::Bright26, this);
|
||||
lfoAmtKnob->move( 85,10 );
|
||||
lfoAmtKnob->setVolumeKnob( false );
|
||||
lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
|
||||
lfoAmtKnob->setLabel( tr( "AMNT" ) );
|
||||
lfoAmtKnob->setHintText( tr( "Amount:" ) , "" );
|
||||
|
||||
auto lfoPhaseKnob = new Knob(knobBright_26, this);
|
||||
auto lfoPhaseKnob = new Knob(KnobType::Bright26, this);
|
||||
lfoPhaseKnob->move( 123,10 );
|
||||
lfoPhaseKnob->setVolumeKnob( false );
|
||||
lfoPhaseKnob->setModel( &controls->m_lfoPhaseModel );
|
||||
lfoPhaseKnob->setLabel( tr( "PHASE" ) );
|
||||
lfoPhaseKnob->setHintText( tr( "Phase:" ) , " degrees" );
|
||||
|
||||
auto feedbackKnob = new Knob(knobBright_26, this);
|
||||
auto feedbackKnob = new Knob(KnobType::Bright26, this);
|
||||
feedbackKnob->move( 160,10 );
|
||||
feedbackKnob->setVolumeKnob( true) ;
|
||||
feedbackKnob->setModel( &controls->m_feedbackModel );
|
||||
feedbackKnob->setLabel( tr( "FDBK" ) );
|
||||
feedbackKnob->setHintText( tr( "Feedback amount:" ) , "" );
|
||||
|
||||
auto whiteNoiseKnob = new Knob(knobBright_26, this);
|
||||
auto whiteNoiseKnob = new Knob(KnobType::Bright26, this);
|
||||
whiteNoiseKnob->move( 196,10 );
|
||||
whiteNoiseKnob->setVolumeKnob( true) ;
|
||||
whiteNoiseKnob->setModel( &controls->m_whiteNoiseAmountModel );
|
||||
|
||||
@@ -45,7 +45,7 @@ Plugin::Descriptor PLUGIN_EXPORT flanger_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "A native flanger plugin" ),
|
||||
"Dave French <contact/dot/dave/dot/french3/at/googlemail/dot/com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -63,7 +63,7 @@ Plugin::Descriptor PLUGIN_EXPORT freeboy_plugin_descriptor =
|
||||
"Attila Herman <attila589/at/gmail.com>"
|
||||
"Csaba Hruska <csaba.hruska/at/gmail.com>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
} ;
|
||||
@@ -446,7 +446,7 @@ class FreeBoyKnob : public Knob
|
||||
{
|
||||
public:
|
||||
FreeBoyKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
Knob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 30, 30 );
|
||||
setCenterPointX( 15.0 );
|
||||
@@ -677,7 +677,7 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument,
|
||||
|
||||
|
||||
m_graph = new Graph( this );
|
||||
m_graph->setGraphStyle( Graph::NearestStyle );
|
||||
m_graph->setGraphStyle( Graph::Style::Nearest );
|
||||
m_graph->setGraphColor( QColor(0x4E, 0x83, 0x2B) );
|
||||
m_graph->move( 37, 199 );
|
||||
m_graph->resize(208, 47);
|
||||
|
||||
@@ -69,7 +69,7 @@ Plugin::Descriptor PLUGIN_EXPORT gigplayer_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "Player for GIG files" ),
|
||||
"Garrett Wilson <g/at/floft/dot/net>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"gig",
|
||||
nullptr,
|
||||
@@ -108,8 +108,8 @@ GigInstrument::GigInstrument( InstrumentTrack * _instrument_track ) :
|
||||
GigInstrument::~GigInstrument()
|
||||
{
|
||||
Engine::audioEngine()->removePlayHandlesOfTypes( instrumentTrack(),
|
||||
PlayHandle::TypeNotePlayHandle
|
||||
| PlayHandle::TypeInstrumentPlayHandle );
|
||||
PlayHandle::Type::NotePlayHandle
|
||||
| PlayHandle::Type::InstrumentPlayHandle );
|
||||
freeInstance();
|
||||
}
|
||||
|
||||
@@ -341,16 +341,16 @@ void GigInstrument::play( sampleFrame * _working_buffer )
|
||||
for( QList<GigNote>::iterator it = m_notes.begin(); it != m_notes.end(); ++it )
|
||||
{
|
||||
// Process notes in the KeyUp state, adding release samples if desired
|
||||
if( it->state == KeyUp )
|
||||
if( it->state == GigState::KeyUp )
|
||||
{
|
||||
// If there are no samples, we're done
|
||||
if( it->samples.empty() )
|
||||
{
|
||||
it->state = Completed;
|
||||
it->state = GigState::Completed;
|
||||
}
|
||||
else
|
||||
{
|
||||
it->state = PlayingKeyUp;
|
||||
it->state = GigState::PlayingKeyUp;
|
||||
|
||||
// Notify each sample that the key has been released
|
||||
for (auto& sample : it->samples)
|
||||
@@ -366,9 +366,9 @@ void GigInstrument::play( sampleFrame * _working_buffer )
|
||||
}
|
||||
}
|
||||
// Process notes in the KeyDown state, adding samples for the notes
|
||||
else if( it->state == KeyDown )
|
||||
else if( it->state == GigState::KeyDown )
|
||||
{
|
||||
it->state = PlayingKeyDown;
|
||||
it->state = GigState::PlayingKeyDown;
|
||||
addSamples( *it, false );
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ void GigInstrument::play( sampleFrame * _working_buffer )
|
||||
}
|
||||
|
||||
// Delete ended notes (either in the completed state or all the samples ended)
|
||||
if( it->state == Completed || it->samples.empty() )
|
||||
if( it->state == GigState::Completed || it->samples.empty() )
|
||||
{
|
||||
it = m_notes.erase( it );
|
||||
|
||||
@@ -408,7 +408,7 @@ void GigInstrument::play( sampleFrame * _working_buffer )
|
||||
for (auto& note : m_notes)
|
||||
{
|
||||
// Only process the notes if we're in a playing state
|
||||
if (!(note.state == PlayingKeyDown || note.state == PlayingKeyUp ))
|
||||
if (!(note.state == GigState::PlayingKeyDown || note.state == GigState::PlayingKeyUp ))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -680,9 +680,9 @@ void GigInstrument::deleteNotePluginData( NotePlayHandle * _n )
|
||||
for (auto& note : m_notes)
|
||||
{
|
||||
// Find the note by matching pointers to the plugin data
|
||||
if (note.handle == pluginData && (note.state == KeyDown || note.state == PlayingKeyDown))
|
||||
if (note.handle == pluginData && (note.state == GigState::KeyDown || note.state == GigState::PlayingKeyDown))
|
||||
{
|
||||
note.state = KeyUp;
|
||||
note.state = GigState::KeyUp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -906,7 +906,7 @@ class gigKnob : public Knob
|
||||
{
|
||||
public:
|
||||
gigKnob( QWidget * _parent ) :
|
||||
Knob( knobBright_26, _parent )
|
||||
Knob( KnobType::Bright26, _parent )
|
||||
{
|
||||
setFixedSize( 31, 38 );
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
|
||||
|
||||
// What portion of a note are we in?
|
||||
enum GigState
|
||||
enum class GigState
|
||||
{
|
||||
// We just pressed the key
|
||||
KeyDown,
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
|
||||
GigNote( int midiNote, int velocity, float frequency, GIGPluginData * handle )
|
||||
: midiNote( midiNote ), velocity( velocity ),
|
||||
release( false ), isRelease( false ), state( KeyDown ),
|
||||
release( false ), isRelease( false ), state( GigState::KeyDown ),
|
||||
frequency( frequency ), handle( handle )
|
||||
{
|
||||
}
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
|
||||
Flags flags() const override
|
||||
{
|
||||
return IsSingleStreamed|IsNotBendable;
|
||||
return Flag::IsSingleStreamed | Flag::IsNotBendable;
|
||||
}
|
||||
|
||||
gui::PluginView* instantiateView( QWidget * _parent ) override;
|
||||
|
||||
@@ -30,7 +30,7 @@ Plugin::Descriptor PLUGIN_EXPORT hydrogenimport_plugin_descriptor =
|
||||
"Filter for importing Hydrogen files into LMMS" ),
|
||||
"frank mather",
|
||||
0x0100,
|
||||
Plugin::ImportFilter,
|
||||
Plugin::Type::ImportFilter,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -42,7 +42,7 @@ QString filename;
|
||||
class NoteKey
|
||||
{
|
||||
public:
|
||||
enum Key {
|
||||
enum class Key {
|
||||
C = 0,
|
||||
Cs,
|
||||
D,
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
|
||||
static int stringToNoteKey( const QString& str )
|
||||
{
|
||||
int m_key = NoteKey::C;
|
||||
auto m_key = Key::C;
|
||||
|
||||
|
||||
QString sKey = str.left( str.length() - 1 );
|
||||
@@ -74,54 +74,54 @@ public:
|
||||
|
||||
if ( sKey == "C" )
|
||||
{
|
||||
m_key = NoteKey::C;
|
||||
m_key = Key::C;
|
||||
}
|
||||
else if ( sKey == "Cs" )
|
||||
{
|
||||
m_key = NoteKey::Cs;
|
||||
m_key = Key::Cs;
|
||||
}
|
||||
else if ( sKey == "D" )
|
||||
{
|
||||
m_key = NoteKey::D;
|
||||
m_key = Key::D;
|
||||
}
|
||||
else if ( sKey == "Ef" )
|
||||
{
|
||||
m_key = NoteKey::Ef;
|
||||
m_key = Key::Ef;
|
||||
}
|
||||
else if ( sKey == "E" )
|
||||
{
|
||||
m_key = NoteKey::E;
|
||||
m_key = Key::E;
|
||||
}
|
||||
else if ( sKey == "F" )
|
||||
{
|
||||
m_key = NoteKey::F;
|
||||
m_key = Key::F;
|
||||
}
|
||||
else if ( sKey == "Fs" )
|
||||
{
|
||||
m_key = NoteKey::Fs;
|
||||
m_key = Key::Fs;
|
||||
}
|
||||
else if ( sKey == "G" )
|
||||
{
|
||||
m_key = NoteKey::G;
|
||||
m_key = Key::G;
|
||||
}
|
||||
else if ( sKey == "Af" )
|
||||
{
|
||||
m_key = NoteKey::Af;
|
||||
m_key = Key::Af;
|
||||
}
|
||||
else if ( sKey == "A" )
|
||||
{
|
||||
m_key = NoteKey::A;
|
||||
m_key = Key::A;
|
||||
}
|
||||
else if ( sKey == "Bf" )
|
||||
{
|
||||
m_key = NoteKey::Bf;
|
||||
m_key = Key::Bf;
|
||||
}
|
||||
else if ( sKey == "B" ) {
|
||||
m_key = NoteKey::B;
|
||||
m_key = Key::B;
|
||||
}
|
||||
|
||||
// Hydrogen records MIDI notes from C-1 to B5, and exports them as a number ranging from -3 to 3
|
||||
return m_key + ((nOctave + 3) * 12);
|
||||
return static_cast<int>(m_key) + ((nOctave + 3) * 12);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -218,7 +218,7 @@ bool HydrogenImport::readSong()
|
||||
if ( nLayer == 0 )
|
||||
{
|
||||
drum_track[sId] = static_cast<InstrumentTrack*>(
|
||||
Track::create(Track::InstrumentTrack, Engine::patternStore())
|
||||
Track::create(Track::Type::Instrument, Engine::patternStore())
|
||||
);
|
||||
drum_track[sId]->volumeModel()->setValue( fVolume * 100 );
|
||||
drum_track[sId]->panningModel()->setValue( ( fPan_R - fPan_L ) * 100 );
|
||||
|
||||
@@ -54,7 +54,7 @@ Plugin::Descriptor PLUGIN_EXPORT kicker_plugin_descriptor =
|
||||
"Versatile drum synthesizer" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -226,7 +226,7 @@ class KickerKnob : public Knob
|
||||
{
|
||||
public:
|
||||
KickerKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
Knob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 29, 29 );
|
||||
setObjectName( "smallKnob" );
|
||||
@@ -238,7 +238,7 @@ class KickerEnvKnob : public TempoSyncKnob
|
||||
{
|
||||
public:
|
||||
KickerEnvKnob( QWidget * _parent ) :
|
||||
TempoSyncKnob( knobStyled, _parent )
|
||||
TempoSyncKnob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 29, 29 );
|
||||
setObjectName( "smallKnob" );
|
||||
@@ -250,7 +250,7 @@ class KickerLargeKnob : public Knob
|
||||
{
|
||||
public:
|
||||
KickerLargeKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
Knob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 34, 34 );
|
||||
setObjectName( "largeKnob" );
|
||||
@@ -315,10 +315,10 @@ KickerInstrumentView::KickerInstrumentView( Instrument * _instrument,
|
||||
m_distEndKnob->setHintText( tr( "End distortion:" ), "" );
|
||||
m_distEndKnob->move( COL5, ROW2 );
|
||||
|
||||
m_startNoteToggle = new LedCheckBox( "", this, "", LedCheckBox::Green );
|
||||
m_startNoteToggle = new LedCheckBox( "", this, "", LedCheckBox::LedColor::Green );
|
||||
m_startNoteToggle->move( COL1 + 8, LED_ROW );
|
||||
|
||||
m_endNoteToggle = new LedCheckBox( "", this, "", LedCheckBox::Green );
|
||||
m_endNoteToggle = new LedCheckBox( "", this, "", LedCheckBox::LedColor::Green );
|
||||
m_endNoteToggle->move( END_COL + 8, LED_ROW );
|
||||
|
||||
setAutoFillBackground( true );
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
Flags flags() const override
|
||||
{
|
||||
return IsNotBendable;
|
||||
return Flag::IsNotBendable;
|
||||
}
|
||||
|
||||
f_cnt_t desiredReleaseFrames() const override
|
||||
|
||||
@@ -56,7 +56,7 @@ Plugin::Descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor =
|
||||
"List installed LADSPA plugins" ),
|
||||
"Danny McRae <khjklujn/at/users.sourceforge.net>",
|
||||
0x0100,
|
||||
Plugin::Tool,
|
||||
Plugin::Type::Tool,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -107,12 +107,12 @@ LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) :
|
||||
auto ws = new QWidget(this);
|
||||
ws->setFixedSize( 500, 480 );
|
||||
|
||||
QWidget * available = createTab( ws, tr( "Available Effects" ), VALID );
|
||||
QWidget * available = createTab( ws, tr( "Available Effects" ), LadspaPluginType::Valid );
|
||||
QWidget * unavailable = createTab( ws, tr( "Unavailable Effects" ),
|
||||
INVALID );
|
||||
QWidget * instruments = createTab( ws, tr( "Instruments" ), SOURCE );
|
||||
QWidget * analysis = createTab( ws, tr( "Analysis Tools" ), SINK );
|
||||
QWidget * other = createTab( ws, tr( "Don't know" ), OTHER );
|
||||
LadspaPluginType::Invalid );
|
||||
QWidget * instruments = createTab( ws, tr( "Instruments" ), LadspaPluginType::Source );
|
||||
QWidget * analysis = createTab( ws, tr( "Analysis Tools" ), LadspaPluginType::Sink );
|
||||
QWidget * other = createTab( ws, tr( "Don't know" ), LadspaPluginType::Other );
|
||||
|
||||
|
||||
m_tabBar->addTab( available, tr( "Available Effects" ),
|
||||
|
||||
@@ -49,22 +49,22 @@ LadspaDescription::LadspaDescription( QWidget * _parent,
|
||||
l_sortable_plugin_t plugins;
|
||||
switch( _type )
|
||||
{
|
||||
case SOURCE:
|
||||
case LadspaPluginType::Source:
|
||||
plugins = manager->getInstruments();
|
||||
break;
|
||||
case TRANSFER:
|
||||
case LadspaPluginType::Transfer:
|
||||
plugins = manager->getValidEffects();
|
||||
break;
|
||||
case VALID:
|
||||
case LadspaPluginType::Valid:
|
||||
plugins = manager->getValidEffects();
|
||||
break;
|
||||
case INVALID:
|
||||
case LadspaPluginType::Invalid:
|
||||
plugins = manager->getInvalidEffects();
|
||||
break;
|
||||
case SINK:
|
||||
case LadspaPluginType::Sink:
|
||||
plugins = manager->getAnalysisTools();
|
||||
break;
|
||||
case OTHER:
|
||||
case LadspaPluginType::Other:
|
||||
plugins = manager->getOthers();
|
||||
break;
|
||||
default:
|
||||
@@ -75,7 +75,7 @@ LadspaDescription::LadspaDescription( QWidget * _parent,
|
||||
for (const auto& plugin : plugins)
|
||||
{
|
||||
ch_cnt_t audioDeviceChannels = Engine::audioEngine()->audioDev()->channels();
|
||||
if (_type != VALID || manager->getDescription(plugin.second)->inputChannels <= audioDeviceChannels)
|
||||
if (_type != LadspaPluginType::Valid || manager->getDescription(plugin.second)->inputChannels <= audioDeviceChannels)
|
||||
{
|
||||
pluginNames.push_back(plugin.first);
|
||||
m_pluginKeys.push_back(plugin.second);
|
||||
|
||||
@@ -86,7 +86,7 @@ void LadspaControlDialog::updateEffectView( LadspaControls * _ctl )
|
||||
control_list_t & controls = _ctl->m_controls[proc];
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
buffer_data_t last_port = NONE;
|
||||
BufferDataType last_port = BufferDataType::None;
|
||||
|
||||
QGroupBox * grouper;
|
||||
if( _ctl->m_processors > 1 )
|
||||
@@ -108,10 +108,10 @@ void LadspaControlDialog::updateEffectView( LadspaControls * _ctl )
|
||||
{
|
||||
if (control->port()->proc == proc)
|
||||
{
|
||||
buffer_data_t this_port = control->port()->data_type;
|
||||
if( last_port != NONE &&
|
||||
( this_port == TOGGLED || this_port == ENUM ) &&
|
||||
( last_port != TOGGLED && last_port != ENUM ) )
|
||||
BufferDataType this_port = control->port()->data_type;
|
||||
if( last_port != BufferDataType::None &&
|
||||
( this_port == BufferDataType::Toggled || this_port == BufferDataType::Enum ) &&
|
||||
( last_port != BufferDataType::Toggled && last_port != BufferDataType::Enum ) )
|
||||
{
|
||||
++row;
|
||||
col = 0;
|
||||
|
||||
@@ -60,10 +60,10 @@ Plugin::Descriptor PLUGIN_EXPORT ladspaeffect_plugin_descriptor =
|
||||
"inside LMMS." ),
|
||||
"Danny McRae <khjklujn/at/users.sourceforge.net>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
new LadspaSubPluginFeatures( Plugin::Effect )
|
||||
new LadspaSubPluginFeatures( Plugin::Type::Effect )
|
||||
} ;
|
||||
|
||||
}
|
||||
@@ -106,7 +106,7 @@ LadspaEffect::~LadspaEffect()
|
||||
|
||||
void LadspaEffect::changeSampleRate()
|
||||
{
|
||||
DataFile dataFile( DataFile::EffectSettings );
|
||||
DataFile dataFile( DataFile::Type::EffectSettings );
|
||||
m_controls->saveState( dataFile, dataFile.content() );
|
||||
|
||||
LadspaControls * controls = m_controls;
|
||||
@@ -163,7 +163,7 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
port_desc_t * pp = m_ports.at( proc ).at( port );
|
||||
switch( pp->rate )
|
||||
{
|
||||
case CHANNEL_IN:
|
||||
case BufferRate::ChannelIn:
|
||||
for( fpp_t frame = 0;
|
||||
frame < frames; ++frame )
|
||||
{
|
||||
@@ -172,7 +172,7 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
}
|
||||
++channel;
|
||||
break;
|
||||
case AUDIO_RATE_INPUT:
|
||||
case BufferRate::AudioRateInput:
|
||||
{
|
||||
ValueBuffer * vb = pp->control->valueBuffer();
|
||||
if( vb )
|
||||
@@ -195,7 +195,7 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CONTROL_RATE_INPUT:
|
||||
case BufferRate::ControlRateInput:
|
||||
if( pp->control == nullptr )
|
||||
{
|
||||
break;
|
||||
@@ -205,9 +205,9 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
pp->buffer[0] =
|
||||
pp->value;
|
||||
break;
|
||||
case CHANNEL_OUT:
|
||||
case AUDIO_RATE_OUTPUT:
|
||||
case CONTROL_RATE_OUTPUT:
|
||||
case BufferRate::ChannelOut:
|
||||
case BufferRate::AudioRateOutput:
|
||||
case BufferRate::ControlRateOutput:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -234,11 +234,11 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
port_desc_t * pp = m_ports.at( proc ).at( port );
|
||||
switch( pp->rate )
|
||||
{
|
||||
case CHANNEL_IN:
|
||||
case AUDIO_RATE_INPUT:
|
||||
case CONTROL_RATE_INPUT:
|
||||
case BufferRate::ChannelIn:
|
||||
case BufferRate::AudioRateInput:
|
||||
case BufferRate::ControlRateInput:
|
||||
break;
|
||||
case CHANNEL_OUT:
|
||||
case BufferRate::ChannelOut:
|
||||
for( fpp_t frame = 0;
|
||||
frame < frames; ++frame )
|
||||
{
|
||||
@@ -247,8 +247,8 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
}
|
||||
++channel;
|
||||
break;
|
||||
case AUDIO_RATE_OUTPUT:
|
||||
case CONTROL_RATE_OUTPUT:
|
||||
case BufferRate::AudioRateOutput:
|
||||
case BufferRate::ControlRateOutput:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -325,7 +325,7 @@ void LadspaEffect::pluginInstantiation()
|
||||
if( p->name.toUpper().contains( "IN" ) &&
|
||||
manager->isPortInput( m_key, port ) )
|
||||
{
|
||||
p->rate = CHANNEL_IN;
|
||||
p->rate = BufferRate::ChannelIn;
|
||||
p->buffer = MM_ALLOC<LADSPA_Data>( Engine::audioEngine()->framesPerPeriod() );
|
||||
inbuf[ inputch ] = p->buffer;
|
||||
inputch++;
|
||||
@@ -333,7 +333,7 @@ void LadspaEffect::pluginInstantiation()
|
||||
else if( p->name.toUpper().contains( "OUT" ) &&
|
||||
manager->isPortOutput( m_key, port ) )
|
||||
{
|
||||
p->rate = CHANNEL_OUT;
|
||||
p->rate = BufferRate::ChannelOut;
|
||||
if( ! m_inPlaceBroken && inbuf[ outputch ] )
|
||||
{
|
||||
p->buffer = inbuf[ outputch ];
|
||||
@@ -347,12 +347,12 @@ void LadspaEffect::pluginInstantiation()
|
||||
}
|
||||
else if( manager->isPortInput( m_key, port ) )
|
||||
{
|
||||
p->rate = AUDIO_RATE_INPUT;
|
||||
p->rate = BufferRate::AudioRateInput;
|
||||
p->buffer = MM_ALLOC<LADSPA_Data>( Engine::audioEngine()->framesPerPeriod() );
|
||||
}
|
||||
else
|
||||
{
|
||||
p->rate = AUDIO_RATE_OUTPUT;
|
||||
p->rate = BufferRate::AudioRateOutput;
|
||||
p->buffer = MM_ALLOC<LADSPA_Data>( Engine::audioEngine()->framesPerPeriod() );
|
||||
}
|
||||
}
|
||||
@@ -362,30 +362,30 @@ void LadspaEffect::pluginInstantiation()
|
||||
|
||||
if( manager->isPortInput( m_key, port ) )
|
||||
{
|
||||
p->rate = CONTROL_RATE_INPUT;
|
||||
p->rate = BufferRate::ControlRateInput;
|
||||
}
|
||||
else
|
||||
{
|
||||
p->rate = CONTROL_RATE_OUTPUT;
|
||||
p->rate = BufferRate::ControlRateOutput;
|
||||
}
|
||||
}
|
||||
|
||||
p->scale = 1.0f;
|
||||
if( manager->isEnum( m_key, port ) )
|
||||
{
|
||||
p->data_type = ENUM;
|
||||
p->data_type = BufferDataType::Enum;
|
||||
}
|
||||
else if( manager->isPortToggled( m_key, port ) )
|
||||
{
|
||||
p->data_type = TOGGLED;
|
||||
p->data_type = BufferDataType::Toggled;
|
||||
}
|
||||
else if( manager->isInteger( m_key, port ) )
|
||||
{
|
||||
p->data_type = INTEGER;
|
||||
p->data_type = BufferDataType::Integer;
|
||||
}
|
||||
else if( p->name.toUpper().contains( "(SECONDS)" ) )
|
||||
{
|
||||
p->data_type = TIME;
|
||||
p->data_type = BufferDataType::Time;
|
||||
p->scale = 1000.0f;
|
||||
int loc = p->name.toUpper().indexOf(
|
||||
"(SECONDS)" );
|
||||
@@ -393,20 +393,20 @@ void LadspaEffect::pluginInstantiation()
|
||||
}
|
||||
else if( p->name.toUpper().contains( "(S)" ) )
|
||||
{
|
||||
p->data_type = TIME;
|
||||
p->data_type = BufferDataType::Time;
|
||||
p->scale = 1000.0f;
|
||||
int loc = p->name.toUpper().indexOf( "(S)" );
|
||||
p->name.replace( loc, 3, "(ms)" );
|
||||
}
|
||||
else if( p->name.toUpper().contains( "(MS)" ) )
|
||||
{
|
||||
p->data_type = TIME;
|
||||
p->data_type = BufferDataType::Time;
|
||||
int loc = p->name.toUpper().indexOf( "(MS)" );
|
||||
p->name.replace( loc, 4, "(ms)" );
|
||||
}
|
||||
else
|
||||
{
|
||||
p->data_type = FLOATING;
|
||||
p->data_type = BufferDataType::Floating;
|
||||
}
|
||||
|
||||
// Get the range and default values.
|
||||
@@ -438,7 +438,7 @@ void LadspaEffect::pluginInstantiation()
|
||||
p->def = manager->getDefaultSetting( m_key, port );
|
||||
if( p->def == NOHINT )
|
||||
{
|
||||
if( p->data_type != TOGGLED )
|
||||
if( p->data_type != BufferDataType::Toggled )
|
||||
{
|
||||
p->def = ( p->min + p->max ) / 2.0f;
|
||||
}
|
||||
@@ -465,8 +465,8 @@ void LadspaEffect::pluginInstantiation()
|
||||
|
||||
// For convenience, keep a separate list of the ports that are used
|
||||
// to control the processors.
|
||||
if( p->rate == AUDIO_RATE_INPUT ||
|
||||
p->rate == CONTROL_RATE_INPUT )
|
||||
if( p->rate == BufferRate::AudioRateInput ||
|
||||
p->rate == BufferRate::ControlRateInput )
|
||||
{
|
||||
p->control_id = m_portControls.count();
|
||||
m_portControls.append( p );
|
||||
@@ -555,7 +555,7 @@ void LadspaEffect::pluginDestruction()
|
||||
for( int port = 0; port < m_portCount; port++ )
|
||||
{
|
||||
port_desc_t * pp = m_ports.at( proc ).at( port );
|
||||
if( m_inPlaceBroken || pp->rate != CHANNEL_OUT )
|
||||
if( m_inPlaceBroken || pp->rate != BufferRate::ChannelOut )
|
||||
{
|
||||
if( pp->buffer) MM_FREE( pp->buffer );
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace lmms
|
||||
{
|
||||
|
||||
|
||||
LadspaSubPluginFeatures::LadspaSubPluginFeatures( Plugin::PluginTypes _type ) :
|
||||
LadspaSubPluginFeatures::LadspaSubPluginFeatures( Plugin::Type _type ) :
|
||||
SubPluginFeatures( _type )
|
||||
{
|
||||
}
|
||||
@@ -137,17 +137,17 @@ void LadspaSubPluginFeatures::listSubPluginKeys(
|
||||
l_sortable_plugin_t plugins;
|
||||
switch( m_type )
|
||||
{
|
||||
case Plugin::Instrument:
|
||||
case Plugin::Type::Instrument:
|
||||
plugins = lm->getInstruments();
|
||||
break;
|
||||
case Plugin::Effect:
|
||||
case Plugin::Type::Effect:
|
||||
plugins = lm->getValidEffects();
|
||||
//plugins += lm->getInvalidEffects();
|
||||
break;
|
||||
case Plugin::Tool:
|
||||
case Plugin::Type::Tool:
|
||||
plugins = lm->getAnalysisTools();
|
||||
break;
|
||||
case Plugin::Other:
|
||||
case Plugin::Type::Other:
|
||||
plugins = lm->getOthers();
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace lmms
|
||||
class LadspaSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures
|
||||
{
|
||||
public:
|
||||
LadspaSubPluginFeatures( Plugin::PluginTypes _type );
|
||||
LadspaSubPluginFeatures( Plugin::Type _type );
|
||||
|
||||
QString displayName(const Key& k) const override;
|
||||
void fillDescriptionWidget( QWidget * _parent,
|
||||
|
||||
@@ -86,7 +86,7 @@ Plugin::Descriptor PLUGIN_EXPORT lb302_plugin_descriptor =
|
||||
"Incomplete monophonic imitation TB-303" ),
|
||||
"Paul Giblock <pgib/at/users.sf.net>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -290,7 +290,7 @@ Lb302Synth::Lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
vca_decay(0.99897516),
|
||||
vca_a0(0.5),
|
||||
vca_a(0.),
|
||||
vca_mode(never_played)
|
||||
vca_mode(VcaMode::NeverPlayed)
|
||||
{
|
||||
|
||||
connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ),
|
||||
@@ -332,7 +332,7 @@ Lb302Synth::Lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
|
||||
vcf_envpos = ENVINC;
|
||||
|
||||
vco_shape = BL_SAWTOOTH;
|
||||
vco_shape = VcoShape::BLSawtooth;
|
||||
|
||||
vcfs[0] = new Lb302FilterIIR2(&fs);
|
||||
vcfs[1] = new Lb302Filter3Pole(&fs);
|
||||
@@ -469,7 +469,7 @@ int Lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
|
||||
if( release_frame == 0 || ! m_playingNote )
|
||||
{
|
||||
vca_mode = decay;
|
||||
vca_mode = VcaMode::Decay;
|
||||
}
|
||||
|
||||
if( new_freq )
|
||||
@@ -493,7 +493,7 @@ int Lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
// start decay if we're past release
|
||||
if( i >= release_frame )
|
||||
{
|
||||
vca_mode = decay;
|
||||
vca_mode = VcaMode::Decay;
|
||||
}
|
||||
|
||||
// update vcf
|
||||
@@ -523,43 +523,43 @@ int Lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
vco_c -= 1.0;
|
||||
|
||||
switch(int(rint(wave_shape.value()))) {
|
||||
case 0: vco_shape = SAWTOOTH; break;
|
||||
case 1: vco_shape = TRIANGLE; break;
|
||||
case 2: vco_shape = SQUARE; break;
|
||||
case 3: vco_shape = ROUND_SQUARE; break;
|
||||
case 4: vco_shape = MOOG; break;
|
||||
case 5: vco_shape = SINE; break;
|
||||
case 6: vco_shape = EXPONENTIAL; break;
|
||||
case 7: vco_shape = WHITE_NOISE; break;
|
||||
case 8: vco_shape = BL_SAWTOOTH; break;
|
||||
case 9: vco_shape = BL_SQUARE; break;
|
||||
case 10: vco_shape = BL_TRIANGLE; break;
|
||||
case 11: vco_shape = BL_MOOG; break;
|
||||
default: vco_shape = SAWTOOTH; break;
|
||||
case 0: vco_shape = VcoShape::Sawtooth; break;
|
||||
case 1: vco_shape = VcoShape::Triangle; break;
|
||||
case 2: vco_shape = VcoShape::Square; break;
|
||||
case 3: vco_shape = VcoShape::RoundSquare; break;
|
||||
case 4: vco_shape = VcoShape::Moog; break;
|
||||
case 5: vco_shape = VcoShape::Sine; break;
|
||||
case 6: vco_shape = VcoShape::Exponential; break;
|
||||
case 7: vco_shape = VcoShape::WhiteNoise; break;
|
||||
case 8: vco_shape = VcoShape::BLSawtooth; break;
|
||||
case 9: vco_shape = VcoShape::BLSquare; break;
|
||||
case 10: vco_shape = VcoShape::BLTriangle; break;
|
||||
case 11: vco_shape = VcoShape::BLMoog; break;
|
||||
default: vco_shape = VcoShape::Sawtooth; break;
|
||||
}
|
||||
|
||||
// add vco_shape_param the changes the shape of each curve.
|
||||
// merge sawtooths with triangle and square with round square?
|
||||
switch (vco_shape) {
|
||||
case SAWTOOTH: // p0: curviness of line
|
||||
case VcoShape::Sawtooth: // p0: curviness of line
|
||||
vco_k = vco_c; // Is this sawtooth backwards?
|
||||
break;
|
||||
|
||||
case TRIANGLE: // p0: duty rev.saw<->triangle<->saw p1: curviness
|
||||
case VcoShape::Triangle: // p0: duty rev.saw<->triangle<->saw p1: curviness
|
||||
vco_k = (vco_c*2.0)+0.5;
|
||||
if (vco_k>0.5)
|
||||
vco_k = 1.0- vco_k;
|
||||
break;
|
||||
|
||||
case SQUARE: // p0: slope of top
|
||||
case VcoShape::Square: // p0: slope of top
|
||||
vco_k = (vco_c<0)?0.5:-0.5;
|
||||
break;
|
||||
|
||||
case ROUND_SQUARE: // p0: width of round
|
||||
case VcoShape::RoundSquare: // p0: width of round
|
||||
vco_k = (vco_c<0)?(sqrtf(1-(vco_c*vco_c*4))-0.5):-0.5;
|
||||
break;
|
||||
|
||||
case MOOG: // Maybe the fall should be exponential/sinsoidal instead of quadric.
|
||||
case VcoShape::Moog: // Maybe the fall should be exponential/sinsoidal instead of quadric.
|
||||
// [-0.5, 0]: Rise, [0,0.25]: Slope down, [0.25,0.5]: Low
|
||||
vco_k = (vco_c*2.0)+0.5;
|
||||
if (vco_k>1.0) {
|
||||
@@ -572,33 +572,33 @@ int Lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
vco_k *= 2.0; // MOOG wave gets filtered away
|
||||
break;
|
||||
|
||||
case SINE:
|
||||
case VcoShape::Sine:
|
||||
// [-0.5, 0.5] : [-pi, pi]
|
||||
vco_k = 0.5f * Oscillator::sinSample( vco_c );
|
||||
break;
|
||||
|
||||
case EXPONENTIAL:
|
||||
case VcoShape::Exponential:
|
||||
vco_k = 0.5 * Oscillator::expSample( vco_c );
|
||||
break;
|
||||
|
||||
case WHITE_NOISE:
|
||||
case VcoShape::WhiteNoise:
|
||||
vco_k = 0.5 * Oscillator::noiseSample( vco_c );
|
||||
break;
|
||||
|
||||
case BL_SAWTOOTH:
|
||||
vco_k = BandLimitedWave::oscillate( vco_c + 0.5f, BandLimitedWave::pdToLen( vco_inc ), BandLimitedWave::BLSaw ) * 0.5f;
|
||||
case VcoShape::BLSawtooth:
|
||||
vco_k = BandLimitedWave::oscillate( vco_c + 0.5f, BandLimitedWave::pdToLen( vco_inc ), BandLimitedWave::Waveform::BLSaw ) * 0.5f;
|
||||
break;
|
||||
|
||||
case BL_SQUARE:
|
||||
vco_k = BandLimitedWave::oscillate( vco_c + 0.5f, BandLimitedWave::pdToLen( vco_inc ), BandLimitedWave::BLSquare ) * 0.5f;
|
||||
case VcoShape::BLSquare:
|
||||
vco_k = BandLimitedWave::oscillate( vco_c + 0.5f, BandLimitedWave::pdToLen( vco_inc ), BandLimitedWave::Waveform::BLSquare ) * 0.5f;
|
||||
break;
|
||||
|
||||
case BL_TRIANGLE:
|
||||
vco_k = BandLimitedWave::oscillate( vco_c + 0.5f, BandLimitedWave::pdToLen( vco_inc ), BandLimitedWave::BLTriangle ) * 0.5f;
|
||||
case VcoShape::BLTriangle:
|
||||
vco_k = BandLimitedWave::oscillate( vco_c + 0.5f, BandLimitedWave::pdToLen( vco_inc ), BandLimitedWave::Waveform::BLTriangle ) * 0.5f;
|
||||
break;
|
||||
|
||||
case BL_MOOG:
|
||||
vco_k = BandLimitedWave::oscillate( vco_c + 0.5f, BandLimitedWave::pdToLen( vco_inc ), BandLimitedWave::BLMoog );
|
||||
case VcoShape::BLMoog:
|
||||
vco_k = BandLimitedWave::oscillate( vco_c + 0.5f, BandLimitedWave::pdToLen( vco_inc ), BandLimitedWave::Waveform::BLMoog );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -633,18 +633,18 @@ int Lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
}
|
||||
|
||||
// Handle Envelope
|
||||
if(vca_mode==attack) {
|
||||
if(vca_mode==VcaMode::Attack) {
|
||||
vca_a+=(vca_a0-vca_a)*vca_attack;
|
||||
if(sample_cnt>=0.5*Engine::audioEngine()->processingSampleRate())
|
||||
vca_mode = idle;
|
||||
vca_mode = VcaMode::Idle;
|
||||
}
|
||||
else if(vca_mode == decay) {
|
||||
else if(vca_mode == VcaMode::Decay) {
|
||||
vca_a *= vca_decay;
|
||||
|
||||
// the following line actually speeds up processing
|
||||
if(vca_a < (1/65536.0)) {
|
||||
vca_a = 0;
|
||||
vca_mode = never_played;
|
||||
vca_mode = VcaMode::NeverPlayed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -666,15 +666,15 @@ void Lb302Synth::initNote( Lb302Note *n)
|
||||
|
||||
// Always reset vca on non-dead notes, and
|
||||
// Only reset vca on decaying(decayed) and never-played
|
||||
if(n->dead == 0 || (vca_mode == decay || vca_mode == never_played)) {
|
||||
if(n->dead == 0 || (vca_mode == VcaMode::Decay || vca_mode == VcaMode::NeverPlayed)) {
|
||||
//printf(" good\n");
|
||||
sample_cnt = 0;
|
||||
vca_mode = attack;
|
||||
vca_mode = VcaMode::Attack;
|
||||
// LB303:
|
||||
//vca_a = 0;
|
||||
}
|
||||
else {
|
||||
vca_mode = idle;
|
||||
vca_mode = VcaMode::Idle;
|
||||
}
|
||||
|
||||
initSlide();
|
||||
@@ -819,22 +819,22 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
InstrumentViewFixedSize( _instrument, _parent )
|
||||
{
|
||||
// GUI
|
||||
m_vcfCutKnob = new Knob( knobBright_26, this );
|
||||
m_vcfCutKnob = new Knob( KnobType::Bright26, this );
|
||||
m_vcfCutKnob->move( 75, 130 );
|
||||
m_vcfCutKnob->setHintText( tr( "Cutoff Freq:" ), "" );
|
||||
m_vcfCutKnob->setLabel( "" );
|
||||
|
||||
m_vcfResKnob = new Knob( knobBright_26, this );
|
||||
m_vcfResKnob = new Knob( KnobType::Bright26, this );
|
||||
m_vcfResKnob->move( 120, 130 );
|
||||
m_vcfResKnob->setHintText( tr( "Resonance:" ), "" );
|
||||
m_vcfResKnob->setLabel( "" );
|
||||
|
||||
m_vcfModKnob = new Knob( knobBright_26, this );
|
||||
m_vcfModKnob = new Knob( KnobType::Bright26, this );
|
||||
m_vcfModKnob->move( 165, 130 );
|
||||
m_vcfModKnob->setHintText( tr( "Env Mod:" ), "" );
|
||||
m_vcfModKnob->setLabel( "" );
|
||||
|
||||
m_vcfDecKnob = new Knob( knobBright_26, this );
|
||||
m_vcfDecKnob = new Knob( KnobType::Bright26, this );
|
||||
m_vcfDecKnob->move( 210, 130 );
|
||||
m_vcfDecKnob->setHintText( tr( "Decay:" ), "" );
|
||||
m_vcfDecKnob->setLabel( "" );
|
||||
@@ -855,12 +855,12 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) :
|
||||
tr( "303-es-que, 24dB/octave, 3 pole filter" ) );
|
||||
|
||||
|
||||
m_slideDecKnob = new Knob( knobBright_26, this );
|
||||
m_slideDecKnob = new Knob( KnobType::Bright26, this );
|
||||
m_slideDecKnob->move( 210, 75 );
|
||||
m_slideDecKnob->setHintText( tr( "Slide Decay:" ), "" );
|
||||
m_slideDecKnob->setLabel( "");
|
||||
|
||||
m_distKnob = new Knob( knobBright_26, this );
|
||||
m_distKnob = new Knob( KnobType::Bright26, this );
|
||||
m_distKnob->move( 210, 190 );
|
||||
m_distKnob->setHintText( tr( "DIST:" ), "" );
|
||||
m_distKnob->setLabel( tr( ""));
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
|
||||
Flags flags() const override
|
||||
{
|
||||
return IsSingleStreamed;
|
||||
return Flag::IsSingleStreamed;
|
||||
}
|
||||
|
||||
f_cnt_t desiredReleaseFrames() const override
|
||||
@@ -213,9 +213,9 @@ private:
|
||||
vco_slideinc, //* Slide base to use in next node. Nonzero=slide next note
|
||||
vco_slidebase; //* The base vco_inc while sliding.
|
||||
|
||||
enum vco_shape_t { SAWTOOTH, SQUARE, TRIANGLE, MOOG, ROUND_SQUARE, SINE, EXPONENTIAL, WHITE_NOISE,
|
||||
BL_SAWTOOTH, BL_SQUARE, BL_TRIANGLE, BL_MOOG };
|
||||
vco_shape_t vco_shape;
|
||||
enum class VcoShape { Sawtooth, Square, Triangle, Moog, RoundSquare, Sine, Exponential, WhiteNoise,
|
||||
BLSawtooth, BLSquare, BLTriangle, BLMoog };
|
||||
VcoShape vco_shape;
|
||||
|
||||
// Filters (just keep both loaded and switch)
|
||||
Lb302Filter* vcfs[NUM_FILTERS];
|
||||
@@ -235,14 +235,14 @@ private:
|
||||
vca_a; // Amplifier coefficient.
|
||||
|
||||
// Envelope State
|
||||
enum VCA_Mode
|
||||
enum class VcaMode
|
||||
{
|
||||
attack = 0,
|
||||
decay = 1,
|
||||
idle = 2,
|
||||
never_played = 3
|
||||
Attack = 0,
|
||||
Decay = 1,
|
||||
Idle = 2,
|
||||
NeverPlayed = 3
|
||||
};
|
||||
VCA_Mode vca_mode;
|
||||
VcaMode vca_mode;
|
||||
|
||||
// My hacks
|
||||
int sample_cnt;
|
||||
|
||||
@@ -46,10 +46,10 @@ Plugin::Descriptor PLUGIN_EXPORT lv2effect_plugin_descriptor =
|
||||
"plugin for using arbitrary LV2-effects inside LMMS."),
|
||||
"Johannes Lorenz <jlsf2013$$$users.sourceforge.net, $$$=@>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
new Lv2SubPluginFeatures(Plugin::Effect)
|
||||
new Lv2SubPluginFeatures(Plugin::Type::Effect)
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -55,10 +55,10 @@ Plugin::Descriptor PLUGIN_EXPORT lv2instrument_plugin_descriptor =
|
||||
"plugin for using arbitrary LV2 instruments inside LMMS."),
|
||||
"Johannes Lorenz <jlsf2013$$$users.sourceforge.net, $$$=@>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
new Lv2SubPluginFeatures(Plugin::Instrument)
|
||||
new Lv2SubPluginFeatures(Plugin::Type::Instrument)
|
||||
};
|
||||
|
||||
}
|
||||
@@ -97,7 +97,7 @@ Lv2Instrument::Lv2Instrument(InstrumentTrack *instrumentTrackArg,
|
||||
Lv2Instrument::~Lv2Instrument()
|
||||
{
|
||||
Engine::audioEngine()->removePlayHandlesOfTypes(instrumentTrack(),
|
||||
PlayHandle::TypeNotePlayHandle | PlayHandle::TypeInstrumentPlayHandle);
|
||||
PlayHandle::Type::NotePlayHandle | PlayHandle::Type::InstrumentPlayHandle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -89,9 +89,9 @@ public:
|
||||
Flags flags() const override
|
||||
{
|
||||
#ifdef LV2_INSTRUMENT_USE_MIDI
|
||||
return IsSingleStreamed | IsMidiBased;
|
||||
return Flag::IsSingleStreamed | Flag::IsMidiBased;
|
||||
#else
|
||||
return IsSingleStreamed;
|
||||
return Flag::IsSingleStreamed;
|
||||
#endif
|
||||
}
|
||||
gui::PluginView* instantiateView(QWidget *parent) override;
|
||||
|
||||
@@ -51,7 +51,7 @@ Plugin::Descriptor PLUGIN_EXPORT midiexport_plugin_descriptor =
|
||||
"Mohamed Abdel Maksoud <mohamed at amaksoud.com> and "
|
||||
"Hyunjin Song <tteu.ingog/at/gmail.com>",
|
||||
0x0100,
|
||||
Plugin::ExportFilter,
|
||||
Plugin::Type::ExportFilter,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -84,8 +84,8 @@ bool MidiExport::tryExport(const TrackContainer::TrackList &tracks,
|
||||
auto buffer = std::array<uint8_t, BUFFER_SIZE>{};
|
||||
uint32_t size;
|
||||
|
||||
for (const Track* track : tracks) if (track->type() == Track::InstrumentTrack) nTracks++;
|
||||
for (const Track* track : patternStoreTracks) if (track->type() == Track::InstrumentTrack) nTracks++;
|
||||
for (const Track* track : tracks) if (track->type() == Track::Type::Instrument) nTracks++;
|
||||
for (const Track* track : patternStoreTracks) if (track->type() == Track::Type::Instrument) nTracks++;
|
||||
|
||||
// midi header
|
||||
MidiFile::MIDIHeader header(nTracks);
|
||||
@@ -97,10 +97,10 @@ bool MidiExport::tryExport(const TrackContainer::TrackList &tracks,
|
||||
// midi tracks
|
||||
for (Track* track : tracks)
|
||||
{
|
||||
DataFile dataFile(DataFile::SongProject);
|
||||
DataFile dataFile(DataFile::Type::SongProject);
|
||||
MTrack mtrack;
|
||||
|
||||
if (track->type() == Track::InstrumentTrack)
|
||||
if (track->type() == Track::Type::Instrument)
|
||||
{
|
||||
|
||||
mtrack.addName(track->name().toStdString(), 0);
|
||||
@@ -143,7 +143,7 @@ bool MidiExport::tryExport(const TrackContainer::TrackList &tracks,
|
||||
midiout.writeRawData((char *)buffer.data(), size);
|
||||
}
|
||||
|
||||
if (track->type() == Track::PatternTrack)
|
||||
if (track->type() == Track::Type::Pattern)
|
||||
{
|
||||
patternTrack = dynamic_cast<PatternTrack*>(track);
|
||||
element = patternTrack->saveState(dataFile, dataFile.content());
|
||||
@@ -169,7 +169,7 @@ bool MidiExport::tryExport(const TrackContainer::TrackList &tracks,
|
||||
// for each instrument in the pattern editor
|
||||
for (Track* track : patternStoreTracks)
|
||||
{
|
||||
DataFile dataFile(DataFile::SongProject);
|
||||
DataFile dataFile(DataFile::Type::SongProject);
|
||||
MTrack mtrack;
|
||||
|
||||
// begin at the first pattern track (first pattern)
|
||||
@@ -177,7 +177,7 @@ bool MidiExport::tryExport(const TrackContainer::TrackList &tracks,
|
||||
|
||||
std::vector<std::pair<int,int>> st;
|
||||
|
||||
if (track->type() != Track::InstrumentTrack) continue;
|
||||
if (track->type() != Track::Type::Instrument) continue;
|
||||
|
||||
mtrack.addName(track->name().toStdString(), 0);
|
||||
//mtrack.addProgramChange(0, 0);
|
||||
|
||||
@@ -71,7 +71,7 @@ Plugin::Descriptor PLUGIN_EXPORT midiimport_plugin_descriptor =
|
||||
"Filter for importing MIDI-files into LMMS" ),
|
||||
"Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>",
|
||||
0x0100,
|
||||
Plugin::ImportFilter,
|
||||
Plugin::Type::ImportFilter,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
// in the main thread. This should probably be
|
||||
// removed if that ever changes.
|
||||
qApp->processEvents();
|
||||
at = dynamic_cast<AutomationTrack *>( Track::create( Track::AutomationTrack, tc ) );
|
||||
at = dynamic_cast<AutomationTrack *>( Track::create( Track::Type::Automation, tc ) );
|
||||
}
|
||||
if( tn != "") {
|
||||
at->setName( tn );
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
if( !it ) {
|
||||
// Keep LMMS responsive
|
||||
qApp->processEvents();
|
||||
it = dynamic_cast<InstrumentTrack *>( Track::create( Track::InstrumentTrack, tc ) );
|
||||
it = dynamic_cast<InstrumentTrack *>( Track::create( Track::Type::Instrument, tc ) );
|
||||
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
it_inst = it->loadInstrument( "sf2player" );
|
||||
@@ -328,9 +328,9 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
// NOTE: unordered_map::operator[] creates a new element if none exists
|
||||
|
||||
MeterModel & timeSigMM = Engine::getSong()->getTimeSigModel();
|
||||
auto nt = dynamic_cast<AutomationTrack*>(Track::create(Track::AutomationTrack, Engine::getSong()));
|
||||
auto nt = dynamic_cast<AutomationTrack*>(Track::create(Track::Type::Automation, Engine::getSong()));
|
||||
nt->setName(tr("MIDI Time Signature Numerator"));
|
||||
auto dt = dynamic_cast<AutomationTrack*>(Track::create(Track::AutomationTrack, Engine::getSong()));
|
||||
auto dt = dynamic_cast<AutomationTrack*>(Track::create(Track::Type::Automation, Engine::getSong()));
|
||||
dt->setName(tr("MIDI Time Signature Denominator"));
|
||||
auto timeSigNumeratorPat = new AutomationClip(nt);
|
||||
timeSigNumeratorPat->setDisplayName(tr("Numerator"));
|
||||
@@ -358,7 +358,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
pd.setValue( 2 );
|
||||
|
||||
// Tempo stuff
|
||||
auto tt = dynamic_cast<AutomationTrack*>(Track::create(Track::AutomationTrack, Engine::getSong()));
|
||||
auto tt = dynamic_cast<AutomationTrack*>(Track::create(Track::Type::Automation, Engine::getSong()));
|
||||
tt->setName(tr("Tempo"));
|
||||
auto tap = new AutomationClip(tt);
|
||||
tap->setDisplayName(tr("Tempo"));
|
||||
|
||||
@@ -53,7 +53,7 @@ Plugin::Descriptor PLUGIN_EXPORT monstro_plugin_descriptor =
|
||||
"Monstrous 3-oscillator synth with modulation matrix" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
//
|
||||
|
||||
#define makeknob( name, x, y, hint, unit, oname ) \
|
||||
name = new Knob( knobStyled, view ); \
|
||||
name = new Knob( KnobType::Styled, view ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( hint, unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
name ->setFixedSize( 20, 20 );
|
||||
|
||||
#define maketsknob( name, x, y, hint, unit, oname ) \
|
||||
name = new TempoSyncKnob( knobStyled, view ); \
|
||||
name = new TempoSyncKnob( KnobType::Styled, view ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( hint, unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
@@ -211,19 +211,19 @@ private:
|
||||
break;
|
||||
case WAVE_TRI:
|
||||
//return Oscillator::triangleSample( _ph );
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::BLTriangle );
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::Waveform::BLTriangle );
|
||||
break;
|
||||
case WAVE_SAW:
|
||||
//return Oscillator::sawSample( _ph );
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::BLSaw );
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::Waveform::BLSaw );
|
||||
break;
|
||||
case WAVE_RAMP:
|
||||
//return Oscillator::sawSample( _ph ) * -1.0;
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::BLSaw ) * -1.0;
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::Waveform::BLSaw ) * -1.0;
|
||||
break;
|
||||
case WAVE_SQR:
|
||||
//return Oscillator::squareSample( _ph );
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::BLSquare );
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::Waveform::BLSquare );
|
||||
break;
|
||||
case WAVE_SQRSOFT:
|
||||
{
|
||||
@@ -236,7 +236,7 @@ private:
|
||||
}
|
||||
case WAVE_MOOG:
|
||||
//return Oscillator::moogSawSample( _ph );
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::BLMoog );
|
||||
return BandLimitedWave::oscillate( _ph, _wavelen, BandLimitedWave::Waveform::BLMoog );
|
||||
break;
|
||||
case WAVE_SINABS:
|
||||
return qAbs( Oscillator::sinSample( _ph ) );
|
||||
|
||||
@@ -41,7 +41,7 @@ Plugin::Descriptor PLUGIN_EXPORT multitapecho_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "A multitap echo delay plugin" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -48,8 +48,8 @@ MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * con
|
||||
|
||||
// graph widgets
|
||||
|
||||
auto ampGraph = new Graph(this, Graph::BarStyle, 204, 105);
|
||||
auto lpGraph = new Graph(this, Graph::BarStyle, 204, 105);
|
||||
auto ampGraph = new Graph(this, Graph::Style::Bar, 204, 105);
|
||||
auto lpGraph = new Graph(this, Graph::Style::Bar, 204, 105);
|
||||
|
||||
ampGraph->move( 30, 10 );
|
||||
lpGraph->move( 30, 125 );
|
||||
@@ -78,26 +78,26 @@ MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * con
|
||||
|
||||
// knobs
|
||||
|
||||
auto stepLength = new TempoSyncKnob(knobBright_26, this);
|
||||
auto stepLength = new TempoSyncKnob(KnobType::Bright26, this);
|
||||
stepLength->move( 100, 245 );
|
||||
stepLength->setModel( & controls->m_stepLength );
|
||||
stepLength->setLabel( tr( "Length" ) );
|
||||
stepLength->setHintText( tr( "Step length:" ) , " ms" );
|
||||
|
||||
auto dryGain = new Knob(knobBright_26, this);
|
||||
auto dryGain = new Knob(KnobType::Bright26, this);
|
||||
dryGain->move( 150, 245 );
|
||||
dryGain->setModel( & controls->m_dryGain );
|
||||
dryGain->setLabel( tr( "Dry" ) );
|
||||
dryGain->setHintText( tr( "Dry gain:" ) , " dBFS" );
|
||||
|
||||
auto stages = new Knob(knobBright_26, this);
|
||||
auto stages = new Knob(KnobType::Bright26, this);
|
||||
stages->move( 200, 245 );
|
||||
stages->setModel( & controls->m_stages );
|
||||
stages->setLabel( tr( "Stages" ) );
|
||||
stages->setHintText( tr( "Low-pass stages:" ) , "x" );
|
||||
// switch led
|
||||
|
||||
auto swapInputs = new LedCheckBox("Swap inputs", this, tr("Swap inputs"), LedCheckBox::Green);
|
||||
auto swapInputs = new LedCheckBox("Swap inputs", this, tr("Swap inputs"), LedCheckBox::LedColor::Green);
|
||||
swapInputs->move( 20, 275 );
|
||||
swapInputs->setModel( & controls->m_swapInputs );
|
||||
swapInputs->setToolTip(tr("Swap left and right input channels for reflections"));
|
||||
|
||||
@@ -51,7 +51,7 @@ Plugin::Descriptor PLUGIN_EXPORT nes_plugin_descriptor =
|
||||
"A NES-like synthesizer" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
#define makeknob( name, x, y, hint, unit, oname ) \
|
||||
name = new Knob( knobStyled, this ); \
|
||||
name = new Knob( KnobType::Styled, this ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( hint, unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
|
||||
@@ -73,7 +73,7 @@ Plugin::Descriptor PLUGIN_EXPORT opulenz_plugin_descriptor =
|
||||
"2-operator FM Synth" ),
|
||||
"Raine M. Ekman <raine/at/iki/fi>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"sbi",
|
||||
nullptr,
|
||||
@@ -222,8 +222,8 @@ OpulenzInstrument::OpulenzInstrument( InstrumentTrack * _instrument_track ) :
|
||||
OpulenzInstrument::~OpulenzInstrument() {
|
||||
delete theEmulator;
|
||||
Engine::audioEngine()->removePlayHandlesOfTypes( instrumentTrack(),
|
||||
PlayHandle::TypeNotePlayHandle
|
||||
| PlayHandle::TypeInstrumentPlayHandle );
|
||||
PlayHandle::Type::NotePlayHandle
|
||||
| PlayHandle::Type::InstrumentPlayHandle );
|
||||
delete [] renderbuffer;
|
||||
}
|
||||
|
||||
@@ -686,7 +686,7 @@ OpulenzInstrumentView::OpulenzInstrumentView( Instrument * _instrument,
|
||||
{
|
||||
|
||||
#define KNOB_GEN(knobname, hinttext, hintunit,xpos,ypos) \
|
||||
knobname = new Knob( knobStyled, this );\
|
||||
knobname = new Knob( KnobType::Styled, this );\
|
||||
knobname->setHintText( tr(hinttext), hintunit );\
|
||||
knobname->setFixedSize(22,22);\
|
||||
knobname->setCenterPointX(11.0);\
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
Flags flags() const override
|
||||
{
|
||||
return IsSingleStreamed | IsMidiBased;
|
||||
return Flag::IsSingleStreamed | Flag::IsMidiBased;
|
||||
}
|
||||
|
||||
bool handleMidiEvent( const MidiEvent& event, const TimePos& time, f_cnt_t offset = 0 ) override;
|
||||
|
||||
@@ -52,7 +52,7 @@ Plugin::Descriptor PLUGIN_EXPORT organic_plugin_descriptor =
|
||||
"Additive Synthesizer for organ-like sounds" ),
|
||||
"Andreas Brandmaier <andreas/at/brandmaier.de>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -74,7 +74,9 @@ float * OrganicInstrument::s_harmonics = nullptr;
|
||||
|
||||
OrganicInstrument::OrganicInstrument( InstrumentTrack * _instrument_track ) :
|
||||
Instrument( _instrument_track, &organic_plugin_descriptor ),
|
||||
m_modulationAlgo( Oscillator::SignalMix, Oscillator::SignalMix, Oscillator::SignalMix),
|
||||
m_modulationAlgo(static_cast<int>(Oscillator::ModulationAlgo::SignalMix),
|
||||
static_cast<int>(Oscillator::ModulationAlgo::SignalMix),
|
||||
static_cast<int>(Oscillator::ModulationAlgo::SignalMix)),
|
||||
m_fx1Model( 0.0f, 0.0f, 0.99f, 0.01f , this, tr( "Distortion" ) ),
|
||||
m_volModel( 100.0f, 0.0f, 200.0f, 1.0f, this, tr( "Volume" ) )
|
||||
{
|
||||
@@ -403,7 +405,7 @@ class OrganicKnob : public Knob
|
||||
{
|
||||
public:
|
||||
OrganicKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
Knob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 21, 21 );
|
||||
}
|
||||
@@ -506,7 +508,7 @@ void OrganicInstrumentView::modelChanged()
|
||||
oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg( i + 1 ), QString() );
|
||||
|
||||
// setup volume-knob
|
||||
auto volKnob = new Knob(knobStyled, this);
|
||||
auto volKnob = new Knob(KnobType::Styled, this);
|
||||
volKnob->setVolumeKnob( true );
|
||||
volKnob->move( x + i * colWidth, y + rowHeight*1 );
|
||||
volKnob->setFixedSize( 21, 21 );
|
||||
@@ -560,7 +562,7 @@ void OrganicInstrumentView::updateKnobHint()
|
||||
|
||||
OscillatorObject::OscillatorObject( Model * _parent, int _index ) :
|
||||
Model( _parent ),
|
||||
m_waveShape( Oscillator::SineWave, 0, Oscillator::NumWaveShapes-1, this ),
|
||||
m_waveShape( static_cast<int>(Oscillator::WaveShape::Sine), 0, Oscillator::NumWaveShapes-1, this ),
|
||||
m_oscModel( 0.0f, 0.0f, 5.0f, 1.0f,
|
||||
this, tr( "Osc %1 waveform" ).arg( _index + 1 ) ),
|
||||
m_harmModel( static_cast<float>( _index ), 0.0f, 17.0f, 1.0f,
|
||||
@@ -582,15 +584,15 @@ void OscillatorObject::oscButtonChanged()
|
||||
|
||||
static auto shapes = std::array
|
||||
{
|
||||
Oscillator::SineWave,
|
||||
Oscillator::SawWave,
|
||||
Oscillator::SquareWave,
|
||||
Oscillator::TriangleWave,
|
||||
Oscillator::MoogSawWave,
|
||||
Oscillator::ExponentialWave
|
||||
Oscillator::WaveShape::Sine,
|
||||
Oscillator::WaveShape::Saw,
|
||||
Oscillator::WaveShape::Square,
|
||||
Oscillator::WaveShape::Triangle,
|
||||
Oscillator::WaveShape::MoogSaw,
|
||||
Oscillator::WaveShape::Exponential
|
||||
} ;
|
||||
|
||||
m_waveShape.setValue( shapes[(int)roundf( m_oscModel.value() )] );
|
||||
m_waveShape.setValue( static_cast<float>(shapes[(int)roundf( m_oscModel.value() )]) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ Plugin::Descriptor PLUGIN_EXPORT patman_plugin_descriptor =
|
||||
"GUS-compatible patch instrument" ),
|
||||
"Javier Serrano Polo <jasp00/at/users.sourceforge.net>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"pat",
|
||||
nullptr,
|
||||
@@ -154,7 +154,7 @@ void PatmanInstrument::playNote( NotePlayHandle * _n,
|
||||
hdata->sample->frequency();
|
||||
|
||||
if( hdata->sample->play( _working_buffer + offset, hdata->state, frames,
|
||||
play_freq, m_loopedModel.value() ? SampleBuffer::LoopOn : SampleBuffer::LoopOff ) )
|
||||
play_freq, m_loopedModel.value() ? SampleBuffer::LoopMode::On : SampleBuffer::LoopMode::Off ) )
|
||||
{
|
||||
applyRelease( _working_buffer, _n );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer,
|
||||
@@ -201,8 +201,8 @@ void PatmanInstrument::setFile( const QString & _patch_file, bool _rename )
|
||||
// named it self
|
||||
|
||||
m_patchFile = PathUtil::toShortestRelative( _patch_file );
|
||||
LoadErrors error = loadPatch( PathUtil::toAbsolute( _patch_file ) );
|
||||
if( error )
|
||||
LoadError error = loadPatch( PathUtil::toAbsolute( _patch_file ) );
|
||||
if( error != LoadError::OK )
|
||||
{
|
||||
printf("Load error\n");
|
||||
}
|
||||
@@ -213,7 +213,7 @@ void PatmanInstrument::setFile( const QString & _patch_file, bool _rename )
|
||||
|
||||
|
||||
|
||||
PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
PatmanInstrument::LoadError PatmanInstrument::loadPatch(
|
||||
const QString & _filename )
|
||||
{
|
||||
unloadCurrentPatch();
|
||||
@@ -222,7 +222,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
if( !fd )
|
||||
{
|
||||
perror( "fopen" );
|
||||
return( LoadOpen );
|
||||
return( LoadError::Open );
|
||||
}
|
||||
|
||||
auto header = std::array<unsigned char, 239>{};
|
||||
@@ -232,19 +232,19 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
&& memcmp(header.data(), "GF1PATCH100\0ID#000002", 22)))
|
||||
{
|
||||
fclose( fd );
|
||||
return( LoadNotGUS );
|
||||
return( LoadError::NotGUS );
|
||||
}
|
||||
|
||||
if( header[82] != 1 && header[82] != 0 )
|
||||
{
|
||||
fclose( fd );
|
||||
return( LoadInstruments );
|
||||
return( LoadError::Instruments );
|
||||
}
|
||||
|
||||
if( header[151] != 1 && header[151] != 0 )
|
||||
{
|
||||
fclose( fd );
|
||||
return( LoadLayers );
|
||||
return( LoadError::Layers );
|
||||
}
|
||||
|
||||
int sample_count = header[198];
|
||||
@@ -256,14 +256,14 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
if ( fseek( fd, x, SEEK_CUR ) == -1 ) \
|
||||
{ \
|
||||
fclose( fd ); \
|
||||
return( LoadIO ); \
|
||||
return( LoadError::IO ); \
|
||||
}
|
||||
|
||||
#define READ_SHORT( x ) \
|
||||
if ( fread( &tmpshort, 2, 1, fd ) != 1 ) \
|
||||
{ \
|
||||
fclose( fd ); \
|
||||
return( LoadIO ); \
|
||||
return( LoadError::IO ); \
|
||||
} \
|
||||
x = (unsigned short)swap16IfBE( tmpshort );
|
||||
|
||||
@@ -271,7 +271,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
if ( fread( &x, 4, 1, fd ) != 1 ) \
|
||||
{ \
|
||||
fclose( fd ); \
|
||||
return( LoadIO ); \
|
||||
return( LoadError::IO ); \
|
||||
} \
|
||||
x = (unsigned)swap32IfBE( x );
|
||||
|
||||
@@ -295,7 +295,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
if ( fread( &modes, 1, 1, fd ) != 1 )
|
||||
{
|
||||
fclose( fd );
|
||||
return( LoadIO );
|
||||
return( LoadError::IO );
|
||||
}
|
||||
// skip scale frequency, scale factor, reserved space
|
||||
SKIP_BYTES( 2 + 2 + 36 );
|
||||
@@ -313,7 +313,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
{
|
||||
delete[] wave_samples;
|
||||
fclose( fd );
|
||||
return( LoadIO );
|
||||
return( LoadError::IO );
|
||||
}
|
||||
sample = swap16IfBE( sample );
|
||||
if( modes & MODES_UNSIGNED )
|
||||
@@ -337,7 +337,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
{
|
||||
delete[] wave_samples;
|
||||
fclose( fd );
|
||||
return( LoadIO );
|
||||
return( LoadError::IO );
|
||||
}
|
||||
if( modes & MODES_UNSIGNED )
|
||||
{
|
||||
@@ -374,7 +374,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch(
|
||||
delete[] data;
|
||||
}
|
||||
fclose( fd );
|
||||
return( LoadOK );
|
||||
return( LoadError::OK );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,17 +98,17 @@ private:
|
||||
BoolModel m_tunedModel;
|
||||
|
||||
|
||||
enum LoadErrors
|
||||
enum class LoadError
|
||||
{
|
||||
LoadOK,
|
||||
LoadOpen,
|
||||
LoadNotGUS,
|
||||
LoadInstruments,
|
||||
LoadLayers,
|
||||
LoadIO
|
||||
OK,
|
||||
Open,
|
||||
NotGUS,
|
||||
Instruments,
|
||||
Layers,
|
||||
IO
|
||||
} ;
|
||||
|
||||
LoadErrors loadPatch( const QString & _filename );
|
||||
LoadError loadPatch( const QString & _filename );
|
||||
void unloadCurrentPatch();
|
||||
|
||||
void selectSample( NotePlayHandle * _n );
|
||||
|
||||
@@ -48,7 +48,7 @@ Plugin::Descriptor PLUGIN_EXPORT peakcontrollereffect_plugin_descriptor =
|
||||
"Plugin for controlling knobs with sound peaks" ),
|
||||
"Paul Giblock <drfaygo/at/gmail.com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -49,32 +49,32 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
|
||||
setPalette( pal );
|
||||
setFixedSize( 240, 80 );
|
||||
|
||||
m_baseKnob = new Knob( knobBright_26, this );
|
||||
m_baseKnob = new Knob( KnobType::Bright26, this );
|
||||
m_baseKnob->setLabel( tr( "BASE" ) );
|
||||
m_baseKnob->setModel( &_controls->m_baseModel );
|
||||
m_baseKnob->setHintText( tr( "Base:" ) , "" );
|
||||
|
||||
m_amountKnob = new Knob( knobBright_26, this );
|
||||
m_amountKnob = new Knob( KnobType::Bright26, this );
|
||||
m_amountKnob->setLabel( tr( "AMNT" ) );
|
||||
m_amountKnob->setModel( &_controls->m_amountModel );
|
||||
m_amountKnob->setHintText( tr( "Modulation amount:" ) , "" );
|
||||
|
||||
m_amountMultKnob = new Knob( knobBright_26, this );
|
||||
m_amountMultKnob = new Knob( KnobType::Bright26, this );
|
||||
m_amountMultKnob->setLabel( tr( "MULT" ) );
|
||||
m_amountMultKnob->setModel( &_controls->m_amountMultModel );
|
||||
m_amountMultKnob->setHintText( tr( "Amount multiplicator:" ) , "" );
|
||||
|
||||
m_attackKnob = new Knob( knobBright_26, this );
|
||||
m_attackKnob = new Knob( KnobType::Bright26, this );
|
||||
m_attackKnob->setLabel( tr( "ATCK" ) );
|
||||
m_attackKnob->setModel( &_controls->m_attackModel );
|
||||
m_attackKnob->setHintText( tr( "Attack:" ) , "" );
|
||||
|
||||
m_decayKnob = new Knob( knobBright_26, this );
|
||||
m_decayKnob = new Knob( KnobType::Bright26, this );
|
||||
m_decayKnob->setLabel( tr( "DCAY" ) );
|
||||
m_decayKnob->setModel( &_controls->m_decayModel );
|
||||
m_decayKnob->setHintText( tr( "Release:" ) , "" );
|
||||
|
||||
m_tresholdKnob = new Knob( knobBright_26, this );
|
||||
m_tresholdKnob = new Knob( KnobType::Bright26, this );
|
||||
m_tresholdKnob->setLabel( tr( "TRSH" ) );
|
||||
m_tresholdKnob->setModel( &_controls->m_tresholdModel );
|
||||
m_tresholdKnob->setHintText( tr( "Treshold:" ) , "" );
|
||||
|
||||
@@ -42,7 +42,7 @@ Plugin::Descriptor PLUGIN_EXPORT reverbsc_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "Reverb algorithm by Sean Costello" ),
|
||||
"Paul Batchelor",
|
||||
0x0123,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -42,25 +42,25 @@ ReverbSCControlDialog::ReverbSCControlDialog( ReverbSCControls* controls ) :
|
||||
setPalette( pal );
|
||||
setFixedSize( 185, 55 );
|
||||
|
||||
auto inputGainKnob = new Knob(knobBright_26, this);
|
||||
auto inputGainKnob = new Knob(KnobType::Bright26, this);
|
||||
inputGainKnob -> move( 16, 10 );
|
||||
inputGainKnob->setModel( &controls->m_inputGainModel );
|
||||
inputGainKnob->setLabel( tr( "Input" ) );
|
||||
inputGainKnob->setHintText( tr( "Input gain:" ) , "dB" );
|
||||
|
||||
auto sizeKnob = new Knob(knobBright_26, this);
|
||||
auto sizeKnob = new Knob(KnobType::Bright26, this);
|
||||
sizeKnob -> move( 57, 10 );
|
||||
sizeKnob->setModel( &controls->m_sizeModel );
|
||||
sizeKnob->setLabel( tr( "Size" ) );
|
||||
sizeKnob->setHintText( tr( "Size:" ) , "" );
|
||||
|
||||
auto colorKnob = new Knob(knobBright_26, this);
|
||||
auto colorKnob = new Knob(KnobType::Bright26, this);
|
||||
colorKnob -> move( 98, 10 );
|
||||
colorKnob->setModel( &controls->m_colorModel );
|
||||
colorKnob->setLabel( tr( "Color" ) );
|
||||
colorKnob->setHintText( tr( "Color:" ) , "" );
|
||||
|
||||
auto outputGainKnob = new Knob(knobBright_26, this);
|
||||
auto outputGainKnob = new Knob(KnobType::Bright26, this);
|
||||
outputGainKnob -> move( 139, 10 );
|
||||
outputGainKnob->setModel( &controls->m_outputGainModel );
|
||||
outputGainKnob->setLabel( tr( "Output" ) );
|
||||
|
||||
@@ -63,7 +63,7 @@ Plugin::Descriptor PLUGIN_EXPORT sf2player_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP( "PluginBrowser", "Player for SoundFont files" ),
|
||||
"Paul Giblock <drfaygo/at/gmail/dot/com>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
"sf2,sf3",
|
||||
nullptr,
|
||||
@@ -200,8 +200,8 @@ Sf2Instrument::Sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
Sf2Instrument::~Sf2Instrument()
|
||||
{
|
||||
Engine::audioEngine()->removePlayHandlesOfTypes( instrumentTrack(),
|
||||
PlayHandle::TypeNotePlayHandle
|
||||
| PlayHandle::TypeInstrumentPlayHandle );
|
||||
PlayHandle::Type::NotePlayHandle
|
||||
| PlayHandle::Type::InstrumentPlayHandle );
|
||||
freeFont();
|
||||
delete_fluid_synth( m_synth );
|
||||
delete_fluid_settings( m_settings );
|
||||
@@ -616,7 +616,7 @@ void Sf2Instrument::reloadSynth()
|
||||
|
||||
m_synthMutex.lock();
|
||||
if( Engine::audioEngine()->currentQualitySettings().interpolation >=
|
||||
AudioEngine::qualitySettings::Interpolation_SincFastest )
|
||||
AudioEngine::qualitySettings::Interpolation::SincFastest )
|
||||
{
|
||||
fluid_synth_set_interp_method( m_synth, -1, FLUID_INTERP_7THORDER );
|
||||
}
|
||||
@@ -936,7 +936,7 @@ class Sf2Knob : public Knob
|
||||
{
|
||||
public:
|
||||
Sf2Knob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
Knob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 31, 38 );
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
|
||||
Flags flags() const override
|
||||
{
|
||||
return IsSingleStreamed;
|
||||
return Flag::IsSingleStreamed;
|
||||
}
|
||||
|
||||
gui::PluginView* instantiateView( QWidget * _parent ) override;
|
||||
|
||||
@@ -67,7 +67,7 @@ Plugin::Descriptor PLUGIN_EXPORT sfxr_plugin_descriptor =
|
||||
"LMMS port of sfxr" ),
|
||||
"Wong Cho Ching",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -350,7 +350,7 @@ SfxrInstrument::SfxrInstrument( InstrumentTrack * _instrument_track ) :
|
||||
m_lpFilResoModel(0.0f, this, "LP Filter Resonance"),
|
||||
m_hpFilCutModel(0.0f, this, "HP Filter Cutoff"),
|
||||
m_hpFilCutSweepModel(0.0f, this, "HP Filter Cutoff Sweep"),
|
||||
m_waveFormModel( SQR_WAVE, 0, WAVES_NUM-1, this, tr( "Wave" ) )
|
||||
m_waveFormModel( static_cast<int>(SfxrWave::Square), 0, NumSfxrWaves-1, this, tr( "Wave" ) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -549,7 +549,7 @@ class SfxrKnob : public Knob
|
||||
{
|
||||
public:
|
||||
SfxrKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
Knob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 20, 20 );
|
||||
setCenterPointX( 10.0 );
|
||||
|
||||
@@ -37,10 +37,11 @@ namespace lmms
|
||||
{
|
||||
|
||||
|
||||
enum SfxrWaves
|
||||
enum class SfxrWave
|
||||
{
|
||||
SQR_WAVE, SAW_WAVE, SINE_WAVE, NOISE_WAVE, WAVES_NUM
|
||||
Square, Saw, Sine, Noise, Count
|
||||
};
|
||||
constexpr auto NumSfxrWaves = static_cast<std::size_t>(SfxrWave::Count);
|
||||
|
||||
const int WAVEFORM_BASE_X = 20;
|
||||
const int WAVEFORM_BASE_Y = 15;
|
||||
|
||||
@@ -83,7 +83,7 @@ Plugin::Descriptor PLUGIN_EXPORT sid_plugin_descriptor =
|
||||
"Csaba Hruska <csaba.hruska/at/gmail.com>"
|
||||
"Attila Herman <attila589/at/gmail.com>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -105,7 +105,7 @@ VoiceObject::VoiceObject( Model * _parent, int _idx ) :
|
||||
tr( "Voice %1 release" ).arg( _idx+1 ) ),
|
||||
m_coarseModel( 0.0f, -24.0, 24.0, 1.0f, this,
|
||||
tr( "Voice %1 coarse detuning" ).arg( _idx+1 ) ),
|
||||
m_waveFormModel( TriangleWave, 0, NumWaveShapes-1, this,
|
||||
m_waveFormModel( static_cast<int>(WaveForm::Triangle), 0, NumWaveShapes-1, this,
|
||||
tr( "Voice %1 wave shape" ).arg( _idx+1 ) ),
|
||||
|
||||
m_syncModel( false, this, tr( "Voice %1 sync" ).arg( _idx+1 ) ),
|
||||
@@ -121,12 +121,12 @@ SidInstrument::SidInstrument( InstrumentTrack * _instrument_track ) :
|
||||
// filter
|
||||
m_filterFCModel( 1024.0f, 0.0f, 2047.0f, 1.0f, this, tr( "Cutoff frequency" ) ),
|
||||
m_filterResonanceModel( 8.0f, 0.0f, 15.0f, 1.0f, this, tr( "Resonance" ) ),
|
||||
m_filterModeModel( LowPass, 0, NumFilterTypes-1, this, tr( "Filter type" )),
|
||||
m_filterModeModel( static_cast<int>(FilterType::LowPass), 0, NumFilterTypes-1, this, tr( "Filter type" )),
|
||||
|
||||
// misc
|
||||
m_voice3OffModel( false, this, tr( "Voice 3 off" ) ),
|
||||
m_volumeModel( 15.0f, 0.0f, 15.0f, 1.0f, this, tr( "Volume" ) ),
|
||||
m_chipModel( sidMOS8580, 0, NumChipModels-1, this, tr( "Chip model" ) )
|
||||
m_chipModel( static_cast<int>(ChipModel::MOS8580), 0, NumChipModels-1, this, tr( "Chip model" ) )
|
||||
{
|
||||
for( int i = 0; i < 3; ++i )
|
||||
{
|
||||
@@ -323,7 +323,7 @@ void SidInstrument::playNote( NotePlayHandle * _n,
|
||||
reg = 0x00;
|
||||
}
|
||||
|
||||
if( (ChipModel)m_chipModel.value() == sidMOS6581 )
|
||||
if( (ChipModel)m_chipModel.value() == ChipModel::MOS6581 )
|
||||
{
|
||||
sid->set_chip_model( MOS6581 );
|
||||
}
|
||||
@@ -360,13 +360,13 @@ void SidInstrument::playNote( NotePlayHandle * _n,
|
||||
data8 += m_voice[i]->m_syncModel.value()?2:0;
|
||||
data8 += m_voice[i]->m_ringModModel.value()?4:0;
|
||||
data8 += m_voice[i]->m_testModel.value()?8:0;
|
||||
switch( m_voice[i]->m_waveFormModel.value() )
|
||||
switch( static_cast<VoiceObject::WaveForm>(m_voice[i]->m_waveFormModel.value()) )
|
||||
{
|
||||
default: break;
|
||||
case VoiceObject::NoiseWave: data8 += 128; break;
|
||||
case VoiceObject::SquareWave: data8 += 64; break;
|
||||
case VoiceObject::SawWave: data8 += 32; break;
|
||||
case VoiceObject::TriangleWave: data8 += 16; break;
|
||||
case VoiceObject::WaveForm::Noise: data8 += 128; break;
|
||||
case VoiceObject::WaveForm::Square: data8 += 64; break;
|
||||
case VoiceObject::WaveForm::Saw: data8 += 32; break;
|
||||
case VoiceObject::WaveForm::Triangle: data8 += 16; break;
|
||||
}
|
||||
sidreg[base+4] = data8&0x00FF;
|
||||
// ad
|
||||
@@ -406,12 +406,12 @@ void SidInstrument::playNote( NotePlayHandle * _n,
|
||||
data8 = data16&0x000F;
|
||||
data8 += m_voice3OffModel.value()?128:0;
|
||||
|
||||
switch( m_filterModeModel.value() )
|
||||
switch( static_cast<FilterType>(m_filterModeModel.value()) )
|
||||
{
|
||||
default: break;
|
||||
case LowPass: data8 += 16; break;
|
||||
case BandPass: data8 += 32; break;
|
||||
case HighPass: data8 += 64; break;
|
||||
case FilterType::LowPass: data8 += 16; break;
|
||||
case FilterType::BandPass: data8 += 32; break;
|
||||
case FilterType::HighPass: data8 += 64; break;
|
||||
}
|
||||
|
||||
sidreg[24] = data8&0x00FF;
|
||||
@@ -459,7 +459,7 @@ class sidKnob : public Knob
|
||||
{
|
||||
public:
|
||||
sidKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
Knob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 16, 16 );
|
||||
setCenterPointX( 7.5 );
|
||||
|
||||
@@ -50,13 +50,15 @@ class VoiceObject : public Model
|
||||
Q_OBJECT
|
||||
MM_OPERATORS
|
||||
public:
|
||||
enum WaveForm {
|
||||
SquareWave = 0,
|
||||
TriangleWave,
|
||||
SawWave,
|
||||
NoiseWave,
|
||||
NumWaveShapes
|
||||
enum class WaveForm {
|
||||
Square = 0,
|
||||
Triangle,
|
||||
Saw,
|
||||
Noise,
|
||||
Count
|
||||
};
|
||||
constexpr static auto NumWaveShapes = static_cast<std::size_t>(WaveForm::Count);
|
||||
|
||||
VoiceObject( Model * _parent, int _idx );
|
||||
~VoiceObject() override = default;
|
||||
|
||||
@@ -82,19 +84,20 @@ class SidInstrument : public Instrument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum FilerType {
|
||||
enum class FilterType {
|
||||
HighPass = 0,
|
||||
BandPass,
|
||||
LowPass,
|
||||
NumFilterTypes
|
||||
Count
|
||||
};
|
||||
constexpr static auto NumFilterTypes = static_cast<std::size_t>(FilterType::Count);
|
||||
|
||||
enum ChipModel {
|
||||
sidMOS6581 = 0,
|
||||
sidMOS8580,
|
||||
NumChipModels
|
||||
enum class ChipModel {
|
||||
MOS6581 = 0,
|
||||
MOS8580,
|
||||
Count
|
||||
};
|
||||
|
||||
constexpr static auto NumChipModels = static_cast<std::size_t>(ChipModel::Count);
|
||||
|
||||
SidInstrument( InstrumentTrack * _instrument_track );
|
||||
~SidInstrument() override = default;
|
||||
|
||||
@@ -48,7 +48,7 @@ extern "C" {
|
||||
QT_TRANSLATE_NOOP("PluginBrowser", "A graphical spectrum analyzer."),
|
||||
"Martin Pavelek <he29/dot/HS/at/gmail/dot/com>",
|
||||
0x0112,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -66,7 +66,7 @@ SaControls::SaControls(Analyzer *effect) :
|
||||
m_zeroPaddingModel(2.0f, 0.0f, 4.0f, 1.0f, this, tr("FFT zero padding"))
|
||||
{
|
||||
// Frequency and amplitude ranges; order must match
|
||||
// FREQUENCY_RANGES and AMPLITUDE_RANGES defined in SaControls.h
|
||||
// FrequencyRange and AmplitudeRange defined in SaControls.h
|
||||
m_freqRangeModel.addItem(tr("Full (auto)"));
|
||||
m_freqRangeModel.addItem(tr("Audible"));
|
||||
m_freqRangeModel.addItem(tr("Bass"));
|
||||
@@ -99,7 +99,7 @@ SaControls::SaControls(Analyzer *effect) :
|
||||
}
|
||||
m_blockSizeModel.setValue(m_blockSizeModel.findText("2048"));
|
||||
|
||||
// Window type order must match FFT_WINDOWS defined in fft_helpers.h
|
||||
// Window type order must match FFTWindow defined in fft_helpers.h
|
||||
m_windowModel.addItem(tr("Rectangular (Off)"));
|
||||
m_windowModel.addItem(tr("Blackman-Harris (Default)"));
|
||||
m_windowModel.addItem(tr("Hamming"));
|
||||
|
||||
@@ -236,7 +236,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
controls_layout->setStretchFactor(advanced_widget, 10);
|
||||
|
||||
// Peak envelope resolution
|
||||
auto envelopeResolutionKnob = new Knob(knobSmall_17, this);
|
||||
auto envelopeResolutionKnob = new Knob(KnobType::Small17, 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."));
|
||||
@@ -244,7 +244,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(envelopeResolutionKnob, 0, 0, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// Spectrum graph resolution
|
||||
auto spectrumResolutionKnob = new Knob(knobSmall_17, this);
|
||||
auto spectrumResolutionKnob = new Knob(KnobType::Small17, 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."));
|
||||
@@ -252,7 +252,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(spectrumResolutionKnob, 1, 0, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// Peak falloff speed
|
||||
auto peakDecayFactorKnob = new Knob(knobSmall_17, this);
|
||||
auto peakDecayFactorKnob = new Knob(KnobType::Small17, this);
|
||||
peakDecayFactorKnob->setModel(&controls->m_peakDecayFactorModel);
|
||||
peakDecayFactorKnob->setLabel(tr("Falloff factor"));
|
||||
peakDecayFactorKnob->setToolTip(tr("Decrease to make peaks fall faster."));
|
||||
@@ -260,7 +260,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(peakDecayFactorKnob, 0, 1, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// Averaging weight
|
||||
auto averagingWeightKnob = new Knob(knobSmall_17, this);
|
||||
auto averagingWeightKnob = new Knob(KnobType::Small17, this);
|
||||
averagingWeightKnob->setModel(&controls->m_averagingWeightModel);
|
||||
averagingWeightKnob->setLabel(tr("Averaging weight"));
|
||||
averagingWeightKnob->setToolTip(tr("Decrease to make averaging slower and smoother."));
|
||||
@@ -268,7 +268,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(averagingWeightKnob, 1, 1, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// Waterfall history size
|
||||
auto waterfallHeightKnob = new Knob(knobSmall_17, this);
|
||||
auto waterfallHeightKnob = new Knob(KnobType::Small17, 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."));
|
||||
@@ -278,7 +278,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
connect(&controls->m_waterfallHeightModel, &FloatModel::dataChanged, [=] {processor->reallocateBuffers();});
|
||||
|
||||
// Waterfall gamma correction
|
||||
auto waterfallGammaKnob = new Knob(knobSmall_17, this);
|
||||
auto waterfallGammaKnob = new Knob(KnobType::Small17, 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."));
|
||||
@@ -286,7 +286,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(waterfallGammaKnob, 1, 2, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// FFT window overlap
|
||||
auto windowOverlapKnob = new Knob(knobSmall_17, this);
|
||||
auto windowOverlapKnob = new Knob(KnobType::Small17, 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."));
|
||||
@@ -294,7 +294,7 @@ SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor)
|
||||
advanced_layout->addWidget(windowOverlapKnob, 0, 3, 1, 1, Qt::AlignCenter);
|
||||
|
||||
// FFT zero padding
|
||||
auto zeroPaddingKnob = new Knob(knobSmall_17, this);
|
||||
auto zeroPaddingKnob = new Knob(KnobType::Small17, this);
|
||||
zeroPaddingKnob->setModel(&controls->m_zeroPaddingModel);
|
||||
zeroPaddingKnob->setLabel(tr("Zero padding"));
|
||||
zeroPaddingKnob->setToolTip(tr("Increase to get smoother-looking spectrum. Warning: high CPU usage."));
|
||||
|
||||
@@ -58,7 +58,7 @@ SaProcessor::SaProcessor(const SaControls *controls) :
|
||||
m_reallocating(false)
|
||||
{
|
||||
m_fftWindow.resize(m_inBlockSize, 1.0);
|
||||
precomputeWindow(m_fftWindow.data(), m_inBlockSize, BLACKMAN_HARRIS);
|
||||
precomputeWindow(m_fftWindow.data(), m_inBlockSize, FFTWindow::BlackmanHarris);
|
||||
|
||||
m_bufferL.resize(m_inBlockSize, 0);
|
||||
m_bufferR.resize(m_inBlockSize, 0);
|
||||
@@ -402,7 +402,7 @@ void SaProcessor::reallocateBuffers()
|
||||
|
||||
// allocate new space, create new plan and resize containers
|
||||
m_fftWindow.resize(new_in_size, 1.0);
|
||||
precomputeWindow(m_fftWindow.data(), new_in_size, (FFT_WINDOWS) m_controls->m_windowModel.value());
|
||||
precomputeWindow(m_fftWindow.data(), new_in_size, (FFTWindow) m_controls->m_windowModel.value());
|
||||
m_bufferL.resize(new_in_size, 0);
|
||||
m_bufferR.resize(new_in_size, 0);
|
||||
m_filteredBufferL.resize(new_fft_size, 0);
|
||||
@@ -448,7 +448,7 @@ void SaProcessor::rebuildWindow()
|
||||
{
|
||||
// computation is done in fft_helpers
|
||||
QMutexLocker lock(&m_dataAccess);
|
||||
precomputeWindow(m_fftWindow.data(), m_inBlockSize, (FFT_WINDOWS) m_controls->m_windowModel.value());
|
||||
precomputeWindow(m_fftWindow.data(), m_inBlockSize, (FFTWindow) m_controls->m_windowModel.value());
|
||||
}
|
||||
|
||||
|
||||
@@ -545,28 +545,28 @@ float SaProcessor::binBandwidth() const
|
||||
|
||||
float SaProcessor::getFreqRangeMin(bool linear) const
|
||||
{
|
||||
switch (m_controls->m_freqRangeModel.value())
|
||||
switch (static_cast<FrequencyRange>(m_controls->m_freqRangeModel.value()))
|
||||
{
|
||||
case FRANGE_AUDIBLE: return FRANGE_AUDIBLE_START;
|
||||
case FRANGE_BASS: return FRANGE_BASS_START;
|
||||
case FRANGE_MIDS: return FRANGE_MIDS_START;
|
||||
case FRANGE_HIGH: return FRANGE_HIGH_START;
|
||||
case FrequencyRange::Audible: return FRANGE_AUDIBLE_START;
|
||||
case FrequencyRange::Bass: return FRANGE_BASS_START;
|
||||
case FrequencyRange::Mids: return FRANGE_MIDS_START;
|
||||
case FrequencyRange::High: return FRANGE_HIGH_START;
|
||||
default:
|
||||
case FRANGE_FULL: return linear ? 0 : LOWEST_LOG_FREQ;
|
||||
case FrequencyRange::Full: return linear ? 0 : LOWEST_LOG_FREQ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float SaProcessor::getFreqRangeMax() const
|
||||
{
|
||||
switch (m_controls->m_freqRangeModel.value())
|
||||
switch (static_cast<FrequencyRange>(m_controls->m_freqRangeModel.value()))
|
||||
{
|
||||
case FRANGE_AUDIBLE: return FRANGE_AUDIBLE_END;
|
||||
case FRANGE_BASS: return FRANGE_BASS_END;
|
||||
case FRANGE_MIDS: return FRANGE_MIDS_END;
|
||||
case FRANGE_HIGH: return FRANGE_HIGH_END;
|
||||
case FrequencyRange::Audible: return FRANGE_AUDIBLE_END;
|
||||
case FrequencyRange::Bass: return FRANGE_BASS_END;
|
||||
case FrequencyRange::Mids: return FRANGE_MIDS_END;
|
||||
case FrequencyRange::High: return FRANGE_HIGH_END;
|
||||
default:
|
||||
case FRANGE_FULL: return getNyquistFreq();
|
||||
case FrequencyRange::Full: return getNyquistFreq();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,26 +619,26 @@ float SaProcessor::getAmpRangeMin(bool linear) const
|
||||
{
|
||||
// return very low limit to make sure zero gets included at linear grid
|
||||
if (linear) {return -900;}
|
||||
switch (m_controls->m_ampRangeModel.value())
|
||||
switch (static_cast<AmplitudeRange>(m_controls->m_ampRangeModel.value()))
|
||||
{
|
||||
case ARANGE_EXTENDED: return ARANGE_EXTENDED_START;
|
||||
case ARANGE_SILENT: return ARANGE_SILENT_START;
|
||||
case ARANGE_LOUD: return ARANGE_LOUD_START;
|
||||
case AmplitudeRange::Extended: return ARANGE_EXTENDED_START;
|
||||
case AmplitudeRange::Silent: return ARANGE_SILENT_START;
|
||||
case AmplitudeRange::Loud: return ARANGE_LOUD_START;
|
||||
default:
|
||||
case ARANGE_AUDIBLE: return ARANGE_AUDIBLE_START;
|
||||
case AmplitudeRange::Audible: return ARANGE_AUDIBLE_START;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float SaProcessor::getAmpRangeMax() const
|
||||
{
|
||||
switch (m_controls->m_ampRangeModel.value())
|
||||
switch (static_cast<AmplitudeRange>(m_controls->m_ampRangeModel.value()))
|
||||
{
|
||||
case ARANGE_EXTENDED: return ARANGE_EXTENDED_END;
|
||||
case ARANGE_SILENT: return ARANGE_SILENT_END;
|
||||
case ARANGE_LOUD: return ARANGE_LOUD_END;
|
||||
case AmplitudeRange::Extended: return ARANGE_EXTENDED_END;
|
||||
case AmplitudeRange::Silent: return ARANGE_SILENT_END;
|
||||
case AmplitudeRange::Loud: return ARANGE_LOUD_END;
|
||||
default:
|
||||
case ARANGE_AUDIBLE: return ARANGE_AUDIBLE_END;
|
||||
case AmplitudeRange::Audible: return ARANGE_AUDIBLE_END;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ Plugin::Descriptor PLUGIN_EXPORT stereoenhancer_plugin_descriptor =
|
||||
"Plugin for enhancing stereo separation of a stereo input file" ),
|
||||
"Lou Herard <lherard/at/gmail.com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -40,7 +40,7 @@ StereoEnhancerControlDialog::StereoEnhancerControlDialog(
|
||||
{
|
||||
auto l = new QHBoxLayout(this);
|
||||
|
||||
auto widthKnob = new Knob(knobBright_26, this);
|
||||
auto widthKnob = new Knob(KnobType::Bright26, this);
|
||||
widthKnob->setModel( &_controls->m_widthModel );
|
||||
widthKnob->setLabel( tr( "WIDTH" ) );
|
||||
widthKnob->setHintText( tr( "Width:" ) , " samples" );
|
||||
|
||||
@@ -43,7 +43,7 @@ Plugin::Descriptor PLUGIN_EXPORT stereomatrix_plugin_descriptor =
|
||||
"Plugin for freely manipulating stereo output" ),
|
||||
"Paul Giblock <drfaygo/at/gmail.com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -48,22 +48,22 @@ StereoMatrixControlDialog::StereoMatrixControlDialog(
|
||||
PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
setPalette( pal );
|
||||
|
||||
auto llKnob = new Knob(knobBright_26, this);
|
||||
auto llKnob = new Knob(KnobType::Bright26, this);
|
||||
llKnob->setModel( &_controls->m_llModel );
|
||||
llKnob->setHintText( tr( "Left to Left Vol:" ) , "" );
|
||||
llKnob->move( 10, 79 );
|
||||
|
||||
auto lrKnob = new Knob(knobBright_26, this);
|
||||
auto lrKnob = new Knob(KnobType::Bright26, this);
|
||||
lrKnob->setModel( &_controls->m_lrModel );
|
||||
lrKnob->setHintText( tr( "Left to Right Vol:" ) , "" );
|
||||
lrKnob->move( 48, 79 );
|
||||
|
||||
auto rlKnob = new Knob(knobBright_26, this);
|
||||
auto rlKnob = new Knob(KnobType::Bright26, this);
|
||||
rlKnob->setModel( &_controls->m_rlModel );
|
||||
rlKnob->setHintText( tr( "Right to Left Vol:" ) , "" );
|
||||
rlKnob->move( 85, 79 );
|
||||
|
||||
auto rrKnob = new Knob(knobBright_26, this);
|
||||
auto rrKnob = new Knob(KnobType::Bright26, this);
|
||||
rrKnob->setModel( &_controls->m_rrModel );
|
||||
rrKnob->setHintText( tr( "Right to Right Vol:" ) , "" );
|
||||
rrKnob->move( 123, 79 );
|
||||
|
||||
@@ -59,7 +59,7 @@ Plugin::Descriptor PLUGIN_EXPORT malletsstk_plugin_descriptor =
|
||||
"Tuneful things to bang on" ),
|
||||
"Danny McRae <khjklujn/at/users.sf.net>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -409,7 +409,7 @@ MalletsInstrumentView::MalletsInstrumentView( MalletsInstrument * _instrument,
|
||||
connect( &_instrument->m_presetsModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( changePreset() ) );
|
||||
|
||||
m_spreadKnob = new Knob( knobVintage_32, this );
|
||||
m_spreadKnob = new Knob( KnobType::Vintage32, this );
|
||||
m_spreadKnob->setLabel( tr( "Spread" ) );
|
||||
m_spreadKnob->move( 190, 140 );
|
||||
m_spreadKnob->setHintText( tr( "Spread:" ), "" );
|
||||
@@ -445,27 +445,27 @@ QWidget * MalletsInstrumentView::setupModalBarControls( QWidget * _parent )
|
||||
auto widget = new QWidget(_parent);
|
||||
widget->setFixedSize( 250, 250 );
|
||||
|
||||
m_hardnessKnob = new Knob( knobVintage_32, widget );
|
||||
m_hardnessKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_hardnessKnob->setLabel( tr( "Hardness" ) );
|
||||
m_hardnessKnob->move( 30, 90 );
|
||||
m_hardnessKnob->setHintText( tr( "Hardness:" ), "" );
|
||||
|
||||
m_positionKnob = new Knob( knobVintage_32, widget );
|
||||
m_positionKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_positionKnob->setLabel( tr( "Position" ) );
|
||||
m_positionKnob->move( 110, 90 );
|
||||
m_positionKnob->setHintText( tr( "Position:" ), "" );
|
||||
|
||||
m_vibratoGainKnob = new Knob( knobVintage_32, widget );
|
||||
m_vibratoGainKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_vibratoGainKnob->setLabel( tr( "Vibrato gain" ) );
|
||||
m_vibratoGainKnob->move( 30, 140 );
|
||||
m_vibratoGainKnob->setHintText( tr( "Vibrato gain:" ), "" );
|
||||
|
||||
m_vibratoFreqKnob = new Knob( knobVintage_32, widget );
|
||||
m_vibratoFreqKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_vibratoFreqKnob->setLabel( tr( "Vibrato frequency" ) );
|
||||
m_vibratoFreqKnob->move( 110, 140 );
|
||||
m_vibratoFreqKnob->setHintText( tr( "Vibrato frequency:" ), "" );
|
||||
|
||||
m_stickKnob = new Knob( knobVintage_32, widget );
|
||||
m_stickKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_stickKnob->setLabel( tr( "Stick mix" ) );
|
||||
m_stickKnob->move( 190, 90 );
|
||||
m_stickKnob->setHintText( tr( "Stick mix:" ), "" );
|
||||
@@ -481,27 +481,27 @@ QWidget * MalletsInstrumentView::setupTubeBellControls( QWidget * _parent )
|
||||
auto widget = new QWidget(_parent);
|
||||
widget->setFixedSize( 250, 250 );
|
||||
|
||||
m_modulatorKnob = new Knob( knobVintage_32, widget );
|
||||
m_modulatorKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_modulatorKnob->setLabel( tr( "Modulator" ) );
|
||||
m_modulatorKnob->move( 30, 90 );
|
||||
m_modulatorKnob->setHintText( tr( "Modulator:" ), "" );
|
||||
|
||||
m_crossfadeKnob = new Knob( knobVintage_32, widget );
|
||||
m_crossfadeKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_crossfadeKnob->setLabel( tr( "Crossfade" ) );
|
||||
m_crossfadeKnob->move( 110, 90 );
|
||||
m_crossfadeKnob->setHintText( tr( "Crossfade:" ), "" );
|
||||
|
||||
m_lfoSpeedKnob = new Knob( knobVintage_32, widget );
|
||||
m_lfoSpeedKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_lfoSpeedKnob->setLabel( tr( "LFO speed" ) );
|
||||
m_lfoSpeedKnob->move( 30, 140 );
|
||||
m_lfoSpeedKnob->setHintText( tr( "LFO speed:" ), "" );
|
||||
|
||||
m_lfoDepthKnob = new Knob( knobVintage_32, widget );
|
||||
m_lfoDepthKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_lfoDepthKnob->setLabel( tr( "LFO depth" ) );
|
||||
m_lfoDepthKnob->move( 110, 140 );
|
||||
m_lfoDepthKnob->setHintText( tr( "LFO depth:" ), "" );
|
||||
|
||||
m_adsrKnob = new Knob( knobVintage_32, widget );
|
||||
m_adsrKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_adsrKnob->setLabel( tr( "ADSR" ) );
|
||||
m_adsrKnob->move( 190, 90 );
|
||||
m_adsrKnob->setHintText( tr( "ADSR:" ), "" );
|
||||
@@ -521,22 +521,22 @@ QWidget * MalletsInstrumentView::setupBandedWGControls( QWidget * _parent )
|
||||
/* m_strikeLED = new LedCheckBox( tr( "Bowed" ), widget );
|
||||
m_strikeLED->move( 138, 25 );*/
|
||||
|
||||
m_pressureKnob = new Knob( knobVintage_32, widget );
|
||||
m_pressureKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_pressureKnob->setLabel( tr( "Pressure" ) );
|
||||
m_pressureKnob->move( 30, 90 );
|
||||
m_pressureKnob->setHintText( tr( "Pressure:" ), "" );
|
||||
|
||||
/* m_motionKnob = new Knob( knobVintage_32, widget );
|
||||
/* m_motionKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_motionKnob->setLabel( tr( "Motion" ) );
|
||||
m_motionKnob->move( 110, 90 );
|
||||
m_motionKnob->setHintText( tr( "Motion:" ), "" );*/
|
||||
|
||||
m_velocityKnob = new Knob( knobVintage_32, widget );
|
||||
m_velocityKnob = new Knob( KnobType::Vintage32, widget );
|
||||
m_velocityKnob->setLabel( tr( "Speed" ) );
|
||||
m_velocityKnob->move( 30, 140 );
|
||||
m_velocityKnob->setHintText( tr( "Speed:" ), "" );
|
||||
|
||||
/* m_vibratoKnob = new Knob( knobVintage_32, widget, tr( "Vibrato" ) );
|
||||
/* m_vibratoKnob = new Knob( KnobType::Vintage32, widget, tr( "Vibrato" ) );
|
||||
m_vibratoKnob->setLabel( tr( "Vibrato" ) );
|
||||
m_vibratoKnob->move( 110, 140 );
|
||||
m_vibratoKnob->setHintText( tr( "Vibrato:" ), "" );*/
|
||||
|
||||
@@ -57,7 +57,7 @@ Plugin::Descriptor PLUGIN_EXPORT tripleoscillator_plugin_descriptor =
|
||||
"in several ways" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0110,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -84,10 +84,10 @@ OscillatorObject::OscillatorObject( Model * _parent, int _idx ) :
|
||||
tr( "Osc %1 phase-offset" ).arg( _idx+1 ) ),
|
||||
m_stereoPhaseDetuningModel( 0.0f, 0.0f, 360.0f, 1.0f, this,
|
||||
tr( "Osc %1 stereo phase-detuning" ).arg( _idx+1 ) ),
|
||||
m_waveShapeModel( Oscillator::SineWave, 0,
|
||||
m_waveShapeModel( static_cast<int>(Oscillator::WaveShape::Sine), 0,
|
||||
Oscillator::NumWaveShapes-1, this,
|
||||
tr( "Osc %1 wave shape" ).arg( _idx+1 ) ),
|
||||
m_modulationAlgoModel( Oscillator::SignalMix, 0,
|
||||
m_modulationAlgoModel( static_cast<int>(Oscillator::ModulationAlgo::SignalMix), 0,
|
||||
Oscillator::NumModulationAlgos-1, this,
|
||||
tr( "Modulation type %1" ).arg( _idx+1 ) ),
|
||||
m_useWaveTableModel(true),
|
||||
@@ -426,7 +426,7 @@ class TripleOscKnob : public Knob
|
||||
{
|
||||
public:
|
||||
TripleOscKnob( QWidget * _parent ) :
|
||||
Knob( knobStyled, _parent )
|
||||
Knob( KnobType::Styled, _parent )
|
||||
{
|
||||
setFixedSize( 28, 35 );
|
||||
}
|
||||
@@ -554,7 +554,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
|
||||
int knob_y = osc_y + i * osc_h;
|
||||
|
||||
// setup volume-knob
|
||||
auto vk = new Knob(knobStyled, this);
|
||||
auto vk = new Knob(KnobType::Styled, this);
|
||||
vk->setVolumeKnob( true );
|
||||
vk->setFixedSize( 28, 35 );
|
||||
vk->move( 6, knob_y );
|
||||
|
||||
@@ -79,7 +79,7 @@ VecControlsDialog::VecControlsDialog(VecControls *controls) :
|
||||
config_layout->addStretch();
|
||||
|
||||
// Persistence knob
|
||||
auto persistenceKnob = new Knob(knobSmall_17, this);
|
||||
auto persistenceKnob = new Knob(KnobType::Small17, 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."));
|
||||
|
||||
@@ -39,7 +39,7 @@ extern "C" {
|
||||
QT_TRANSLATE_NOOP("PluginBrowser", "A stereo field visualizer."),
|
||||
"Martin Pavelek <he29/dot/HS/at/gmail/dot/com>",
|
||||
0x0100,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
||||
@@ -77,7 +77,7 @@ Plugin::Descriptor Q_DECL_EXPORT vestige_plugin_descriptor =
|
||||
"VST-host for using VST(i)-plugins within LMMS" ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
#ifdef LMMS_BUILD_LINUX
|
||||
"dll,so",
|
||||
@@ -185,8 +185,8 @@ VestigeInstrument::~VestigeInstrument()
|
||||
}
|
||||
|
||||
Engine::audioEngine()->removePlayHandlesOfTypes( instrumentTrack(),
|
||||
PlayHandle::TypeNotePlayHandle
|
||||
| PlayHandle::TypeInstrumentPlayHandle );
|
||||
PlayHandle::Type::NotePlayHandle
|
||||
| PlayHandle::Type::InstrumentPlayHandle );
|
||||
closePlugin();
|
||||
}
|
||||
|
||||
@@ -1004,7 +1004,7 @@ ManageVestigeInstrumentView::ManageVestigeInstrumentView( Instrument * _instrume
|
||||
sprintf(paramStr.data(), "param%d", i);
|
||||
s_dumpValues = dump[paramStr.data()].split(":");
|
||||
|
||||
vstKnobs[ i ] = new CustomTextKnob( knobBright_26, this, s_dumpValues.at( 1 ) );
|
||||
vstKnobs[ i ] = new CustomTextKnob( KnobType::Bright26, this, s_dumpValues.at( 1 ) );
|
||||
vstKnobs[ i ]->setDescription( s_dumpValues.at( 1 ) + ":" );
|
||||
vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
virtual Flags flags() const
|
||||
{
|
||||
return IsSingleStreamed | IsMidiBased;
|
||||
return Flag::IsSingleStreamed | Flag::IsMidiBased;
|
||||
}
|
||||
|
||||
virtual bool handleMidiEvent( const MidiEvent& event, const TimePos& time, f_cnt_t offset = 0 );
|
||||
|
||||
@@ -56,7 +56,7 @@ Plugin::Descriptor PLUGIN_EXPORT vibedstrings_plugin_descriptor =
|
||||
QT_TRANSLATE_NOOP("PluginBrowser", "Vibrating string modeler"),
|
||||
"Danny McRae <khjklujn/at/yahoo/com>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
nullptr
|
||||
@@ -272,14 +272,14 @@ namespace gui
|
||||
|
||||
VibedView::VibedView(Instrument* instrument, QWidget* parent) :
|
||||
InstrumentViewFixedSize(instrument, parent),
|
||||
m_volumeKnob(knobBright_26, this),
|
||||
m_stiffnessKnob(knobBright_26, this),
|
||||
m_pickKnob(knobBright_26, this),
|
||||
m_pickupKnob(knobBright_26, this),
|
||||
m_panKnob(knobBright_26, this),
|
||||
m_detuneKnob(knobBright_26, this),
|
||||
m_randomKnob(knobBright_26, this),
|
||||
m_lengthKnob(knobBright_26, this),
|
||||
m_volumeKnob(KnobType::Bright26, this),
|
||||
m_stiffnessKnob(KnobType::Bright26, this),
|
||||
m_pickKnob(KnobType::Bright26, this),
|
||||
m_pickupKnob(KnobType::Bright26, this),
|
||||
m_panKnob(KnobType::Bright26, this),
|
||||
m_detuneKnob(KnobType::Bright26, this),
|
||||
m_randomKnob(KnobType::Bright26, this),
|
||||
m_lengthKnob(KnobType::Bright26, this),
|
||||
m_graph(this),
|
||||
m_impulse("", this),
|
||||
m_power("", this, tr("Enable waveform")),
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
QString nodeName() const override;
|
||||
|
||||
Flags flags() const override { return IsNotBendable; }
|
||||
Flags flags() const override { return Flag::IsNotBendable; }
|
||||
|
||||
gui::PluginView* instantiateView(QWidget* parent) override;
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ struct ERect
|
||||
|
||||
using namespace std;
|
||||
|
||||
static lmms::VstHostLanguages hlang = lmms::LanguageEnglish;
|
||||
static lmms::VstHostLanguage hlang = lmms::VstHostLanguage::English;
|
||||
|
||||
static bool EMBED = false;
|
||||
static bool EMBED_X11 = false;
|
||||
@@ -390,7 +390,7 @@ public:
|
||||
#endif
|
||||
|
||||
private:
|
||||
enum GuiThreadMessages
|
||||
enum class GuiThreadMessage
|
||||
{
|
||||
None,
|
||||
ProcessPluginMessage,
|
||||
@@ -628,7 +628,7 @@ bool RemoteVstPlugin::processMessage( const message & _m )
|
||||
break;
|
||||
|
||||
case IdVstSetLanguage:
|
||||
hlang = static_cast<VstHostLanguages>( _m.getInt() );
|
||||
hlang = static_cast<VstHostLanguage>( _m.getInt() );
|
||||
break;
|
||||
|
||||
case IdVstGetParameterDump:
|
||||
@@ -1763,7 +1763,7 @@ intptr_t RemoteVstPlugin::hostCallback( AEffect * _effect, int32_t _opcode,
|
||||
// call application idle routine (this will
|
||||
// call effEditIdle for all open editors too)
|
||||
#ifndef NATIVE_LINUX_VST
|
||||
PostMessage( __MessageHwnd, WM_USER, GiveIdle, 0 );
|
||||
PostMessage( __MessageHwnd, WM_USER, static_cast<WPARAM>(GuiThreadMessage::GiveIdle), 0 );
|
||||
#else
|
||||
__plugin->sendX11Idle();
|
||||
#endif
|
||||
@@ -2066,7 +2066,7 @@ intptr_t RemoteVstPlugin::hostCallback( AEffect * _effect, int32_t _opcode,
|
||||
|
||||
case audioMasterGetLanguage:
|
||||
SHOW_CALLBACK( "amc: audioMasterGetLanguage\n" );
|
||||
return hlang;
|
||||
return static_cast<std::intptr_t>(hlang);
|
||||
|
||||
case audioMasterGetDirectory:
|
||||
SHOW_CALLBACK( "amc: audioMasterGetDirectory\n" );
|
||||
@@ -2077,7 +2077,7 @@ intptr_t RemoteVstPlugin::hostCallback( AEffect * _effect, int32_t _opcode,
|
||||
SHOW_CALLBACK( "amc: audioMasterUpdateDisplay\n" );
|
||||
// something has changed, update 'multi-fx' display
|
||||
#ifndef NATIVE_LINUX_VST
|
||||
PostMessage( __MessageHwnd, WM_USER, GiveIdle, 0 );
|
||||
PostMessage( __MessageHwnd, WM_USER, static_cast<WPARAM>(GuiThreadMessage::GiveIdle), 0 );
|
||||
#else
|
||||
__plugin->sendX11Idle();
|
||||
#endif
|
||||
@@ -2234,7 +2234,7 @@ void * RemoteVstPlugin::processingThread(void * _param)
|
||||
#ifndef NATIVE_LINUX_VST
|
||||
PostMessage( __MessageHwnd,
|
||||
WM_USER,
|
||||
ProcessPluginMessage,
|
||||
static_cast<WPARAM>(GuiThreadMessage::ProcessPluginMessage),
|
||||
(LPARAM) new message( m ) );
|
||||
#else
|
||||
_this->queueMessage( m );
|
||||
@@ -2244,7 +2244,7 @@ void * RemoteVstPlugin::processingThread(void * _param)
|
||||
|
||||
// notify GUI thread about shutdown
|
||||
#ifndef NATIVE_LINUX_VST
|
||||
PostMessage( __MessageHwnd, WM_USER, ClosePlugin, 0 );
|
||||
PostMessage( __MessageHwnd, WM_USER, static_cast<WPARAM>(GuiThreadMessage::ClosePlugin), 0 );
|
||||
|
||||
return 0;
|
||||
#else
|
||||
@@ -2349,9 +2349,9 @@ LRESULT CALLBACK RemoteVstPlugin::wndProc( HWND hwnd, UINT uMsg,
|
||||
}
|
||||
else if( uMsg == WM_USER )
|
||||
{
|
||||
switch( wParam )
|
||||
switch( static_cast<GuiThreadMessage>(wParam) )
|
||||
{
|
||||
case ProcessPluginMessage:
|
||||
case GuiThreadMessage::ProcessPluginMessage:
|
||||
{
|
||||
message * m = (message *) lParam;
|
||||
__plugin->queueMessage( *m );
|
||||
@@ -2363,11 +2363,11 @@ LRESULT CALLBACK RemoteVstPlugin::wndProc( HWND hwnd, UINT uMsg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
case GiveIdle:
|
||||
case GuiThreadMessage::GiveIdle:
|
||||
__plugin->idle();
|
||||
return 0;
|
||||
|
||||
case ClosePlugin:
|
||||
case GuiThreadMessage::ClosePlugin:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -216,18 +216,18 @@ void VstPlugin::tryLoad( const QString &remoteVstPluginExecutable )
|
||||
|
||||
lock();
|
||||
|
||||
VstHostLanguages hlang = LanguageEnglish;
|
||||
VstHostLanguage hlang = VstHostLanguage::English;
|
||||
switch( QLocale::system().language() )
|
||||
{
|
||||
case QLocale::French: hlang = LanguageFrench; break;
|
||||
case QLocale::German: hlang = LanguageGerman; break;
|
||||
case QLocale::Italian: hlang = LanguageItalian; break;
|
||||
case QLocale::Japanese: hlang = LanguageJapanese; break;
|
||||
case QLocale::Korean: hlang = LanguageKorean; break;
|
||||
case QLocale::Spanish: hlang = LanguageSpanish; break;
|
||||
case QLocale::French: hlang = VstHostLanguage::French; break;
|
||||
case QLocale::German: hlang = VstHostLanguage::German; break;
|
||||
case QLocale::Italian: hlang = VstHostLanguage::Italian; break;
|
||||
case QLocale::Japanese: hlang = VstHostLanguage::Japanese; break;
|
||||
case QLocale::Korean: hlang = VstHostLanguage::Korean; break;
|
||||
case QLocale::Spanish: hlang = VstHostLanguage::Spanish; break;
|
||||
default: break;
|
||||
}
|
||||
sendMessage( message( IdVstSetLanguage ).addInt( hlang ) );
|
||||
sendMessage( message( IdVstSetLanguage ).addInt( static_cast<int>(hlang) ) );
|
||||
sendMessage( message( IdVstLoadPlugin ).addString( QSTR_TO_STDSTR( m_plugin ) ) );
|
||||
|
||||
waitForInitDone();
|
||||
|
||||
@@ -40,15 +40,15 @@ struct VstParameterDumpItem
|
||||
|
||||
|
||||
|
||||
enum VstHostLanguages
|
||||
enum class VstHostLanguage
|
||||
{
|
||||
LanguageEnglish = 1,
|
||||
LanguageGerman,
|
||||
LanguageFrench,
|
||||
LanguageItalian,
|
||||
LanguageSpanish,
|
||||
LanguageJapanese,
|
||||
LanguageKorean
|
||||
English = 1,
|
||||
German,
|
||||
French,
|
||||
Italian,
|
||||
Spanish,
|
||||
Japanese,
|
||||
Korean
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Plugin::Descriptor VSTBASE_EXPORT vstbase_plugin_descriptor =
|
||||
"library for all LMMS plugins dealing with VST-plugins",
|
||||
"Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>",
|
||||
0x0100,
|
||||
Plugin::Library,
|
||||
Plugin::Type::Library,
|
||||
nullptr,
|
||||
nullptr,
|
||||
} ;
|
||||
|
||||
@@ -49,10 +49,10 @@ Plugin::Descriptor PLUGIN_EXPORT vsteffect_plugin_descriptor =
|
||||
"plugin for using arbitrary VST effects inside LMMS." ),
|
||||
"Tobias Doerffel <tobydox/at/users.sf.net>",
|
||||
0x0200,
|
||||
Plugin::Effect,
|
||||
Plugin::Type::Effect,
|
||||
new PluginPixmapLoader("logo"),
|
||||
nullptr,
|
||||
new VstSubPluginFeatures( Plugin::Effect )
|
||||
new VstSubPluginFeatures( Plugin::Type::Effect )
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -48,6 +48,16 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
m_plugin( nullptr ),
|
||||
tbLabel( nullptr )
|
||||
{
|
||||
#if QT_VERSION < 0x50C00
|
||||
// Workaround for a bug in Qt versions below 5.12,
|
||||
// where argument-dependent-lookup fails for QFlags operators
|
||||
// declared inside a namepsace.
|
||||
// This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h
|
||||
// See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348
|
||||
|
||||
using ::operator|;
|
||||
#endif
|
||||
|
||||
auto l = new QGridLayout(this);
|
||||
l->setContentsMargins( 10, 10, 10, 10 );
|
||||
l->setVerticalSpacing( 2 );
|
||||
|
||||
@@ -316,6 +316,16 @@ namespace gui
|
||||
ManageVSTEffectView::ManageVSTEffectView( VstEffect * _eff, VstEffectControls * m_vi ) :
|
||||
m_effect( _eff )
|
||||
{
|
||||
#if QT_VERSION < 0x50C00
|
||||
// Workaround for a bug in Qt versions below 5.12,
|
||||
// where argument-dependent-lookup fails for QFlags operators
|
||||
// declared inside a namepsace.
|
||||
// This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h
|
||||
// See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348
|
||||
|
||||
using ::operator|;
|
||||
#endif
|
||||
|
||||
m_vi2 = m_vi;
|
||||
widget = new QWidget();
|
||||
m_vi->m_scrollArea = new QScrollArea( widget );
|
||||
@@ -379,7 +389,7 @@ ManageVSTEffectView::ManageVSTEffectView( VstEffect * _eff, VstEffectControls *
|
||||
sprintf(paramStr.data(), "param%d", i);
|
||||
s_dumpValues = dump[paramStr.data()].split(":");
|
||||
|
||||
vstKnobs[ i ] = new CustomTextKnob( knobBright_26, widget, s_dumpValues.at( 1 ) );
|
||||
vstKnobs[ i ] = new CustomTextKnob( KnobType::Bright26, widget, s_dumpValues.at( 1 ) );
|
||||
vstKnobs[ i ]->setDescription( s_dumpValues.at( 1 ) + ":" );
|
||||
vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace lmms
|
||||
{
|
||||
|
||||
|
||||
VstSubPluginFeatures::VstSubPluginFeatures( Plugin::PluginTypes _type ) :
|
||||
VstSubPluginFeatures::VstSubPluginFeatures( Plugin::Type _type ) :
|
||||
SubPluginFeatures( _type )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace lmms
|
||||
class VstSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures
|
||||
{
|
||||
public:
|
||||
VstSubPluginFeatures( Plugin::PluginTypes _type );
|
||||
VstSubPluginFeatures( Plugin::Type _type );
|
||||
|
||||
void fillDescriptionWidget( QWidget * _parent,
|
||||
const Key * _key ) const override;
|
||||
|
||||
@@ -52,7 +52,7 @@ Plugin::Descriptor PLUGIN_EXPORT watsyn_plugin_descriptor =
|
||||
"4-oscillator modulatable wavetable synth" ),
|
||||
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
|
||||
0x0100,
|
||||
Plugin::Instrument,
|
||||
Plugin::Type::Instrument,
|
||||
new PluginPixmapLoader( "logo" ),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@@ -816,7 +816,7 @@ WatsynView::WatsynView( Instrument * _instrument,
|
||||
pal = QPalette();
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap("wavegraph") );
|
||||
// a1 graph
|
||||
a1_graph = new Graph( this, Graph::LinearStyle, 224, 105 );
|
||||
a1_graph = new Graph( this, Graph::Style::Linear, 224, 105 );
|
||||
a1_graph->move( 4, 141 );
|
||||
a1_graph->setAutoFillBackground( true );
|
||||
a1_graph->setGraphColor( QColor( 0x43, 0xb2, 0xff ) );
|
||||
@@ -824,7 +824,7 @@ WatsynView::WatsynView( Instrument * _instrument,
|
||||
a1_graph->setPalette( pal );
|
||||
|
||||
// a2 graph
|
||||
a2_graph = new Graph( this, Graph::LinearStyle, 224, 105 );
|
||||
a2_graph = new Graph( this, Graph::Style::Linear, 224, 105 );
|
||||
a2_graph->move( 4, 141 );
|
||||
a2_graph->setAutoFillBackground( true );
|
||||
a2_graph->setGraphColor( QColor( 0x43, 0xb2, 0xff ) );
|
||||
@@ -832,7 +832,7 @@ WatsynView::WatsynView( Instrument * _instrument,
|
||||
a2_graph->setPalette( pal );
|
||||
|
||||
// b1 graph
|
||||
b1_graph = new Graph( this, Graph::LinearStyle, 224, 105 );
|
||||
b1_graph = new Graph( this, Graph::Style::Linear, 224, 105 );
|
||||
b1_graph->move( 4, 141 );
|
||||
b1_graph->setAutoFillBackground( true );
|
||||
b1_graph->setGraphColor( QColor( 0xfc, 0x54, 0x31 ) );
|
||||
@@ -840,7 +840,7 @@ WatsynView::WatsynView( Instrument * _instrument,
|
||||
b1_graph->setPalette( pal );
|
||||
|
||||
// b2 graph
|
||||
b2_graph = new Graph( this, Graph::LinearStyle, 224, 105 );
|
||||
b2_graph = new Graph( this, Graph::Style::Linear, 224, 105 );
|
||||
b2_graph->move( 4, 141 );
|
||||
b2_graph->setAutoFillBackground( true );
|
||||
b2_graph->setGraphColor( QColor( 0xfc, 0x54, 0x31 ) );
|
||||
|
||||
@@ -39,14 +39,14 @@ namespace lmms
|
||||
|
||||
|
||||
#define makeknob( name, x, y, hint, unit, oname ) \
|
||||
name = new Knob( knobStyled, this ); \
|
||||
name = new Knob( KnobType::Styled, this ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( hint, unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
name ->setFixedSize( 19, 19 );
|
||||
|
||||
#define maketsknob( name, x, y, hint, unit, oname ) \
|
||||
name = new TempoSyncKnob( knobStyled, this ); \
|
||||
name = new TempoSyncKnob( KnobType::Styled, this ); \
|
||||
name ->move( x, y ); \
|
||||
name ->setHintText( hint, unit ); \
|
||||
name ->setObjectName( oname ); \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user