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