3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
* Copyright (C) 2005 - 2010 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This library is free software; you can redistribute it and/or modify * |
* This library is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
39 |
* |
* |
40 |
* This class is used to manage effect sends on Engine Channels. An effect |
* This class is used to manage effect sends on Engine Channels. An effect |
41 |
* send is used to route sampler channel's audio signals to either sampler |
* send is used to route sampler channel's audio signals to either sampler |
42 |
* external effect processors or to sampler internal effect processors. |
* external effect processors (by routing the effect send to dedicated |
43 |
* Each effect send entity can define an arbitrary MIDI controller number |
* audio output channels of the sampler channel's audio output device) or |
44 |
* which can alter the effect send's send level. |
* to sampler internal effect processors (send effects). Each effect send |
45 |
|
* entity can define an arbitrary MIDI controller number which can alter |
46 |
|
* the effect send's send level. |
47 |
* |
* |
48 |
* Regarding sampler internal effects: only master effects are supported |
* Regarding sampler internal effects: See AudioOutputDevice regarding |
49 |
* ATM, no insert effects yet. See AudioOutputDevice regarding management |
* management of send effects, since send effects only live in the context |
50 |
* of master effects, since master effects only live in the context of |
* of exactly @e ONE AudioOutputDevice. |
|
* exactly @e ONE AudioOutputDevice. |
|
51 |
* |
* |
52 |
* Note: effect sends cannot be routed to a different AudioOutputDevice |
* Note: effect sends cannot be routed to a different AudioOutputDevice |
53 |
* than assigned to the FxSend's EngineChannel. Also note that an effect |
* than assigned to the FxSend's EngineChannel. Also note that an effect |
73 |
FxSend(EngineChannel* pEngineChannel, uint8_t MidiCtrl, String Name = "") throw (Exception); |
FxSend(EngineChannel* pEngineChannel, uint8_t MidiCtrl, String Name = "") throw (Exception); |
74 |
|
|
75 |
/** |
/** |
76 |
* Index of the master effect chain this FX send is routed to or |
* Index of the send effect chain this FX send is routed to or |
77 |
* -1 if FX send is not routed to a master effect. |
* -1 if FX send is not routed to a send effect. |
78 |
*/ |
*/ |
79 |
int DestinationMasterEffectChain() const; |
int DestinationEffectChain() const; |
80 |
|
|
81 |
/** |
/** |
82 |
* Index of the master effect of the master effect chain given by |
* Index of the send effect of the send effect chain given by |
83 |
* DestinationMasterEffectChain(), in case FX send is routed to |
* DestinationEffectChain(), in case FX send is routed to |
84 |
* a master effect or -1 otherwise. |
* a send effect or -1 otherwise. This is the effect chain |
85 |
|
* position, not the effect ID! |
86 |
*/ |
*/ |
87 |
int DestinationMasterEffect() const; |
int DestinationEffectChainPosition() const; |
88 |
|
|
89 |
/** |
/** |
90 |
* Route this FX send to the given master effect given by index |
* Route this FX send to the given send effect given by index |
91 |
* @a iEffect of the master effect chain given by @a iChain . |
* @a iChainPos of the send effect chain given by @a iChain . |
92 |
* |
* |
93 |
* If you want to remove the routing of an FX send, currently |
* If you want to remove the routing of an FX send, currently |
94 |
* directed to a master effect processor, and want to route it |
* directed to a send effect processor, and want to route it |
95 |
* directly to an audio output device channel instead, then set |
* directly to an audio output device channel instead, then set |
96 |
* both arguments to @c -1 . |
* both arguments to @c -1 . |
97 |
* |
* |
98 |
* @throw Exception - if given effect / effect chain doesn't exist |
* @throw Exception - if given effect chain or effect chain position |
99 |
* @see AudioOutputDevice::MasterEffectChain() |
* doesn't exist |
100 |
|
* |
101 |
|
* @see AudioOutputDevice::SendEffectChain() |
102 |
|
*/ |
103 |
|
void SetDestinationEffect(int iChain, int iChainPos) throw (Exception); |
104 |
|
|
105 |
|
/** |
106 |
|
* @deprecated This method will be removed, use DestinationEffectChain() instead! |
107 |
|
*/ |
108 |
|
int DestinationMasterEffectChain() const DEPRECATED_API; |
109 |
|
|
110 |
|
/** |
111 |
|
* @deprecated This method will be removed, use DestinationEffectChainPosition() instead! |
112 |
|
*/ |
113 |
|
int DestinationMasterEffect() const DEPRECATED_API; |
114 |
|
|
115 |
|
/** |
116 |
|
* @deprecated This method will be removed, use SetDestinationEffect() instead! |
117 |
*/ |
*/ |
118 |
void SetDestinationMasterEffect(int iChain, int iEffect) throw (Exception); |
void SetDestinationMasterEffect(int iChain, int iChainPos) throw (Exception) DEPRECATED_API; |
119 |
|
|
120 |
/** |
/** |
121 |
* Returns the audio output device's audio channel to which effect |
* Returns the audio output device's audio channel to which effect |
124 |
int DestinationChannel(int SrcChan); |
int DestinationChannel(int SrcChan); |
125 |
|
|
126 |
/** |
/** |
127 |
* Alters the routing of an audio channel. |
* Alters the routing of an audio channel. By default all audio |
128 |
|
* channels of an effect send are routed in consecutive same order |
129 |
|
* to its destination. You can use this method to change this |
130 |
|
* default routing. If this effect send is routed to an internel |
131 |
|
* effect, then @a DstChan is the input channel of that destination |
132 |
|
* effect. Otherwise, if this effect send is not routed to an |
133 |
|
* internal effect, then @a DstChan is the output channel of the |
134 |
|
* sampler channel's audio output device. |
135 |
* |
* |
136 |
* @param SrcChan - the effect send's source channel |
* @param SrcChan - the effect send's source channel |
137 |
* @param DstChan - the audio output device's destination channel |
* @param DstChan - the audio output device's destination channel |
138 |
|
* or send effect's input channel |
139 |
* @throws Exception - in case arguments out of range |
* @throws Exception - in case arguments out of range |
140 |
*/ |
*/ |
141 |
void SetDestinationChannel(int SrcChan, int DstChan) throw (Exception); |
void SetDestinationChannel(int SrcChan, int DstChan) throw (Exception); |
219 |
|
|
220 |
protected: |
protected: |
221 |
EngineChannel* pEngineChannel; |
EngineChannel* pEngineChannel; |
222 |
int iMasterEffectChain; |
int iDestinationEffectChain; |
223 |
int iMasterEffect; |
int iDestinationEffectChainPos; |
224 |
std::vector<int> Routing; |
std::vector<int> Routing; |
225 |
uint8_t MidiFxSendController; |
uint8_t MidiFxSendController; |
226 |
String sName; |
String sName; |