added definition for upcoming FX-mixer

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@783 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-03-09 00:19:51 +00:00
parent 70b29695a5
commit 5f47f86625
3 changed files with 108 additions and 43 deletions

View File

@@ -1,35 +0,0 @@
/*
* effect_board.h - stuff for effect-board
*
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/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., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _EFFECT_BOARD_H
#define _EFFECT_BOARD_H
#include "types.h"
const fx_ch_t MIN_EFFECT_CHANNEL = 0;
const fx_ch_t MAX_EFFECT_CHANNEL = 63;
const fx_ch_t DEFAULT_EFFECT_CHANNEL = MIN_EFFECT_CHANNEL;
#endif

103
include/fx_mixer.h Normal file
View File

@@ -0,0 +1,103 @@
/*
* fx_mixer.h - effect-mixer for LMMS
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/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., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _FX_MIXER_H
#define _FX_MIXER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "types.h"
#include "effect_chain.h"
#include "mv_base.h"
#include "journalling_object.h"
const int NUM_FX_CHANNELS = 64;
class fxMixer : public journallingObject, public model
{
public:
fxMixer();
virtual ~fxMixer();
void mixToChannel( const surroundSampleFrame * _buf, fx_ch_t _ch );
void processChannel( fx_ch_t _ch );
void masterMix( surroundSampleFrame * _dest );
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
virtual void loadSettings( const QDomElement & _this );
virtual QString nodeName( void ) const
{
return( "fxmixer" );
}
private:
struct fxChannel
{
effectChain m_fxChain;
surroundSampleFrame * m_buffer;
boolModel m_muteModel;
boolModel m_soloModel;
QMutex m_lock;
} ;
fxChannel m_fxChannels[NUM_FX_CHANNELS];
fxChannel m_masterChannel;
friend class mixerWorkerThread;
friend class fxMixerView;
} ;
class fxMixerView : public QWidget, public modelView
{
public:
fxMixerView();
virtual ~fxMixerView();
private:
struct fxChannelView
{
effectRackView * m_rackView;
pixmapButton * m_muteButton;
pixmapButton * m_soloButton;
} ;
fxChannelView m_fxChannelViews[NUM_FX_CHANNELS];
fxChannelView m_masterChannelView;
} ;
#endif

View File

@@ -47,7 +47,6 @@
#include "automation_pattern.h"
#include "config_mgr.h"
#include "debug.h"
#include "effect_board.h"
#include "effect_chain.h"
#include "effect_rack_view.h"
#include "embed.h"
@@ -63,6 +62,7 @@
#include "main_window.h"
#include "midi_client.h"
#include "midi_port.h"
#include "fx_mixer.h"
#include "instrument_midi_io.h"
#include "mmp.h"
#include "note_play_handle.h"
@@ -104,14 +104,11 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
tr( "unnamed_channel" ) ) ),
m_audioPort( tr( "unnamed_channel" ), this ),
m_notes(),
m_baseNoteModel( 0, 0, NOTES_PER_OCTAVE * OCTAVES - 1, 1/* this */ ),
m_baseNoteModel( 0, 0, NOTES_PER_OCTAVE * OCTAVES - 1, 1, this ),
m_volumeModel( DEFAULT_VOLUME, MIN_VOLUME, MAX_VOLUME,
1.0f /* this */ ),
m_surroundAreaModel( NULL /* this */, this ),
m_effectChannelModel( DEFAULT_EFFECT_CHANNEL,
MIN_EFFECT_CHANNEL, MAX_EFFECT_CHANNEL
/* this */ ),
// m_effects( /* this */ NULL ),
1.0f, this ),
m_surroundAreaModel( this, this ),
m_effectChannelModel( 1, 1, NUM_FX_CHANNELS, 1, this ),
m_instrument( NULL ),
m_soundShaping( this ),
m_arpeggiator( this ),