diff projects/airharp/String.h @ 164:40badaff5729 heavy-updated

- added more pd/heavy examples - removed heavy-specific flags from Makefile - added air-harp cpp example project
author chnrx <chris.heinrichs@gmail.com>
date Thu, 03 Dec 2015 16:19:33 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/airharp/String.h	Thu Dec 03 16:19:33 2015 +0000
@@ -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