Midi file import - problem with stave groupings for instruments

I don’t know if anyone can help - please if you can:
I imported an xml file from Reaper. The parsing made such an utter mess of it I’m on the point of giving up and writing the score by hand.
The import came up with some very weird stuff but worse, it dropped out almost all the music. A harp part managed to stagger to bar 45 of 144 bars but other players dropped out earlier. The tuba just made it to around bar 6.
I spent the day taking great care to ensure every piano roll note stuck to the grid (resolved to 1/64 notes). It contains triplets, sometimes in the same bar as quadruplets, duplets etc.
I really can’t face putting in the lot by hand at my level of experience, particularly as I’d be switching between two applications the whole time.

So I tried a midi export from Reaper - and lo and behold it appears to have worked…except: it’s a) revealed all the keyswitch notes and b) has given some single-staff instruments two staves, treble and bass, as shown in the picture below.
It could be because the keyswitches are in the bass clef, so Dorico/midi interpreted the line as treble + bass. However, it has left other treble instruments single-staffed.

To rescue the thing, I’d be happy enough deleting all the keyswitches one by one. Fine, except is there then a way of splitting the pairs of staves to delete the one no longer needed?

The only other choices I have are:
a) to prepare a subsidiary file in the daw with the keyswitches deleted for a new midi export. At this point they’re irrelevant anyway.
b) give up on notation software. Though a couple of projects have gone well the xml import has always given trouble.

So please for an opinion.
Many thanks.

If I got stuck with something that looked like this, I’d start by creating some temporary layouts to isolate a few staves at a time to help me see more clearly the staves, notes, keyswitches, and the like that I was working with.

Thank you, Derrek. A lot of work to work around a failing somewhere.
But to save anyone else time, should they ponder this problem, I solved it with a multitrack midi file without keyswitches. It worked.

I’ll do this in future. I lose some information but it’s better than having to deal with the results of the xml creation/import…

So if anyone else hits this problem the solution may be to export a midi file from the daw. Dorico can read it far better.

For what it’s worth, in a future version of Dorico it will be possible to specify ranges of notes in incoming MIDI files that should not be imported, so that you can filter out keyswitches.

When taking data between two different applications with very different domains, you do have to plan ahead a bit, and particularly if you are on the learning slopes of a new tool, it might be more practical to try something smaller scale at first rather than a large-scale work with hundreds of bars, so that you don’t feel so overwhelmed when you get a particular class of problem that affects the whole project, and you can’t see how to fix it.

If you were to try, for example, just making a sequence in Reaper of (say) just the string section for 30 bars, and then try importing that as both MIDI and MusicXML, it would be equally instructive, if not more so, and would not seem like you were left with a mountain to climb to sort things out. Plus with a shorter span of music, the “cost” of throwing it away and importing it again with different options (say) is much lower, so you will feel less mental anguish when you need to do so.

You should definitely persevere, however. Your workflow is not unusual, and many people successfully use both MIDI and MusicXML as an initial step in preparing their scores. If the MusicXML coming out of Reaper is a bit funky (which is certainly possible, as it’s perhaps even less mature than Dorico’s MusicXML support), then MIDI may well be more reliable, though you do have to worry about things like the identification of each track as an instrument, and things like keyswitches. But future versions of Dorico will certainly include tools that will help make working with imported MIDI files easier.

Sincere thanks for your encouragement and suggestions. It was a shock when Dorico opened the file to reveal only about 15% of the music but thankfully the Midi did far better. Yes, I’ll persevere! I’ve done a couple of scores now almost no problems but they’re far simpler…

My first reaction to that failure after disappointment was to wonder how much it’ll cost me to persuade a couple of students I know to copy the parts. They’ve done this before with my handwritten scores!

Reaper isn’t exactly perfect. A great midi editor but problems start when translating to a notation view from which the xml is drawn. It occasionally ‘loses’ notes; it fails with n-tuplets more often than not. But as I discovered it can export a multitrack midi and Dorico can receive it with the player names and everything.

I’m fine with doing detailed repair and accept that taking full advantage of Dorico’s engraving needs painstaking care because it does seem superior to alternatives (which I’ve only seen students work at). But I shuddered to think of entering the whole lot!

I’ll certainly take your suggestions regarding smaller pieces or chunks of score in which problems might be anticipated. I have a long way to go yet but seem to be making progress thanks to yourself, your team, the videos and Dorico help.