diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/airharp/String.h	Mon Dec 28 03:19:59 2015 +0100
@@ -0,0 +1,45 @@
+/*
+ *
+ * 1-D string consisting of two waveguides and junction
+ *
+ * Christian Heinrichs 04/2015
+ *
+ */
+
+#ifndef STRING_H_
+#define STRING_H_
+
+#include <cmath>
+#include "Junction.h"
+#include "Waveguide.h"
+
+class String
+{
+
+public:
+
+	String();
+	float update(float in);
+
+	float getPlectrumDisplacement();
+	void setMidinote(float midinote);
+	void setFrequency(float frequency);
+	void setPeriod(float periodInMs);
+	void setPluckPosition(float pluckPos);
+	void setGlobalPosition(float pos);
+	float getGlobalPosition();
+
+private:
+
+	float _previous_l;
+	float _previous_r;
+
+	float _globalPosition;
+
+	Waveguide wg_l;
+	Waveguide wg_r;
+	Junction junction;
+
+};
+
+#endif