Debian Codegraph @

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

raw
1 /***************************************************/
2 /*! \class ReedTabl
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 - 2002.
17 */
18 /***************************************************/
19
20 #if !defined(__REEDTABL_H)
21 #define __REEDTABL_H
22
23 #include "Stk.h"
24
25 class ReedTabl : public Stk
26 {
27 public:
28 //! Default constructor.
29 ReedTabl();
30
31 //! Class destructor.
32 ~ReedTabl();
33
34 //! Set the table offset value.
35 /*!
36 The table offset roughly corresponds to the size
37 of the initial reed tip opening (a greater offset
38 represents a smaller opening).
39 */
40 void setOffset(MY_FLOAT aValue);
41
42 //! Set the table slope value.
43 /*!
44 The table slope roughly corresponds to the reed
45 stiffness (a greater slope represents a harder
46 reed).
47 */
48 void setSlope(MY_FLOAT aValue);
49
50 //! Return the last output value.
51 MY_FLOAT lastOut() const;
52
53 //! Return the function value for \e input.
54 /*!
55 The function input represents the differential
56 pressure across the reeds.
57 */
58 MY_FLOAT tick(MY_FLOAT input);
59
60 //! Take \e vectorSize inputs and return the corresponding function values in \e vector.
61 MY_FLOAT *tick(MY_FLOAT *vector, unsigned int vectorSize);
62
63 protected:
64 MY_FLOAT offSet;
65 MY_FLOAT slope;
66 MY_FLOAT lastOutput;
67
68 };
69
70 #endif