save and load effects
effects on sample tracks no more ladspa knob segfaults git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@298 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
92
include/effect_label.h
Normal file
92
include/effect_label.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* effect_label.h - a label which is renamable by double-clicking it and
|
||||
* offers access to an effect rack
|
||||
*
|
||||
* Copyright (c) 2006 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _EFFECT_LABEL_H
|
||||
#define _EFFECT_LABEL_H
|
||||
|
||||
#include "ladspa_manager.h"
|
||||
#ifdef LADSPA_SUPPORT
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "tab_widget.h"
|
||||
#include "effect_tab_widget.h"
|
||||
|
||||
|
||||
class sampleTrack;
|
||||
|
||||
|
||||
class effectLabel: public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
effectLabel( const QString & _initial_name, QWidget * _parent, engine * _engine, sampleTrack * _track );
|
||||
virtual ~effectLabel();
|
||||
|
||||
inline const QString & text( void )
|
||||
{
|
||||
return( m_text );
|
||||
}
|
||||
void FASTCALL setText( const QString & _text );
|
||||
|
||||
virtual void FASTCALL saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void FASTCALL loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "sample_track" );
|
||||
}
|
||||
|
||||
public slots:
|
||||
void showEffects( void );
|
||||
void closeEffects( void );
|
||||
void rename( void );
|
||||
|
||||
signals:
|
||||
void clicked( void );
|
||||
void nameChanged( void );
|
||||
void nameChanged( const QString & _new_name );
|
||||
void pixmapChanged( void );
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent * _me );
|
||||
|
||||
private:
|
||||
sampleTrack * m_track;
|
||||
QString m_text;
|
||||
bool m_show;
|
||||
|
||||
QLabel * m_label;
|
||||
QPushButton * m_effectBtn;
|
||||
tabWidget * m_tabWidget;
|
||||
effectTabWidget * m_effWidget;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -55,9 +55,12 @@
|
||||
#include "engine.h"
|
||||
#include "rack_plugin.h"
|
||||
#include "rack_view.h"
|
||||
#include "audio_port.h"
|
||||
#include "track.h"
|
||||
|
||||
|
||||
class instrumentTrack;
|
||||
class sampleTrack;
|
||||
class groupBox;
|
||||
|
||||
|
||||
@@ -65,7 +68,8 @@ class effectTabWidget : public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
effectTabWidget( instrumentTrack * _channel_track );
|
||||
effectTabWidget( instrumentTrack * _track, audioPort * _port );
|
||||
effectTabWidget( QWidget * _parent, sampleTrack * _track, audioPort * _port );
|
||||
virtual ~effectTabWidget();
|
||||
|
||||
|
||||
@@ -75,13 +79,22 @@ public:
|
||||
{
|
||||
return( "fx" );
|
||||
}
|
||||
|
||||
void setupWidget( void );
|
||||
|
||||
signals:
|
||||
void closed( void );
|
||||
|
||||
private slots:
|
||||
void addEffect( void );
|
||||
void setBypass( bool _state );
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
private:
|
||||
instrumentTrack * m_instrumentTrack;
|
||||
track * m_track;
|
||||
audioPort * m_port;
|
||||
|
||||
groupBox * m_effectsGroupBox;
|
||||
QPushButton * m_addButton;
|
||||
|
||||
@@ -176,10 +176,12 @@ public:
|
||||
return( m_pianoWidget );
|
||||
}
|
||||
|
||||
#ifdef LADSPA_SUPPORT
|
||||
inline audioPort * getAudioPort( void )
|
||||
{
|
||||
return( m_audioPort );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -29,9 +29,10 @@
|
||||
#ifdef LADSPA_SUPPORT
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qmutex.h>
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "instrument_track.h"
|
||||
#include "track.h"
|
||||
#include "knob.h"
|
||||
#include "led_checkbox.h"
|
||||
|
||||
@@ -42,7 +43,7 @@ class ladspaControl : public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ladspaControl( QWidget * _parent, port_desc_t * _port, engine * _engine, instrumentTrack * _track );
|
||||
ladspaControl( QWidget * _parent, port_desc_t * _port, engine * _engine, track * _track );
|
||||
~ladspaControl();
|
||||
|
||||
LADSPA_Data getValue( void );
|
||||
@@ -57,6 +58,7 @@ public:
|
||||
|
||||
private:
|
||||
port_desc_t * m_port;
|
||||
track * m_track;
|
||||
ledCheckBox * m_toggle;
|
||||
knob * m_knob;
|
||||
|
||||
|
||||
@@ -35,12 +35,14 @@
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "instrument_track.h"
|
||||
#include "track.h"
|
||||
#include "effect.h"
|
||||
#include "ladspa_control_dialog.h"
|
||||
#include "audio_port.h"
|
||||
|
||||
|
||||
class knob;
|
||||
class tempoSyncKnob;
|
||||
|
||||
|
||||
class rackPlugin: public QWidget, public journallingObject
|
||||
@@ -48,7 +50,7 @@ class rackPlugin: public QWidget, public journallingObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
rackPlugin( QWidget * _parent, ladspa_key_t _key, instrumentTrack * _track, engine * _engine );
|
||||
rackPlugin( QWidget * _parent, ladspa_key_t _key, track * _track, engine * _engine, audioPort * _port );
|
||||
~rackPlugin();
|
||||
|
||||
inline effect * getEffect()
|
||||
@@ -78,6 +80,7 @@ public slots:
|
||||
void moveDown( void );
|
||||
void deletePlugin( void );
|
||||
void displayHelp( void );
|
||||
void closeEffects( void );
|
||||
|
||||
signals:
|
||||
void moveUp( rackPlugin * _plugin );
|
||||
@@ -90,7 +93,7 @@ protected:
|
||||
private:
|
||||
ledCheckBox * m_bypass;
|
||||
knob * m_wetDry;
|
||||
knob * m_autoQuit;
|
||||
tempoSyncKnob * m_autoQuit;
|
||||
knob * m_gate;
|
||||
QGroupBox * m_grouper;
|
||||
QGroupBox * m_controls;
|
||||
@@ -98,10 +101,12 @@ private:
|
||||
QPushButton * m_editButton;
|
||||
effect * m_effect;
|
||||
ladspaControlDialog * m_controlView;
|
||||
instrumentTrack * m_track;
|
||||
track * m_track;
|
||||
audioPort * m_port;
|
||||
QMenu * m_contextMenu;
|
||||
ladspa_key_t m_key;
|
||||
QString m_name;
|
||||
bool m_show;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,8 +36,9 @@
|
||||
#include "types.h"
|
||||
#include "journalling_object.h"
|
||||
#include "rack_plugin.h"
|
||||
#include "instrument_track.h"
|
||||
#include "track.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "audio_port.h"
|
||||
|
||||
|
||||
class rackView: public QWidget, public journallingObject
|
||||
@@ -45,7 +46,7 @@ class rackView: public QWidget, public journallingObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
rackView( QWidget * _parent, engine * _engine, instrumentTrack * _track );
|
||||
rackView( QWidget * _parent, engine * _engine, track * _track, audioPort * _port );
|
||||
~rackView();
|
||||
|
||||
void addPlugin( ladspa_key_t _key );
|
||||
@@ -70,7 +71,9 @@ private:
|
||||
QVBoxLayout * m_mainLayout;
|
||||
QScrollView * m_scrollView;
|
||||
|
||||
instrumentTrack * m_instrumentTrack;
|
||||
track * m_track;
|
||||
audioPort * m_port;
|
||||
|
||||
Uint32 m_lastY;
|
||||
|
||||
ladspa2LMMS * m_ladspa;
|
||||
|
||||
@@ -44,8 +44,13 @@
|
||||
#include "sample_buffer.h"
|
||||
#include "volume_knob.h"
|
||||
|
||||
|
||||
#include "ladspa_manager.h"
|
||||
#ifdef LADSPA_SUPPORT
|
||||
class effectLabel;
|
||||
#else
|
||||
class nameLabel;
|
||||
#endif
|
||||
|
||||
class audioPort;
|
||||
class QLabel;
|
||||
|
||||
@@ -141,6 +146,13 @@ public:
|
||||
virtual void FASTCALL loadTrackSpecificSettings( const QDomElement &
|
||||
_this );
|
||||
|
||||
#ifdef LADSPA_SUPPORT
|
||||
inline audioPort * getAudioPort( void )
|
||||
{
|
||||
return( m_audioPort );
|
||||
}
|
||||
#endif
|
||||
|
||||
public slots:
|
||||
virtual QString nodeName( void ) const
|
||||
{
|
||||
@@ -150,7 +162,11 @@ public slots:
|
||||
|
||||
|
||||
private:
|
||||
#ifdef LADSPA_SUPPORT
|
||||
effectLabel * m_trackLabel;
|
||||
#else
|
||||
nameLabel * m_trackLabel;
|
||||
#endif
|
||||
audioPort * m_audioPort;
|
||||
|
||||
volumeKnob * m_volumeKnob;
|
||||
|
||||
Reference in New Issue
Block a user