~ubuntu-branches/ubuntu/utopic/fomp/utopic

« back to all changes in this revision

Viewing changes to src/cs_chorus.h

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2012-11-05 10:49:59 UTC
  • Revision ID: package-import@ubuntu.com-20121105104959-2q6sje2d5fhjevfv
Tags: upstream-1.0.0~dfsg0
ImportĀ upstreamĀ versionĀ 1.0.0~dfsg0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
 
3
   
 
4
  This program is free software; you can redistribute it and/or modify
 
5
  it under the terms of the GNU General Public License as published by
 
6
  the Free Software Foundation; either version 2 of the License, or
 
7
  (at your option) any later version.
 
8
 
 
9
  This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public License
 
15
  along with this program; if not, write to the Free Software
 
16
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
17
*/
 
18
 
 
19
 
 
20
#ifndef __CS_CHORUS_H
 
21
#define __CS_CHORUS_H
 
22
 
 
23
#include "ladspaplugin.h"
 
24
 
 
25
 
 
26
class Ladspa_CS_chorus1 : public LadspaPlugin
 
27
{
 
28
public:
 
29
 
 
30
    enum { INPUT, OUTPUT, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT };
 
31
 
 
32
    Ladspa_CS_chorus1 (SampleRate fsam);
 
33
    virtual void setport (PortIndex port, PortData *data);  
 
34
    virtual void active  (bool act);  
 
35
    virtual void runproc (SampleCount len, bool add);
 
36
    virtual ~Ladspa_CS_chorus1 (void);  
 
37
 
 
38
private:
 
39
 
 
40
    float    *_port [NPORT];
 
41
    unsigned long  _size;
 
42
    unsigned long  _wi;
 
43
    unsigned long  _gi;
 
44
    float     _ri [3];
 
45
    float     _dr [3];  
 
46
    float     _x1, _y1;
 
47
    float     _x2, _y2;
 
48
    float    *_line;
 
49
};
 
50
 
 
51
 
 
52
class Ladspa_CS_chorus2 : public LadspaPlugin
 
53
{
 
54
public:
 
55
 
 
56
    enum { INPUT, OUTPUT, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT };
 
57
 
 
58
    Ladspa_CS_chorus2 (SampleRate fsam);
 
59
    virtual void setport (PortIndex port, PortData *data);  
 
60
    virtual void active  (bool act);  
 
61
    virtual void runproc (SampleCount len, bool add);
 
62
    virtual ~Ladspa_CS_chorus2 (void);  
 
63
 
 
64
private:
 
65
 
 
66
    float    *_port [NPORT];
 
67
    unsigned long  _size;
 
68
    unsigned long  _wi;
 
69
    unsigned long  _gi;
 
70
    float     _ri [3];
 
71
    float     _dr [3];  
 
72
    float     _x1, _y1;
 
73
    float     _x2, _y2;
 
74
    float     _a, _b;
 
75
    float    *_line;
 
76
};
 
77
 
 
78
 
 
79
class Ladspa_CS_chorus3 : public LadspaPlugin
 
80
{
 
81
public:
 
82
 
 
83
    enum { INPUT, OUTPUT1, OUTPUT2, OUTPUT3, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT };
 
84
 
 
85
    Ladspa_CS_chorus3 (SampleRate fsam);
 
86
    virtual void setport (PortIndex port, PortData *data);  
 
87
    virtual void active  (bool act);  
 
88
    virtual void runproc (SampleCount len, bool add);
 
89
    virtual ~Ladspa_CS_chorus3 (void);  
 
90
 
 
91
private:
 
92
 
 
93
    float    *_port [NPORT];
 
94
    unsigned long  _size;
 
95
    unsigned long  _wi;
 
96
    unsigned long  _gi;
 
97
    float     _ri [3];
 
98
    float     _dr [3];  
 
99
    float     _x1, _y1;
 
100
    float     _x2, _y2;
 
101
    float     _a, _b;
 
102
    float    *_line;
 
103
};
 
104
 
 
105
 
 
106
#endif