aboutsummaryrefslogtreecommitdiff
path: root/stksitar~/sitar.h
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2003-08-16 17:08:55 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2003-08-16 17:08:55 +0000
commit506b8e7dedb80d79bf015e47d92e8b8dd8284584 (patch)
tree6393e98add0a0ae7f92388665b3b6242977f5b64 /stksitar~/sitar.h
parent856eaf396d9a4d371a458a2c373a052bb72c8057 (diff)
added files straight from Yves' sources
svn path=/trunk/externals/unauthorized/; revision=864
Diffstat (limited to 'stksitar~/sitar.h')
-rw-r--r--stksitar~/sitar.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/stksitar~/sitar.h b/stksitar~/sitar.h
new file mode 100644
index 0000000..d787211
--- /dev/null
+++ b/stksitar~/sitar.h
@@ -0,0 +1,44 @@
+/******************************************/
+/* Karplus-Strong Sitar1 string model */
+/* by Perry Cook, 1995-96 */
+/* */
+/* There exist at least two patents, */
+/* assigned to Stanford, bearing the */
+/* names of Karplus and/or Strong. */
+/******************************************/
+
+#if !defined(__sitar_h)
+#define __sitar_h
+
+#include "Instrmnt.h"
+#include "DLineA.h"
+#include "OneZero.h"
+#include "ADSR.h"
+#include "Noise.h"
+#include "Object.h"
+
+class sitar : public Instrmnt
+{
+protected:
+ DLineA *delayLine;
+ OneZero *loopFilt;
+ ADSR *envelope;
+ Noise *noise;
+ long length;
+ MY_FLOAT loopGain;
+ MY_FLOAT amPluck;
+ MY_FLOAT delay;
+ MY_FLOAT delayTarg;
+public:
+ sitar(MY_FLOAT lowestFreq);
+ ~sitar();
+ void clear();
+ virtual void setFreq(MY_FLOAT frequency);
+ void pluck(MY_FLOAT amplitude);
+ virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp);
+ virtual void noteOff(MY_FLOAT amp);
+ virtual MY_FLOAT tick();
+};
+
+#endif
+