A little research (half of that research was a comment on this page) led me to two superb solutions.
One is Sonic Visualiser (https://www.sonicvisualiser.org/download.html), which is a deep (complex) program that, when the Vamp plugin package is installed, includes a few "transformations" (analytical operations) which include export to midi. The two I found most effective were "pYin: Notes" and "Polyphonic Transcription [University of Alicante]".
The method is this: You open a wav file, select the transformation (play it if you want) - this creates a new "layer" (each layer is shown as a tab). With this layer active, export using "Export Annotation Layer". Midi is one of the options.
The other, more simple option is called "Tony" (get it? tone-y?) available from https://code.soundsoftware.ac.uk/projects/tony/
Method: open wav file, it auto-analyses by default or select "Analyse Now", then "Export Note Data" allows midi export.
There are probably other solutions. I'm looking for a command-line solution, too, but these work really well.