| 1 |
/***************************************************/ |
| 2 |
/*! \class BowTable |
| 3 |
\brief STK bowed string table class. |
| 4 |
|
| 5 |
This class implements a simple bowed string |
| 6 |
non-linear function, as described by Smith (1986). |
| 7 |
|
| 8 |
by Perry R. Cook and Gary P. Scavone, 1995 - 2005. |
| 9 |
*/ |
| 10 |
/***************************************************/ |
| 11 |
|
| 12 |
#ifndef STK_BOWTABL_H |
| 13 |
#define STK_BOWTABL_H |
| 14 |
|
| 15 |
#include "Function.h" |
| 16 |
|
| 17 |
namespace Nyq |
| 18 |
{ |
| 19 |
|
| 20 |
class BowTable : public Function |
| 21 |
{ |
| 22 |
public: |
| 23 |
//! Default constructor. |
| 24 |
BowTable(); |
| 25 |
|
| 26 |
//! Class destructor. |
| 27 |
~BowTable(); |
| 28 |
|
| 29 |
//! Set the table offset value. |
| 30 |
/*! |
| 31 |
The table offset is a bias which controls the |
| 32 |
symmetry of the friction. If you want the |
| 33 |
friction to vary with direction, use a non-zero |
| 34 |
value for the offset. The default value is zero. |
| 35 |
*/ |
| 36 |
void setOffset(StkFloat offset); |
| 37 |
|
| 38 |
//! Set the table slope value. |
| 39 |
/*! |
| 40 |
The table slope controls the width of the friction |
| 41 |
pulse, which is related to bow force. |
| 42 |
*/ |
| 43 |
void setSlope(StkFloat slope); |
| 44 |
|
| 45 |
protected: |
| 46 |
|
| 47 |
StkFloat computeSample( StkFloat input ); |
| 48 |
|
| 49 |
StkFloat offset_; |
| 50 |
StkFloat slope_; |
| 51 |
|
| 52 |
}; |
| 53 |
|
| 54 |
} // namespace Nyq |
| 55 |
|
| 56 |
#endif |