Post video cfg. modifications, added libcm dependency, added use of external 'flow_proc_dict'.
This commit is contained in:
parent
e8e42c809b
commit
6a9e9a8d06
@ -35,7 +35,7 @@ endif
|
||||
if OS_LINUX
|
||||
|
||||
if OS_64
|
||||
AM_LDFLAGS += -L/usr/lib64
|
||||
AM_LDFLAGS += -L/usr/lib64/atlas -L/usr/lib64
|
||||
AM_CFLAGS += -m64
|
||||
endif
|
||||
|
||||
@ -88,6 +88,7 @@ if cwWEBSOCK
|
||||
src_cwtest_cwtest_LDADD += -lwebsockets
|
||||
endif
|
||||
|
||||
src_cwtest_cwtest_LDADD += -lsatlas -lcm
|
||||
|
||||
# src_cwtest_cwtest_CPPFLAGS = -I$(srcdir)/src/libcw $(AM_CPPFLAGS)
|
||||
bin_PROGRAMS += src/cwtest/cwtest
|
||||
|
@ -9,7 +9,7 @@ libcw Testing and Development App
|
||||
|
||||
# Valgrind setup
|
||||
|
||||
export LD_LIBRARY_PATH=~/sdk/libwebsockets/build/out/lib
|
||||
export LD_LIBRARY_PATH=~/sdk/libwebsockets/build/out/lib:~/src/libcm/build/linux/debug/lib
|
||||
valgrind --leak-check=yes --log-file=vg0.txt ./cwtest ~/src/cwtest/src/cwtest/cfg/main.cfg mtx
|
||||
|
||||
#Design Questions:
|
||||
|
@ -19,8 +19,8 @@ cd ${curdir}
|
||||
--enable-alsa \
|
||||
CFLAGS="-g -Wall" \
|
||||
CXXFLAGS="-g -Wall" \
|
||||
CPPFLAGS="-I${HOME}/sdk/libwebsockets/build/out/include" \
|
||||
LDFLAGS="-L${HOME}/sdk/libwebsockets/build/out/lib" \
|
||||
CPPFLAGS="-I${HOME}/sdk/libwebsockets/build/out/include -I${HOME}/src/libcm/build/linux/debug/include" \
|
||||
LDFLAGS="-L${HOME}/sdk/libwebsockets/build/out/lib -L${HOME}/src/libcm/build/linux/debug/lib" \
|
||||
LIBS=
|
||||
|
||||
|
||||
|
@ -10,8 +10,8 @@ cd ${curdir}
|
||||
../../../configure --prefix=${curdir} --enable-websock --enable-alsa \
|
||||
CFLAGS="-Wall" \
|
||||
CXXFLAGS="-Wall" \
|
||||
CPPFLAGS="-I${HOME}/sdk/libwebsockets/build/out/include" \
|
||||
LDFLAGS="-L${HOME}/sdk/libwebsockets/build/out/lib" \
|
||||
CPPFLAGS="-I${HOME}/sdk/libwebsockets/build/out/include -I${HOME}/src/libcm/build/linux/debug/include" \
|
||||
LDFLAGS="-L${HOME}/sdk/libwebsockets/build/out/lib -L${HOME}/src/libcm/build/linux/debug/lib" \
|
||||
LIBS=
|
||||
|
||||
|
||||
|
@ -1,386 +1,5 @@
|
||||
{
|
||||
test: {
|
||||
flow_proc_dict: {
|
||||
|
||||
balance: {
|
||||
vars: {
|
||||
in: { type:real, value:0.5, doc:"Input vaue" },
|
||||
out: { type:real, doc:"Ouput value. Same as input value."},
|
||||
inv_out: { type:real, doc:"1.0 minus output value."}
|
||||
}
|
||||
}
|
||||
|
||||
audio_in: {
|
||||
vars: {
|
||||
dev_label: { type:string, doc:"Audio device label." },
|
||||
out: { type:audio, doc:"Audio output" },
|
||||
}
|
||||
}
|
||||
|
||||
audio_out: {
|
||||
vars: {
|
||||
dev_label: { type:string, doc:"Audio device label." },
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." }
|
||||
}
|
||||
}
|
||||
|
||||
audioFileIn: {
|
||||
vars: {
|
||||
fname: { type:string, doc:"Audio file name." },
|
||||
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: {
|
||||
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." }
|
||||
}
|
||||
}
|
||||
|
||||
audio_gain: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
gain: { type:real, value:1.0, doc:"Gain coefficient." }
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_split: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
select: { type:bool, doc:"Enable/Disable each channel" }
|
||||
gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
|
||||
presets:
|
||||
{
|
||||
mute_off: { gain:1 },
|
||||
mute_on: { gain:0 },
|
||||
}
|
||||
}
|
||||
|
||||
audio_duplicate: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input."},
|
||||
duplicate: { type: uint, doc:"Count of times to repeat this channel." },
|
||||
gain: { type: real, value:1.0, doc:"Audio gain." },
|
||||
out: { type:audio, doc:"Audio output containing repeat * input channel count channels."}
|
||||
}
|
||||
}
|
||||
|
||||
audio_merge: {
|
||||
vars: {
|
||||
in0: { type:audio, srcFl:true, doc:"First audio input." },
|
||||
in1: { type:audio, srcFl:true, doc:"Second audio input." },
|
||||
gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
|
||||
out: { type:audio, doc:"Audio output. Channel count is the sum of the input channel count." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_mix: {
|
||||
vars: {
|
||||
in0: { type:audio, srcFl:true, doc:"First audio input." },
|
||||
in1: { type:audio, srcFl:true, doc:"Second audio input." },
|
||||
gain0: { type:real, value:0.5, doc:"Audio gain for input 0." },
|
||||
gain1: { type:real, value:0.5, doc:"Audio gain for input 1." },
|
||||
out: { type:audio, doc:"Audio output. Channel count is the sum of the input channel count." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_delay: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
maxDelayMs: { type:real, value:1000.0 doc:"Maximum possible delay in milliseconds." },
|
||||
delayMs: { type:real, doc:"Delay in milliseconds." },
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sine_tone: {
|
||||
vars: {
|
||||
srate: { type:real, value:48000.0, doc:"Sine tone sample rate."}
|
||||
chCnt: { type:uint, value:2, doc:"Output signal channel count."},
|
||||
hz: { type:real, value:440.0, doc:"Frequency in Hertz."},
|
||||
gain: { type:real, value:0.8, doc:"Signal frequency."},
|
||||
out: { type:audio, doc:"Audio output" },
|
||||
}
|
||||
|
||||
presets: {
|
||||
a: { hz:220 },
|
||||
b: { hz:880 },
|
||||
}
|
||||
}
|
||||
|
||||
pv_analysis: {
|
||||
vars: {
|
||||
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." }
|
||||
}
|
||||
}
|
||||
|
||||
pv_synthesis: {
|
||||
vars: {
|
||||
in: { type:spectrum, srcFl:true, doc:"Spectrum input." },
|
||||
out: { type:audio, doc:"Audio output." }
|
||||
}
|
||||
}
|
||||
|
||||
spec_dist: {
|
||||
vars: {
|
||||
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:"Basic/Bump Mix parameter."},
|
||||
|
||||
out: { type:spectrum, doc:"Spectrum output." },
|
||||
|
||||
}
|
||||
|
||||
presets: {
|
||||
|
||||
dry: {
|
||||
|
||||
}
|
||||
|
||||
kc: {
|
||||
ceiling: 20.0,
|
||||
expo: 2.0,
|
||||
thresh: 65.0,
|
||||
upr: 0.0,
|
||||
lwr: 2.0,
|
||||
mix: 0.0
|
||||
}
|
||||
|
||||
a: {
|
||||
ceiling: 20.0
|
||||
expo: 2.0
|
||||
thresh: 60.0
|
||||
upr: [ -1.1, -0.99],
|
||||
lwr: 2.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: {
|
||||
bypass: false
|
||||
igain: 3.0
|
||||
thresh: 80.0
|
||||
ratio: 2.0
|
||||
atk_ms: 20.0
|
||||
rls_ms: 1000.0
|
||||
wnd_ms: 200.0
|
||||
ogain: 1.0
|
||||
}
|
||||
|
||||
dry: {
|
||||
|
||||
}
|
||||
|
||||
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: 0.25
|
||||
}
|
||||
|
||||
g_a: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
g_1_a: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
g_1_d: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
preset_sel: {
|
||||
|
||||
@ -395,6 +14,7 @@
|
||||
record_fn: "workshop_presets",
|
||||
record_fn_ext: "txt",
|
||||
|
||||
flow_proc_dict_fn: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
|
||||
|
||||
crossFadeSrate: 48000.0, // TODO: move to flow cfg. and set via 'system default sample rate'
|
||||
crossFadeCount: 3,
|
||||
@ -412,7 +32,7 @@
|
||||
default_master_wet_in_gain: 1.0,
|
||||
default_master_wet_out_gain: 1.0,
|
||||
default_master_dry_gain: 1.0,
|
||||
default_master_sync_delay_ms: 0, // spirio 400
|
||||
default_master_sync_delay_ms: 400, // spirio 400
|
||||
|
||||
},
|
||||
|
||||
|
@ -1,384 +1,5 @@
|
||||
{
|
||||
test: {
|
||||
flow_proc_dict: {
|
||||
|
||||
balance: {
|
||||
vars: {
|
||||
in: { type:real, value:0.5, doc:"Input vaue" },
|
||||
out: { type:real, doc:"Ouput value. Same as input value."},
|
||||
inv_out: { type:real, doc:"1.0 minus output value."}
|
||||
}
|
||||
}
|
||||
|
||||
audio_in: {
|
||||
vars: {
|
||||
dev_label: { type:string, doc:"Audio device label." },
|
||||
out: { type:audio, doc:"Audio output" },
|
||||
}
|
||||
}
|
||||
|
||||
audio_out: {
|
||||
vars: {
|
||||
dev_label: { type:string, doc:"Audio device label." },
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." }
|
||||
}
|
||||
}
|
||||
|
||||
audioFileIn: {
|
||||
vars: {
|
||||
fname: { type:string, doc:"Audio file name." },
|
||||
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: {
|
||||
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." }
|
||||
}
|
||||
}
|
||||
|
||||
audio_gain: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
gain: { type:real, value:1.0, doc:"Gain coefficient." }
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_split: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
select: { type:bool, doc:"Enable/Disable each channel" }
|
||||
gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
|
||||
presets:
|
||||
{
|
||||
mute_off: { gain:1 },
|
||||
mute_on: { gain:0 },
|
||||
}
|
||||
}
|
||||
|
||||
audio_duplicate: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input."},
|
||||
duplicate: { type: uint, doc:"Count of times to repeat this channel." },
|
||||
gain: { type: real, value:1.0, doc:"Audio gain." },
|
||||
out: { type:audio, doc:"Audio output containing repeat * input channel count channels."}
|
||||
}
|
||||
}
|
||||
|
||||
audio_merge: {
|
||||
vars: {
|
||||
in0: { type:audio, srcFl:true, doc:"First audio input." },
|
||||
in1: { type:audio, srcFl:true, doc:"Second audio input." },
|
||||
gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
|
||||
out: { type:audio, doc:"Audio output. Channel count is the sum of the input channel count." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_mix: {
|
||||
vars: {
|
||||
in0: { type:audio, srcFl:true, doc:"First audio input." },
|
||||
in1: { type:audio, srcFl:true, doc:"Second audio input." },
|
||||
gain0: { type:real, value:0.5, doc:"Audio gain for input 0." },
|
||||
gain1: { type:real, value:0.5, doc:"Audio gain for input 1." },
|
||||
out: { type:audio, doc:"Audio output. Channel count is the sum of the input channel count." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_delay: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
maxDelayMs: { type:real, value:1000.0 doc:"Maximum possible delay in milliseconds." },
|
||||
delayMs: { type:real, doc:"Delay in milliseconds." },
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sine_tone: {
|
||||
vars: {
|
||||
srate: { type:real, value:48000.0, doc:"Sine tone sample rate."}
|
||||
chCnt: { type:uint, value:2, doc:"Output signal channel count."},
|
||||
hz: { type:real, value:440.0, doc:"Frequency in Hertz."},
|
||||
gain: { type:real, value:0.8, doc:"Signal frequency."},
|
||||
out: { type:audio, doc:"Audio output" },
|
||||
}
|
||||
|
||||
presets: {
|
||||
a: { hz:220 },
|
||||
b: { hz:880 },
|
||||
}
|
||||
}
|
||||
|
||||
pv_analysis: {
|
||||
vars: {
|
||||
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." }
|
||||
}
|
||||
}
|
||||
|
||||
pv_synthesis: {
|
||||
vars: {
|
||||
in: { type:spectrum, srcFl:true, doc:"Spectrum input." },
|
||||
out: { type:audio, doc:"Audio output." }
|
||||
}
|
||||
}
|
||||
|
||||
spec_dist: {
|
||||
vars: {
|
||||
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:"Basic/Bump Mix parameter."},
|
||||
|
||||
out: { type:spectrum, doc:"Spectrum output." },
|
||||
|
||||
}
|
||||
|
||||
presets: {
|
||||
|
||||
dry: {
|
||||
|
||||
}
|
||||
|
||||
kc: {
|
||||
ceiling: 20.0,
|
||||
expo: 2.0,
|
||||
thresh: 65.0,
|
||||
upr: 0.0,
|
||||
lwr: 2.0,
|
||||
mix: 0.0
|
||||
}
|
||||
|
||||
a: {
|
||||
ceiling: 20.0
|
||||
expo: 2.0
|
||||
thresh: 60.0
|
||||
upr: [ -1.1, -0.99],
|
||||
lwr: 2.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: {
|
||||
bypass: false
|
||||
igain: 3.0
|
||||
thresh: 80.0
|
||||
ratio: 2.0
|
||||
atk_ms: 20.0
|
||||
rls_ms: 1000.0
|
||||
wnd_ms: 200.0
|
||||
ogain: 1.0
|
||||
}
|
||||
|
||||
dry: {
|
||||
|
||||
}
|
||||
|
||||
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: 0.25
|
||||
}
|
||||
|
||||
g_a: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
g_1_a: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
g_1_d: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
preset_sel: {
|
||||
|
||||
params: {
|
||||
@ -390,6 +11,9 @@
|
||||
record_fn: "preset_sel_20220507",
|
||||
record_fn_ext: "txt",
|
||||
|
||||
//flow_proc_dict: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
|
||||
flow_proc_dict_fn: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
|
||||
|
||||
beg_play_loc: 12431,
|
||||
end_play_loc: 14730,
|
||||
|
||||
@ -574,7 +198,7 @@
|
||||
enableFl: true, // (req)
|
||||
label: "main", // (req) User label
|
||||
userId: 0, // (opt) User id (can also be set at runtime)
|
||||
framesPerCycle: 512, // (req) Samples per audio device cycle
|
||||
framesPerCycle: 256, // (req) Samples per audio device cycle
|
||||
cycleCnt: 3, // (req) Count of device cycle buffers.
|
||||
inGroup: "main", // (opt) All devices in a group must be 'ready' to source
|
||||
outGroup: "main", // (opt) or sink data before an audio callback is made for that group
|
||||
@ -600,7 +224,6 @@
|
||||
printClassDictFl: false, // print the class description dictionary
|
||||
|
||||
|
||||
|
||||
no_spirio_network: {
|
||||
aud_in: { class: audio_in, args:{ default:{dev_label:"main"} } },
|
||||
|
||||
@ -650,7 +273,7 @@
|
||||
// select the first two channels (this reduces the channel count if there are more than 2 incoming channels)
|
||||
split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1]}} }
|
||||
|
||||
// delay the incoming audio signal to sync it with the piano
|
||||
// delay the incoming audio signal to sync it with the piano: Use 400 ms delay
|
||||
sync_delay { class: audio_delay, in: { in:split_in.out }, args:{ default:{ delayMs:400 } }}
|
||||
|
||||
mstr_wet_in_gain: { class: audio_gain, in:{ in:sync_delay.out }, args:{}}
|
||||
|
@ -1,386 +1,5 @@
|
||||
{
|
||||
test: {
|
||||
flow_proc_dict: {
|
||||
|
||||
balance: {
|
||||
vars: {
|
||||
in: { type:real, value:0.5, doc:"Input vaue" },
|
||||
out: { type:real, doc:"Ouput value. Same as input value."},
|
||||
inv_out: { type:real, doc:"1.0 minus output value."}
|
||||
}
|
||||
}
|
||||
|
||||
audio_in: {
|
||||
vars: {
|
||||
dev_label: { type:string, doc:"Audio device label." },
|
||||
out: { type:audio, doc:"Audio output" },
|
||||
}
|
||||
}
|
||||
|
||||
audio_out: {
|
||||
vars: {
|
||||
dev_label: { type:string, doc:"Audio device label." },
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." }
|
||||
}
|
||||
}
|
||||
|
||||
audioFileIn: {
|
||||
vars: {
|
||||
fname: { type:string, doc:"Audio file name." },
|
||||
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: {
|
||||
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." }
|
||||
}
|
||||
}
|
||||
|
||||
audio_gain: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
gain: { type:real, value:1.0, doc:"Gain coefficient." }
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_split: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
select: { type:bool, doc:"Enable/Disable each channel" }
|
||||
gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
|
||||
presets:
|
||||
{
|
||||
mute_off: { gain:1 },
|
||||
mute_on: { gain:0 },
|
||||
}
|
||||
}
|
||||
|
||||
audio_duplicate: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input."},
|
||||
duplicate: { type: uint, doc:"Count of times to repeat this channel." },
|
||||
gain: { type: real, value:1.0, doc:"Audio gain." },
|
||||
out: { type:audio, doc:"Audio output containing repeat * input channel count channels."}
|
||||
}
|
||||
}
|
||||
|
||||
audio_merge: {
|
||||
vars: {
|
||||
in0: { type:audio, srcFl:true, doc:"First audio input." },
|
||||
in1: { type:audio, srcFl:true, doc:"Second audio input." },
|
||||
gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
|
||||
out: { type:audio, doc:"Audio output. Channel count is the sum of the input channel count." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_mix: {
|
||||
vars: {
|
||||
in0: { type:audio, srcFl:true, doc:"First audio input." },
|
||||
in1: { type:audio, srcFl:true, doc:"Second audio input." },
|
||||
gain0: { type:real, value:0.5, doc:"Audio gain for input 0." },
|
||||
gain1: { type:real, value:0.5, doc:"Audio gain for input 1." },
|
||||
out: { type:audio, doc:"Audio output. Channel count is the sum of the input channel count." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_delay: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
maxDelayMs: { type:real, value:1000.0 doc:"Maximum possible delay in milliseconds." },
|
||||
delayMs: { type:real, doc:"Delay in milliseconds." },
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sine_tone: {
|
||||
vars: {
|
||||
srate: { type:real, value:48000.0, doc:"Sine tone sample rate."}
|
||||
chCnt: { type:uint, value:2, doc:"Output signal channel count."},
|
||||
hz: { type:real, value:440.0, doc:"Frequency in Hertz."},
|
||||
gain: { type:real, value:0.8, doc:"Signal frequency."},
|
||||
out: { type:audio, doc:"Audio output" },
|
||||
}
|
||||
|
||||
presets: {
|
||||
a: { hz:220 },
|
||||
b: { hz:880 },
|
||||
}
|
||||
}
|
||||
|
||||
pv_analysis: {
|
||||
vars: {
|
||||
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." }
|
||||
}
|
||||
}
|
||||
|
||||
pv_synthesis: {
|
||||
vars: {
|
||||
in: { type:spectrum, srcFl:true, doc:"Spectrum input." },
|
||||
out: { type:audio, doc:"Audio output." }
|
||||
}
|
||||
}
|
||||
|
||||
spec_dist: {
|
||||
vars: {
|
||||
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:"Basic/Bump Mix parameter."},
|
||||
|
||||
out: { type:spectrum, doc:"Spectrum output." },
|
||||
|
||||
}
|
||||
|
||||
presets: {
|
||||
|
||||
dry: {
|
||||
|
||||
}
|
||||
|
||||
kc: {
|
||||
ceiling: 20.0,
|
||||
expo: 2.0,
|
||||
thresh: 65.0,
|
||||
upr: 0.0,
|
||||
lwr: 2.0,
|
||||
mix: 0.0
|
||||
}
|
||||
|
||||
a: {
|
||||
ceiling: 20.0
|
||||
expo: 2.0
|
||||
thresh: 60.0
|
||||
upr: [ -1.1, -0.99],
|
||||
lwr: 2.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: {
|
||||
bypass: false
|
||||
igain: 3.0
|
||||
thresh: 80.0
|
||||
ratio: 2.0
|
||||
atk_ms: 20.0
|
||||
rls_ms: 1000.0
|
||||
wnd_ms: 200.0
|
||||
ogain: 1.0
|
||||
}
|
||||
|
||||
dry: {
|
||||
|
||||
}
|
||||
|
||||
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: 0.25
|
||||
}
|
||||
|
||||
g_a: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
g_1_a: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
g_1_d: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
preset_sel: {
|
||||
|
||||
@ -395,6 +14,8 @@
|
||||
record_fn: "workshop_presets",
|
||||
record_fn_ext: "txt",
|
||||
|
||||
flow_proc_dict_fn: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
|
||||
|
||||
beg_play_loc: 9187,
|
||||
end_play_loc: 0,
|
||||
|
||||
|
@ -33,8 +33,8 @@
|
||||
midi_out_device: "iRig MIDI 2",
|
||||
midi_out_port: "iRig MIDI 2 MIDI 1",
|
||||
|
||||
//midi_out_device: "Fastlane",
|
||||
//midi_out_port: "Fastlane MIDI A",
|
||||
midi_out_device: "Fastlane",
|
||||
midi_out_port: "Fastlane MIDI A",
|
||||
|
||||
force_damper_down_fl: false,
|
||||
force_damper_down_threshold: 35,
|
||||
|
3
src/cwtest/cfg/empty_play_score.csv
Normal file
3
src/cwtest/cfg/empty_play_score.csv
Normal file
@ -0,0 +1,3 @@
|
||||
meas,index,voice,loc,tick,sec,dur,rval,sci_pitch,dmark,dlevel,status,d0,d1,bar,section,bpm,grace,pedal
|
||||
0,0,1,0,0,0,28,,,,9,176,64,0,,,,,
|
||||
0,0,1,1,0,0,28,,,,9,176,64,0,,,,,
|
|
379
src/cwtest/cfg/flow_proc_dict.cfg
Normal file
379
src/cwtest/cfg/flow_proc_dict.cfg
Normal file
@ -0,0 +1,379 @@
|
||||
{
|
||||
|
||||
balance: {
|
||||
vars: {
|
||||
in: { type:real, value:0.5, doc:"Input vaue" },
|
||||
out: { type:real, doc:"Ouput value. Same as input value."},
|
||||
inv_out: { type:real, doc:"1.0 minus output value."}
|
||||
}
|
||||
}
|
||||
|
||||
audio_in: {
|
||||
vars: {
|
||||
dev_label: { type:string, doc:"Audio device label." },
|
||||
out: { type:audio, doc:"Audio output" },
|
||||
}
|
||||
}
|
||||
|
||||
audio_out: {
|
||||
vars: {
|
||||
dev_label: { type:string, doc:"Audio device label." },
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." }
|
||||
}
|
||||
}
|
||||
|
||||
audioFileIn: {
|
||||
vars: {
|
||||
fname: { type:string, doc:"Audio file name." },
|
||||
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: {
|
||||
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." }
|
||||
}
|
||||
}
|
||||
|
||||
audio_gain: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
gain: { type:real, value:1.0, doc:"Gain coefficient." }
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_split: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
select: { type:bool, doc:"Enable/Disable each channel" }
|
||||
gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
|
||||
presets:
|
||||
{
|
||||
mute_off: { gain:1 },
|
||||
mute_on: { gain:0 },
|
||||
}
|
||||
}
|
||||
|
||||
audio_duplicate: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input."},
|
||||
duplicate: { type: uint, doc:"Count of times to repeat this channel." },
|
||||
gain: { type: real, value:1.0, doc:"Audio gain." },
|
||||
out: { type:audio, doc:"Audio output containing repeat * input channel count channels."}
|
||||
}
|
||||
}
|
||||
|
||||
audio_merge: {
|
||||
vars: {
|
||||
in0: { type:audio, srcFl:true, doc:"First audio input." },
|
||||
in1: { type:audio, srcFl:true, doc:"Second audio input." },
|
||||
gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
|
||||
out: { type:audio, doc:"Audio output. Channel count is the sum of the input channel count." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_mix: {
|
||||
vars: {
|
||||
in0: { type:audio, srcFl:true, doc:"First audio input." },
|
||||
in1: { type:audio, srcFl:true, doc:"Second audio input." },
|
||||
gain0: { type:real, value:0.5, doc:"Audio gain for input 0." },
|
||||
gain1: { type:real, value:0.5, doc:"Audio gain for input 1." },
|
||||
out: { type:audio, doc:"Audio output. Channel count is the sum of the input channel count." },
|
||||
}
|
||||
}
|
||||
|
||||
audio_delay: {
|
||||
vars: {
|
||||
in: { type:audio, srcFl:true, doc:"Audio input." },
|
||||
maxDelayMs: { type:real, value:1000.0 doc:"Maximum possible delay in milliseconds." },
|
||||
delayMs: { type:real, doc:"Delay in milliseconds." },
|
||||
out: { type:audio, doc:"Audio output." },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sine_tone: {
|
||||
vars: {
|
||||
srate: { type:real, value:48000.0, doc:"Sine tone sample rate."}
|
||||
chCnt: { type:uint, value:2, doc:"Output signal channel count."},
|
||||
hz: { type:real, value:440.0, doc:"Frequency in Hertz."},
|
||||
gain: { type:real, value:0.8, doc:"Signal frequency."},
|
||||
out: { type:audio, doc:"Audio output" },
|
||||
}
|
||||
|
||||
presets: {
|
||||
a: { hz:220 },
|
||||
b: { hz:880 },
|
||||
}
|
||||
}
|
||||
|
||||
pv_analysis: {
|
||||
vars: {
|
||||
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." }
|
||||
}
|
||||
}
|
||||
|
||||
pv_synthesis: {
|
||||
vars: {
|
||||
in: { type:spectrum, srcFl:true, doc:"Spectrum input." },
|
||||
out: { type:audio, doc:"Audio output." }
|
||||
}
|
||||
}
|
||||
|
||||
spec_dist: {
|
||||
vars: {
|
||||
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:"Basic/Bump Mix parameter."},
|
||||
|
||||
out: { type:spectrum, doc:"Spectrum output." },
|
||||
|
||||
}
|
||||
|
||||
presets: {
|
||||
|
||||
dry: {
|
||||
|
||||
}
|
||||
|
||||
kc: {
|
||||
ceiling: 20.0,
|
||||
expo: 2.0,
|
||||
thresh: 65.0,
|
||||
upr: 0.0,
|
||||
lwr: 2.0,
|
||||
mix: 0.0
|
||||
}
|
||||
|
||||
a: {
|
||||
ceiling: 20.0
|
||||
expo: 2.0
|
||||
thresh: 60.0
|
||||
upr: [ -1.1, -0.99],
|
||||
lwr: 2.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: {
|
||||
bypass: false
|
||||
igain: 3.0
|
||||
thresh: 80.0
|
||||
ratio: 2.0
|
||||
atk_ms: 20.0
|
||||
rls_ms: 1000.0
|
||||
wnd_ms: 200.0
|
||||
ogain: 1.0
|
||||
}
|
||||
|
||||
dry: {
|
||||
|
||||
}
|
||||
|
||||
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: 0.25
|
||||
}
|
||||
|
||||
g_a: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
g_1_a: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
g_1_d: {
|
||||
igain: 10.0
|
||||
ogain: 0.25
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
274
src/cwtest/cfg/latency.cfg
Normal file
274
src/cwtest/cfg/latency.cfg
Normal file
@ -0,0 +1,274 @@
|
||||
{
|
||||
test: {
|
||||
preset_sel: {
|
||||
|
||||
params: {
|
||||
score_fn: "~/src/cwtest/src/cwtest/cfg/empty_play_score.csv",
|
||||
record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
|
||||
record_fn: "live_fragment",
|
||||
record_fn_ext: "txt",
|
||||
|
||||
flow_proc_dict_fn: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
|
||||
|
||||
beg_play_loc: 0,
|
||||
end_play_loc: 1,
|
||||
|
||||
crossFadeSrate: 48000.0, // TODO: move to flow cfg. and set via 'system default sample rate'
|
||||
crossFadeCount: 3,
|
||||
|
||||
presets: {
|
||||
preset_labelL: [ "dry", "a", "b", "c", "d", "f1", "f2", "f3", "f4", "g", "ga", "g1a", "g1d" ],
|
||||
default_gain: 1.0,
|
||||
default_wet_dry_gain: 0.5,
|
||||
default_fade_ms: 500.0,
|
||||
default_preset: "dry",
|
||||
|
||||
default_master_wet_in_gain: 1.0,
|
||||
default_master_wet_out_gain: 1.0,
|
||||
default_master_dry_gain: 1.0,
|
||||
default_master_sync_delay_ms: 0, // spirio 400
|
||||
|
||||
},
|
||||
|
||||
midi_play_record: {
|
||||
max_midi_msg_count: 32768,
|
||||
midi_timer_period_micro_sec: 15000,
|
||||
all_off_delay_ms: 2500, // delay after stop time to turn off all notes
|
||||
log_in_flag: false,
|
||||
log_out_flag: false,
|
||||
half_pedal_flag: false,
|
||||
|
||||
midi_device_list: [
|
||||
// Sampler
|
||||
{
|
||||
|
||||
enableFl: true,
|
||||
//midi_out_device: "MIDIFACE 2x2",
|
||||
//midi_out_port: "MIDIFACE 2x2 Midi Out 1",
|
||||
|
||||
midi_out_device: "Scarlett 18i20 USB",
|
||||
midi_out_port: "Scarlett 18i20 USB MIDI 1",
|
||||
|
||||
//midi_out_device: "PipeWire-RT-Event",
|
||||
//midi_out_port: "input",
|
||||
|
||||
// pedal down velocity input/output mapping
|
||||
pedal: {
|
||||
down_id: 127,
|
||||
down_vel: 75,
|
||||
half_down_id: 64,
|
||||
half_down_vel: 43,
|
||||
half_up_id: 63,
|
||||
half_up_vel: 43
|
||||
|
||||
},
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
||||
// spirio vel_table: [ 1, 4, 10, 12, 12, 18, 24, 24, 30, 36, 36, 44, 48, 52, 58, 64, 64, 70, 76, 82, 88, 94,100,106,112 ]
|
||||
vel_table: [ 1, 5 10, 16, 21, 26, 32, 37, 42, 48, 53, 58, 64, 69, 74, 80, 85, 90, 96,101,106,112,117,122,127 ] ,
|
||||
},
|
||||
// Piano
|
||||
{
|
||||
enableFl: true,
|
||||
//midi_out_device: "Fastlane",
|
||||
//midi_out_port: "Fastlane MIDI A",
|
||||
midi_out_device: "MIDIFACE 2x2",
|
||||
midi_out_port: "MIDIFACE 2x2 Midi Out 2",
|
||||
|
||||
//midi_out_device: "PC-300",
|
||||
//midi_out_port: "PC-300 MIDI 1",
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 34
|
||||
vel_table: [ 1, 4, 10, 12, 12, 18, 24, 24, 30, 36, 36, 44, 48, 52, 58, 64, 64, 70, 76, 82, 88, 94,100,106,112 ]
|
||||
//vel_table: [ 1, 5 10, 16, 21, 26, 32, 37, 42, 48, 53, 58, 64, 69, 74, 80, 85, 90, 96,101,106,112,117,122,127 ] ,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
frag_panel: {
|
||||
|
||||
panel: {
|
||||
|
||||
name: fragPanelId
|
||||
addClassName: fragPanel
|
||||
|
||||
row: {
|
||||
name: fragPanelRowId
|
||||
addClassName: fragPanelRow
|
||||
|
||||
col: {
|
||||
numb_disp: { name: fragBegLocId, title:"Beg Loc", value: 0 },
|
||||
numb_disp: { name: fragEndLocId, title:"End Loc", value: 0 },
|
||||
number: { name: fragInGainId, title:"In Gain", min:0.0, max:100.0, step:0.1, decpl:1 },
|
||||
number: { name: fragOutGainId, title:"Out Gain", min:0.0, max:100.0, step:0.1, decpl:1 },
|
||||
},
|
||||
col: {
|
||||
row: {
|
||||
name: fragPresetRowId,
|
||||
addClassName: fragPresetRow,
|
||||
},
|
||||
|
||||
row: {
|
||||
string: { name: fragNoteId, addClassName: fragNote, title:"Note" },
|
||||
}
|
||||
},
|
||||
col: {
|
||||
number:{ name: fragWetDryGainId, title:"Wet/Dry", min:0.0, max:1.0, step:0.1, decpl:2 },
|
||||
number:{ name: fragFadeOutMsId, title:"Fade Ms", min:0.0, max:5000, step:1, decpl:0 },
|
||||
row: {
|
||||
button:{ name: fragPlaySeqBtnId, title:"Play Seq" },
|
||||
button:{ name: fragPlayAllBtnId, title:"Play All" },
|
||||
}
|
||||
},
|
||||
col: {
|
||||
number: { name: fragBegPlayLocId, title:"Begin", min:0, max:1000000, step:1, decpl:0 },
|
||||
number: { name: fragEndPlayLocId, title:"End", min:0, max:1000000, step:1, decpl:0 },
|
||||
button: { name: fragPlayBtnId, title:"Play" }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
}, // params
|
||||
|
||||
ui: {
|
||||
physRootDir: "~/src/cwtest/src/libcw/html/preset_sel",
|
||||
dfltPageFn: "index.html",
|
||||
port: 5687,
|
||||
rcvBufByteN: 2048,
|
||||
xmtBufByteN: 2048,
|
||||
fmtBufByteN: 4096,
|
||||
websockTimeOutMs: 50, // max time out while blocking for a websock event
|
||||
uiCfgFn: "ui.cfg" // default UI resource description
|
||||
},
|
||||
|
||||
serial: {
|
||||
pollPeriodMs: 50,
|
||||
recvBufByteN: 512,
|
||||
|
||||
array: [
|
||||
{
|
||||
enable_flag: false,
|
||||
label: "port1", // User label
|
||||
device: "/dev/ttyUSB0", // Serial device name
|
||||
baud: 115200,
|
||||
bits: 8,
|
||||
stop: 1,
|
||||
parity: "no",
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
|
||||
|
||||
midi: {
|
||||
parserBufByteN: 1024,
|
||||
},
|
||||
|
||||
audio: {
|
||||
meterMs: 50, // audio meter filter length and meter callback period
|
||||
threadTimeOutMs: 50, // audio thread cond var time out
|
||||
|
||||
groupL: [
|
||||
{
|
||||
enableFl: true, // (req)
|
||||
label: "main", // (req) User label
|
||||
id: 0, // (req) User id (can also be set at runtime)
|
||||
srate: 48000, // (req) Sample rate used by all devices in this group
|
||||
dspFrameCnt: 64 // (req) Size of DSP processing buffers
|
||||
}
|
||||
],
|
||||
|
||||
deviceL: [
|
||||
{
|
||||
// System device name
|
||||
device: "Scarlett 18i20 USB USB Audio",
|
||||
//device: "USB Audio CODEC USB Audio",
|
||||
//device: "HDA Intel PCH CS4208 Analog",
|
||||
|
||||
enableFl: true, // (req)
|
||||
label: "main", // (req) User label
|
||||
userId: 0, // (opt) User id (can also be set at runtime)
|
||||
framesPerCycle: 128, // (req) Samples per audio device cycle
|
||||
cycleCnt: 2, // (req) Count of device cycle buffers.
|
||||
inGroup: "main", // (opt) All devices in a group must be 'ready' to source
|
||||
outGroup: "main", // (opt) or sink data before an audio callback is made for that group
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
socket: {
|
||||
maxSocketCnt: 10,
|
||||
recvBufByteCnt: 4096,
|
||||
threadTimeOutMs: 50,
|
||||
socketL: [],
|
||||
}
|
||||
|
||||
flow: {
|
||||
framesPerCycle: 64, // time-domain audio cycles frame per cycle
|
||||
maxCycleCount: 15000, // 0 disables maxCycleCount
|
||||
printNetworkFl: false, // print the network instance
|
||||
printClassDictFl: false, // print the class description dictionary
|
||||
|
||||
|
||||
network: {
|
||||
aud_in: { class: audio_in, args:{ default:{dev_label:"main"} } },
|
||||
|
||||
// select the first two channels (this reduces the channel count if there are more than 2 incoming channels)
|
||||
split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1]}} }
|
||||
|
||||
// delay the incoming audio signal to sync it with the piano
|
||||
//sync_delay { class: audio_delay, in: { in:split_in.out }, args:{ default:{ delayMs:400 } }}
|
||||
|
||||
mstr_wet_in_gain: { class: audio_gain, in:{ in:split_in.out }, args:{}}
|
||||
|
||||
// wet signal processing chain
|
||||
wet_in_gain: { class: audio_gain, in:{ in:mstr_wet_in_gain.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:{}},
|
||||
|
||||
mute_wet: { class: audio_gain, in:{ in:wet_out_gain.out }, args:{}},
|
||||
|
||||
|
||||
// apply the wet/dry gain balance
|
||||
wd_bal: { class: balance, args{}},
|
||||
wet_bal_gain: { class: audio_gain, in:{ in:mute_wet.out, gain:wd_bal.out }, args:{}},
|
||||
dry_bal_gain: { class: audio_gain, in:{ in:split_in.out, gain:wd_bal.inv_out }, args:{}},
|
||||
|
||||
mstr_wet_out_gain: { class: audio_gain, in:{ in:wet_bal_gain.out }, args:{}}
|
||||
mstr_dry_out_gain: { class: audio_gain, in:{ in:dry_bal_gain.out }, args:{}},
|
||||
|
||||
// merge the wet/dry signals into a single 4 channel signal
|
||||
//merge: { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:mstr_dry_out_gain.out }, args:{} },
|
||||
merge: { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:mstr_wet_out_gain.out }, args:{} },
|
||||
|
||||
aout: { class: audio_out, in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
|
||||
//aout: { class: audio_out, in:{ in:mstr_wet_out_gain.out }, args:{ default:{dev_label:"main"} } },
|
||||
}
|
||||
|
||||
presets: {
|
||||
dry: { mute_wet:{ gain:0 } },
|
||||
a: { sd:a, cmp:a, mute_wet:{ gain:1 } },
|
||||
b: { sd:b, cmp:b, mute_wet:{ gain:1 } },
|
||||
c: { sd:c, cmp:c, mute_wet:{ gain:1 } },
|
||||
d: { sd:d, cmp:d, mute_wet:{ gain:1 } },
|
||||
f1: { sd:f_1, cmp:f_1, mute_wet:{ gain:1 } },
|
||||
f2: { sd:f_2, cmp:f_2, mute_wet:{ gain:1 } },
|
||||
f3: { sd:f_3, cmp:f_3, mute_wet:{ gain:1 } },
|
||||
f4: { sd:f_4, cmp:f_4, mute_wet:{ gain:1 } },
|
||||
g: { sd:g, cmp:g, mute_wet:{ gain:1 } },
|
||||
ga: { sd:g_a, cmp:g_a, mute_wet:{ gain:1 } },
|
||||
g1a: { sd:g_1_a, cmp:g_1_a, mute_wet:{ gain:1 } },
|
||||
g1d: { sd:g_1_d, cmp:g_1_d, mute_wet:{ gain:1 } }
|
||||
|
||||
}
|
||||
} //flow
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
342
src/cwtest/cfg/live_preset_m307.cfg
Normal file
342
src/cwtest/cfg/live_preset_m307.cfg
Normal file
@ -0,0 +1,342 @@
|
||||
{
|
||||
test: {
|
||||
|
||||
preset_sel: {
|
||||
|
||||
params: {
|
||||
//score_fn: "~/src/currawong/projects/score_proc/data/play_file.csv",
|
||||
//score_fn: "~/src/cwtest/src/cwtest/cfg/preset_sel/score/20220423/temp.csv",
|
||||
score_fn: "~/src/currawong/audio/workshop/beck2/record_2/play_score.csv",
|
||||
|
||||
record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
|
||||
//record_fn: "preset_sel_20220423",
|
||||
//record_fn: "preset_sel_20220507",
|
||||
record_fn: "live_workshop_presets",
|
||||
record_fn_ext: "txt",
|
||||
|
||||
flow_proc_dict_fn: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
|
||||
|
||||
crossFadeSrate: 48000.0, // TODO: move to flow cfg. and set via 'system default sample rate'
|
||||
crossFadeCount: 3,
|
||||
|
||||
beg_play_loc: 9187,
|
||||
end_play_loc: 0,
|
||||
|
||||
presets: {
|
||||
preset_labelL: [ "dry", "a", "b", "c", "d", "f1", "f2", "f3", "f4", "g", "ga", "g1a", "g1d" ],
|
||||
default_gain: 1.0,
|
||||
default_wet_dry_gain: 0.5,
|
||||
default_fade_ms: 500.0,
|
||||
default_preset: "dry",
|
||||
|
||||
default_master_wet_in_gain: 1.0,
|
||||
default_master_wet_out_gain: 1.0,
|
||||
default_master_dry_gain: 1.0,
|
||||
default_master_sync_delay_ms: 400, // spirio 400
|
||||
|
||||
},
|
||||
|
||||
midi_play_record: {
|
||||
max_midi_msg_count: 32768,
|
||||
midi_timer_period_micro_sec: 15000,
|
||||
all_off_delay_ms: 2500, // delay after stop time to turn off all notes
|
||||
log_in_flag: false,
|
||||
log_out_flag: false,
|
||||
half_pedal_flag: false,
|
||||
|
||||
midi_device_list: [
|
||||
// piano
|
||||
{
|
||||
enableFl: true,
|
||||
//midi_out_device: "MIDIFACE 2x2",
|
||||
//midi_out_port: "MIDIFACE 2x2 Midi Out 1",
|
||||
|
||||
midi_out_device: "Scarlett 18i20 USB",
|
||||
midi_out_port: "Scarlett 18i20 USB MIDI 1",
|
||||
|
||||
force_damper_down_fl: true,
|
||||
force_damper_down_threshold: 35,
|
||||
force_damper_down_velocity: 80,
|
||||
|
||||
//midi_out_device: "PipeWire-RT-Event",
|
||||
//midi_out_port: "input",
|
||||
|
||||
// pedal down velocity input/output mapping
|
||||
/*
|
||||
pedal: {
|
||||
down_id: 127,
|
||||
down_vel: 75,
|
||||
half_down_id: 64,
|
||||
half_down_vel: 43,
|
||||
half_up_id: 63,
|
||||
half_up_vel: 43
|
||||
|
||||
},
|
||||
*/
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
||||
// spirio vel_table: [ 1, 4, 10, 12, 12, 18, 24, 24, 30, 36, 36, 44, 48, 52, 58, 64, 64, 70, 76, 82, 88, 94,100,106,112 ]
|
||||
// vel_table: [ 1, 5 10, 16, 21, 26, 32, 37, 42, 48, 53, 58, 64, 69, 74, 80, 85, 90, 96,101,106,112,117,122,127 ] ,
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
enableFl: true,
|
||||
//midi_out_device: "Fastlane",
|
||||
//midi_out_port: "Fastlane MIDI A",
|
||||
midi_out_device: "MIDIFACE 2x2",
|
||||
midi_out_port: "MIDIFACE 2x2 Midi Out 2",
|
||||
|
||||
//midi_out_device: "PC-300",
|
||||
//midi_out_port: "PC-300 MIDI 1",
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 34
|
||||
//vel_table: [ 1, 4, 10, 12, 12, 18, 24, 24, 30, 36, 36, 44, 48, 52, 58, 64, 64, 70, 76, 82, 88, 94,100,106,112 ]
|
||||
//vel_table: [ 1, 5 10, 16, 21, 26, 32, 37, 42, 48, 53, 58, 64, 69, 74, 80, 85, 90, 96,101,106,112,117,122,127 ] ,
|
||||
|
||||
force_damper_down_fl: true,
|
||||
force_damper_down_threshold: 35,
|
||||
force_damper_down_velocity: 80,
|
||||
|
||||
},
|
||||
|
||||
//{ midi_out_device: "PipeWire-RT-Event", midi_out_port: "input" },
|
||||
],
|
||||
}
|
||||
|
||||
frag_panel: {
|
||||
|
||||
panel: {
|
||||
|
||||
name: fragPanelId
|
||||
addClassName: fragPanel
|
||||
|
||||
row: {
|
||||
name: fragPanelRowId
|
||||
addClassName: fragPanelRow
|
||||
|
||||
col: {
|
||||
numb_disp: { name: fragBegLocId, title:"Beg Loc", value: 0 },
|
||||
numb_disp: { name: fragEndLocId, title:"End Loc", value: 0 },
|
||||
number: { name: fragInGainId, title:"In Gain", min:0.0, max:100.0, step:0.1, decpl:1 },
|
||||
number: { name: fragOutGainId, title:"Out Gain", min:0.0, max:100.0, step:0.1, decpl:1 },
|
||||
},
|
||||
col: {
|
||||
row: {
|
||||
name: fragPresetRowId,
|
||||
addClassName: fragPresetRow,
|
||||
},
|
||||
|
||||
row: {
|
||||
string: { name: fragNoteId, addClassName: fragNote, title:"Note" },
|
||||
}
|
||||
},
|
||||
col: {
|
||||
number:{ name: fragWetDryGainId, title:"Wet/Dry", min:0.0, max:1.0, step:0.1, decpl:2 },
|
||||
number:{ name: fragFadeOutMsId, title:"Fade Ms", min:0.0, max:5000, step:1, decpl:0 },
|
||||
row: {
|
||||
button:{ name: fragPlaySeqBtnId, title:"Play Seq" },
|
||||
button:{ name: fragPlayAllBtnId, title:"Play All" },
|
||||
}
|
||||
},
|
||||
col: {
|
||||
number: { name: fragBegPlayLocId, title:"Begin", min:0, max:1000000, step:1, decpl:0 },
|
||||
number: { name: fragEndPlayLocId, title:"End", min:0, max:1000000, step:1, decpl:0 },
|
||||
button: { name: fragPlayBtnId, title:"Play" }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
ui: {
|
||||
physRootDir: "~/src/cwtest/src/libcw/html/preset_sel",
|
||||
dfltPageFn: "index.html",
|
||||
port: 5687,
|
||||
rcvBufByteN: 2048,
|
||||
xmtBufByteN: 2048,
|
||||
fmtBufByteN: 4096,
|
||||
websockTimeOutMs: 50, // max time out while blocking for a websock event
|
||||
uiCfgFn: "ui.cfg" // default UI resource description
|
||||
},
|
||||
|
||||
serial: {
|
||||
pollPeriodMs: 50,
|
||||
recvBufByteN: 512,
|
||||
|
||||
array: [
|
||||
{
|
||||
enable_flag: false,
|
||||
label: "port1", // User label
|
||||
device: "/dev/ttyUSB0", // Serial device name
|
||||
baud: 115200,
|
||||
bits: 8,
|
||||
stop: 1,
|
||||
parity: "no",
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
|
||||
|
||||
midi: {
|
||||
parserBufByteN: 1024,
|
||||
},
|
||||
|
||||
audio: {
|
||||
meterMs: 50, // audio meter filter length and meter callback period
|
||||
threadTimeOutMs: 50, // audio thread cond var time out
|
||||
|
||||
groupL: [
|
||||
{
|
||||
enableFl: true, // (req)
|
||||
label: "main", // (req) User label
|
||||
id: 0, // (req) User id (can also be set at runtime)
|
||||
srate: 48000, // (req) Sample rate used by all devices in this group
|
||||
dspFrameCnt: 64 // (req) Size of DSP processing buffers
|
||||
}
|
||||
],
|
||||
|
||||
deviceL: [
|
||||
{
|
||||
// System device name
|
||||
device: "Scarlett 18i20 USB USB Audio",
|
||||
//device: "USB Audio CODEC USB Audio",
|
||||
//device: "HDA Intel PCH CS4208 Analog",
|
||||
|
||||
enableFl: true, // (req)
|
||||
label: "main", // (req) User label
|
||||
userId: 0, // (opt) User id (can also be set at runtime)
|
||||
framesPerCycle: 512, // (req) Samples per audio device cycle
|
||||
cycleCnt: 3, // (req) Count of device cycle buffers.
|
||||
inGroup: "main", // (opt) All devices in a group must be 'ready' to source
|
||||
outGroup: "main", // (opt) or sink data before an audio callback is made for that group
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
socket: {
|
||||
|
||||
maxSocketCnt: 10,
|
||||
recvBufByteCnt: 4096,
|
||||
threadTimeOutMs: 50,
|
||||
socketL: [],
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
flow: {
|
||||
framesPerCycle: 64, // time-domain audio cycles frame per cycle
|
||||
maxCycleCount: 15000, // 0 disables maxCycleCount
|
||||
printNetworkFl: false, // print the network instance
|
||||
printClassDictFl: false, // print the class description dictionary
|
||||
|
||||
|
||||
|
||||
no_spirio_network: {
|
||||
aud_in: { class: audio_in, args:{ default:{dev_label:"main"} } },
|
||||
|
||||
// select the first two channels (this reduces the channel count if there are more than 2 incoming channels)
|
||||
ivory_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1]}} }
|
||||
|
||||
|
||||
vsl_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[0,0,1,1]}} }
|
||||
|
||||
// delay the incoming audio signal to sync it with the piano
|
||||
sync_delay: { class: audio_delay, in: { in:vsl_in.out }, args:{ default:{ delayMs:0 } }}
|
||||
|
||||
mstr_wet_in_gain: { class: audio_gain, in:{ in:ivory_in.out }, args:{}}
|
||||
|
||||
// wet signal processing chain
|
||||
wet_in_gain: { class: audio_gain, in:{ in:mstr_wet_in_gain.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:{}},
|
||||
|
||||
mute_wet: { class: audio_gain, in:{ in:wet_out_gain.out }, args:{}},
|
||||
|
||||
|
||||
// apply the wet/dry gain balance
|
||||
wd_bal: { class: balance, args{}},
|
||||
wet_bal_gain: { class: audio_gain, in:{ in:wet_out_gain.out, gain:wd_bal.out }, args:{}},
|
||||
dry_bal_gain: { class: audio_gain, in:{ in:vsl_in.out, gain:wd_bal.inv_out }, args:{}},
|
||||
|
||||
mstr_wet_out_gain: { class: audio_gain, in:{ in:wet_bal_gain.out }, args:{}}
|
||||
mstr_dry_out_gain: { class: audio_gain, in:{ in:dry_bal_gain.out }, args:{}},
|
||||
|
||||
// merge the wet/dry signals into a single 4 channel signal
|
||||
merge0: { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:mstr_dry_out_gain.out }, args:{} },
|
||||
|
||||
merge1: { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:sync_delay.out }, args:{} },
|
||||
//merge1: { class: audio_merge, in:{ in0:ivory_in.out, in1:vsl_in.out }, args:{} },
|
||||
|
||||
aout: { class: audio_out, in:{ in:merge1.out }, args:{ default:{dev_label:"main"} } },
|
||||
}
|
||||
|
||||
network: {
|
||||
aud_in: { class: audio_in, args:{ default:{dev_label:"main"} } },
|
||||
|
||||
// select the first two channels (this reduces the channel count if there are more than 2 incoming channels)
|
||||
split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1]}} }
|
||||
|
||||
// delay the incoming audio signal to sync it with the piano
|
||||
sync_delay { class: audio_delay, in: { in:split_in.out }, args:{ default:{ delayMs:400 } }}
|
||||
|
||||
mstr_wet_in_gain: { class: audio_gain, in:{ in:sync_delay.out }, args:{}}
|
||||
|
||||
// wet signal processing chain
|
||||
wet_in_gain: { class: audio_gain, in:{ in:mstr_wet_in_gain.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:{}},
|
||||
|
||||
mute_wet: { class: audio_gain, in:{ in:wet_out_gain.out }, args:{}},
|
||||
|
||||
|
||||
// apply the wet/dry gain balance
|
||||
wd_bal: { class: balance, args{}},
|
||||
wet_bal_gain: { class: audio_gain, in:{ in:mute_wet.out, gain:wd_bal.out }, args:{}},
|
||||
dry_bal_gain: { class: audio_gain, in:{ in:sync_delay.out, gain:wd_bal.inv_out }, args:{}},
|
||||
|
||||
mstr_wet_out_gain: { class: audio_gain, in:{ in:wet_bal_gain.out }, args:{}}
|
||||
mstr_dry_out_gain: { class: audio_gain, in:{ in:dry_bal_gain.out }, args:{}},
|
||||
|
||||
// merge the wet/dry signals into a single 4 channel signal
|
||||
merge: { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:mstr_wet_out_gain.out }, args:{} },
|
||||
|
||||
aout: { class: audio_out, in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
|
||||
}
|
||||
|
||||
presets: {
|
||||
dry: {
|
||||
mute_wet: { gain:0 },
|
||||
},
|
||||
a: { sd:a, cmp:a, mute_wet:{ gain:1 } },
|
||||
b: { sd:b, cmp:b, mute_wet:{ gain:1 } },
|
||||
c: { sd:c, cmp:c, mute_wet:{ gain:1 } },
|
||||
d: { sd:d, cmp:d, mute_wet:{ gain:1 } },
|
||||
f1: { sd:f_1, cmp:f_1, mute_wet:{ gain:1 } },
|
||||
f2: { sd:f_2, cmp:f_2, mute_wet:{ gain:1 } },
|
||||
f3: { sd:f_3, cmp:f_3, mute_wet:{ gain:1 } },
|
||||
f4: { sd:f_4, cmp:f_4, mute_wet:{ gain:1 } },
|
||||
g: { sd:g, cmp:g, mute_wet:{ gain:1 } },
|
||||
ga: { sd:g_a, cmp:g_a, mute_wet:{ gain:1 } },
|
||||
g1a: { sd:g_1_a, cmp:g_1_a, mute_wet:{ gain:1 } },
|
||||
g1d: { sd:g_1_d, cmp:g_1_d, mute_wet:{ gain:1 } }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1381,6 +1381,8 @@
|
||||
crossFadeSrate: 48000.0, // TODO: move to flow cfg. and set via 'system default sample rate'
|
||||
crossFadeCount: 3,
|
||||
|
||||
beg_play_loc: 0,
|
||||
end_play_loc: 0,
|
||||
|
||||
presets: {
|
||||
preset_labelL: [ "dry", "a", "b", "c", "d", "f1", "f2", "f3", "f4", "g", "ga", "g1a", "g1d" ],
|
||||
|
@ -0,0 +1,90 @@
|
||||
{
|
||||
"masterSyncDelayMs": 0.0,
|
||||
"masterDryGain": 1.0,
|
||||
"masterWetOutGain": 1.0,
|
||||
"masterWetInGain": 1.5,
|
||||
"fragN": 1,
|
||||
"fragL": [
|
||||
{
|
||||
"presetN": 1,
|
||||
"note": "",
|
||||
"begPlayLoc": 0,
|
||||
"endPlayLoc": 1,
|
||||
"fadeOutMs": 500.0,
|
||||
"wetDryGain": 0.5,
|
||||
"outGain": 1.0,
|
||||
"inGain": 1.0,
|
||||
"endTimestamp_nsec": 0,
|
||||
"endTimestamp_sec": 0,
|
||||
"endLoc": 1,
|
||||
"fragId": 0,
|
||||
"presetL": [
|
||||
{
|
||||
"play_fl": true,
|
||||
"preset_label": "dry",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "a",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "b",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "c",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "d",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "f1",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "f2",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "f3",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "f4",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "g",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "ga",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "g1a",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"play_fl": false,
|
||||
"preset_label": "g1d",
|
||||
"order": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -404,14 +404,14 @@ cw::rc_t ioMinTest( const cw::object_t* cfg, const cw::object_t* args, i
|
||||
cw::rc_t ioAudioMidiTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::audio_midi_app::main(args); }
|
||||
cw::rc_t ioPresetSelTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] )
|
||||
{
|
||||
|
||||
/*
|
||||
cw::rc_t rc;
|
||||
const cw::object_t* flow_proc_dict = nullptr;
|
||||
|
||||
if((rc = cfg->getv("flow_proc_dict",flow_proc_dict)) != cw::kOkRC )
|
||||
return cwLogError(rc,"The 'flow_proc_dict' specification object was not found.");
|
||||
|
||||
return cw::preset_sel_app::main(args,flow_proc_dict);
|
||||
*/
|
||||
return cw::preset_sel_app::main(args);
|
||||
}
|
||||
#else
|
||||
cw::rc_t _no_alsa_websock() { return cwLogError(cw::kResourceNotAvailableRC,"Websock or ALSA functionality not included in this build."); }
|
||||
|
Loading…
Reference in New Issue
Block a user