aboutsummaryrefslogtreecommitdiff
path: root/music.scm
diff options
context:
space:
mode:
Diffstat (limited to 'music.scm')
-rw-r--r--music.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/music.scm b/music.scm
new file mode 100644
index 0000000..a45111f
--- /dev/null
+++ b/music.scm
@@ -0,0 +1,18 @@
+(include "lib.scm")
+
+(define (melody t) (+
+ ((note (getfreq 3 4) 0 1/4) t)
+ ((note (getfreq 3 8) 1/4 1/4) t)
+ ((note (getfreq 3 4) 3/4 1/4) t)
+ ((note (getfreq 3 11) 1 1/4) t)
+ ((note (getfreq 3 4) 5/4 1/4) t)
+ ((note (getfreq 3 2) 3/2 1/4) t)
+ ((note (getfreq 3 8) 7/4 1/4) t)
+ ((note (getfreq 3 4) 9/4 1/4) t)
+ ((note (getfreq 3 11) 5/2 1/4) t)
+ ((note (getfreq 3 4) 11/4 1/4) t)
+))
+
+(define (music t) (
+ melody (floor-remainder t 3)
+))