cwtest/src/cfg/main.cfg : 'flow' testing changes

This commit is contained in:
kevin 2021-09-06 09:42:03 -04:00
parent bc8d58d690
commit 563d8a3ef8

View File

@ -735,7 +735,7 @@
am_to_midi_file: { inDir: "~/temp/audio_midi_app_backup/taka1" }, am_to_midi_file: { inDir: "~/temp/audio_midi_app_backup/taka1" },
audio_file_proc: { audio_file_proc: {
srcFn: "/home/kevin/temp/audio.wav", srcFn: "/home/kevin/src/currawong/audio/GUTIM_All_20200711_96k_float.wav",
dstFn: "/home/kevin/temp/audio_out.wav", dstFn: "/home/kevin/temp/audio_out.wav",
cfg: "tremelo", cfg: "tremelo",
@ -753,8 +753,8 @@
hopSmpN: 1024, hopSmpN: 1024,
program: "tremelo", program: "tremelo",
args: { args: {
hz: 2.5, hz: 1.0
depth: 0.75 depth: 1.0
} }
} }
@ -817,8 +817,8 @@
ceiling: 30.0, ceiling: 30.0,
expo: 2.0, expo: 2.0,
thresh: 54.0, thresh: 54.0,
uprSlope: -0.7, upr: -0.7,
lwrSlope: 2.0, lwr: 2.0,
mix: 0.0 mix: 0.0
} }
} }
@ -828,12 +828,16 @@
flow_class: { flow_class: {
audioFileIn: { audioFileIn: {
vars: { vars: {
fname: { type:string, doc:"Audio file name." },
out:{ type:audio, doc:"Audio file output" }, out:{ type:audio, doc:"Audio file output" },
eofFl:{ type:bool, eofFl: true, doc:"Set the system 'halt' flag when the audio is completely read."},
} }
} }
audioFileOut: { audioFileOut: {
vars: { vars: {
fname: { type:string, doc:"Audio file name." },
bits: { type:uint, value:32, doc:"Audio file word width. (8,16,24,32,0=float32)."},
in: { type:audio, srcFl:true, doc:"Audio file input." } in: { type:audio, srcFl:true, doc:"Audio file input." }
} }
} }
@ -841,6 +845,9 @@
pv_analysis: { pv_analysis: {
vars: { vars: {
in: { type:audio, srcFl:true, doc:"Audio input." }, in: { type:audio, srcFl:true, doc:"Audio input." },
hopSmpN: { type:uint, value: 128, doc:"Hop sample count." },
wndSmpN: { type:uint, value: 512, doc:"Window sample count." },
hzFl: { type:bool, value: false, doc:"Calculate frequency via the method of phase changeof each bin." },
out: { type:spectrum, doc:"Spectrum output." } out: { type:spectrum, doc:"Spectrum output." }
} }
} }
@ -855,29 +862,237 @@
spec_dist: { spec_dist: {
vars: { vars: {
in: { type:spectrum, srcFl:true, doc:"Spectrum input." }, in: { type:spectrum, srcFl:true, doc:"Spectrum input." },
ceiling: { type:real, value: 30.0, doc:"Ceiling parameter."},
expo: { type:real, value: 2.0, doc:"Exponent parameter."},
thresh: { type:real, value: 54.0, doc:"Threshold parameter."},
upr: { type:real, value: -0.7, doc:"Upper slope parameter."},
lwr: { type:real, value: 2.0, doc:"Lower slope parameter."},
mix: { type:real, value: 0.0, doc:"Mix parameter."},
out: { type:spectrum, doc:"Spectrum output." }, out: { type:spectrum, doc:"Spectrum output." },
ceiling: { type:real, doc:"Ceiling parameter."},
expo: { type:real, doc:"Exponent parameter."},
thresh: { type:real, doc:"Threshold parameter."},
uprSlope: { type:real, doc:"Upper slope parameter."},
lwrSlope: { type:real, doc:"Lower slope parameter."},
mix: { type:real, doc:"Mix parameter."},
} }
presets: { presets: {
kc: {
ceiling: 20.0,
expo: 2.0,
thresh: 65.0,
upr: 0.0,
lwr: 2.0,
mix: 0.0
}
a: { a: {
ceiling: [ 30.0, 30.0 ], ceiling: 20.0
expo: [ 2.0, 2.0 ], expo: 2.0
thresh: [ 54.0, 55.0 ], thresh: 60.0
uprSlope: [ -0.7, -0.7 ], upr: [ -1.1, -0.99],
lwrSlope: [ 2.0, 2.0 ], lwr: 2.0
mix: [ 0.0 0.0 ] mix: 0.0
}, }
b: {
ceiling: 20.0
expo: 2.0
thresh: [ 77.0, 74.0 ],
upr: -0.5
lwr: [ 3.0, 2.0 ],
mix: 0.0
}
c: {
ceiling: 20.0
expo: 2.0
thresh: 80.0
upr: -0.5
lwr: 5.0
mix: 0.0
}
d: {
ceiling: 20.0
expo: 2.0
thresh: 70.0
upr: [ -3.9, 04.5]
lwr: 4.0
mix: 0.0
}
f_1: {
ceiling: 20.0
expo: 2.0
thresh: 50.0
upr: -3.0
lwr: 1.0
mix: 0.0
}
f_2: {
ceiling: 20.0
expo: 2.0
thresh: 60.0
upr: -3.0
lwr: 1.0
mix: 0.0
}
f_3: {
ceiling: 20.0
expo: 2.0
thresh: 55.0
upr: -3.0
lwr: 1.0
mix: 0.0
}
f_4: {
ceiling: 20.0
expo: 2.0
thresh: 55.0
upr: -5.0
lwr: 1.0
mix: 0.0
}
g: {
ceiling: 40.0
expo: 8.0
thresh: [60.0 64.0]
upr: -0.7
lwr: 8.0
mix: 1.0
}
g_a: {
ceiling: 40.0
expo: 2.0
thresh: [50.0 54.0]
upr: -0.7
lwr: 2.0
mix: 1.0
}
g_1_a: {
ceiling: 20.0
expo: 2.0
thresh: [50.0 54.0]
upr: -0.7
lwr: 8.0
mix: 1.0
}
g_1_d: {
ceiling: [60.0 64.0]
expo: [ 7.0 5.0]
thresh: [40.0 34.0]
upr: [-0.4 -0.3]
lwr: [ 7.0 5.0]
mix: 1.0
}
} }
} }
compressor: {
vars: {
in: { type:audio, srcFl: true, doc:"Audio input." },
bypass: { type:bool, value: false, doc:"Bypass the compressor."},
igain: { type:real, value: 1.0, doc:"Input gain."},
thresh: { type:real, value: 0.0, doc:"Attack threshold in dB."},
ratio: { type:real, value: 2.0, doc:"Compression ratio."},
atk_ms: { type:real, value: 20.0, doc:"Attack time in milliseconds."},
rls_ms: { type:real, value: 20.0, doc:"Release time in milliseconds."},
wnd_ms: { type:real, value: 200.0, doc:"RMS calc. window length in milliseconds."},
maxWnd_ms: { type:real, value: 1000.0, doc:"Maximim (allocated) window length in milliseconds."},
ogain: { type:real, value: 1.0, doc:"Output gain."},
out: { type:audio, doc:"Audio output." },
}
presets: {
dflt: {
igain: 3.0
thresh: 60.0
ratio: 5.0
atk_ms: 5.0
rls_ms: 20.0
wnd_ms:100.0
ogain: 1.0
}
kc: {
igain: 3.0
thresh: 80.0
ratio: 2.0
atk_ms: 20.0
rls_ms: 1000.0
wnd_ms: 200.0
ogain: 1.0
}
a: {
igain: 6.0
ogain: 1.0
}
b: {
igain: 10.0
ogain: 1.0
}
c: {
igain: 11.0
ogain: 1.0
}
d: {
igain: 9.0
ogain: 1.0
}
f_1: {
igain: 6.0
ogain: 1.0
}
f_2: {
igain: 6.0
ogain: 1.0
}
f_3: {
igain: 6.0
ogain: 1.0
}
f_4: {
igain: 6.0
ogain: 1.0
}
g: {
igain: 10.0
ogain: 1.0
}
g_a: {
igain: 10.0
ogain: 1.0
}
g_1_a: {
igain: 10.0
ogain: 1.0
}
g_1_d: {
igain: 10.0
ogain: 1.0
}
}
}
} }
flow_test: { flow_test: {
@ -885,8 +1100,8 @@
maxCycleCount:15000, maxCycleCount:15000,
network: { network: {
srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fn:"/home/kevin/temp/audio.wav", eofFl:true } } }, srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fname:"/home/kevin/temp/audio.wav", eofFl:true } } },
dstFn: { class: audioFileOut, in:{ in:srcFn.out }, args:{ default:{fn:"/home/kevin/temp/audio_flow_out.wav"} } }, dstFn: { class: audioFileOut, in:{ in:srcFn.out }, args:{ default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } },
} }
} }
@ -895,25 +1110,39 @@
maxCycleCount:15000, maxCycleCount:15000,
network: { network: {
srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fn:"/home/kevin/temp/audio.wav", eofFl:true } } }, srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fname:"/home/kevin/temp/audio.wav", eofFl:true } } },
pva: { class: pv_analysis, in:{ in:srcFn.out }, args:{ default:{ wndSmpCnt:512, hopSmpCnt:64, hzFl:false } } }, pva: { class: pv_analysis, in:{ in:srcFn.out }, args:{ default:{ wndSmpN:512, hopSmpN:64, hzFl:false } } },
pvs: { class: pv_synthesis, in:{ in:pva.out }, args:{ default:{ } } }, pvs: { class: pv_synthesis, in:{ in:pva.out }, args:{ default:{ } } },
dstFn: { class: audioFileOut, in:{ in:pvs.out }, args:{ default:{fn:"/home/kevin/temp/audio_flow_out.wav"} } }, dstFn: { class: audioFileOut, in:{ in:pvs.out }, args:{ default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } },
} }
} }
flow_spec_dist: { flow_spec_dist: {
framesPerCycle:64, framesPerCycle: 64, // time-domain audio cycles frame per cycle
maxCycleCount:15000, maxCycleCount: 15000, // 0 disables maxCycleCount
printNetworkFl: false, // print the network instance
printClassDictFl: false, // print the class description dictionary
network: { network: {
srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fn:"/home/kevin/temp/audio.wav", eofFl:true } } }, ain:
pva: { class: pv_analysis, in:{ in:srcFn.out }, args:{ default:{ wndSmpCnt:512, hopSmpCnt:64, hzFl:false } } }, {
sd: { class: spec_dist, in:{ in:pva.out }, preset:a, args:{ default:{ thresh:80 }}}, class: audioFileIn,
pvs: { class: pv_synthesis, in:{ in:sd.out }, args:{ default:{ } } }, argLabel:"default",
dstFn: { class: audioFileOut, in:{ in:pvs.out }, args:{ default:{fn:"/home/kevin/temp/audio_flow_out.wav"} } },
args:{
default:{ fname:"/home/kevin/temp/audio.wav", eofFl:true },
kc: { fname:"/home/kevin/src/currawong/audio/GUTIM_All_20200711_96k_float.wav", eofFl:true }
}
},
pva: { class: pv_analysis, in:{ in:ain.out }, args:{ default:{ wndSmpN:[2048,1024], hopSmpN:[512,256], hzFl:false } } },
sd: { class: spec_dist, in:{ in:pva.out }, preset:[kc a] },
pvs: { class: pv_synthesis, in:{ in:sd.out }, },
cmp: { class: compressor, in:{ in:pvs.out }, preset:[kc a] },
aout: { class: audioFileOut, in:{ in:cmp.out }, args:{ default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } },
} }
} }