Mercurial > hg > beaglert
annotate examples/airharp/String.h @ 382:bcc033b46636 prerelease
Updated libpd license
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sun, 12 Jun 2016 23:38:31 +0100 |
parents | dbeed520b014 |
children |
rev | line source |
---|---|
chris@164 | 1 /* |
chris@164 | 2 * |
chris@164 | 3 * 1-D string consisting of two waveguides and junction |
chris@164 | 4 * |
chris@164 | 5 * Christian Heinrichs 04/2015 |
chris@164 | 6 * |
chris@164 | 7 */ |
chris@164 | 8 |
chris@164 | 9 #ifndef STRING_H_ |
chris@164 | 10 #define STRING_H_ |
chris@164 | 11 |
chris@164 | 12 #include <cmath> |
chris@164 | 13 #include "Junction.h" |
chris@164 | 14 #include "Waveguide.h" |
chris@164 | 15 |
chris@164 | 16 class String |
chris@164 | 17 { |
chris@164 | 18 |
chris@164 | 19 public: |
chris@164 | 20 |
chris@164 | 21 String(); |
chris@164 | 22 float update(float in); |
chris@164 | 23 |
chris@164 | 24 float getPlectrumDisplacement(); |
chris@164 | 25 void setMidinote(float midinote); |
chris@164 | 26 void setFrequency(float frequency); |
chris@164 | 27 void setPeriod(float periodInMs); |
chris@164 | 28 void setPluckPosition(float pluckPos); |
chris@164 | 29 void setGlobalPosition(float pos); |
chris@164 | 30 float getGlobalPosition(); |
chris@164 | 31 |
chris@164 | 32 private: |
chris@164 | 33 |
chris@164 | 34 float _previous_l; |
chris@164 | 35 float _previous_r; |
chris@164 | 36 |
chris@164 | 37 float _globalPosition; |
chris@164 | 38 |
chris@164 | 39 Waveguide wg_l; |
chris@164 | 40 Waveguide wg_r; |
chris@164 | 41 Junction junction; |
chris@164 | 42 |
chris@164 | 43 }; |
chris@164 | 44 |
chris@164 | 45 #endif |