cwMain.cpp,cfg/main.cfg : Added 'lex' test.

This commit is contained in:
kevin 2024-05-04 10:29:33 -04:00
parent 81a786bee8
commit 766c0fb865
2 changed files with 77 additions and 15 deletions

View File

@ -16,6 +16,7 @@
variadicTpl: {},
lex:{},
fileSys: {},
numbCvt: {},
object: {},
@ -32,8 +33,9 @@
nbmpscQueue: {
blkN: 4,
blkByteN: 1024,
testDurMs: 2000,
threadN: 2
testDurMs: 10000,
threadN: 10,
out_fname: "~/temp/temp.txt"
}
websockSrv: {
@ -398,6 +400,38 @@
},
midifile:
{
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op8_2_f_sh_minor.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op8_2_f_sh_minor.csv" }
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op8_3_b_minor.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op8_3_b_minor.csv" }
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op8_9_g_sh_minor.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op8_9_g_sh_minor.csv" }
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op42_7_f_minor.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op42_7_f_minor.csv" }
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op65_1_allegro fantastico.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op65_1_allegro fantastico.csv" }
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op65_2_allegretto.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op65_2_allegretto.csv" }
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op65_3_molta_vivace.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op65_3_molta_vivace.csv" }
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op56_4.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op56_4.csv" }
csv: { midiFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op49_1.mid",
csvFn:"~/src/cwtest/src/cwtest/cfg/gutim_full/scriabin/scriabin_etude_op49_1.csv" }
}
midifile1:
{
// rpt_beg_end: print the first and last 'msg' count msgs in 'midi_fname'.
rpt_beg_end: {
@ -1449,26 +1483,51 @@
}
}
}
flow_test: {
flow_proc_fname: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
framesPerCycle:64,
maxCycleCount:15000,
flow_proc_fname: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
multiPriPresetProbFl: false, // Use probability to select primary multi-preset
multiSecPresetProbFl: true, // Use probability to select secondary multi-preset
multiPresetInterpFl: false, // Interpolate between two selected multi-presets
printNetworkFl: true, // print the network instance
printClassDictFl: false, // print the class description dictionary
network: {
srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fname:"/home/kevin/temp/audio.wav", eofFl:false, on_off:true } } },
wet_in_gain: { class: audio_gain, in:{ in:srcFn.out }, args:{}},
procs: {
srcFn: { class: audioFileIn, argLabel:"default", args:{ default:{fname:"/home/kevin/temp/temp_sine_100_hz.wav", eofFl:false, on_off:true } } },
wet_in_gain: { class: audio_gain, in:{ in:srcFn.out }, args:{}},
pva: { class: pv_analysis, in:{ in:wet_in_gain.out }, args:{ default:{ wndSmpN:512, hopSmpN:128, hzFl:false } } },
sd: { class: spec_dist, in:{ in:pva.out }, preset:kc },
pvs: { class: pv_synthesis, in:{ in:sd.out }, },
cmp: { class: compressor, in:{ in:pvs.out }, preset:kc },
wet_out_gain: { class: audio_gain, in:{ in:cmp.out }, args:{}},
sd_poly: {
class: poly,
args: { default:{ count:3 }}
network: {
procs: {
pva: { class: pv_analysis, in:{ in:_.wet_in_gain.out }, args:{ default:{ wndSmpN:512, hopSmpN:128, hzFl:false } } },
sd: { class: spec_dist, in:{ in:pva.out }, preset:kc },
pvs: { class: pv_synthesis, in:{ in:sd.out }, },
cmp: { class: compressor, in:{ in:pvs.out }, preset:kc },
dstFn: { class: audioFileOut, in:{ in:wet_out_gain.out }, args:{ default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } },
}
presets:{}
}
}
xfade_ctl: { class: xfade_ctl, in:{ srateSrc:sd_poly.cmp.out }, args:{ default:{ net:sd_poly, durMs:1000 }} },
wet_out_gain: { class: audio_gain, in:{ in_:sd_poly.cmp_.out, gain_:xfade_ctl.gain_ }, args:{}},
dstFn: { class: audioFileOut, in:{ in:wet_out_gain.out }, args:{ default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } },
}
}
}

View File

@ -29,12 +29,13 @@
#include "cwAudioTransforms.h"
#include "cwAudioFileProc.h"
#include "cwPvAudioFileProc.h"
#include "cwFlowDecl.h"
#include "cwFlow.h"
#include "cwTime.h"
#include "cwMidi.h"
#include "cwMidiDecls.h"
#include "cwFlowDecl.h"
#include "cwFlow.h"
#include "cwDynRefTbl.h"
#include "cwScoreParse.h"
#include "cwSfScore.h"
@ -410,6 +411,7 @@ cw::rc_t vectOpTest( const cw::object_t* cfg, const cw::object_t* args, int argc
return cw::kOkRC;
}
cw::rc_t lexTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::lex::test(); }
cw::rc_t timeTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::time::test(); }
cw::rc_t threadTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::threadTest(); }
cw::rc_t kbTest1Test( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { cw::kbTest1(); return cw::kOkRC; }
@ -778,6 +780,7 @@ int main( int argc, const char* argv[] )
func_t modeArray[] =
{
{ "variadicTpl", variadicTplTest },
{ "lex", lexTest },
{ "fileSys", fileSysTest },
{ "numbCvt", numbCvtTest },
{ "object", objectTest },