Midi import proposal

• Jan 29, 2012 - 19:52

I've been thinking about ways to improve Musescore's midi import. One of the big problems is that the parameter “time division” in the midi header usually doesn't have much (if any) relation to where beats and measure bars need to be located.

Here is a Musescore import of a midi of Fats Waller's tune “Ain't Misbehavin.” As you can see, the result is pretty much useless. However, here is the pianoroll of the midi import. It was satisfactory, but the measure bars and beat locations are not correct.

I wrote a demonstration of a method that could be used to identify measures and beats, and assign notes to their (approximate) correct locations within measures.

Here is the opening screen of the example after a midi name of a file for import has been given. Clicking on the “Create” button results in this display , similar to Musescore's pianoroll image of the midi import. A button to assign the location of the opening measure is shown. Clicking on that button, then on a note at the beginning of the opening measure assigns the first measure to that location . In the example, two options are presented for assigning the start of a succeeding measure, either the beginning of the second measure or the beginning of the fourth measure. In the example the latter option was chosen and a bar created in the display to show that result . A new button appeared, “Do Measures.” Pressing this button generates the definitions of the measures and beats.

The measure bars and beat locations can be moved as is shown in this image where a beat bar is shown selected. The last image shows the selected beat bar in an improved location.

The next step, which I haven't shown by example, is to quantize (round) the beginnings and endings of the notes and assign them values.

I wrote this demonstration in Lazarus, but much of the “machinery” for implementing this proposal already exists in Musescore. I leave it to others to pick up on the idea if it warrants merit.


Newbe talking...I think MuseScore is terrific (esp for free!), but I do have limited music ability. However, I can play a few notes of my tune and seeing them "printed" appears to help. With some difficulty I can play them back, although I have to unplug one MIDI lead. This is rather odd and time-consuming, not to mention the wear on the connectors.
[my MIDI touch-sensitive, piano-keyboard goes into a converter to USB - 5-pin MIDI is almost unheard of with 21c PC's].

The OP touched on this:-
MuseScore(MIDI-in) doesn't appear to allow "Duration" other than one selected (in the program). So the tune comes out with all note the same. I wonder if I'm not using MuseScore correctly - OR - can this be fixed, so a MIDI-input prints the played note-lengths?

I'll accept this may be my lack of understanding beats/measures etc. but (dare I say it here?), I don't care where the bars start, or finish - I don't really read music, so my scores tells me only if the next note is higher, or lower. Obviously it's nice to see it printed properly, but entering the "note duration" by hand means I need to know what I'm doing.....whereas if I can play it - I can hear when its right.
I rather hoped the software would correct (Quantise?) my playing.

[ I do find it frustrating when hand-entering notes - The program inserts "Rests" which I can't erase easily, so I end up with a gaggle of notes AND a Rest -or- it pushes any extra notes into the next Bar, rather than removing a Rest I didn't ask for...]

I have created some scores in MuseScore and they do print out rather well (thank-you). I want to add another instrument (say strings) to the piano (or harpsichord) - so I rewind the play-point and try to input my MIDI-notes . . . . but I don't think it's possible because the MIDI playback appears to lag. - - - - In fact, it's a bit of a nightmare.

I revisited to Tutorial No4 today, but I really need a longer session.
- and maybe a little help from those "in the know"
Also, I suspect MuseScore MIDI input doesn't like these USB adaptors. Thus the Keyboard can't playback at the same time the program accepts the play-input. I wonder if playing the music on the computer (soundcard) fixes this, if a delay can be inserted (under user control) so as to match-up the delay - er, so it works out correctly....?

In the past I've used other music programs*, usually as Piano-roll mode, but they don't permit having them as overlays, with the new notes (e.g. in RED?). I don't recall MuseScore does either, so some instruction on "adding another instrument" would be most welcome.
Don't ask me what key its in ( I select C ) - I avoid those notes that sound nasty.
And the Time-signature is a bit of a mystery as well.

Might I suggest a Forum section. for Learning Music? - maybe starting with simple Nursery Rhymes, which we all know rather well. ( maybe not outside Britain/America/Canada/Australia.)....then we could progress to... Fur Else...
. . . . . This would help getting round the Basics of the program as well . . . . .

Sorry, It's getting rather confusinig.

*Evolution Audio - somewhat basic
*Samplitude - too much information!

In reply to by harold-harmony

It siunds to me as if you do not have your MIDI system set up properly, and, (this is just a guess), you may have MIDI thru enabled, which can set up a MIDI loop, making the system unusable. Disable MIDI thru and see if that helps.

In reply to by xavierjazz

Thanks for the suggestions, but MIDI Thru is not possible IMHO, as there is no such connector on Organ-Keyboard, or the USB-MIDI adaptor.
I believe others have commented on this and the OP was looking for a software fix....the issue appears to be that the MIDI-stream is not providing the right informatio for Muscore - however, I suspect it's the other way round - that Muscore was developed without MIDI in mind and now can't match-up.
It's a great pity as beiing able to print the score is one way of learning about Notation (well that's if I continue that long).

Marc Sabatela
u suggest why Muscore put in rests - but my complain was that it creates another bar while leaving the Rest in an "unfinished" bar (or should that be "Measure"). It's possible the next-note is "too long", however, I really don't care (ie computer will Fix it), but by leaving the Rest in place, when playing-back the music stalls briefly . . .which can't be right.

In reply to by harold-harmony

Regarding rests, you'll have to post a specific example and specific steps in order for me to understand what you mean. Again, MuseScore,s behavior with respect to rests is normally musically correct, and it would not create rests in any measure but the one you are entering notes into, and it would only create as many rests as were musically necessary. It is possible your unfamiliarity with music notation is causing you to perceive something as a problem that isn't, but it's also possible your score has become corrupt and that is why rests are appearing in the next measure. Again, no way to tell without a sample score and steps to reproduce.

As for MIDI input, MuseScore does not real time MIDI input, only step time - meaning you have to change durations manually. It,s the more efficient and less error prone way of working if you read music. But if you meed to get something from a real time performance, the way to do it is to record the performance using a MIDI sequencer, then import the resulting MIDi file into MuseScore.

In reply to by harold-harmony

may actually be enabled through the MIDI out port. I was referring to a switch in the instrument which will control how MIDI is directed. I don't know the instrument so this may indeed be inapplicable.

In reply to by harold-harmony

The rules of music notation require each measure to have the number of beats specified by the time signature. Your music starts out with all rests. Any time you add a note, it takes that value away from the rest that was there, and leaves the remaining value in rests. You aren't supposed to to delete those rests - that would be incorrect notation. If you want to enter more notes, just enter them - no need to delete the rests first.

Thanks guys for yr help, on reflection I need to learn Notation, which is sadly somewhat down on a v.long list. Before that I have a stringed Viola and Cello to make (but not as you'd recognise), for use in film-scores.

That Musescore doesn't accept full-MIDI is a big issue with my present ability, so I guess I have to look to Sequencer software - piano-roll being my most successful, but that only deals with one instrument at a time, so it's difficult to "play-along" to an existing track. Musescore introduces considerable latency in MIDI-mode (for me!) and lacks a "Test-tune" that might make changes easier.
+ If you intend to increase the scope of Musescore and MIDI, might I suggest you look at a Piano-roll* input which can be stacked (in different colours) so the cuurrent track is "on top" but you can see what's below. As a suggestion to remove latency issues:- IMHO a simple solution is to have two timelines....one in bold being the tune as heard (so you accompany this) and an earlier one which is the MIDI playback-point - if the User can change the distance between these (to suit their MIDI set-up) they "should" be able to listen to the music and "Play-along" aparently "in step". Thus you've solved the inherent delays MIDI creates. Store these "piano-roll" files for each instrument, then any latency errors could be "tweaked" later, before importing the parts into Musescore. ((There may be more than one MIDI instrument connected!))
As a bonus, it would be nice if Muscore warned users if these instrument starts are "out of sync", but I suspect real musicians would ignore any print-error and play only when the conductor jumped.

Once again, many thanks - and I wish you success in future.

PS * Piano-roll (previous writen ..(. R.Edwards, (29 Jan 2012))
Not sure I understood, ...but it appears that your piano-roll idea was "nearly" OK, except time-errors between instrument parts perhaps?.
There are two issues here, both familiar to filmaking: 1), the overall duration (of each clip) and 2), the speed.
Normally changing one affects the other. . The Ans. is to have two fixes: 1) allows the video track to be stretched and 2), alows more space between events - this should be easy, since the piano-roll events have a start and finish. By adding tiny spaces the overall length can be changed without lengthening the notes.
((Chosing solution 1), or 2), depends on the "fix" needed.))
Ah but you say this would crash the computer.-
+The Video-answer to this is to "Render" the material. The computer looks at all the info, changes, timings, etc and creates a "Fair Copy" (leaving the original As-Is. ). This take some minutes to complete (have a cup of Tea).
Now, you'll have a piano-roll that is corrected and whilst you can change it, -only "brutal changes" apply: - Copy, Cut, Paste, Etc. If you need to adjust timing you'd go back to rebuild/Piano-Roll. It would be useful to allow Users to write Timing Notes (presetrs). so if a fix-works they can use the same settings when Rendering the next session.
- A further modification, might be to include a "velocity track" - this is a line, set at 100% so the computer Renders what it sees. However, you can al;ter each velocity track (throughout the tune) so instruments could move their timing - this is getting a bit advanced, but would create some interesting opportunities. In the past, with Paper Scores you'd have to write notes (eg "Cymbal a bit earlier, here").
By introducing the comcept of "Rendering" even a modest laptop PC can perform wonders - like 20x its power . . . . the downside being the Rendering Time . . . but for complicated software issues, there is no alternative.
- Sudenly makes possible amazing concepts like linking external "events" to the score, detonating fireworks where the detonation delays will vary (e.g a rockets need 2+ seconds before it can disply its contents) -and I suggest it's worth considering as a companion to Musescore . . . call it Midiscore, if that doesn't infringe copyright.
+++Whilst I'm on this, there is another feature that might appeal to musicians - a Key-track. This would normally be a long straight line representing the key, but by moving it up/down you could change the key of a section of the music (don't know if it might be "all-tracks") - thus musicians could change the key for one instrument, or shift the whole thing for effect, before returning to the original. I don't think this can be done any other way - Rendering is a very-powerful concept allowing the Computer has to work out each note and how it fits, etc.... whilst you have a few beers.
You've probably already though "let's have Volume tracks and Stereo-image" - so the strength and placement of instruments can be changed through the performance. For most sequencers, I've seen these settings are 1-time and can't change. By usinig the Velocity-track concept, - Now you can.
You read it here, first.

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