LMMS
Loading...
Searching...
No Matches
Pan.h
Go to the documentation of this file.
1/*
2 Pan.h
3
4 Copyright 2004-11 Tim Goetze <tim@quitte.de>
5
6 http://quitte.de/dsp/
7
8 panorama with width control,
9 stereo image width reduction
10
11*/
12/*
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License
15 as published by the Free Software Foundation; either version 2
16 of the License, or (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 02111-1307, USA or point your web browser to http://www.gnu.org.
27*/
28
29#ifndef _PAN_H_
30#define _PAN_H_
31
32#include "dsp/Delay.h"
33#include "dsp/OnePole.h"
34
35class PanTap
36{
37 public:
38 int t;
40
42 {
43 return damper.process (delay[t]);
44 }
45
46 void reset (double c)
47 {
48 damper.set_f (c);
49 damper.reset();
50 }
51};
52
53class Pan
54: public Plugin
55{
56 public:
58
60
63
64 template <sample_func_t F>
65 void one_cycle (int frames);
66
67 inline void set_pan (sample_t);
68
69 public:
71
72 void init();
73 void activate();
74
75 void run (int n)
76 {
78 }
79
80 void run_adding (int n)
81 {
83 }
84};
85
86/* stereo width reduction */
88: public Plugin
89{
90 public:
92
93 template <sample_func_t F>
94 void one_cycle (int frames);
95
96 public:
98
99 void init();
100 void activate();
101
102 void run (int n)
103 {
105 }
106
107 void run_adding (int n)
108 {
110 }
111
112};
113
114#endif /* _PAN_H_ */
LADSPA_Data sample_t
Definition basics.h:100
Definition Delay.h:41
Definition OnePole.h:34
Definition Pan.h:89
void init()
void run_adding(int n)
Definition Pan.h:107
static PortInfo port_info[]
Definition Pan.h:97
sample_t strength
Definition Pan.h:91
void activate()
void run(int n)
Definition Pan.h:102
void one_cycle(int frames)
Definition Pan.h:55
sample_t gain_r
Definition Pan.h:59
void set_pan(sample_t)
sample_t pan
Definition Pan.h:57
sample_t gain_l
Definition Pan.h:59
void init()
void one_cycle(int frames)
void run(int n)
Definition Pan.h:75
void activate()
DSP::Delay delay
Definition Pan.h:61
static PortInfo port_info[]
Definition Pan.h:70
PanTap tap
Definition Pan.h:62
void run_adding(int n)
Definition Pan.h:80
Definition Pan.h:36
int t
Definition Pan.h:38
void reset(double c)
Definition Pan.h:46
sample_t get(DSP::Delay &delay)
Definition Pan.h:41
DSP::OnePoleLP damper
Definition Pan.h:39
Definition basics.h:174
Definition basics.h:94
int n
Definition crypt.c:458
return c
Definition crypt.c:175