Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-08-19 16:16:20 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-08-19 16:16:20 (GMT)
commitef0201686354c51563aca1147c50bed3fd6100ab (patch)
tree157888c816fd392a1d82957929ba8c880fb1be46 /samples
parent72cff17dfbc439ae73ea2c23d032e93fefe016f1 (diff)
new sample program
Diffstat (limited to 'samples')
-rw-r--r--samples/media-music-keyboard.tb255
-rw-r--r--samples/thumbnails/media-music-keyboard.pngbin0 -> 936 bytes
2 files changed, 129 insertions, 126 deletions
diff --git a/samples/media-music-keyboard.tb b/samples/media-music-keyboard.tb
index 9673c4a..a525d33 100644
--- a/samples/media-music-keyboard.tb
+++ b/samples/media-music-keyboard.tb
@@ -1,127 +1,130 @@
-[[0, ["start", 2.0], 160, 200, [null, 52]],
-[1, ["until", 63], 600, 254, [48, 22, 27, 54]],
-[2, ["forever", 230], 160, 288, [52, 50, null]],
-[3, "sinewave", 178, 656, [20, 46, 10, 4, 11]],
-[4, ["number", 0.33], 258, 740, [3, null]],
-[5, ["product2", 0], 392, 698, [10, 6, 7]],
-[6, ["number", 10000], 446, 698, [5, null]],
-[7, ["division2", 0], 446, 740, [5, 8, 44]],
-[8, ["number", 2093], 516, 740, [7, null]],
-[9, ["vspace", 20], 178, 532, [42, 20]],
-[10, ["identity2", 40], 258, 698, [3, 5]],
-[11, "wait", 178, 782, [3, 12, null]],
-[12, ["number", 0.33], 236, 782, [11, null]],
-[13, ["number", 1.06], 326, 532, [16, null]],
-[14, "comment", 178, 406, [18, 15, 42]],
-[15, ["string", "2^^(1/12) is factor between half-steps"], 261, 406, [14, null]],
-[16, ["myfunc2arg", 0], 246, 490, [42, 17, 13, 40, null]],
-[17, ["string", "130.81 * pow(x, y)"], 326, 490, [16, null]],
-[18, "comment", 178, 364, [50, 19, 14]],
-[19, ["string", "130.81 Hz is Low C"], 261, 364, [18, null]],
-[20, "comment", 178, 614, [9, 21, 3]],
-[21, ["string", "normalize volume by frequency"], 261, 614, [20, null]],
+[[0, ["start", 2.0], 160, 200, [null, 110]],
+[1, ["until", 63], 600, 254, [38, 22, 25, 28]],
+[2, ["forever", 230], 160, 330, [112, 40, null]],
+[3, "sinewave", 178, 698, [20, 36, 10, 4, 11]],
+[4, ["number", 0.33], 258, 782, [3, null]],
+[5, ["product2", 0], 392, 740, [10, 6, 7]],
+[6, ["number", 10000], 446, 740, [5, null]],
+[7, ["division2", 0], 446, 782, [5, 8, 34]],
+[8, ["number", 2093], 516, 782, [7, null]],
+[9, ["vspace", 20], 178, 574, [32, 20]],
+[10, ["identity2", 40], 258, 740, [3, 5]],
+[11, "wait", 178, 824, [3, 12, null]],
+[12, ["number", 0.33], 236, 824, [11, null]],
+[13, ["number", 1.06], 326, 574, [16, null]],
+[14, "comment", 178, 448, [18, 15, 32]],
+[15, ["string", "2^^(1/12) is factor between half-steps"], 261, 448, [14, null]],
+[16, ["myfunc2arg", 0], 246, 532, [32, 17, 13, 30, null]],
+[17, ["string", "130.81 * pow(x, y)"], 326, 532, [16, null]],
+[18, "comment", 178, 406, [40, 19, 14]],
+[19, ["string", "130.81 Hz is Low C"], 261, 406, [18, null]],
+[20, "comment", 178, 656, [9, 21, 3]],
+[21, ["string", "normalize volume by frequency"], 261, 656, [20, null]],
[22, "mousebutton2", 656, 270, [1, null]],
-[23, "mousex", 676, 362, [29, null]],
-[24, "mousey", 676, 404, [29, null]],
-[25, "forward", 600, 590, [58, 26, 33]],
-[26, ["number", 1], 671, 590, [25, null]],
-[27, "penup", 618, 320, [1, 29]],
-[28, "pendown", 618, 446, [29, null]],
-[29, ["setxy2", 0], 618, 362, [27, 23, 24, 28]],
-[30, "xcor", 954, 716, [62, null]],
-[31, ["division2", 40], 830, 716, [36, 62, 32]],
-[32, "width", 924, 838, [31, null]],
-[33, ["storein", 0], 600, 632, [25, 34, 39, null]],
-[34, ["string", "note"], 668, 632, [33, null]],
-[35, ["number", 24], 722, 674, [39, null]],
-[36, ["product2", 60], 776, 716, [38, 31, 37]],
-[37, ["number", 12], 830, 878, [36, null]],
-[38, "int", 722, 716, [39, 36]],
-[39, ["plus2", 0], 668, 674, [33, 35, 38]],
-[40, "box", 326, 574, [16, 41, null]],
-[41, ["string", "note"], 381, 574, [40, null]],
-[42, ["storein", 0], 178, 448, [14, 43, 16, 9]],
-[43, ["string", "frequency"], 246, 448, [42, null]],
-[44, "box", 540, 782, [7, 45, null]],
-[45, ["string", "frequency"], 595, 782, [44, null]],
-[46, "box", 258, 656, [3, 47, null]],
-[47, ["string", "frequency"], 313, 656, [46, null]],
-[48, "hat", 600, 200, [null, 49, 1]],
-[49, ["string", "paint"], 658, 212, [48, null]],
-[50, "stack", 178, 322, [2, 51, 18]],
-[51, ["string", "paint"], 236, 322, [50, null]],
-[52, "setpensize", 160, 246, [0, 53, 2]],
-[53, ["number", 50.0], 262, 246, [52, null]],
-[54, "setcolor", 600, 506, [1, 55, 58]],
-[55, ["random", 0], 677, 506, [54, 56, 57, null]],
-[56, ["number", 0], 763, 506, [55, null]],
-[57, ["number", 100], 763, 548, [55, null]],
-[58, ["vspace", 0], 600, 548, [54, 25]],
-[59, "width", 1024, 758, [60, null]],
-[60, ["division2", 0], 954, 758, [62, 59, 61]],
-[61, ["number", 2], 1048, 800, [60, null]],
-[62, ["plus2", 0], 900, 716, [31, 30, 60]],
-[63, "fillscreen2", 850, 73, [null, 64, 66, 65, 105]],
-[64, ["number", 60], 932, 73, [63, null]],
-[65, ["number", 100], 932, 157, [63, null]],
-[66, "white", 932, 115, [63, null]],
-[67, ["repeat", 105], 1770, 243, [125, 68, 69, 126]],
-[68, ["number", 2.0], 1829, 243, [67, null]],
-[69, "forward", 1788, 285, [67, 122, 124]],
-[70, "height", 1929, 285, [122, null]],
-[71, "width", 1929, 411, [72, null]],
-[72, ["division2", 0], 1859, 411, [76, 71, 73]],
-[73, ["number", 8.0], 1953, 453, [72, null]],
-[74, "right", 1788, 369, [124, 75, 76]],
-[75, ["number", 90], 1846, 369, [74, null]],
-[76, "forward", 1788, 411, [74, 72, 79]],
-[77, "right", 1788, 495, [79, 78, null]],
-[78, ["number", 90], 1846, 495, [77, null]],
-[79, ["vspace", 0], 1788, 453, [76, 77]],
-[80, ["repeat", 166], 850, 451, [96, 81, 82, null]],
-[81, ["number", 8.0], 909, 451, [80, null]],
-[82, "penup", 868, 493, [80, 88]],
-[83, "pendown", 868, 619, [88, 89]],
-[84, "hat", 1431, 128, [null, 85, 109]],
-[85, ["string", "white key"], 1489, 140, [84, null]],
-[86, "setcolor", 850, 241, [105, 87, 95]],
-[87, "black", 927, 241, [86, null]],
-[88, ["setxy2", 0], 868, 535, [82, 97, 91, 83]],
-[89, "stack", 868, 661, [83, 90, 98]],
-[90, ["string", "white key"], 926, 661, [89, null]],
-[91, "bottompos", 926, 577, [88, null]],
-[92, "leftpos", 908, 325, [94, null]],
-[93, "bottompos", 908, 367, [94, null]],
-[94, ["setxy2", 0], 850, 325, [95, 92, 93, 96]],
-[95, "penup", 850, 283, [86, 94]],
-[96, "pendown", 850, 409, [94, 80]],
-[97, "xcor", 926, 535, [88, null]],
-[98, ["setxy2", 40], 868, 703, [89, 101, 100, null]],
-[99, "xcor", 980, 703, [101, null]],
-[100, "ycor", 926, 825, [98, null]],
-[101, ["plus2", 0], 926, 703, [98, 99, 103]],
-[102, ["number", 8.0], 1074, 787, [103, null]],
-[103, ["division2", 0], 980, 745, [101, 104, 102]],
-[104, "width", 1050, 745, [103, null]],
-[105, "setpensize", 850, 199, [63, 106, 86]],
-[106, ["number", 5], 952, 199, [105, null]],
-[107, "hat", 1770, 147, [null, 108, 125]],
-[108, ["string", "black key"], 1828, 159, [107, null]],
-[109, ["repeat", 84], 1431, 182, [84, 110, 111, null]],
-[110, ["number", 2], 1490, 182, [109, null]],
-[111, "forward", 1449, 224, [109, 112, 113]],
-[112, "height", 1520, 224, [111, null]],
-[113, "right", 1449, 266, [111, 114, 115]],
-[114, ["number", 90], 1507, 266, [113, null]],
-[115, "forward", 1449, 308, [113, 116, 119]],
-[116, ["division2", 0], 1520, 308, [115, 117, 118]],
-[117, "width", 1590, 308, [116, null]],
-[118, ["number", 8], 1614, 350, [116, null]],
-[119, ["vspace", 0], 1449, 350, [115, 120]],
-[120, "right", 1449, 392, [119, 121, null]],
-[121, ["number", 90], 1507, 392, [120, null]],
-[122, ["division2", 0], 1859, 285, [69, 70, 123]],
-[123, ["number", 2.0], 1953, 327, [122, null]],
-[124, ["vspace", 0], 1788, 327, [69, 74]],
-[125, "startfill", 1770, 201, [107, 67]],
-[126, "stopfill", 1770, 555, [67, null]]]
+[23, "mousex", 676, 362, [27, null]],
+[24, "mousey", 676, 404, [27, null]],
+[25, "penup", 618, 320, [1, 27]],
+[26, "pendown", 618, 446, [27, null]],
+[27, ["setxy2", 0], 618, 362, [25, 23, 24, 26]],
+[28, ["storein", 0], 600, 506, [1, 29, 82, null]],
+[29, ["string", "note"], 668, 506, [28, null]],
+[30, "box", 326, 616, [16, 31, null]],
+[31, ["string", "note"], 381, 616, [30, null]],
+[32, ["storein", 0], 178, 490, [14, 33, 16, 9]],
+[33, ["string", "frequency"], 246, 490, [32, null]],
+[34, "box", 540, 824, [7, 35, null]],
+[35, ["string", "frequency"], 595, 824, [34, null]],
+[36, "box", 258, 698, [3, 37, null]],
+[37, ["string", "frequency"], 313, 698, [36, null]],
+[38, "hat", 600, 200, [null, 39, 1]],
+[39, ["string", "paint"], 658, 212, [38, null]],
+[40, "stack", 178, 364, [2, 41, 18]],
+[41, ["string", "paint"], 236, 364, [40, null]],
+[42, ["repeat", 229], 853, 421, [58, 43, 44, 48]],
+[43, ["number", 8], 912, 421, [42, null]],
+[44, "penup", 871, 463, [42, 50]],
+[45, "pendown", 871, 589, [50, 86]],
+[46, "hat", 1431, 128, [null, 47, 67]],
+[47, ["string", "white key"], 1489, 140, [46, null]],
+[48, "setcolor", 853, 981, [42, 49, 87]],
+[49, "black", 930, 981, [48, null]],
+[50, ["setxy2", 0], 871, 505, [44, 59, 53, 45]],
+[51, "stack", 871, 715, [80, 52, 81]],
+[52, ["string", "white key"], 929, 715, [51, null]],
+[53, "bottompos", 929, 547, [50, null]],
+[54, "leftpos", 911, 295, [56, null]],
+[55, "bottompos", 911, 337, [56, null]],
+[56, ["setxy2", 0], 853, 295, [57, 54, 55, 58]],
+[57, "penup", 853, 253, [83, 56]],
+[58, "pendown", 853, 379, [56, 42]],
+[59, "xcor", 929, 505, [50, null]],
+[60, ["setxy2", 40], 871, 799, [81, 63, 62, null]],
+[61, "xcor", 983, 799, [63, null]],
+[62, "ycor", 929, 921, [60, null]],
+[63, ["plus2", 0], 929, 799, [60, 61, 65]],
+[64, ["number", 8], 1077, 883, [65, null]],
+[65, ["division2", 0], 983, 841, [63, 66, 64]],
+[66, "width", 1053, 841, [65, null]],
+[67, ["repeat", 84], 1431, 182, [46, 68, 69, null]],
+[68, ["number", 2], 1490, 182, [67, null]],
+[69, "forward", 1449, 224, [67, 70, 71]],
+[70, "height", 1520, 224, [69, null]],
+[71, "right", 1449, 266, [69, 72, 73]],
+[72, ["number", 90], 1507, 266, [71, null]],
+[73, "forward", 1449, 308, [71, 74, 77]],
+[74, ["division2", 0], 1520, 308, [73, 75, 76]],
+[75, "width", 1590, 308, [74, null]],
+[76, ["number", 8], 1614, 350, [74, null]],
+[77, ["vspace", 0], 1449, 350, [73, 78]],
+[78, "right", 1449, 392, [77, 79, null]],
+[79, ["number", 90], 1507, 392, [78, null]],
+[80, "startfill", 871, 673, [86, 51]],
+[81, "stopfill", 871, 757, [51, 60]],
+[82, "see", 668, 548, [28, null]],
+[83, "hat", 853, 199, [null, 84, 57]],
+[84, ["string", "draw keyboard"], 911, 211, [83, null]],
+[85, "pop", 948, 631, [86, null]],
+[86, "setcolor", 871, 631, [45, 85, 80]],
+[87, "penup", 853, 1023, [48, 88]],
+[88, ["setxy2", 0], 853, 1065, [87, 89, 90, 91]],
+[89, "leftpos", 911, 1065, [88, null]],
+[90, "bottompos", 911, 1107, [88, null]],
+[91, "pendown", 853, 1149, [88, 92]],
+[92, ["repeat", 166], 853, 1191, [91, 93, 94, null]],
+[93, ["number", 8], 912, 1191, [92, null]],
+[94, "penup", 871, 1233, [92, 95]],
+[95, ["setxy2", 0], 871, 1275, [94, 96, 97, 98]],
+[96, "xcor", 929, 1275, [95, null]],
+[97, "bottompos", 929, 1317, [95, null]],
+[98, "pendown", 871, 1359, [95, 99]],
+[99, "stack", 871, 1401, [98, 100, 101]],
+[100, ["string", "white key"], 929, 1401, [99, null]],
+[101, ["setxy2", 40], 871, 1443, [99, 102, 107, null]],
+[102, ["plus2", 0], 929, 1443, [101, 103, 104]],
+[103, "xcor", 983, 1443, [102, null]],
+[104, ["division2", 0], 983, 1485, [102, 105, 106]],
+[105, "width", 1053, 1485, [104, null]],
+[106, ["number", 8], 1077, 1527, [104, null]],
+[107, "ycor", 929, 1565, [101, null]],
+[108, "hat", 1096, 195, [null, 109, 114]],
+[109, ["string", "select notes"], 1154, 207, [108, null]],
+[110, "stack", 160, 246, [0, 111, 112]],
+[111, ["string", "select notes"], 218, 246, [110, null]],
+[112, "stack", 160, 288, [110, 113, 2]],
+[113, ["string", "draw keyboard"], 218, 288, [112, null]],
+[114, "push", 1096, 249, [108, 115, 116]],
+[115, ["number", 36.0], 1154, 249, [114, null]],
+[116, "push", 1096, 291, [114, 117, 118]],
+[117, ["number", 35.0], 1154, 291, [116, null]],
+[118, "push", 1096, 333, [116, 119, 120]],
+[119, ["number", 33.0], 1154, 333, [118, null]],
+[120, "push", 1096, 375, [118, 121, 122]],
+[121, ["number", 31.0], 1154, 375, [120, null]],
+[122, "push", 1096, 417, [120, 123, 124]],
+[123, ["number", 29.0], 1154, 417, [122, null]],
+[124, "push", 1096, 459, [122, 125, 126]],
+[125, ["number", 28.0], 1154, 459, [124, null]],
+[126, "push", 1096, 501, [124, 127, 128]],
+[127, ["number", 26.0], 1154, 501, [126, null]],
+[128, "push", 1096, 543, [126, 129, null]],
+[129, ["number", 24], 1154, 543, [128, null]]]
diff --git a/samples/thumbnails/media-music-keyboard.png b/samples/thumbnails/media-music-keyboard.png
new file mode 100644
index 0000000..e515a24
--- /dev/null
+++ b/samples/thumbnails/media-music-keyboard.png
Binary files differ