aboutsummaryrefslogtreecommitdiff
path: root/software
diff options
context:
space:
mode:
Diffstat (limited to 'software')
m---------software/lib/the_synth0
-rw-r--r--software/readme.md7
-rw-r--r--software/software.ino23
3 files changed, 30 insertions, 0 deletions
diff --git a/software/lib/the_synth b/software/lib/the_synth
new file mode 160000
+Subproject e44b5d11e4c1137ea5c938b7639d6aefb6d321a
diff --git a/software/readme.md b/software/readme.md
new file mode 100644
index 0000000..4c6764a
--- /dev/null
+++ b/software/readme.md
@@ -0,0 +1,7 @@
+een van de interne synthesizers die de stylofoon heeft is digitaal en gebaseerd
+op een arduino uno. er moet gebruik gemaakt worden van de
+[the\_synth](https://github.com/dzlonline/the_synth) bibliotheek, en deze wordt
+in deze repository geimporteerd met behulp van git submodules. draai `git
+submodule update --init --recursive --remote --merge` om de submodules te
+downloaden/updaten als je van plan bent de code aan te passen of te compileren.
+
diff --git a/software/software.ino b/software/software.ino
new file mode 100644
index 0000000..376a8d5
--- /dev/null
+++ b/software/software.ino
@@ -0,0 +1,23 @@
+#include "lib/the_synth/synth.h"
+
+synth bernard;
+
+void setup() {
+ bernard.begin();
+
+ bernard.setupVoice(0,SINE,60,ENVELOPE0,90,64);
+ bernard.setupVoice(1,SINE,62,ENVELOPE1,90,64);
+ bernard.setupVoice(2,SINE,64,ENVELOPE2,90,64);
+ bernard.setupVoice(3,SINE,67,ENVELOPE0,90,64);
+}
+
+void loop() {
+ bernard.trigger(0);
+ delay(1000);
+ bernard.trigger(1);
+ delay(1000);
+ bernard.trigger(2);
+ delay(1000);
+ bernard.trigger(3);
+ delay(1000);
+}