comparison examples/10-Instruments/airharp/Plectrum.h @ 464:8fcfbfb32aa0 prerelease

Examples reorder with subdirectories. Added header to each project. Moved Doxygen to bottom of render.cpp.
author Robert Jack <robert.h.jack@gmail.com>
date Mon, 20 Jun 2016 16:20:38 +0100
parents
children
comparison
equal deleted inserted replaced
463:c47709e8b5c9 464:8fcfbfb32aa0
1 /*
2 *
3 * Plectrum model for touching and plucking strings
4 *
5 * [inspired by E. Berdahl's pluck~ abstraction for the FireFader]
6 *
7 */
8
9 #ifndef PLECTRUM_H_
10 #define PLECTRUM_H_
11
12 class Plectrum
13 {
14
15 public:
16
17 Plectrum();
18 void setup(float spring, float damp, float hyst);
19 float update(float position, float stringPosition);
20
21 private:
22
23 double _dt;
24 float _spring;
25 float _damp;
26 double _position;
27 double _velocity;
28 float _hyst;
29 float _lastDistance;
30 int _contact;
31
32 };
33
34 #endif
35