From 088f367cab005878d95d1f3558d49e02fb058c86 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 21 May 2024 19:12:48 -0400 Subject: [PATCH] flow/flow_test.cfg : Test cfg. file for initial working and tested presets. --- src/cwtest/cfg/flow/flow_test.cfg | 61 +++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/src/cwtest/cfg/flow/flow_test.cfg b/src/cwtest/cfg/flow/flow_test.cfg index eb5f8f8..1c88d6b 100644 --- a/src/cwtest/cfg/flow/flow_test.cfg +++ b/src/cwtest/cfg/flow/flow_test.cfg @@ -5,8 +5,8 @@ proc_cfg_fname: "~/src/cwtest/src/cwtest/cfg/flow/flow_proc_dict.cfg", subnet_cfg_fname:"~/src/cwtest/src/cwtest/cfg/flow/flow_subnet_dict.cfg", project_dir:"~/src/cwtest/src/cwtest/cfg/flow/ttest", - test_ref_dir:"~/src/cwtest/src/cwtest/cfg/flow/test", - cmp_enable_fl: false, + test_ref_dir:"~/src/cwtest/src/cwtest/cfg/flow/test_ref", + cmp_enable_fl: true, test_cases: { @@ -100,9 +100,9 @@ } presets: { - a: { lfo: { hz:1, dc:880 }, osc: { gain:0.95 } }, - b: { lfo: { hz:2, dc:220 }, osc: { gain:0.75 } }, - c: { lfo: a220 }, + a: { lfo: { hz:1.0, dc:880 }, osc: { gain:0.95 } }, + b: { lfo: { hz:2.0, dc:220 }, osc: { gain:0.75 } }, + c: { lfo: a220 } } } } @@ -203,11 +203,14 @@ sh: { class: sample_hold, in:{ in:lfo.out }} osc: { class: sine_tone, in:{ hz: sh.out }} } - + + // Note the use of the trailing underscore to create matching presets + // on all poly channels. Without the underscore the presets would only + // be applied to poly channel 0. presets: { - a: { lfo: { hz:1, dc:880 }, osc: { gain:0.95 } }, - b: { lfo: { hz:2, dc:220 }, osc: { gain:0.75 } }, - c: { lfo: a220 }, + a: { lfo_: { hz:1, dc:880 }, osc_: { gain:0.95 } }, + b: { lfo_: { hz:2, dc:220 }, osc_: { gain:0.75 } }, + c: { lfo_: a220 }, } } } @@ -263,10 +266,13 @@ osc: { class: sine_tone, in:{ hz: sh.out }} } + // Note the use of the trailing underscore to create matching presets + // on all poly channels. Without the underscore the presets would only + // be applied to poly channel 0. presets: { - a: { lfo: { hz:1 }, osc: { gain:0.95 } }, - b: { lfo: { hz:2 }, osc: { gain:0.75 } }, - c: { lfo: a220 }, + a: { lfo_: { hz:1 }, osc_: { gain:0.95 } }, + b: { lfo_: { hz:2 }, osc_: { gain:0.75 } }, + c: { lfo_: a220 }, } } } @@ -360,6 +366,37 @@ } }, + + // Same as test_4 but with a dual-preset + test_13: { + framesPerCycle: 64, + maxCycleCount: 15000, + printNetworkFl: false, + + network: { + + procs: { + srate: { class: number, log:{value:0} args:{ default:{ value:48000.0} } }, + tmr: { class: timer, in: { srate:srate.value } log:{srate:0} args:{ default:{ period_ms:2000 } }}, + cnt: { class: counter, in: { trigger:tmr.out }, args:{ default:{ min:0, max:3, inc:1, init:0, mode:clip, out_type:uint }}} + list: { class: list, in: { in:cnt.out }, args:{ default:{ list:[ a,b,c,d ] }}}, + ps: { class: preset, in: { in:list.out } } + + lfo: { class: sine_tone, in:{ srate:srate.value }, log:{srate:0,hz:0,dc:0} args: { default:{hz:3, dc:440, gain:110 }}} + sh: { class: sample_hold, in:{ in:lfo.out } } + osc: { class: sine_tone, in:{ hz:sh.out, srate:srate.value }} + afout: { class: audio_file_out, in:{ in:osc.out } args:{ default:{fname:"$/audio_flow_out.wav"} }} + } + + presets: { + a: { lfo: { hz:1.0, dc:880 }, osc: { gain:0.95 } }, + b: { lfo: { hz:2.0, dc:220 }, osc: { gain:0.75 } }, + c: { lfo: a220 }, + d: [ a,b,0.5 ] + } + } + } + } } }