Jamoma API  0.6.0.a19
TTRosenbergGlottalPulseWindow.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspWindowFunctionLib
4  *
5  * @brief Rosenberg Glottal Pulse Window Function Unit for Jamoma DSP
6  *
7  * @details This implements a window function as described here: @n
8  * https://ccrma.stanford.edu/~jos/sasp/Kaiser_Window.html @n
9  * http://en.wikipedia.org/wiki/Window_function#Kaiser_windows @n
10  * @n
11  * This window can be used as a glottal pulse in voice and speech synthesis.
12  *
13  * @authors Trond Lossius
14  *
15  * @copyright Copyright © 2013 by Trond Lossius @n
16  * This code is licensed under the terms of the "New BSD License" @n
17  * http://creativecommons.org/licenses/BSD/
18  */
19 
20 
21 #ifndef __ROSENBERGGLOTTALPULSEWINDOW_H__
22 #define __ROSENBERGGLOTTALPULSEWINDOW_H__
23 
24 #include "TTDSP.h"
25 
26 
27 /** This implements a speach/voice emulating glottal pulse window function as described @
28  http://staff.science.uva.nl/~wzajdel/audiocourse/practicum/lab56.pdf @n
29  http://www.fon.hum.uva.nl/david/ma_ssp/2007/rosenberg_JASA_1971.pdf
30  */
33 
34 protected:
35 
36  /**
37  Thew ratio attribute controls how large part of the window is used for the initial increase (attack) as compared to the decay part.
38  */
40 
41 
42  /** Calculate y = f(x) for a single value.
43  @param x The input value to the window function.
44  @param y The resulting value for the window function.
45  @param data Not used.
46  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
47  */
48  inline TTErr calculateValue(const TTFloat64& x, TTFloat64& y, TTPtrSizedInt data);
49 
50 
51  /** A standard audio processing method as used by Jamoma DSP objects.
52  @param inputs The input vector that is to be processed.
53  @param outputs The resulting windowed vector.
54  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
55  */
57 
58 
59  /** Unit test for the window function unit.
60  @param returnedTestInfo The outcome from the performed unit test.
61  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
62  */
63  virtual TTErr test(TTValue& returnedTestInfo);
64 
65 };
66 
67 
68 #endif // __ROSENBERGGLOTTALPULSEWINDOW_H__
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
virtual TTErr test(TTValue &returnedTestInfo)
Unit test for the window function unit.
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
TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by Jamoma DSP objects.
This implements a speach/voice emulating glottal pulse window function as described @ http://staff...
A simple container for an array of TTAudioSignal pointers.
long TTPtrSizedInt
An integer that is the same size as a pointer.
Definition: TTBase.h:240
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTErr calculateValue(const TTFloat64 &x, TTFloat64 &y, TTPtrSizedInt data)
Calculate y = f(x) for a single value.
TTFloat64 mRatio
Thew ratio attribute controls how large part of the window is used for the initial increase (attack) ...
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34