52 setMinimumSize( width(), height() );
53 setFixedHeight( height() );
55 QHBoxLayout *hbox =
new QHBoxLayout();
56 hbox->setSpacing( 0 );
57 hbox->setContentsMargins( 0, 0, 0, 0 );
63 bool ok = background.load(
Skin::getImagePath() +
"/mixerPanel/mixer_background.png" );
73 m_pScrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
74 m_pScrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
78 m_pFrame->resize( width(), height() );
87 boldFont.setBold(
true);
138#ifdef H2CORE_HAVE_LADSPA
151 sValue = QString(
"%1").arg( pControl->
fControlValue, 0,
'f', 2 );
154 sValue = QString(
"%1").arg( pControl->
fControlValue, 0,
'f', 1 );
157 sValue = QString(
"%1").arg( pControl->
fControlValue, 0,
'f', 0 );
170#ifdef H2CORE_HAVE_LADSPA
171 INFOLOG(
"*** [updateControls] ***" );
211 setWindowTitle( tr(
"[%1] LADSPA FX Properties" ).arg( sPluginName ) );
214 if ( nControlsFrameWidth < width() ) {
215 nControlsFrameWidth = width();
217 m_pFrame->resize( nControlsFrameWidth, height() );
227 QString mixerline_text_path =
Skin::getImagePath() +
"/mixerPanel/mixer_background.png";
228 QPixmap textBackground;
229 if( textBackground.load( mixerline_text_path ) ==
false ){
234 uint nInputControl_X = 0;
238 nInputControl_X = 10 + 45 * i;
241 WARNINGLOG(
"[updateControls] LADSPA toggle controls not implemented yet");
247 sValue = QString(
"%1").arg( pControlPort->
fControlValue, 0,
'f', 2);
250 sValue = QString(
"%1").arg( pControlPort->
fControlValue, 0,
'f', 1);
253 sValue = QString(
"%1").arg( pControlPort->
fControlValue, 0,
'f', 0);
257 pLCD->move( nInputControl_X, 40 );
258 pLCD->setText( sValue );
261 lcdPalette.setColor( QPalette::Window, QColor( 58, 62, 72 ) );
262 pLCD->setPalette( lcdPalette );
267 pName->move( nInputControl_X, 60 );
271 pName->setToolTip( pName->
text() );
278 pFader->move( nInputControl_X + 20, 60 );
292 nInputControl_X += 45;
296 uint xPos = nInputControl_X + 10 + 45 * i;
299 pName->move( xPos, 60 );
303 pName->setToolTip( pName->
text() );
307 pFader->move( xPos + 20, 60 );
323 setWindowTitle( tr(
"LADSPA FX %1 Properties" ).arg(
m_nLadspaFX) );
336#ifdef H2CORE_HAVE_LADSPA
338 auto pAudioDriver = pHydrogen->getAudioOutput();
339 if ( pAudioDriver ==
nullptr ) {
340 ERRORLOG(
"AudioDriver is not ready!" );
345 if (fxSelector.exec() == QDialog::Accepted) {
347 if ( !sSelectedFX.isEmpty() ) {
351 for (uint i = 0; i < pluginList.size(); i++) {
353 if (pFXInfo->
m_sName == sSelectedFX ) {
354 int nSampleRate = pAudioDriver->getSampleRate();
362 pHydrogen->restartLadspaFX();
366 INFOLOG(
"no plugin selected" );
375#ifdef H2CORE_HAVE_LADSPA
386#ifdef H2CORE_HAVE_LADSPA
405 if (pFader ==
nullptr) {
406 ERRORLOG(
"[updateOutputControls] pFader = NULL" );
413 if (fValue < 0) fValue = -fValue;
431#ifdef H2CORE_HAVE_LADSPA
#define RIGHT_HERE
Macro intended to be used for the logging of the locking of the H2Core::AudioEngine.
void setPeak_R(float peak)
void setMaxPeak(float fMax)
void setMinPeak(float fMin)
void setPeak_L(float peak)
void unlock()
Mutex unlocking of the AudioEngine.
void lock(const char *file, unsigned int line, const char *function)
Mutex locking of the AudioEngine.
static Effects * get_instance()
Returns a pointer to the current Effects singleton stored in __instance.
std::vector< LadspaFXInfo * > getPluginList()
Loads only usable plugins.
void setLadspaFX(LadspaFX *pFX, int nFX)
LadspaFX * getLadspaFX(int nFX) const
static Hydrogen * get_instance()
Returns the current Hydrogen instance __instance.
AudioEngine * getAudioEngine() const
void setIsModified(bool bIsModified)
Wrapper around Song::setIsModified() that checks whether a song is set.
LADSPA_Data fDefaultValue
LADSPA_Data fControlValue
QString m_sFilename
plugin filename
std::vector< LadspaControlPort * > inputControlPorts
void setEnabled(bool bEnabled)
const QString & getPluginName() const
const QString & getPluginLabel() const
std::vector< LadspaControlPort * > outputControlPorts
static LadspaFX * load(const QString &sLibraryPath, const QString &sPluginLabel, long nSampleRate)
Non-interactive display used for both numerical values and the status display.
LadspaFXProperties(QWidget *parent, uint nLadspaFX)
std::vector< Fader * > m_pOutputControlFaders
std::vector< Fader * > m_pInputControlFaders
void updateOutputControls()
QPushButton * m_pActivateBtn
QScrollArea * m_pScrollArea
void faderChanged(WidgetWithInput *ref)
virtual void closeEvent(QCloseEvent *ev) override
std::vector< InstrumentNameWidget * > m_pInputControlNames
QPushButton * m_pRemoveFXBtn
virtual void showEvent(QShowEvent *ev) override
void removeFXBtnClicked()
std::vector< InstrumentNameWidget * > m_pOutputControlNames
QPushButton * m_pSelectFXBtn
void activateBtnClicked()
void selectFXBtnClicked()
std::vector< LCDDisplay * > m_pInputControlLabel
static QString getImagePath()