preset_sel cfg updates and additions

This commit is contained in:
kevin 2022-12-05 17:15:55 -05:00
parent 0cd67afd15
commit 6d6510367e
16 changed files with 28285 additions and 17 deletions

View File

@ -103,6 +103,7 @@
addClassName: fragPanelRow
col: {
str_disp: { name: measLabelId, title:"Meas", value: "x" },
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 },

View File

@ -0,0 +1,329 @@
{
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",
record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
record_fn: "m1_196",
record_fn_ext: "txt",
flow_proc_dict_fn: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
beg_play_loc: 0,
end_play_loc: 4083,
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: [
// 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",
//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 ] ,
},
//{ midi_out_device: "PipeWire-RT-Event", midi_out_port: "input" },
],
}
frag_panel: {
panel: {
name: fragPanelId
addClassName: fragPanel
row: {
name: fragPanelRowId
addClassName: fragPanelRow
col: {
str_disp: { name: fragMeasId, title:"Meas", value: "x" },
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_dry_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 } }
}
}
}
}

View File

@ -0,0 +1,329 @@
{
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",
record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
record_fn: "m197_283",
record_fn_ext: "txt",
flow_proc_dict_fn: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
beg_play_loc: 4090,
end_play_loc: 16352,
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: [
// 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",
//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 ] ,
},
//{ midi_out_device: "PipeWire-RT-Event", midi_out_port: "input" },
],
}
frag_panel: {
panel: {
name: fragPanelId
addClassName: fragPanel
row: {
name: fragPanelRowId
addClassName: fragPanelRow
col: {
str_disp: { name: measLabelId, title:"Meas", value: "x" },
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_dry_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 } }
}
}
}
}

View File

@ -0,0 +1,304 @@
{
test: {
preset_sel: {
params: {
score_fn: "~/src/cwtest/src/cwtest/cfg/preset_sel/score/20220423/temp.csv",
record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
record_fn: "m197_283_a",
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: 4085,
end_play_loc: 16352,
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: {
str_disp: { name: fragMeasId, title:"Meas", value: "x" },
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
network: {
aud_in: { class: audio_in, args:{ default:{dev_label:"main"} } },
// select the first six channels
split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1, 1,1, 1,1, 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 } }}
// select the first two channels to feed into the transform
sync_split: { class: audio_split, in:{ in:sync_delay.out } args:{ default:{select[1,1, 0,0, 0,0, 0,0]}} }
mstr_wet_in_gain: { class: audio_gain, in:{ in:sync_split.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_split.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, in2:mstr_dry_out_gain.out }, args:{} },
aout: { class: audio_out, in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
//af_merge { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:sync_delay.out } args:{} },
//af_out: { class: audioFileOut, in:{ in:af_merge.out }, args:{ default:{fname:"/home/kevin/temp/m1-7_temp.wav"}}},
}
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 } }
}
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,306 @@
{
test: {
preset_sel: {
params: {
//score_fn: "~/src/currawong/audio/video_trailer/beck/record_3/play_score.csv",
score_fn: "~/src/currawong/audio/video_trailer/taka/record_3/play_score.csv",
record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
record_fn: "m302-325",
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: false,
force_damper_down_threshold: 60,
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: false,
force_damper_down_threshold: 60,
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
network: {
aud_in: { class: audio_in, args:{ default:{dev_label:"main"} } },
// select the first six channels
split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select:[1,1, 1,1, 1,1, 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 } }}
// select the first two channels to feed into the transform
sync_split: { class: audio_split, in:{ in:sync_delay.out } args:{ default:{select:[1,1, 0,0, 0,0, 0,0]}} }
mstr_wet_in_gain: { class: audio_gain, in:{ in:sync_split.out }, args:{}}
// wet signal processing chain
wet_in_gain: { class: audio_gain, in:{ in:mstr_wet_in_gain.out }, args:{}},
//icmp: { class: compressor, in:{ in:wet_in_gain.out }, preset:input },
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 },
dcf: { class: dc_filter, in:{ in:cmp.out } },
wet_out_gain: { class: audio_gain, in:{ in:dcf.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_split.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, in2:mstr_dry_out_gain.out }, args:{} },
aout: { class: audio_out, in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
//af_merge { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:mstr_dry_out_gain.out } args:{} },
//af_out: { class: audioFileOut, in:{ in:af_merge.out }, args:{ default:{fname:"/home/kevin/temp/headphone_temp_1.wav"}}},
}
presets: {
dry: {
mute_wet: { gain:0 },
},
a: { pva:a, sd:a, cmp:a, mute_wet:{ gain:1 } },
b: { pva:b, sd:b, cmp:b, mute_wet:{ gain:1 } },
c: { pva:c, sd:c, cmp:c, mute_wet:{ gain:1 } },
d: { pva:d, sd:d, cmp:d, mute_wet:{ gain:1 } },
f1: { pva:f_1, sd:f_1, cmp:f_1, mute_wet:{ gain:1 } },
f2: { pva:f_2, sd:f_2, cmp:f_2, mute_wet:{ gain:1 } },
f3: { pva:f_3, sd:f_3, cmp:f_3, mute_wet:{ gain:1 } },
f4: { pva:f_4, sd:f_4, cmp:f_4, mute_wet:{ gain:1 } },
g: { pva:g, sd:g, cmp:g, mute_wet:{ gain:1 } },
ga: { pva:g_a, sd:g_a, cmp:g_a, mute_wet:{ gain:1 } },
g1a: { pva:g_1_a, sd:g_1_a, cmp:g_1_a, mute_wet:{ gain:1 } },
g1d: { pva:g_1_d, sd:g_1_d, cmp:g_1_d, mute_wet:{ gain:1 } }
}
}
}
}

View File

@ -0,0 +1,306 @@
{
test: {
preset_sel: {
params: {
//score_fn: "~/src/currawong/audio/video_trailer/beck/record_3/play_score.csv",
score_fn: "~/src/currawong/audio/video_trailer/taka/record_3/play_score.csv",
record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
record_fn: "m302-325",
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: 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: [
// 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: false,
force_damper_down_threshold: 60,
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: false,
force_damper_down_threshold: 60,
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
network: {
aud_in: { class: audio_in, args:{ default:{dev_label:"main"} } },
// select the first six channels
split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select:[1,1, 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:0 } }}
vsl_split: { class: audio_split, in:{ in:sync_delay.out } args:{ default:{select:[0,0,1,1 ]}} }
// select the first two channels to feed into the transform
sync_split: { class: audio_split, in:{ in:sync_delay.out } args:{ default:{select:[1,1, 0,0 ]}} }
mstr_wet_in_gain: { class: audio_gain, in:{ in:sync_split.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_split.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, in2:mstr_wet_out_gain.out, in3:vsl_split.out }, args:{} },
aout: { class: audio_out, in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
//af_merge { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:sync_delay.out } args:{} },
af_out: { class: audioFileOut, in:{ in:merge.out }, args:{ default:{fname:"/home/kevin/temp/taka_3_temp.wav"}}},
}
presets: {
dry: {
mute_wet: { gain:0 },
},
a: { pva:a, sd:a, cmp:a, mute_wet:{ gain:1 } },
b: { pva:b, sd:b, cmp:b, mute_wet:{ gain:1 } },
c: { pva:c, sd:c, cmp:c, mute_wet:{ gain:1 } },
d: { pva:d, sd:d, cmp:d, mute_wet:{ gain:1 } },
f1: { pva:f_1, sd:f_1, cmp:f_1, mute_wet:{ gain:1 } },
f2: { pva:f_2, sd:f_2, cmp:f_2, mute_wet:{ gain:1 } },
f3: { pva:f_3, sd:f_3, cmp:f_3, mute_wet:{ gain:1 } },
f4: { pva:f_4, sd:f_4, cmp:f_4, mute_wet:{ gain:1 } },
g: { pva:g, sd:g, cmp:g, mute_wet:{ gain:1 } },
ga: { pva:g_a, sd:g_a, cmp:g_a, mute_wet:{ gain:1 } },
g1a: { pva:g_1_a, sd:g_1_a, cmp:g_1_a, mute_wet:{ gain:1 } },
g1d: { pva:g_1_d, sd:g_1_d, cmp:g_1_d, mute_wet:{ gain:1 } }
}
}
}
}

View File

@ -274,9 +274,9 @@
aout: { class: audio_out, in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
af_merge { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:sync_delay.out } args:{} },
//af_merge { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:sync_delay.out } args:{} },
af_out: { class: audioFileOut, in:{ in:af_merge.out }, args:{ default:{fname:"/home/kevin/temp/m1-7_temp.wav"}}},
//af_out: { class: audioFileOut, in:{ in:af_merge.out }, args:{ default:{fname:"/home/kevin/temp/m1-7_temp.wav"}}},
}

View File

@ -5,13 +5,13 @@
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",
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: "m359-420",
record_fn: "m350_458",
record_fn_ext: "txt",
flow_proc_dict_fn: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
@ -19,8 +19,8 @@
crossFadeSrate: 48000.0, // TODO: move to flow cfg. and set via 'system default sample rate'
crossFadeCount: 3,
beg_play_loc: 11499,
end_play_loc: 14732,
beg_play_loc: 12489, // coda 11499,
end_play_loc: 14726, // coda 12426,
presets: {
preset_labelL: [ "dry", "a", "b", "c", "d", "f1", "f2", "f3", "f4", "g", "ga", "g1a", "g1d" ],
@ -54,7 +54,7 @@
midi_out_device: "Scarlett 18i20 USB",
midi_out_port: "Scarlett 18i20 USB MIDI 1",
force_damper_down_fl: true,
force_damper_down_fl: false,
force_damper_down_threshold: 35,
force_damper_down_velocity: 80,
@ -76,7 +76,7 @@
// 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 ] ,
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 ] ,
},
{
@ -91,10 +91,10 @@
//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, 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_fl: false,
force_damper_down_threshold: 35,
force_damper_down_velocity: 80,
@ -239,14 +239,14 @@
network: {
aud_in: { class: audio_in, args:{ default:{dev_label:"main"} } },
// select the first six channels
split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1, 1,1, 1,1, 1,1 ]}} }
// select the first six channels: ivory, mic, vsl
split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1, 1,1, 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 } }}
// select the first two channels to feed into the transform
sync_split: { class: audio_split, in:{ in:sync_delay.out } args:{ default:{select[0,0, 0,0, 0,0, 1,1]}} }
sync_split: { class: audio_split, in:{ in:sync_delay.out } args:{ default:{select[1,1]}} }
mstr_wet_in_gain: { class: audio_gain, in:{ in:sync_split.out }, args:{}}
@ -255,6 +255,7 @@
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 }, },
//dcf: { class: dc_filter, in:{ in:pvs.out }, },
cmp: { class: compressor, in:{ in:pvs.out }, preset:kc },
wet_out_gain: { class: audio_gain, in:{ in:cmp.out }, args:{}},
@ -271,13 +272,13 @@
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, in2:mstr_dry_out_gain.out }, args:{} },
merge: { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:mstr_dry_out_gain.out, in2:mstr_wet_out_gain.out, in3:mstr_dry_out_gain.out }, args:{} },
aout: { class: audio_out, in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
af_merge { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:sync_delay.out } args:{} },
af_out: { class: audioFileOut, in:{ in:af_merge.out }, args:{ default:{fname:"/home/kevin/temp/m302-325_xy_6ft_spkrs_moved_back.wav"}}},
af_out: { class: audioFileOut, in:{ in:af_merge.out }, args:{ default:{fname:"/home/kevin/temp/m378_m420_0.wav"}}},
}