Nsound  0.9.4
FilterSlinky.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // $Id: FilterSlinky.h 874 2014-09-08 02:21:29Z weegreenblobbie $
4 //
5 // Nsound is a C++ library and Python module for audio synthesis featuring
6 // dynamic digital filters. Nsound lets you easily shape waveforms and write
7 // to disk or plot them. Nsound aims to be as powerful as Csound but easy to
8 // use.
9 //
10 // Copyright (c) 2007 Nick Hilton
11 //
12 // weegreenblobbie_yahoo_com (replace '_' with '@' and '.')
13 //
14 //-----------------------------------------------------------------------------
15 
16 //-----------------------------------------------------------------------------
17 //
18 // This program is free software; you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation; either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 // This program is distributed in the hope that it will be useful,
24 // but WITHOUT ANY WARRANTY; without even the implied warranty of
25 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 // GNU Library General Public License for more details.
27 //
28 // You should have received a copy of the GNU General Public License
29 // along with this program; if not, write to the Free Software
30 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 //
32 //-----------------------------------------------------------------------------
33 #ifndef _NSOUND_FILTER_SLINKY_H_
34 #define _NSOUND_FILTER_SLINKY_H_
35 
36 #include <Nsound/FFTransform.h>
37 #include <Nsound/Filter.h>
38 #include <Nsound/Nsound.h>
39 
40 #include <string>
41 #include <vector>
42 
43 namespace Nsound
44 {
45 
46 class AudioStream;
47 class Buffer;
48 class FilterDelay;
49 class FilterBandPassIIR;
50 
51 //-----------------------------------------------------------------------------
53 class FilterSlinky : public Filter
54 {
55  public:
56 
58  const float64 & sample_rate,
59  const float64 & delay_time,
60  const float64 & frequency_window);
61 
62  virtual ~FilterSlinky();
63 
65  filter(const AudioStream & x);
66 
68  filter(const AudioStream & x, const Buffer & frequencies);
69 
70  Buffer
71  filter(const Buffer & x);
72 
73  Buffer
74  filter(const Buffer & x, const Buffer & frequencies);
75 
76  float64
77  filter(const float64 & x);
78 
79  float64
80  filter(const float64 & x, const float64 & frequency);
81 
82  void
83  reset();
84 
85  protected:
86 
87  typedef std::vector< FilterDelay * > DelayVector;
88  typedef std::vector< FilterBandPassIIR * > FilterVector;
89 
92 
93 }; // class Filter
94 
95 } // namespace
96 
97 // :mode=c++: jEdit modeline
98 #endif
FilterSlinky(const float64 &sample_rate, const float64 &delay_time, const float64 &frequency_window)
Definition: FilterSlinky.cc:45
FilterVector filters_
Definition: FilterSlinky.h:91
DelayVector delay_lines_
Definition: FilterSlinky.h:90
double float64
Definition: Nsound.h:146
Base class for IIR Filters, defines the interface.
Definition: Filter.h:49
std::vector< FilterDelay * > DelayVector
Definition: FilterSlinky.h:87
A Buffer for storing audio samples.
Definition: Buffer.h:60
Base class for IIR Filters, defines the interface.
Definition: FilterSlinky.h:53
std::vector< FilterBandPassIIR * > FilterVector
Definition: FilterSlinky.h:88
AudioStream filter(const AudioStream &x)