Mercurial > hg > beaglert
comparison projects/airharp/String.h @ 170:e80340fe527a
merge
| author | Giulio Moro <giuliomoro@yahoo.it> | 
|---|---|
| date | Mon, 28 Dec 2015 03:19:59 +0100 | 
| parents | 40badaff5729 | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 169:94751ad27fd6 | 170:e80340fe527a | 
|---|---|
| 1 /* | |
| 2 * | |
| 3 * 1-D string consisting of two waveguides and junction | |
| 4 * | |
| 5 * Christian Heinrichs 04/2015 | |
| 6 * | |
| 7 */ | |
| 8 | |
| 9 #ifndef STRING_H_ | |
| 10 #define STRING_H_ | |
| 11 | |
| 12 #include <cmath> | |
| 13 #include "Junction.h" | |
| 14 #include "Waveguide.h" | |
| 15 | |
| 16 class String | |
| 17 { | |
| 18 | |
| 19 public: | |
| 20 | |
| 21 String(); | |
| 22 float update(float in); | |
| 23 | |
| 24 float getPlectrumDisplacement(); | |
| 25 void setMidinote(float midinote); | |
| 26 void setFrequency(float frequency); | |
| 27 void setPeriod(float periodInMs); | |
| 28 void setPluckPosition(float pluckPos); | |
| 29 void setGlobalPosition(float pos); | |
| 30 float getGlobalPosition(); | |
| 31 | |
| 32 private: | |
| 33 | |
| 34 float _previous_l; | |
| 35 float _previous_r; | |
| 36 | |
| 37 float _globalPosition; | |
| 38 | |
| 39 Waveguide wg_l; | |
| 40 Waveguide wg_r; | |
| 41 Junction junction; | |
| 42 | |
| 43 }; | |
| 44 | |
| 45 #endif | 
