source: Sophya/trunk/SophyaLib/Samba/bruit.h@ 502

Last change on this file since 502 was 228, checked in by ansari, 26 years ago

Creation du module DPC/Samba Reza 13/04/99

File size: 2.0 KB
RevLine 
[228]1#ifndef BRUIT_H_SEEN
2#define BRUIT_H_SEEN
3
4class NoiseGenerator {
5public :
6 NoiseGenerator(float sigma=1.);
7 virtual ~NoiseGenerator();
8 virtual float Noise();
9 inline unsigned long int NCoups() { return(mNCoups); }
10
11protected :
12unsigned long int mNCoups;
13 float mSigma;
14};
15
16class RWalkNoise : public NoiseGenerator {
17public :
18 RWalkNoise(float sigma=1.);
19 virtual ~RWalkNoise();
20 virtual float Noise();
21
22protected:
23 float mState;
24};
25
26class OOFNoise : public NoiseGenerator {
27public :
28 enum {
29 ACF_Def = 0,
30 ACF_Exp = 1
31 };
32 OOFNoise(float sigma=1., int typacf=ACF_Exp,
33 int mem=128, float tau=1.);
34 virtual ~OOFNoise();
35 virtual float Noise();
36 void Print();
37
38protected:
39 int mTypACF;
40 int mMemL;
41 float mTau;
42 double* mState;
43 double* mDyn;
44};
45
46class EXPNoise : public NoiseGenerator {
47public :
48 enum {
49 ACF_Def = 0,
50 ACF_Exp = 1
51 };
52 EXPNoise(float sigma=1., int typacf=ACF_Exp,
53 int mem=128, float tau=1.);
54 virtual ~EXPNoise();
55 virtual float Noise();
56 void Print();
57
58protected:
59 int mTypACF;
60long int mMemL;
61 float mTau;
62 double* mState;
63 double* mDyn;
64};
65
66class MemNoise : public NoiseGenerator {
67public :
68 enum {
69 ACF_Def = 0,
70 ACF_Exp = 1
71 };
72 MemNoise(float sigma=1., int mem=128, float tau=1., int ava=4096);
73 virtual ~MemNoise();
74 virtual float Noise();
75 virtual float Avance(long Asauter);
76 int Print();
77
78protected:
79 int mTypACF;
80 int mMemL; int mCoupHaut;
81unsigned long mNappel;
82unsigned long mNappLast;
83 float mTeappel;
84 float mTau;
85 float mduree;
86 float mTdernier;
87 int mNtirage;
88 int mMemPos;
89 int mMemNeg;
90 float* mStPos;
91 float* mTePos;
92 float* mStNeg;
93 float* mTeNeg;
94};
95
96class SumNoise : public NoiseGenerator {
97public :
98 SumNoise(float fknee, float sig=1.);
99 virtual ~SumNoise();
100 virtual float Noise();
101
102protected:
103 MemNoise* mn;
104};
105
106
107#endif
108
Note: See TracBrowser for help on using the repository browser.