New user - trying to import existing midi files

• Apr 13, 2021 - 10:50

I've just started looking at MuseScore, and have a lot of midifiles created by a home-grown sequencer, but in close to standard midifile format. MuseScore imports it, but I can't get it to edit any of the attributes. For example, a file with 6 tracks, gets imported as 3 grand staves, and assigned Grand Piano. I can change the instrument after loading, but I can't find a way to split the grand staves. The Import dialog won't let me
edit the instrument, which I thought would suggest individual staves.

Anyone have any helpful suggestions?
Thanks!


Comments

One approach would be to copy-paste those staves onto additional instruments you add after the import.
Another approach is to not have your MIDI files tell MuseScore that they're for a piano instrument by having the correct instruments in them to start with.

In reply to by jeetee

I found a way round it was to edit the .mscx file - seems the structure if Part -( Staff ...) /Part so I duplicated the Parts then deleted the second voice from the original and the first from the copies. Reload and I've got individual staffs - just needed to delete the Braces, and re-assign instruments appropriately.

The manual implies that you can re-assign the Instruments when loading a midifille, but all it would let me do was change to different pianos.

Getting there slowly.....

In reply to by jeetee

Ahh, but I like to know what's what, and I'd not figured out how to select a whole staff!

And I still think the manual is saying things that aren't correct as it clearly says you can amend the instrument and it doesn't let me.

I'm now trying to sort out lyrics - it seems to shift them to the next note, and looking in the XML it has up to four copies of some of the words. Tried deleting them from the score, and had to select then delete multiple times for each word. Maybe I should have a look at the source code next, see if I can figure out why??...

In reply to by billp

We have quite a good online handbook to take you through the basics and save long term frustrations. For example staff selection is covered in https://musescore.org/en/handbook/3/selection-modes and should be as easy as click the first note in a staff and then either Shift+Click the last in the staff or Shift+Ctrl+End to select till the end of the staff (pretty much like selection in a text editor).

It sure does allow you to change instruments; but during import does indeed limit you to those instrument groups specifically requested by the MIDI file however. Once imported you are free to change a piano to a marimba or clarinet for that matter by using the "change instrument" facility in the Staff/Part Properties: https://musescore.org/en/handbook/3/staff-part-properties

See https://musescore.org/en/handbook/3/lyrics on some hints on how to work with lyrics, although it mostly refers to entering them. As for why they appear multiple times? Likely because of how they are encoded in your MIDI file or what you checked as options during import.
If you're able to share the MIDI file we can help you figure that out.

While diving into the source code to figure out why might be a fun challenge, diving into the handbook to get a grasp of the basic editing facilities of MuseScore will likely require less effort with better results.

As a sidenote though (given that your MIDI file contains lyrics): if your score stems from other notationlike software, try exporting to MusicXML there instead of using MIDI. The latter really isn't a notation format at all, so lots of guessing has to happen upon importing such a file.

In reply to by jeetee

OK, here's my midi file - it's a rendering of Lady in Red. I use MUP to initially create the MIDI file, but then edit the odd item using my home-grown sequencer, which used to work fine, but recently has developed problems and I'm thinking of changing to something else, MuseScore being a possibility. It will be sad, as my sequencer had some nice facilities, like being able to edit midi events in a table format, as well as piano-roll. With MUP
I can easily generate printable scores as well as midifiles.

I've checked the file, and none of the lyrics entries are duplicates. I do specify track names, but I'm unsure as to which midifile event you expect the instrument name to be in. It's a long time since I wrote the code and my memory is probably a bit faulty these days... ;-)

Attachment Size
redlady.mid 18.08 KB

In reply to by billp

I believe the instruments in MIDI are usually set by a program change event at the start of the track. I tried opening your midi file with MidiEditor, but it seems to trigger a bug in that software throwing it in a continuous loop. My assumption would be that these events are not written by your own sequencer software; in which case MuseScore likely defaults to the program change value of 0; which is indeed the "Grand Piano" definition in the General MIDI standard.

The multiple lyrics stem from that by default there seem to be multiple lyric imports ongoing (combined with the piano confusion):
lyrics-import.png
If I change that so only the first track gets it's lyrics (which for some reason start with "dev=korgg, patch=") the duplicate lyrics seem to be gone from import.

Similarly it seems that the last two tracks need to be some kind of drums, but their channel info (chan=9) is detected as lyrics instead..

In reply to by jeetee

OK, that kind of makes sense. The midifile format distinguishes between 'text' and 'lyrics' and I used 'text' to specify commands to the sequencer to distinguish what kind of synth I was talking to. My guess is Musescore is assuming lyrics. 'chan=9' is specifying the midi channel for the track (overriding the individual channel numbers in the events) and midi uses 0-15 rather than 1-16 (which won't fit in four bits!) Drums which are usually referred to as Channel 10 are actually on 9. The initial program changes are generated from text messages by the synth, but additional, normal PC events can appear anywhere along the track.

In reply to by billp

A further problem, which I can't find anything in the handbook that works, is to get rid of spurious key signatures. These arose as MuseScore decided to insert clef changes, and added the key signature following them. I've deleted the clefs, but the key signatures, which are redundant as they are the same as those at the start of the staff, won't go. The handbook says, selected and press DEL. That simply de-selects them.

I guess this is going to be another foray into the .mcsx file.

In reply to by billp

Don't check them during import is the easy solution here.

The trouble is that due to this being a MIDI import the key changes happen in a weird local way too. You can apply a new key change to said measure to normalize it and then delete it without issue. But yes, if you don't want them in there, don't check that option during import.

Do you still have an unanswered question? Please log in first to post your question.