diff --git a/src/cwtest/cfg/gutim_full/vel_table/vel_table_perf.json b/src/cwtest/cfg/gutim_full/vel_table/vel_table_perf.json index 54bbde5..4ed9249 100644 --- a/src/cwtest/cfg/gutim_full/vel_table/vel_table_perf.json +++ b/src/cwtest/cfg/gutim_full/vel_table/vel_table_perf.json @@ -33,6 +33,15 @@ "device": "sampler", "name": "ivory" }, + { + // 1 2 3 4 5 6 7 8 9 0 1 2 + // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 + "table": [1, 1, 1, 4, 4, 4, 4, 6, 6, 6, 6, 9, 9, 9, 9, 10, 10, 11, 12, 13, 14, 14, 15, 15, 17, 19, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 43, 43, 46, 48, 49, 52, 54, 56, 59, 59, 62, 63, 65, 68, 69, 68, 70, 75, 77, 81, 82, 82, 83, 83, 83, 87, 85, 87, 87, 89, 92, 92, 99, 105, 101, 102, 104, 102, 103, 103, 105, 100, 102, 103, 101, 106, 106, 106, 106, 106, 107, 107, 107, 107, 110, 110, 110, 110, 110, 110, 111, 112, 113, 115, 116, 117, 118, 120, 120, 121, 121, 122, 122, 122, 124, 124, 124, 125, 125, 125], + "enableFl": false, + "defaultFl": false, + "device": "sampler", + "name": "calced" + }, { "table": [ 1, @@ -99,6 +108,7 @@ "device": "piano", "name": "spirio_1" } + ], "incr_pitch": 3, "max_pitch": 108, diff --git a/src/cwtest/cfg/main.cfg b/src/cwtest/cfg/main.cfg index 689c70b..b6b99d2 100644 --- a/src/cwtest/cfg/main.cfg +++ b/src/cwtest/cfg/main.cfg @@ -35,7 +35,33 @@ }, serialSrv: {}, - midiDevice: {}, // print a list of midi devices and send a MIDI note + midiDeviceReport: {}, + + midiDevice: { + appNameStr: "test_app", + fileDevName: "file_dev", + fileDevReadAheadMicros: 1000, + parseBufByteCnt: 1024, + testFileLabel: "file_0", + testFileEnableFl: true, + + file_ports: [ + + { "label":"file_0", + "file": "/home/kevin/src/cwtest/src/cwtest/cfg/gutim_full/data1/beck1/record_4/midi.mid", + "enable_fl": true }, + + { "label":"file_1", + "file": "/home/kevin/src/cwtest/src/cwtest/cfg/gutim_full/data1/beck1/record_5/midi.mid" + "enable_fl": false } + ] + }, + + + midiFileDev: { + fname: "/home/kevin/src/cwtest/src/cwtest/cfg/gutim_full/data1/beck2/record_5/midi.mid" + }, + textBuf: {}, audioBuf: {}, audioDev: {}, @@ -114,12 +140,9 @@ }, midi: { - - parserBufByteN: 1024, - - }, + audio: { meterMs: 50, // audio meter filter length and meter callback period @@ -342,6 +365,10 @@ y1: [ [9,12,15],[12,17,22],[15,22,29] ], }, + b23Tree: + { + }, + midifile: { // rpt_beg_end: print the first and last 'msg' count msgs in 'midi_fname'. @@ -895,7 +922,8 @@ piano_score:{ //filename: "/home/kevin/src/currawong/projects/score_proc/data/play_file.cfg", //filename: "/home/kevin/src/cwtest/src/cwtest/cfg/gutim_full/data/beck1/record_5/play_score.csv" - filename: "/home/kevin/src/cwtest/src/cwtest/cfg/gutim_full/data/score/20231028/temp.csv" + //filename: "/home/kevin/src/cwtest/src/cwtest/cfg/gutim_full/data/score/20231028/temp.csv" + filename: "/home/kevin/src/currawong/projects/perf_meas_workshop_0/foo.csv" } @@ -1915,7 +1943,7 @@ out_svg_fname: "sf_results.html", write_sf_analysis_csv_fl: false, - out_sf_analysis_csv_fname: "sf_analysis.csv", + out_sf_analysis_csv_fname: "sf_analysis.csv", write_midi_csv_fl: false, out_midi_csv_fname: "midi.csv", @@ -1958,10 +1986,10 @@ { enable_fl: true, jobL: [ - { dir:"~/src/cwtest/src/cwtest/cfg/gutim_full/data/beck1" }, - { dir:"~/src/cwtest/src/cwtest/cfg/gutim_full/data/beck2" }, - { dir:"~/src/cwtest/src/cwtest/cfg/gutim_full/data/taka1" }, - { dir:"~/src/cwtest/src/cwtest/cfg/gutim_full/data/taka2" }, + { dir:"~/src/cwtest/src/cwtest/cfg/gutim_full/data1/beck1" }, + { dir:"~/src/cwtest/src/cwtest/cfg/gutim_full/data1/beck2" }, + { dir:"~/src/cwtest/src/cwtest/cfg/gutim_full/data1/taka1" }, + { dir:"~/src/cwtest/src/cwtest/cfg/gutim_full/data1/taka2" }, ], out_fname: "play_score.csv", }, @@ -2204,6 +2232,12 @@ translate_frags: { + // + // + // translate_frags IS OBSOLETE. SEE projects/translate_frags.py + // + // + cur_frag_fname: "~/src/cwtest/src/cwtest/cfg/gutim_full/preset_select/m1_458.txt", cur_score_fname: "~/src/cwtest/src/cwtest/cfg/gutim_full/score/temp.csv", new_score_fname: "~/src/currawong/projects/score_proc/temp.csv", diff --git a/src/cwtest/main.cpp b/src/cwtest/main.cpp index dfd91ee..c89cd45 100644 --- a/src/cwtest/main.cpp +++ b/src/cwtest/main.cpp @@ -31,7 +31,9 @@ #include "cwFlowDecl.h" #include "cwFlow.h" +#include "cwTime.h" #include "cwMidi.h" +#include "cwMidiDecls.h" #include "cwDynRefTbl.h" #include "cwScoreParse.h" #include "cwSfScore.h" @@ -40,7 +42,6 @@ #include "cwPianoScore.h" #include "cwIoPresetSelApp.h" -#include "cwTime.h" #include "cwMidiFile.h" #include "cwAudioDevice.h" @@ -65,7 +66,9 @@ #endif #if(cwALSA) -#include "cwMidiPort.h" +#include "cwMidiDevice.h" +#include "cwMidiDeviceTest.h" +#include "cwMidiFileDev.h" #include "cwAudioDeviceTest.h" #include "cwAudioDeviceAlsa.h" #endif @@ -484,14 +487,18 @@ cw::rc_t ioPresetSelTest( const cw::object_t* cfg, const cw::object_t* args, i #if defined(cwALSA) -cw::rc_t midiDeviceTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::midi::device::test();} +cw::rc_t midiDeviceReport( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::midi::device::testReport();} +cw::rc_t midiDeviceTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::midi::device::test(args);} +cw::rc_t midiFileDevTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::midi::device::file_dev::test( args );} cw::rc_t audioDevTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::audio::device::test( args ); } cw::rc_t audioDevTestTone( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::audio::device::test_tone( args ); } cw::rc_t audioDevAlsaTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::audio::device::alsa::report(); } cw::rc_t audioDevRpt( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::audio::device::report(); } #else cw::rc_t _no_alsa() { return cwLogError(cw::kResourceNotAvailableRC,"ALSA based functionality not included in this build."); } +cw::rc_t midiDeviceReport( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_alsa();} cw::rc_t midiDeviceTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_alsa();} +cw::rc_t midiFileDevTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_alsa();} cw::rc_t audioDevTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_alsa(); } cw::rc_t audioDevTestTone( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_alsa(); } cw::rc_t audioDevAlsaTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return _no_alsa(); } @@ -781,7 +788,9 @@ int main( int argc, const char* argv[] ) { "spscQueueTmpl", spscQueueTmpl }, { "websockSrv", websockSrvTest }, { "serialSrv", serialPortSrvTest }, + { "midiDeviceReport", midiDeviceReport }, { "midiDevice", midiDeviceTest }, + { "midiFileDev", midiFileDevTest }, { "textBuf", textBufTest }, { "audioBuf", audioBufTest }, { "audioDevFileTest", audioDevFileTest },