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

« back to all changes in this revision

Viewing changes to synti/stklib/DLineL.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
/*
 
3
   Linearly Interpolating Delay Line
 
4
   Object by Perry R. Cook 1995-96.
 
5
   Added methods by Julius Smith, 2000.
 
6
 
 
7
   This one uses a delay line of maximum
 
8
   length specified on creation, and
 
9
   linearly interpolates fractional
 
10
   length.  It is designed to be more
 
11
   efficient if the delay length is not
 
12
   changed very often.
 
13
*/
 
14
/*******************************************/
 
15
 
 
16
#if !defined(__DLineL_h)
 
17
#define __DLineL_h
 
18
 
 
19
#include "Filter.h"
 
20
 
 
21
class DLineL : public Filter
 
22
{
 
23
 protected:  
 
24
  long inPoint;
 
25
  long outPoint;
 
26
  long length;
 
27
  MY_FLOAT alpha;
 
28
  MY_FLOAT omAlpha;
 
29
  MY_FLOAT currentDelay;
 
30
 public:
 
31
  DLineL();
 
32
  DLineL(long max_length);
 
33
  ~DLineL();
 
34
  void clear();
 
35
  void setDelay(MY_FLOAT length);
 
36
  MY_FLOAT delay(void);
 
37
  MY_FLOAT energy(void);
 
38
  long currentInPoint(void);
 
39
  long currentOutPoint(void);
 
40
  MY_FLOAT contentsAt(int n);
 
41
  MY_FLOAT contentsAtNowMinus(int n);
 
42
  MY_FLOAT tick(MY_FLOAT sample);
 
43
};
 
44
 
 
45
#endif