diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-10-11 07:51:18 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-10-11 07:51:18 +0200 |
| commit | 920bdc358831087c46db736120a718ed9a75fbd4 (patch) | |
| tree | e884606865dccd8e756c4271b24f7ecc33f19826 /examples | |
| parent | ac6283f92b0579c0e820e13a83715389455d3171 (diff) | |
| download | ttdaw-920bdc358831087c46db736120a718ed9a75fbd4.tar.gz | |
Added boilerplate interface code
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/sandbox.lua | 30 |
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 @@ +-- Song file structure +-- This is just an outline of it and this will change. + +-- API specification: +-- note_on(note, sf_preset, effect) +-- note_off(note) +-- delay(millisecons) +-- play_pattern(pattern_name, repeat) + +-- Effects: +-- delay +-- reverb + +-- This is a pattern definition. +-- Columns go from A..F and rows go from 1..4. +-- This blocks will be visualized in the DAW. +pattern("A1", function(self) + for i = 1, 10 do + note_on(40 + i, 1, nil) + delay(10) + end +end) + +-- This is the actual song timeline. +timeline(function(self) + play_pattern("A1", 1) + play_pattern("F2", 3) + play_pattern("D4", 2) +end) + |
