cwFlow.cpp,flow/proc_dict.cfg : Added cwFlowPerf procs score_player,midi_to_msg,score_follower.

This commit is contained in:
kevin 2024-11-17 16:20:10 -05:00
parent 43025557e8
commit 0b0ac8ce76
2 changed files with 40 additions and 1 deletions

View File

@ -15,10 +15,11 @@
#include "cwMidiDecls.h" #include "cwMidiDecls.h"
#include "cwFlowDecl.h" #include "cwFlowDecl.h"
#include "cwFlow.h" #include "cwFlow.h"
#include "cwFlowValue.h"
#include "cwFlowTypes.h" #include "cwFlowTypes.h"
#include "cwFlowNet.h" #include "cwFlowNet.h"
#include "cwFlowProc.h" #include "cwFlowProc.h"
#include "cwFlowPerf.h"
namespace cw namespace cw
{ {
namespace flow namespace flow
@ -73,6 +74,9 @@ namespace cw
{ "midi_split", &midi_split::members }, { "midi_split", &midi_split::members },
{ "midi_file", &midi_file::members }, { "midi_file", &midi_file::members },
{ "midi_merge", &midi_merge::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 } { nullptr, nullptr }
}; };

View File

@ -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 ." }
}
}
} }