diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 4650f1a..68b5ef7 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -2320,6 +2320,12 @@ Implemented: all 66 gallery PNGs were refreshed, including five new MIDI prefere --- +Follow-up screenshot: [open MIDI input device dropdown](../screenshots/preferences-midi-input-devices.png) +shows actual host MIDI sources after the label-lifetime fix. The reproducible +`XTC_CAPTURE_MIDI_INPUT_ONLY=1` capture uses the real preferences dropdown and +leaves device routing/configuration unchanged. Warning-enabled capture build, +successful capture and visual inspection confirmed readable device names. + ## Integrated Validation for Phases 100–105 Completed on 2026-11-06. Normal builds use `BUILD_DIR=build/audio-editor`: diff --git a/screenshots/README.md b/screenshots/README.md index 86227f6..399e901 100644 --- a/screenshots/README.md +++ b/screenshots/README.md @@ -17,6 +17,7 @@ floating views show the actual detached windows together. ## MIDI devices, defaults and file exchange (Phases 100–105) +- [Open MIDI input dropdown with real host devices](preferences-midi-input-devices.png) - [MIDI source/destination preferences and channel defaults](preferences-midi.png) - [Device setup and MIDI defaults help](preferences-midi-help.png) - [File menu with MIDI import and selected-clip export](midi-file-menu.png) @@ -32,6 +33,13 @@ See [MIDI workflows and limits](../docs/MIDI_WORKFLOWS.md). Reproduce these five captures with `XTC_CAPTURE_MIDI_ONLY=1 make BUILD_DIR=build/audio-editor screenshots`. +The open input dropdown was captured after the device-label lifetime fix. It +shows actual host sources, including UMC204HD, USB MIDI, Oxygen Pro 25 and BLE +MIDI ports. No route is selected and user preferences are preserved. Reproduce +just this image with real MIDI sources exposed by JACK/PipeWire: +`XTC_CAPTURE_MIDI_INPUT_ONLY=1 make BUILD_DIR=build/audio-editor screenshots`. +The capture fails explicitly if the host exposes no input sources. + ## Creative workflows (Phases 90–99) Four real captures show the current transport Tap button, insert meters and diff --git a/screenshots/preferences-midi-input-devices.png b/screenshots/preferences-midi-input-devices.png new file mode 100644 index 0000000..aeadf41 Binary files /dev/null and b/screenshots/preferences-midi-input-devices.png differ diff --git a/tools/capture_screenshots.cpp b/tools/capture_screenshots.cpp index fa00f8a..e594a12 100644 --- a/tools/capture_screenshots.cpp +++ b/tools/capture_screenshots.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -63,6 +64,26 @@ int main(int argc,char **argv) { MainWindow window(false,"");main_window=&window;window.resize(0,0,1400,900);window.show();check(window.open_project(project.c_str()));pump(); auto *s=first(window);if(!s)throw std::runtime_error("Sequencer missing"); auto reset=[&](){window.reset_layout();check(window.open_project(project.c_str()));window.resize(0,20,1400,900);tab("Sequencer");s->select(0,0);s->position(0);check(window.set_loop(3840,7680,true));window.fit_song();pump();}; + if(std::getenv("XTC_CAPTURE_MIDI_INPUT_ONLY")) { + reset(); + if(window.midi_devices(true).empty())throw std::runtime_error("No real MIDI input sources exposed by the host"); + Fl::add_timeout(.3,[](void*){ + auto *preferences=Fl::modal();if(!preferences)throw std::runtime_error("Preferences missing"); + auto *tabs=first(*preferences);auto *page=named(*preferences,"midi"); + if(!tabs || !page)throw std::runtime_error("MIDI preferences missing"); + tabs->value(page);tabs->redraw();pump(); + auto *choice=dynamic_cast(named(*preferences,"Default MIDI input source (next Play)")); + if(!choice || choice->menubutton()->size()<3)throw std::runtime_error("MIDI source list is empty"); + Fl::add_timeout(.3,[](void*){ + capture("preferences-midi-input-devices"); + if(system("xdotool key Escape"))std::abort(); + }); + choice->menubutton()->popup(); + auto *close=named(*preferences,"Close");if(!close)throw std::runtime_error("Preferences close missing");close->do_callback(); + }); + window.show_preferences();window.do_callback(); + std::puts("Real host MIDI input device dropdown captured.");return 0; + } if(std::getenv("XTC_CAPTURE_MIDI_ONLY")) { reset();dialog("preferences-midi",[&]{window.show_preferences();},"midi"); dialog("preferences-midi-help",[&]{window.show_preferences();},"MIDI help");