~ubuntu-branches/ubuntu/oneiric/muse/oneiric

« back to all changes in this revision

Viewing changes to synti/stklib/OneZero.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2002-04-23 17:28:23 UTC
  • Revision ID: james.westby@ubuntu.com-20020423172823-w8yplzr81a759xa3
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************/
 
2
/*  One Zero Filter Class,                 */
 
3
/*  by Perry R. Cook, 1995-96              */ 
 
4
/*  The parameter gain is an additional    */
 
5
/*  gain parameter applied to the filter   */  
 
6
/*  on top of the normalization that takes */
 
7
/*  place automatically.  So the net max   */
 
8
/*  gain through the system equals the     */
 
9
/*  value of gain.  sgain is the combina-  */
 
10
/*  tion of gain and the normalization     */
 
11
/*  parameter, so if you set the poleCoeff */
 
12
/*  to alpha, sgain is always set to       */
 
13
/*  gain / (1.0 - fabs(alpha)).            */
 
14
/*******************************************/
 
15
 
 
16
#if !defined(__OneZero_h)
 
17
#define __OneZero_h
 
18
 
 
19
#include "Filter.h"
 
20
 
 
21
class OneZero : public Filter
 
22
{
 
23
  protected:  
 
24
    MY_FLOAT zeroCoeff;
 
25
    MY_FLOAT sgain;
 
26
  public:
 
27
    OneZero();
 
28
    ~OneZero();
 
29
    void clear();
 
30
    void setGain(MY_FLOAT aValue);
 
31
    void setCoeff(MY_FLOAT aValue);
 
32
    MY_FLOAT tick(MY_FLOAT sample);
 
33
};
 
34
 
 
35
#endif