aboutsummaryrefslogtreecommitdiff
path: root/stksitar~/mstksitar~.cc
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~/mstksitar~.cc
parent856eaf396d9a4d371a458a2c373a052bb72c8057 (diff)
added files straight from Yves' sources
svn path=/trunk/externals/unauthorized/; revision=864
Diffstat (limited to 'stksitar~/mstksitar~.cc')
-rw-r--r--stksitar~/mstksitar~.cc39
1 files changed, 39 insertions, 0 deletions
diff --git a/stksitar~/mstksitar~.cc b/stksitar~/mstksitar~.cc
new file mode 100644
index 0000000..62edef6
--- /dev/null
+++ b/stksitar~/mstksitar~.cc
@@ -0,0 +1,39 @@
+/* stksitar~ -- apply a stksitar effect
+ * requires libDSP library
+ * Copyleft 2001 Yves Degoyon.
+ * Permission is granted to use this software for any purpose provided you
+ * keep this copyright notice intact.
+ *
+ * THE AUTHOR AND HIS EXPLOITERS MAKE NO WARRANTY, EXPRESS OR IMPLIED,
+ * IN CONNECTION WITH THIS SOFTWARE.
+ *
+*/
+
+#include "sitar.h"
+#include "unistd.h"
+#include "RtWvOut.h"
+
+sitar *x_stksitar = NULL;
+
+int main( int argc, char** argv )
+{
+
+ // int count=0;
+
+ x_stksitar = new sitar( 50.0 );
+ if ( x_stksitar == NULL )
+ {
+ printf( "mstksitar~: cannot build sitar instrument from STK" );
+ exit(-1);
+ }
+
+ x_stksitar->noteOn( 400.0, 0.25 ); // start sound
+ while (1)
+ {
+ double dare;
+
+ dare = (float) x_stksitar->tick();
+ printf( "%f\n", dare );
+ fwrite( (void*)&dare, sizeof(float), 1, stderr );
+ }
+}