diff options
author | Graham Northup <grissess@nexusg.org> | 2017-10-13 12:54:04 -0400 |
---|---|---|
committer | Graham Northup <grissess@nexusg.org> | 2017-10-13 12:54:04 -0400 |
commit | 22cb7d7cbcacbfe3a7d3a2d454e6b8cf49ae989c (patch) | |
tree | 4d2d8cb2ce9c4441ce5cc525375665c44c31f9fb /gens | |
parent | 255f0aa6de604e0bf9d37ba0ee5362ef3b9f235f (diff) |
Added LUTs and ControlRate; improved parser
Diffstat (limited to 'gens')
-rw-r--r-- | gens/test.gen | 31 | ||||
-rw-r--r-- | gens/test_basic.gen | 1 | ||||
-rw-r--r-- | gens/test_lut.gen | 1 | ||||
-rw-r--r-- | gens/test_voice.gen | 2 |
4 files changed, 24 insertions, 11 deletions
diff --git a/gens/test.gen b/gens/test.gen index be43356..4613c0c 100644 --- a/gens/test.gen +++ b/gens/test.gen @@ -1,12 +1,23 @@ [ - #gens/test_voice.gen#, - #gens/test_voice.gen#, - #gens/test_voice.gen#, - #gens/test_voice.gen#, - #gens/test_voice.gen#, - #gens/test_voice.gen#, - #gens/test_voice.gen#, - #gens/test_voice.gen#, - #gens/test_voice.gen#, - #gens/test_voice.gen# + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen#, + #gens/test_basic.gen# ] diff --git a/gens/test_basic.gen b/gens/test_basic.gen new file mode 100644 index 0000000..cbbfbbc --- /dev/null +++ b/gens/test_basic.gen @@ -0,0 +1 @@ +lutgen(sine(lut_freq), 128, v_freq) * ifelse(v_frame < v_deadline, v_amp, 0) diff --git a/gens/test_lut.gen b/gens/test_lut.gen new file mode 100644 index 0000000..d9fc9fe --- /dev/null +++ b/gens/test_lut.gen @@ -0,0 +1 @@ +lutgen(sine(lut_freq), 256, 440) diff --git a/gens/test_voice.gen b/gens/test_voice.gen index 855568b..41684c1 100644 --- a/gens/test_voice.gen +++ b/gens/test_voice.gen @@ -1 +1 @@ -mul(sine(param('v_freq', 500)), ifelse(rel(param('v_frame'), '<', param('v_deadline')), mul(param('v_amp'), add(param('v_frame'), negate(param('v_start'))), reciprocate(add(param('v_deadline'), negate(param('v_start'))))), 0.0)) +(lutgen(sine(lut_freq), 128, v_freq) * controlrate(dahdsr(v_frame < v_deadline, 0, 4 / samplerate(), 0, 1, 1, 8 / samplerate()))) * v_amp |