Nsound  0.9.4
OrganPipe.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // $Id: OrganPipe.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) 2009-Present Nick Hilton
11 //
12 // Simulates a Pipe Organ. Based on a Csound Pipe Organ by Hons Mikelson.
13 //
14 // source: http://www.csounds.com/mikelson/
15 //
16 // "A Csound Halloween" hallown.orc hallown.sco
17 //
18 //-----------------------------------------------------------------------------
19 
20 //-----------------------------------------------------------------------------
21 //
22 // This program is free software; you can redistribute it and/or modify
23 // it under the terms of the GNU General Public License as published by
24 // the Free Software Foundation; either version 2 of the License, or
25 // (at your option) any later version.
26 //
27 // This program is distributed in the hope that it will be useful,
28 // but WITHOUT ANY WARRANTY; without even the implied warranty of
29 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 // GNU Library General Public License for more details.
31 //
32 // You should have received a copy of the GNU General Public License
33 // along with this program; if not, write to the Free Software
34 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
35 //
36 //-----------------------------------------------------------------------------
37 
38 #ifndef _NSOUND_ORGAN_PIPE_H_
39 #define _NSOUND_ORGAN_PIPE_H_
40 
41 #include <Nsound/Instrument.h>
42 
43 namespace Nsound
44 {
45 
46 // Forward Declarations
47 class AudioStream;
48 class Buffer;
49 
50 //-----------------------------------------------------------------------------
52 //
58 //
59 class OrganPipe : public Instrument
60 {
61  public:
62 
64  OrganPipe(const float64 & sample_rate);
65 
67  ~OrganPipe();
68 
70  AudioStream play();
71 
73  AudioStream play(const float64 & duration, const float64 & frequency);
74 
77  const float64 & duration,
78  const float64 & frequency,
79  const float64 & pan);
80 
82  std::string getInfo()
83  {
84  return
85  "Nsound::OrganPipe by Nick Hilton on 2009-10-25\n"
86  "Simulates a Pipe Organ. Based on a Csound Pipe Organ.\n"
87  "source: http://www.csounds.com/mikelson/hallown.orc\n";
88  };
89 
90 };
91 
92 };
93 
94 // :mode=c++: jEdit modeline
95 #endif
std::string getInfo()
Nsound::OrganPipe information.
Definition: OrganPipe.h:82
AudioStream play()
Plays a demo for this instrument.
Definition: OrganPipe.cc:57
double float64
Definition: Nsound.h:146
~OrganPipe()
Destructor.
Definition: OrganPipe.cc:53
Class OrganPipe.
Definition: OrganPipe.h:59
The Nsound Instrument baseclass. All Nsound instruments extend this class.
Definition: Instrument.h:50
OrganPipe(const float64 &sample_rate)
Creates an OrganPipe.
Definition: OrganPipe.cc:47