Nsound  0.9.4
Triangle.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // $Id: Triangle.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) 2006 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_TRIANGLE_H_
34 #define _NSOUND_TRIANGLE_H_
35 
36 #include <Nsound/Nsound.h>
37 #include <Nsound/Generator.h>
38 
39 namespace Nsound
40 {
41 
42 // Forward declaration
43 class Buffer;
44 
45 //-----------------------------------------------------------------------------
47 
48 class Triangle : public Generator
49 {
50  public:
51  Triangle(const Nsound::float64 & sample_rate);
52 
54  // //
68  Triangle(
69  const Nsound::float64 & sample_rate,
70  const Nsound::float64 & attack_time,
71  const Nsound::float64 & release_time);
72 
74  // //
89  Triangle(
90  const Nsound::float64 & sample_rate,
91  const Nsound::float64 & percent_lambda_1,
92  const Nsound::float64 & percent_lambda_2,
93  const Nsound::float64 & amplitude_2,
94  const Nsound::float64 & percent_lambda_3,
95  const Nsound::float64 & percent_lambda_4,
96  const Nsound::float64 & percent_lambda_5,
97  const Nsound::float64 & amplitude_5,
98  const Nsound::float64 & percent_lambda_6);
99 
100 };
101 
102 };
103 
104 #endif
Triangle generator.
Definition: Triangle.h:48
Triangle(const Nsound::float64 &sample_rate)
Definition: Triangle.cc:41
double float64
Definition: Nsound.h:146
A class the provides draw utilities and a wavetable oscillator.
Definition: Generator.h:50