main.cfg,main.cpp : Update for cwSfMatch and cwSfTrack.

This commit is contained in:
kevin 2023-08-05 12:36:27 -04:00
parent 3353b13e61
commit e55673f0dd
2 changed files with 108 additions and 1 deletions

View File

@ -1978,6 +1978,107 @@
}
}
sfmatch: {
gen_perf_example:
{
enable_fl: false,
beg_loc_idx: 0,
loc_cnt: 10
}
cm_score_fname: "/home/kevin/src/currawong/projects/score_proc/score_out.csv"
srate: 48000,
maxScWndN:10, // max size of the score alignment window
maxMidiWndN:7, // max counf of the performance (MIDI) alignment window
dyn_ref: {
"silent": 1,
"pppp":10,
"ppp_m":20,
"ppp":25,
"ppp_p":30,
"pp_m":30,
"pp":35,
"pp_p":40,
"p_m":40,
"p":45,
"p_p":50,
"mp_m":50
"mp":55
"mp_p":60,
"mf_m":60,
"mf":65,
"mf_p":70,
"f_m":70,
"f":75,
"f_p":80,
"ff":85,
"fff":100,
"ffff":120
}
perf: [
{ muid:0 smpIdx:0 pitch:65 vel:44 },
{ muid:1 smpIdx:3600 pitch:63 vel:64 },
{ muid:2 smpIdx:7200 pitch:45 vel:64 },
{ muid:3 smpIdx:10800 pitch:30 vel:64 },
{ muid:4 smpIdx:14400 pitch:37 vel:64 },
{ muid:5 smpIdx:18000 pitch:65 vel:112 },
{ muid:6 smpIdx:21600 pitch:87 vel:100 },
{ muid:7 smpIdx:21600 pitch:36 vel:88 },
{ muid:8 smpIdx:21600 pitch:46 vel:30 },
{ muid:9 smpIdx:193028 pitch:85 vel:30 },
{ muid:10 smpIdx:330171 pitch:100 vel:88 },
{ muid:11 smpIdx:638742 pitch:80 vel:100 },
]
},
sftrack: {
cm_score_fname: "/home/kevin/src/currawong/projects/score_proc/score_out.csv"
srate: 48000,
maxScWndN:10, // max size of the score alignment window
maxMidiWndN:7, // max counf of the performance (MIDI) alignment window
report_midi_file_fl: false,
report_score_fl: false,
report_track_fl: true
dyn_ref: {
"silent": 1,
"pppp":10,
"ppp_m":20,
"ppp":25,
"ppp_p":30,
"pp_m":30,
"pp":35,
"pp_p":40,
"p_m":40,
"p":45,
"p_p":50,
"mp_m":50
"mp":55
"mp_p":60,
"mf_m":60,
"mf":65,
"mf_p":70,
"f_m":70,
"f":75,
"f_p":80,
"ff":85,
"fff":100,
"ffff":120
}
perf:{
enable_fl:true,
loc_idx: 120,
midi_fname:"/home/kevin/temp/shiau_uen/record_5/midi.mid"
}
}
}

View File

@ -47,8 +47,10 @@
#include "cwMidiFile.h"
#include "cwAudioDevice.h"
#include "cwSfScore.h"
#include "cwSfMatch.h"
#include "cwSfTrack.h"
#if defined(cwALSA)
#if(cwALSA)
#include "cwMidiPort.h"
#include "cwAudioDeviceTest.h"
#include "cwAudioDeviceAlsa.h"
@ -408,6 +410,8 @@ cw::rc_t svgMidiFileTest( const cw::object_t* cfg, const cw::object_t* args, int
cw::rc_t midiStateTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::midi_state::test(args); }
cw::rc_t csvTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::csv::test(args); }
cw::rc_t sfScoreTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::sfscore::test(args); }
cw::rc_t sfMatchTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::sfmatch::test(args); }
cw::rc_t sfTrackTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::sftrack::test(args); }
#if defined(cwWEBSOCK)
cw::rc_t websockSrvTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::websockSrvTest(cfg); }
@ -798,6 +802,8 @@ int main( int argc, const char* argv[] )
{ "midi_state", midiStateTest },
{ "csv", csvTest },
{ "sfscore", sfScoreTest },
{ "sfmatch", sfMatchTest },
{ "sftrack", sfTrackTest },
{ "stub", stubTest },
{ nullptr, nullptr }
};