diff --git a/cwFlow.cpp b/cwFlow.cpp index 348bb75..e1e7350 100644 --- a/cwFlow.cpp +++ b/cwFlow.cpp @@ -15,10 +15,11 @@ #include "cwMidiDecls.h" #include "cwFlowDecl.h" #include "cwFlow.h" +#include "cwFlowValue.h" #include "cwFlowTypes.h" #include "cwFlowNet.h" #include "cwFlowProc.h" - +#include "cwFlowPerf.h" namespace cw { namespace flow @@ -73,6 +74,9 @@ namespace cw { "midi_split", &midi_split::members }, { "midi_file", &midi_file::members }, { "midi_merge", &midi_merge::members }, + { "score_player", &score_player::members }, + { "midi_to_msg", &midi_to_msg::members }, + { "score_follower", &score_follower::members }, { nullptr, nullptr } }; diff --git a/flow/proc_dict.cfg b/flow/proc_dict.cfg index 05f689a..adc3c85 100644 --- a/flow/proc_dict.cfg +++ b/flow/proc_dict.cfg @@ -780,5 +780,40 @@ } } + score_player: { + doc: [ "Generate MIDI and score location information from a score file." ] + vars: { + fname: { type:string, flags:["init"], value:"", doc:"Score file name." }, + out: { type:midi, doc:"MIDI output." }, + loc: { type:uint, value:0, doc:"Score location output." }, + done_fl: { type:bool, value:false, doc:"Emits true on done." }, + } + } + + + midi_to_msg: { + doc:[ "Convert MIDI event to the 'messages'." ] + vars: { + in: { type:midi, doc:"MIDI input port" }, + fields: { type:string, flags:["init"], value:"", doc:"Space separated msg fields string." }, + buf_cnt:{ type:uint, flags:["init"], value:1024, doc:"Maximum count of messages that this object can buffer during a single execution cycle." }, + out: { type:record, doc:"MIDI input converted to records in the 'midi' field and blank extra fields named according to 'fields'." } + } + } + + score_follower: { + doc:[ "MIDI score follower: Sets the 'loc' field of the output record according to the score location." ] + vars: { + in: { type:record, doc:"Input record with 'midi' and 'loc' fields." }, + dyntbl_fname: { type:string, flags:["init"], value:"", doc:"Dynamics reference table file name." }, + score_fname: { type:string, flags:["init"], value:"", doc:"Score file with location information." }, + score_wnd: { type:uint, flags:["init"], value:7, doc:"Count of locations in the score search window." }, + midi_wnd: { type:uint, flags:["init"], value:15, doc:"Count of MIDI events to align in the score search window." }, + print_fl: { type:bool, flags:["init"], value:false, doc:"Set to print log of score follower state." }, + back_track_fl: { type:bool, flags["init"], value:false, doc:"Set if the score follower is allowed to report locations out of order." }, + loc: { type:uint, doc:"Score location." }, + out: { type:record, doc:"Input record with the 'loc' field set ." } + } + } }