From 5a63a2187f84d6325878fa23687ff718209d733f Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 30 Apr 2023 21:27:33 -0400 Subject: [PATCH] main.cfg,main.cpp : Added tests for 'midi_state' and 'svg_midi_file' --- src/cwtest/cfg/main.cfg | 36 ++++++++++++++++++++++++++++++++++++ src/cwtest/main.cpp | 6 ++++++ 2 files changed, 42 insertions(+) diff --git a/src/cwtest/cfg/main.cfg b/src/cwtest/cfg/main.cfg index 54614f0..98ca1be 100644 --- a/src/cwtest/cfg/main.cfg +++ b/src/cwtest/cfg/main.cfg @@ -1840,4 +1840,40 @@ } + svg_midi_file: { + "midi_fname": "~/src/currawong/audio/workshop/beck1/record_4/midi.mid", + "out_fname": "~/temp/temp_midi.html" + "midi_state_args": { + "cache_block_msg_count": 128, + "pedal_up_midi_value": 64, + "pedal_half_min_midi_value": 40, + "pedal_half_max_midi_value": 50 + } + } + + svg_score: { + "piano_score_fname":"~/src/cwtest/src/cwtest/cfg/gutim_full/score/temp.csv", + "cm_score_fname":"~/src/cwtest/src/cwtest/cfg/gutim_full/cm_score.csv", + "css_fname":"~/src/cwtest/src/cwtest/cfg/gutim_full/score/svg/score.css", + "out_fname":"~/src/cwtest/src/cwtest/cfg/gutim_full/score/svg/score.html" + "midi_state_args": { + "cache_block_msg_count": 128, + "pedal_up_midi_value": 64, + "pedal_half_min_midi_value": 40, + "pedal_half_max_midi_value": 50 + } + }, + + midi_state: { + "midi_fname": "~/src/currawong/audio/workshop/beck1/record_4/midi.mid", + "cache_enable_fl": true, + "args": { + "cache_block_msg_count": 128, + "pedal_up_midi_value": 64, + "pedal_half_min_midi_value": 40, + "pedal_half_max_midi_value": 50 + } + } + + } diff --git a/src/cwtest/main.cpp b/src/cwtest/main.cpp index 216dc1a..7f37260 100644 --- a/src/cwtest/main.cpp +++ b/src/cwtest/main.cpp @@ -77,6 +77,8 @@ #include "cwAudioFile.h" #include "cwAudioFileOps.h" +#include "cwMidiState.h" +#include "cwSvgMidi.h" //#include "cwNbMem.h" @@ -399,6 +401,8 @@ cw::rc_t euConTest( const cw::object_t* cfg, const cw::object_t* args cw::rc_t flowTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::flow::test(args); } cw::rc_t scoreFollowTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::score_follower::test(args); } +cw::rc_t svgMidiFileTest( const cw::object_t* cfg, const cw::object_t* args, int argc, const char* argv[] ) { return cw::svg_midi::test_midi_file(args); } +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); } #if defined(cwWEBSOCK) @@ -786,6 +790,8 @@ int main( int argc, const char* argv[] ) { "flow_spec_dist", flowTest }, { "preset_sel", ioPresetSelTest }, { "score_follow", scoreFollowTest }, + { "svg_midi_file", svgMidiFileTest }, + { "midi_state", midiStateTest }, { "stub", stubTest }, { nullptr, nullptr } };