Debian Codegraph @

lib-src/libnyquist/nyquist/nyqstk/include/ReedTable.h

raw
1 /***************************************************/
2 /*! \class ReedTable
3 \brief STK reed table class.
4
5 This class implements a simple one breakpoint,
6 non-linear reed function, as described by
7 Smith (1986). This function is based on a
8 memoryless non-linear spring model of the reed
9 (the reed mass is ignored) which saturates when
10 the reed collides with the mouthpiece facing.
11
12 See McIntyre, Schumacher, & Woodhouse (1983),
13 Smith (1986), Hirschman, Cook, Scavone, and
14 others for more information.
15
16 by Perry R. Cook and Gary P. Scavone, 1995 - 2005.
17 */
18 /***************************************************/
19
20 #ifndef STK_REEDTABLE_H
21 #define STK_REEDTABLE_H
22
23 #include "Function.h"
24
25 namespace Nyq
26 {
27
28 class ReedTable : public Function
29 {
30 public:
31 //! Default constructor.
32 ReedTable();
33
34 //! Class destructor.
35 ~ReedTable();
36
37 //! Set the table offset value.
38 /*!
39 The table offset roughly corresponds to the size
40 of the initial reed tip opening (a greater offset
41 represents a smaller opening).
42 */
43 void setOffset(StkFloat offset);
44
45 //! Set the table slope value.
46 /*!
47 The table slope roughly corresponds to the reed
48 stiffness (a greater slope represents a harder
49 reed).
50 */
51 void setSlope(StkFloat slope);
52
53 protected:
54
55 StkFloat computeSample( StkFloat input );
56
57 StkFloat offset_;
58 StkFloat slope_;
59
60 };
61
62 } // namespace Nyq
63
64 #endif