flow/proc_dict.cfg : Added score_follow2 and voice_detector

Many updates to support changes to other proc's.
This commit is contained in:
kevin 2025-04-21 09:32:37 -04:00
parent c292c009e9
commit ec40706e2b

View File

@ -44,6 +44,7 @@
in: { type:midi, doc:"MIDI messages to send."},
rin: { type:record, fmt:{ required:["midi"]}, doc:"Record input. (must have 'midi' field)"},
print_fl: { type:bool, value:false, doc:"Print the output to the console."}
enable_fl: { type:bool, value:true, doc:"Enable the output port."}
}
}
@ -735,7 +736,8 @@
in: { type:record, fmt:{ required:["midi"]} doc:"MIDI input."},
voice_cnt: { type:uint, value:3, flags:["init"], doc:"Count of voices." },
out: { type:midi, flags:["mult"], doc:"MIDI output to voices. One per voice." },
done_fl: { type:bool, value:false, flags:["mult"], doc:"Voice available feedback triggers from voices. One per voice."},
gate_fl: { type:bool, flags:["mult"], doc:"Output: Per voice. Goes true with note-on, false when done_fl is set." },
done_fl: { type:bool, value:false, flags:["mult"], doc:"Input: Voice available feedback triggers from voices. One per voice."},
}
},
@ -746,8 +748,8 @@
wtb_instr: { type:string, value:"piano", flags:["init"], doc:"Instrument label of the selected wave-table bank."},
in: { type:midi, doc:"MIDI in" },
out: { type:audio, doc:"Audio out" },
done_fl: { type:bool, value:false, doc:"Triggers when voice is available."},
gate_fl: { type:bool, value:false, doc:"True when voice is active, false when inactive." },
done_fl: { type:bool, value:false, doc:"Output: True when voice is available, false when active."},
gate_fl: { type:bool, value:false, doc:"Output: True when voice is active, false when inactive." },
rls_coeff: { type:coeff, value:0.9, doc:"Release decay factor. Increase for longer decays."},
rls_thresh:{ type:coeff, value:0.01,doc:"Note off threshold. Decrease for longer decays."},
@ -758,6 +760,15 @@
}
},
voice_detector: {
vars: {
in: { type:audio, doc:"Audio in" },
enable_fl: { type:bool, flags:[notify], value:false, doc:"Set when this voice detector is enabled." },
rls_thresh: { type:coeff, flags:[notify], value:0.01, doc:"Voice off threshold." },
done_fl: { type:bool, value:true, doc:"Output: Set when the voice is inactive, cleared when it is active."}
}
},
print: {
vars: {
@ -799,8 +810,21 @@
vars: {
fname: { type:string, flags:["init"], value:"", doc:"MIDI file name." },
csv_fname: { type:string, flags:["init"], value:"", doc:"MIDI CSV fname. See: midi::file open_csv()." },
alt_csv_fname: { type:string, flags:["init"], value:"", doc:"MIDI CSV fname. See: midi::file open_csv_2()." },
start: { type:all, flags:["notify"], value:false, doc:"Start playback" },
stop: { type:all, flags:["notify"], value:false, doc:"Stop playback" },
done_fl: { type:bool, value:false, doc:"Emits true on done." },
out: { type:midi, doc:"MIDI output."}
out: { type:midi, doc:"MIDI output."},
r_out: { type:record, doc:"MIDI output as records.",
fmt: {
alloc_cnt:1024,
fields: {
midi: { type:m3, doc:"MIDI channel event message" },
}
}
}
}
}
@ -838,6 +862,7 @@
b_meas: { type:uint, flags:["notify"], value:0, doc:"Score begin measure." },
e_meas: { type:uint, flags:["notify"], value:0, doc:"Score end measure." },
done_fl: { type:bool, value:false, doc:"Emits true on done." },
loc_cnt: { type:uint, value:0, doc:"Output: Value of max 'loc'."},
out: { type:record, doc:"Score event record.",
fmt: {
fields: {
@ -851,7 +876,9 @@
},
vel_table: {
doc:[ "Remap MIDI velocity values."]
doc:[ "Remap MIDI velocity values."
"If the incoming record has a 'score_vel' field then this is taken as the source velocity to be mapped and the MIDI message velocity is ignored."
]
vars: {
vel_tbl_fname:{ type:string, flags:["init"], value:"", doc:"Velocity table filename as create by vwVelTableTuner." },
vel_tbl_label:{ type:string, flags:["init"], value:"", doc:"Name of the active velocity table referenced by 'vel_fname'."},
@ -879,6 +906,26 @@
}
}
score_follower_2: {
doc:[ "MIDI score follower: Sets the 'loc' field of the output record according to the score location." ]
vars: {
in: { type:record, fmt:{ required:["midi"]} doc:"Input record with 'midi' and 'loc' fields." },
score_fname: { type:string, flags:["init"], value:"", doc:"Score file with location information." },
b_loc: { type:uint, value:0, doc:"Score begin location." },
e_loc: { type:uint, value:0, doc:"Score end location." },
reset_trigger { type:all, flags:["notify"], value:false, doc:"Reset the score follower." },
print_fl: { type:bool, flags:["init"], value:false, doc:"Set to print log of score follower state." },
out:{ type:record, doc:"Pass-through of incoming MIDI with score location and score velocity."
fmt: {
alloc_cnt:1024, // internal recd_array size
fields: {
loc: { type:uint, value:-1, doc:"Score location id or if score track failed." } ,
score_vel: { type:uint, value:-1, doc:"Score mapped velocity or -1 if 'loc' is -1." }
}
}
}
}
preset_select: {
doc:[ "Given a score location emit a preset label."],
@ -922,10 +969,16 @@
vars: {
cfg: { type:cfg, flags:["init"], doc:"Initial preset configuration." },
fname: { type:string, flags:["init"], value:"", doc:"Preset file name."},
in: { type:record, fmt:{ required:["loc"] }, doc:"Input record with 'loc' field." },
loc_cnt: { type:uint, flags:["init"], value:0, doc:"Count of uniq 'loc' id's in the score."},
//in: { type:record, fmt:{ required:["loc"] }, doc:"Input record with 'loc' field." },
in: { type:record, doc:"Input record with 'loc' field." },
loc: { type:uint, value:0, doc:"Seek to this location." },
reset: { type:bool, flags:["notify"], value:false, doc:"Reset to initial state."},
per_note_fl: { type:bool, value:false, doc:"Update the selected preset on every note, otherwise update on new location values." },
pri_manual_sel: { type:uint, flags:["notify"], value:-1, doc:"Manually select the presets.", ui:{ type:list} },
sec_manual_sel: { type:uint, flags:["notify"], value:-1, doc:"Manually select the presets.", ui:{ type:list} },
per_note_fl: { type:bool, value:false, doc:"Change the preset on every note, otherwise change on new preset 'fragments'." },
per_loc_fl: { type:bool, value:false, doc:"Change the preset on every score location, change according to 'per_note_fl'." },
dry_chord_fl: { type:bool, value:false, doc:"Set to make 50% of all chord notes dry."},
pri_prob_fl: { type:bool, flags:["notify"], value: false, doc:"Select primary preset probabilstically." }
pri_uniform_fl: { type:bool, flags:["notify","ui_disable"], value: false, doc:"Use a uniform probability distribution rather than an 'order' weighted distribution." },