2013-12-08 22:44:43 +01:00
|
|
|
/*
|
|
|
|
* Author: Harry van Haaren 2013
|
|
|
|
* harryhaaren@gmail.com
|
2016-12-27 13:47:19 +01:00
|
|
|
*
|
2013-12-08 22:44:43 +01:00
|
|
|
* 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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2016-12-27 13:47:19 +01:00
|
|
|
*
|
2013-12-08 22:44:43 +01:00
|
|
|
* 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.
|
2016-12-27 13:47:19 +01:00
|
|
|
*
|
2013-12-08 22:44:43 +01:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2013-07-27 23:36:58 +02:00
|
|
|
|
|
|
|
#ifndef LUPPP_TRACK_OUTPUT_H
|
|
|
|
#define LUPPP_TRACK_OUTPUT_H
|
|
|
|
|
2013-08-13 01:02:59 +02:00
|
|
|
#include <iostream>
|
2013-07-30 01:56:13 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2013-08-15 18:17:16 +02:00
|
|
|
#include "buffers.hxx"
|
2013-08-06 22:55:57 +02:00
|
|
|
#include "config.hxx"
|
2013-07-28 14:14:25 +02:00
|
|
|
#include "audioprocessor.hxx"
|
|
|
|
|
2013-07-28 14:31:07 +02:00
|
|
|
#include "eventhandler.hxx"
|
|
|
|
#include "dsp/dsp_dbmeter.hxx"
|
|
|
|
|
2013-09-23 16:23:48 +02:00
|
|
|
/** TrackOutput
|
|
|
|
* This class is used to mix down each track, and produce output: that output
|
|
|
|
* exists in the master outputs and send buffers.
|
|
|
|
**/
|
2013-07-28 14:14:25 +02:00
|
|
|
class TrackOutput : public AudioProcessor
|
2013-07-27 23:36:58 +02:00
|
|
|
{
|
2016-12-27 13:47:19 +01:00
|
|
|
public:
|
|
|
|
TrackOutput(int t, AudioProcessor* ap);
|
|
|
|
|
|
|
|
/// set main mix, 0-1
|
|
|
|
void setMaster(float value);
|
|
|
|
|
|
|
|
float getMaster();
|
|
|
|
|
2017-01-09 15:11:16 +01:00
|
|
|
// panning
|
|
|
|
void setPan ( float pan );
|
|
|
|
|
2016-12-27 13:47:19 +01:00
|
|
|
bool recordArm();
|
|
|
|
void recordArm(bool r);
|
|
|
|
|
|
|
|
/// set send
|
|
|
|
void setSend( int send, float value );
|
|
|
|
void setSendActive( int send, bool active );
|
|
|
|
|
|
|
|
/// copies the track output to master buffer, sidechain & post-side buffer
|
|
|
|
void process(unsigned int nframes, Buffers* buffers);
|
|
|
|
|
|
|
|
~TrackOutput();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int track;
|
|
|
|
|
|
|
|
bool _recordArm;
|
2018-05-04 14:40:31 +02:00
|
|
|
|
|
|
|
// the *Lag values lag behind the corresponding values to avoid audible jumps in volume
|
2016-12-27 13:47:19 +01:00
|
|
|
float _toMaster;
|
|
|
|
float _toMasterLag;
|
2018-04-29 14:05:53 +02:00
|
|
|
|
2018-05-04 13:57:07 +02:00
|
|
|
float _panL;
|
|
|
|
float _panR;
|
|
|
|
float _panLLag;
|
|
|
|
float _panRLag;
|
2016-12-27 13:47:19 +01:00
|
|
|
|
2018-05-04 14:14:00 +02:00
|
|
|
float _toSend;
|
|
|
|
float _toSendLag;
|
|
|
|
|
2016-12-27 13:47:19 +01:00
|
|
|
float _toSidechain;
|
|
|
|
float _toPostSidechain;
|
2018-05-12 17:55:12 +02:00
|
|
|
float _toPostSidechainLag;
|
2016-12-27 13:47:19 +01:00
|
|
|
|
|
|
|
bool _toPostfaderActive;
|
2018-07-09 11:30:47 +02:00
|
|
|
float _toPostfaderActiveLag;
|
|
|
|
|
2016-12-27 13:47:19 +01:00
|
|
|
bool _toKeyActive;
|
2018-07-09 11:40:14 +02:00
|
|
|
float _toKeyActiveLag;
|
|
|
|
|
2016-12-27 13:47:19 +01:00
|
|
|
bool _toXSideActive;
|
|
|
|
|
|
|
|
/// Pointer to "previous" processor: the graph is backwards
|
|
|
|
AudioProcessor* previousInChain;
|
|
|
|
|
|
|
|
// Metering variables
|
|
|
|
long uiUpdateCounter;
|
|
|
|
long uiUpdateConstant;
|
|
|
|
DBMeter* dbMeter;
|
|
|
|
|
2013-07-27 23:36:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LUPPP_TRACK_OUTPUT_H
|
|
|
|
|