Making sheet music out of untimed hand played and piano roll midi files
If you look at my profile and scroll through the scores, you'll find that I have made sheet music out of player piano rolls and hand played midi files that I didn't play to a metronome.
MuseScore has an algorithm of some sort that can find the approximate tempo of a midi file and quantify it to that tempo (though the software will remove syncopation and mess up grace notes). I use this to my advantage to make piano roll transcriptions, and sheet music of my own playing.
Unfortunately, the program has a terrible time mapping swing in midi files (especially foxtrots from piano rolls) and I usually have to quantize everything to an 8th note or 16th (depending on if I use normal tempo or double time).
This method is very time consuming and I wish there was a way that the program AT LEAST WOULDN'T REMOVE SYNCOPATION!!!! Correcting the removed syncopation is the most time consuming part of the process.
Comments
Have you tried playing wiht the swing settings in the import panel? In general swing shouldn't present any particular difficult - no more so than the usual difficulties inherent in any MIDI import, that is. Can you attach a specific MIDI file you are having trouble with?
But I would also say if the software you are using to record your MIDI file makes the simple act of quantizing "very time consuming", you might consider different software for the recording. Quantizing should be trivially simple in most MIDI recording software (eq, pretty much any DAW).
In reply to Have you tried playing wiht… by Marc Sabatella
It's not that I'm having any particular difficulty but when MuseScore imports a piano roll scan that was recorded with swing (foxtrots played by J. Lawrence Cook are a perfect example) then the swing turns into notes in triplets to simulate swing which is exactly what it is. I have to then select everything except for grace notes, triplet trills etc. and quantize everything else.
In reply to It's not that I'm having any… by Piotr Barcz
So Marc's question remains, did you experiment with the swing-settings in the MIDI-import dialog? That is , the column on the far right in the picture here:
https://musescore.org/en/handbook/3/midi-import
In reply to So Marc's question remains,… by AndreasKågedal
Oh is that what he meant? Maybe that'll work!
In reply to So Marc's question remains,… by AndreasKågedal
Oof, I just tried it... just a bunch of triplets again...
In reply to Oof, I just tried it... just… by Piotr Barcz
n order to assist, we'd need you to attach the MIDI file in question and describe more precisely which notes you would like imported differently.
In reply to n order to assist, we'd need… by Marc Sabatella
Well, I actually met a guy who removes the swing for me, the results are way better...
In reply to n order to assist, we'd need… by Marc Sabatella
Ok here's a midi file of a piano roll that i tried to quantize. It has a constant tempo because it's a timed piano roll puch matrix midi file. I split the tracks to help MuseScore not make an illegible piece of junk but it still couldn't map the swing no matter what setting I used on the import panel.
The second midi file (Your the cream in my coffee) is a straight piano roll scan that is not timed or anything. I've managed to quantify these but only by extensive syncopation fixing and quantization to remove all the swing which in this case is very very badly mapped into a mess of tuplets and augmented notes.
In reply to Ok here's a midi file of a… by Piotr Barcz
Carolina Shout seems off by a fraction a beat pretty much throughout. That is the notes that should be on the beat are not. No doubt that plays havoc with the swing recognition. If you can shift this in your sequencer to coincide with the metronome better, you'll have much better luck I suspect. Also probably better if you can convince your sequencer to output the relevant metadata to the actual piano track.
In reply to Carolina shout seems off by… by Marc Sabatella
Well, I've noticed that MuseScore figures out the tempo on it's own so that Carolina Shout midi indeed does get a uniform tempo for the most part but I wish the swing selection would just get rid of the triplets, even when I do the swing setting on quantified midis then it still makes a mess.
In reply to Well, I've noticed that… by Piotr Barcz
As far as I know, MuseScore doesn't usually "figure out" tempo, it's normally recorded directly in the MIDI file. But in cases where the info is missing, I don't think there would be any way to guess it. But my point here is, the MIDI file doesn't have a notion of "triplets" - just notes at pretty varying places relative to a beat that in fact is not the actual beat of the song. There's no way for MuseScore to recognize what you "intended" the file to contain, it can only see what is actually there. That's why being careful to play to a metronome, and being sure to quantize to that before export the MIDI file, is vitally important is a format like MIDI - never intended to be used for notation - is going to have any hope of producing decent results.
In reply to As far as I know, MuseScore… by Marc Sabatella
The thing is, this happens with midi files that have swing and are conventionally sequenced and the swing compensation just doesn't get rid of all the triplets. The only way I've found to make sheets from these files is to go through them and select all the notes that aren't part of triplets that are necessary to have in the score and quantize them to straighten the rhythm...
In reply to The thing is, this happens… by Piotr Barcz
Again, we'd need you to attach a file with the problem so we can investigate. It works quite well with any reasonable quantized MIDI file we've tested. The one attached above, as mentioned, is practically arhythmic, not really obeying the metronome at all.
In reply to Again, we'd need you to… by Marc Sabatella
Ok, here's a midi file that I have that's lining up with the metronome and also has been quantized in many places. You'll see that it's nearly impossible to get rid of the mass of triplets that comprise the swing in the midi.
In reply to Ok, here's a midi file that… by Piotr Barcz
Uncheck the tuplets setting at the bottom of the page.
In reply to Uncheck the tuplets setting… by bobjp
The thing is, this will remove triplets that are supposed to be there xD, then again, sometimes the triplets are quantized to be two 16th notes and then an 8th note which gives the trill a quite sharp tone but it's acceptable.
In reply to Ok, here's a midi file that… by Piotr Barcz
That file seems to have been quantized to still include triplets. You'll get much better results if you quantize it to eighths instead. You can get rid of the triplets that represent swing eighths by setting "Detect swing" to Swing 2:1, but indeed, some triplets will likely remain.
In reply to So Marc's question remains,… by AndreasKågedal
I tried it again with the second swing setting, still triplets...
In reply to Have you tried playing wiht… by Marc Sabatella
It is actually impossible for me to quantify a piano roll without Smart Tempo of some sort. This is a feature only high end paid programs have and I cannot afford to get Logic Pro or Ableton Live, both of which have that feature.
Piano roll scans that I have aren't recorded by me and even if they were there is no way for me to record them to a metronome.
In reply to It is actually impossible… by Piotr Barcz
In the "Tuplets" column in the import-dialog, did you un-check (disable) all tuplets, including "3"?
In reply to In the "Tuplets" column in… by AndreasKågedal
Thing is if i do that then if the piano roll happened to be arranged with tuplets then those will be marred and lost. This is my dilemma.
In reply to Thing is if i do that then… by Piotr Barcz
Is this the thing you want to get?
In reply to Is this the thing you want… by Pentatonus
Ummm, yeah, sort of, you can still see that a lot of the notes are on the second voice which isn't right, and also, there are still some screwed up spots in the swing even though the song is quantized...
But also, I want two staves, not four. I don't know really what this program does but I usually don't get that clean of a result...
In reply to Ummm, yeah, sort of, you can… by Piotr Barcz
Best way to get only two staves would be to use only one MIDI channel. As it is, MuseScore sees separate tracks and separate channels and thinks this is a two-pian duet. But assuming you are using track 1 for the top staff and track 2 for the bottom, just uncheck "split staff in the MIDI import dialog for each track, then hit apply
And indeed, you won't get a clean result importing MIDI - it was never designed to be a notation format and lacks a lot of really basic info that would be needed for good results.
In reply to Best way to get only two… by Marc Sabatella
I do usually uncheck the "split staff" because of how it doesn't even split the staff correctly xD, I have to admit though, this program has a fairly solid algorithm since I have actually hand played midi files and made sheet music of them as well. I have an example attached. I hand played the midi file as smoothly as I could but I did NOT record it with a metronome, MuseScore just finds the tempo and quantized the midi and made some pretty ok sheet music that I then edited because of how the program removes Syncopation (that's the one major annoyance). I kind of wish that the dev team would build on this and maybe incorporate an AI neural net or something to make sheet music from midi imports conform to modern notation conventions and so on.
In reply to I do usually uncheck the … by Piotr Barcz
Again, there is no such thing as "correctly" when it comes to how MIDI data is turned into notation. Every single AI algorithm that attempts to reconstruct the missing information - including the AI algorithm already built into MuseScore - will guess differently as to the best way to do it. That's just the nature of trying to use MIDI to build notation - tons and tons and tons of crucial info is missing, and a program will need to use AI to guess how to best reconstruct it. In almost all real world cases, you can expect to spend many times more work overriding the AI decisions using your own expertise than simply making the decisions yourself to begin by entering the music directly. AI technology just isn't anywhere near the level where you can expect this to go well in any but really simple cases. But sure, it's conceivably that in the coming decades this technology may mature. but consider. people have been working on this since the 1980's and it's still primitive.
In reply to Again, there is no such… by Marc Sabatella
So there is an AI algorithm in play when a midi import is made?
In reply to So there is an AI algorithm… by Piotr Barcz
Yes, certainly, that is always the case in any attempt to take something inherently incompatible with standard notation and try to turn it into readable notation. Countless decisions have to be made about to how represent rhythms, durations, enharmonic spelling, use of multiple voices and/or multiple staves, etc. Because MIDI is simply incapable of representing any of that, a computer program needs to make its own subjective decisions. That’s AI.
In reply to Yes, certainly, that is… by Marc Sabatella
You know, I just had an idea, why not have MuseScore embed text data into the midi file to tell the program on import what should be done to make the midi into notation!
In reply to You know, I just had an idea… by Piotr Barcz
And maybe the dev team could get rid of adding a non reverb control event and the channel volume control event at the beginning of the midi, it makes it a pain to get good audio without editing the file...
In reply to You know, I just had an idea… by Piotr Barcz
> "Why not have MuseScore embed text data into the midi file to tell the program on import what should be done to make the midi into notation"
Sure, we could invent a new MIDI format extension to include that information; perhaps even include some layout information. And while we're at it could probably also add styling information and whether a note should be written as a tied or not; and add a distinction between a staccato eight note or a dotted sixteenth...
... and probably just end up with the mscz format in the end...
In reply to > "Why not have MuseScore… by jeetee
Well it wouldn't be a completely new format, just simple text events. Many old midi files have simple text events chucked into the midi track. This information could be embedded when exporting a midi from MuseScore so that you can get accurate sheet music on import into MuseScore again.
In reply to Well it wouldn't be a… by Piotr Barcz
The point I'm making is that if you start adding text events to the MIDI stream (thus creating an extension of the specification) to make it contain more score information that for you it might be enough to include just note spelling (for example). But for someone else it won't be enough; because why stop there? Why not also include messages that differentiate between a staccato note or not, or identify tuplets?
And if you then do finally end up with a score-like format in hopes that whichever other software you're processing that MIDI in won't destroy it; who's to say those messages still make sense after someone/something else processed that MIDI file?
If you want to save a score, then why not save in a score format instead?
In reply to The point I'm making is that… by jeetee
Because midi files are readily available everywhere, are much more versatile and are the smallest format.
In reply to Because midi files are… by Piotr Barcz
Indeed, MIDI has that property and serves that prupse well. but its' terrible as a notation format. So simply use both formats - the right format for the right job. When you want the smallest possible file that can do playback on appropriate;ly-equipped devices, use MIDI. When you want to represent an actual score - standard musical notation - use MusicXML or MSCZ or another score format.
Just as a refrigerator is a great appliance for keeping food cold, but a terrible one for cooking an omelet. So use the appropriate appliance for the task at hand - no need to expect one tool to do both jobs.
In reply to Indeed, MIDI has that… by Marc Sabatella
Well here's the thing, with one file I could play the midi in a visualizer AND make notation without having to download two different formats that might not even be accessible.
This kind of a far shot though, it'll never work.
In reply to Because midi files are… by Piotr Barcz
But the MIDI file that are "readily available everywhere" don't include that score information currently, so your request doesn't solve that problem at all.
In reply to But the MIDI file that are … by jeetee
it could solve the problem if someone only downloaded a midi file exported from MuseScore. I've had people not know what a MuseScore project is so they send me the midi files which are sometimes a pain to import back into MuseScore which is when this text information could be useful.
In reply to it could solve the problem… by Piotr Barcz
Teach to people to either send the MuseScore file instead; or at the very least MusicXML.
If they need to share the score, then they should share a score file format, not a playback instruction format.
In reply to Teach to people to either… by jeetee
I do but sometimes it takes a few tries before the person actually understands what it is I want... either way, this is a bit of a pointless subject because it will most likely never happen...
In reply to I do but sometimes it takes… by Piotr Barcz
As mentioned, you are welcome to define your own unique extensions to the MIDI format that allow for text to describe notational details that MIDI otherwise doesn't happen. You would then also be welcome to develop your own software tools to assist you or other musicians in adding this text notation, and to contribute code to MsueScore to read those text instruments and convert them into the desired result. it's an enormous undertaking, probably at least a year for a sufficiently skilled programmer, but if it's important enough to you for you to undertake the work, no reason to believe it will never happen.
In reply to As mentioned, you are… by Marc Sabatella
And that's pretty much where the story hits a dead end, I have ideas but I definitely have none of the required skills, equipment, knowledge or anything else essential to developing them.
In reply to And that's pretty much where… by Piotr Barcz
I think it's more about using the right tool for the right job. I wouldn't use a screwdriver and an end wrench to pound in a railroad spike. Sure, I could modify them to do the job. But why bother? There are already tools that work properly.
In reply to I think it's more about… by bobjp
The question then still remains how to import MuseScore produced midi files back into the program without having notation that is screwed up
In reply to The question then still… by Piotr Barcz
The answer remains the same as from the very beginning: MIDI was never ever meant for notation. it's completely incapable of doing the job. If the score was in MuseScore once and was readable, feel free to export to MIDI all you want and use that file for whatever other purposes you want. But if you want the see the original notation, simply re-open the original score, don't open the MIDI file in MuseScore.
Having a score in MuseScore, exporting to MIDI, and then opening the MIDI file but expecting to see something that looks as good as the original is completely nonsensical. It's about the same as having a cake, taking a picture of it, then later eating the picture and wondering why it doesn't taste as good as the cake did. The picture isn't the cake, and the MIDI isn't the score.
In reply to The answer remains the same… by Marc Sabatella
Alright, for the sake of ending this ridiculous thread I love the cake analogy.
In reply to You know, I just had an idea… by Piotr Barcz
MuseScore could certainly invent a format for this add that info to any MIDI file it exports, but it won't help on a MIDi file you created through other means, unless you insert that information into the file yourself. So maybe a good starting place would be, you could make a formal proposal for a new format describing what that info might look like, then implement your own software to create that info. And then if it catches on, no doubt MuseScore would end up supporting it as well.
In reply to MuseScore could certainly… by Marc Sabatella
Like I said, no need for a new midi format, just text events in the midi string. As for making the events, yeah, there would have to be either a software to do it or some really simple text that you could put in for the basic information. I definitely don't have programming skills of any kind so making the program myself is out of the question... I might make a formal proposal as you suggested though.