Tune sunny music a bit, add cup filling music
authorNick Downing <nick@ndcode.org>
Fri, 20 May 2022 15:45:14 +0000 (01:45 +1000)
committerNick Downing <nick@ndcode.org>
Fri, 20 May 2022 16:24:10 +0000 (02:24 +1000)
test/lemonade_music.py

index d85184e..41d4472 100755 (executable)
@@ -39,6 +39,10 @@ music = [
     (96, 255),
   ],
 
+  # cup filling
+  # delay between tones needs to be calibrated
+  [(i * 3 - 12, 12) for i in range(36, 19, -1)],
+
   # financial report
   [
     (152, 80),
@@ -143,6 +147,44 @@ music = [
     ('c2', .75), # was: .646
   ],
 
+  # cup filling
+  [
+    ('a2', .03), # was: c2
+    ('rest', .03),
+    ('a#2', .03),
+    ('rest', .03),
+    ('b2', .03),
+    ('rest', .03),
+    ('c2', .03),
+    ('rest', .03),
+    ('c#2', .03),
+    ('rest', .03),
+    ('d2', .03),
+    ('rest', .03),
+    ('d#2', .03),
+    ('rest', .03),
+    ('e2', .03),
+    ('rest', .03),
+    ('f2', .03),
+    ('rest', .03),
+    ('f#2', .03),
+    ('rest', .03),
+    ('g2', .03),
+    ('rest', .03),
+    ('g#2', .03),
+    ('rest', .03),
+    ('a3', .03),
+    ('rest', .03),
+    ('a#3', .03),
+    ('rest', .03),
+    ('b3', .03),
+    ('rest', .03),
+    ('c3', .03),
+    ('rest', .03),
+    ('c#3', .03), # was: c3
+    ('rest', .03)
+  ],
+
   # financial report
   [
     ('e1', .2),
@@ -155,13 +197,13 @@ music = [
   # SC=2: SUNNY
   # played in a staccato style
   # delay between repetitions needs to be calibrated
-  [('c2', .025), ('rest', .005)] * 16 +
-    [('d2', .025), ('rest', .005)] * 4 +
-    [('g1', .025), ('rest', .005)] * 4 +
-    [('c2', .025), ('rest', .005)] * 4 +
-    [('e2', .025), ('rest', .005)] * 4 +
-    [('g1', .025), ('rest', .005)] * 4 +
-    [('c2', .025), ('rest', .005)] * 16,
+  [('c2', .024), ('rest', .001)] * 16 +
+    [('d2', .024), ('rest', .001)] * 4 +
+    [('g1', .024), ('rest', .001)] * 4 +
+    [('c2', .024), ('rest', .001)] * 4 +
+    [('e2', .024), ('rest', .001)] * 4 +
+    [('g1', .024), ('rest', .001)] * 4 +
+    [('c2', .024), ('rest', .001)] * 16,
 
   # SC=7: HOT AND DRY
   [
@@ -256,6 +298,44 @@ music = [
     (0x064f, 0x7c61), # note   c2 duration   0.750
   ],
 
+  # cup filling
+  [
+    (0x054e, 0x04fa), # note   a2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x059f, 0x04fa), # note  a#2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x05f4, 0x04fa), # note   b2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x064f, 0x04fa), # note   c2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x06b0, 0x04f9), # note  c#2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0716, 0x04f9), # note   d2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0782, 0x04f9), # note  d#2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x07f5, 0x04f9), # note   e2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x086f, 0x04f8), # note   f2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x08ef, 0x04f8), # note  f#2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0978, 0x04f8), # note   g2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0a09, 0x04f7), # note  g#2 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0aa3, 0x04f7), # note   a3 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0b45, 0x04f7), # note  a#3 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0bf2, 0x04f6), # note   b3 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0ca9, 0x04f6), # note   c3 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+    (0x0d6b, 0x04f5), # note  c#3 duration   0.030
+    (0x0000, 0x04fe), # note rest duration   0.030
+  ],
+
   # financial report
   [
     (0x03f8, 0x2135), # note   e1 duration   0.200
@@ -268,32 +348,32 @@ music = [
   # SC=2: SUNNY
   # delay between repetitions needs to be calibrated
   [
-    (0x064f, 0x0425), # note   c2 duration   0.025
-    (0x0000, 0x00d5), # note rest duration   0.005
+    (0x064f, 0x03fb), # note   c2 duration   0.024
+    (0x0000, 0x002b), # note rest duration   0.001
   ] * 16 +
     [
-      (0x0716, 0x0425), # note   d2 duration   0.025
-      (0x0000, 0x00d5), # note rest duration   0.005
+      (0x0716, 0x03fb), # note   d2 duration   0.024
+      (0x0000, 0x002b), # note rest duration   0.001
     ] * 4 +
     [
-      (0x04b9, 0x0426), # note   g1 duration   0.025
-      (0x0000, 0x00d5), # note rest duration   0.005
+      (0x04b9, 0x03fc), # note   g1 duration   0.024
+      (0x0000, 0x002b), # note rest duration   0.001
     ] * 4 +
     [
-      (0x064f, 0x0425), # note   c2 duration   0.025
-      (0x0000, 0x00d5), # note rest duration   0.005
+      (0x064f, 0x03fb), # note   c2 duration   0.024
+      (0x0000, 0x002b), # note rest duration   0.001
     ] * 4 +
     [
-      (0x07f5, 0x0425), # note   e2 duration   0.025
-      (0x0000, 0x00d5), # note rest duration   0.005
+      (0x07f5, 0x03fa), # note   e2 duration   0.024
+      (0x0000, 0x002b), # note rest duration   0.001
     ] * 4 +
     [
-      (0x04b9, 0x0426), # note   g1 duration   0.025
-      (0x0000, 0x00d5), # note rest duration   0.005
+      (0x04b9, 0x03fc), # note   g1 duration   0.024
+      (0x0000, 0x002b), # note rest duration   0.001
     ] * 4 +
     [
-      (0x064f, 0x0425), # note   c2 duration   0.025
-      (0x0000, 0x00d5), # note rest duration   0.005
+      (0x064f, 0x03fb), # note   c2 duration   0.024
+      (0x0000, 0x002b), # note rest duration   0.001
     ] * 16,
 
   # SC=7: HOT AND DRY
@@ -358,7 +438,7 @@ print(
 60FL={FREQL:d}
 70FH={FREQH:d}
 80GETI$
-90ONVAL(I$)+1GOSUB10000,11000,12000,13000,14000,15000
+90ONVAL(I$)+1GOSUB10000,11000,12000,13000,14000,15000,16000
 100GOTO80'''
 )
 for i in range(len(music)):