aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/sandbox.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/sandbox.lua b/examples/sandbox.lua
new file mode 100644
index 0000000..43c3ec7
--- /dev/null
+++ b/examples/sandbox.lua
@@ -0,0 +1,30 @@
1-- Song file structure
2-- This is just an outline of it and this will change.
3
4-- API specification:
5-- note_on(note, sf_preset, effect)
6-- note_off(note)
7-- delay(millisecons)
8-- play_pattern(pattern_name, repeat)
9
10-- Effects:
11-- delay
12-- reverb
13
14-- This is a pattern definition.
15-- Columns go from A..F and rows go from 1..4.
16-- This blocks will be visualized in the DAW.
17pattern("A1", function(self)
18 for i = 1, 10 do
19 note_on(40 + i, 1, nil)
20 delay(10)
21 end
22end)
23
24-- This is the actual song timeline.
25timeline(function(self)
26 play_pattern("A1", 1)
27 play_pattern("F2", 3)
28 play_pattern("D4", 2)
29end)
30