Jamoma API  0.6.0.a19
TTPulseSub.h
1 /*
2  * TTBlue Pulse-based Envelope Substitution
3  * Copyright © 2004, Timothy Place
4  *
5  * License: This code is licensed under the terms of the "New BSD License"
6  * http://creativecommons.org/licenses/BSD/
7  */
8 
9 #ifndef __TT_PULSESUB_H__
10 #define __TT_PULSESUB_H__
11 
12 #include "TTDSP.h"
13 
14 
15 /** TTPulseSub generates a repeating ADSR envelope which is then applied to the gain of an input signal. */
16 class TTPulseSub : public TTAudioObjectBase {
18 
19 protected:
20 
21  TTFloat64 attrAttack;
22  TTFloat64 attrDecay;
23  TTFloat64 attrSustain;
24  TTFloat64 attrRelease;
25  TTBoolean attrTrigger;
26  TTSymbol attrMode;
27  TTFloat64 attrFrequency;
28  TTFloat64 attrLength;
31  TTAudioObjectBasePtr offset; ///< TTOperator
32  TTAudioObjectBasePtr scaler; ///< TTOperator
33  TTAudioSignalPtr sig1;
34  TTAudioSignalPtr sig2;
35 
36  TTErr updateSampleRate(const TTValue& oldSampleRate, TTValue&);
37  TTErr updateMaxNumChannels(const TTValue& oldMaxNumChannels, TTValue&);
38 
39  TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs);
40 
41  TTErr setTrigger(const TTValue& newValue);
42  TTErr setAttack(const TTValue& newValue);
43  TTErr setDecay(const TTValue& newValue);
44  TTErr setSustain(const TTValue& newValue);
45  TTErr setRelease(const TTValue& newValue);
46  TTErr setMode(const TTValue& newValue);
47 
48  TTErr setFrequency(const TTValue& newValue);
49  TTErr setLength(const TTValue& newValue);
50 };
51 
52 #endif // __TT_PULSESUB_H__
53 
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
Definition: TTBase.h:167
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
Jamoma DSP Library.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTAudioObjectBasePtr phasor
TTPhasor.
Definition: TTPulseSub.h:30
TTPulseSub generates a repeating ADSR envelope which is then applied to the gain of an input signal...
Definition: TTPulseSub.h:16
The TTAudioSignal class represents N vectors of audio samples for M channels.
Definition: TTAudioSignal.h:57
TTAudioObjectBasePtr scaler
TTOperator.
Definition: TTPulseSub.h:32
TTAudioObjectBasePtr env_gen
TTAdsr.
Definition: TTPulseSub.h:29
A simple container for an array of TTAudioSignal pointers.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTAudioObjectBasePtr offset
TTOperator.
Definition: TTPulseSub.h:31
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34