diff examples/10-Instruments/airharp/String.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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/10-Instruments/airharp/String.h	Mon Jun 20 16:20:38 2016 +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