CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Processing
Synthesis
SpectralSynthesisConfig.hxx
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2004 MUSIC TECHNOLOGY GROUP (MTG)
3
* UNIVERSITAT POMPEU FABRA
4
*
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
*/
21
22
#ifndef _SpectralSynthesisConfig_
23
#define _SpectralSynthesisConfig_
24
25
#include "
ProcessingConfig.hxx
"
26
#include "
WindowGeneratorConfig.hxx
"
27
#include "
CircularShiftConfig.hxx
"
28
#include "
IFFTConfig.hxx
"
29
30
namespace
CLAM {
31
35
class
SpectralSynthesisConfig
:
public
ProcessingConfig
36
{
37
38
friend
class
SpectralSynthesis
;
39
40
public
:
41
42
DYNAMIC_TYPE_USING_INTERFACE
(
SpectralSynthesisConfig
,10,
ProcessingConfig
);
44
DYN_ATTRIBUTE
(0,
public
,
WindowGeneratorConfig
,AnalWindowGenerator);
45
DYN_ATTRIBUTE
(1,
public
,
WindowGeneratorConfig
,SynthWindowGenerator);
46
DYN_ATTRIBUTE
(2,
public
,
CircularShiftConfig
,
CircularShift
);
47
DYN_ATTRIBUTE
(3,
public
,
IFFTConfig
,
IFFT
);
48
DYN_ATTRIBUTE
(4,
public
,
int
, prZeroPadding);
49
DYN_ATTRIBUTE
(5,
public
,
int
,prSamplingRate);
50
DYN_ATTRIBUTE
(6,
public
,
bool
,Residual);
51
//xamat: added this to be able to access from configurators
52
DYN_ATTRIBUTE
(7,
public
,
int
,prAnalWindowSize);
53
DYN_ATTRIBUTE
(8,
public
,
EWindowType
,prAnalWindowType);
54
DYN_ATTRIBUTE
(9,
public
,
int
,prHopSize);
55
56
//Config shortcuts
57
58
public
:
63
void
SetAnalWindowSize
(
TSize
w);
67
TSize
GetAnalWindowSize
()
const
;
68
72
void
SetAnalWindowType
(
const
EWindowType
& t);
76
const
EWindowType
&
GetAnalWindowType
()
const
;
77
82
void
SetZeroPadding
(
int
z);
85
int
GetZeroPadding
()
const
;
89
void
SetSynthWindowSize
(
TSize
w);
93
TSize
GetSynthWindowSize
()
const
;
94
99
void
SetHopSize
(
TSize
h);
103
TSize
GetHopSize
()
const
;
105
void
SetSamplingRate
(
TData
sr);
107
TData
GetSamplingRate
()
const
;
109
void
SetSpectrumSize
(
TSize
specSize);
110
TSize
GetSpectrumSize
()
const
;
111
112
private
:
113
114
void
DefaultInit();
115
void
DefaultValues();
117
void
Sync();
118
120
TInt32
PowerOfTwo(
TInt32
size);
121
};
122
123
}
// namespace CLAM
124
125
#endif
126
Generated by
1.8.1