Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIDI import: the step to a new level #1059

Merged
merged 279 commits into from Jul 30, 2014
Merged

Conversation

trig-ger
Copy link
Contributor

This major update brings several improvements to the MIDI import:

Raw result, without adjustment - to compare:
https://drive.google.com/file/d/0B5alKuFoSol2OVdMVTNJNmdNX0E/edit?usp=sharing
MIDI - https://drive.google.com/file/d/0B5alKuFoSol2X0xXYndnMnpVLTQ/edit?usp=sharing

./mscore midi_file.mid -M option_file.xml -o score.mscz

Script to start tests:
https://gist.github.com/trig-ger/d9cf0810abcb350e55d1
For this script in mscore directory I created midi/basic/ directory for basic testing and options/ directory to put options into. For massive testing I splitted the whole collection into 7 parts to test them in parallel in 7 processes, and for each part there was a separate script with the corresponding subdir value.
So each MIDI file is imported with all option cases in options/ dir. The ideal number of passed tests would be ~12000 * number_of_options.

Example of xml option files:
https://drive.google.com/file/d/0B5alKuFoSol2QmlfS1dOWGRJQ1U/edit?usp=sharing

  • Original note on time values that are stored for further possible usage
  • Lots of bugfixes

Beat detection is implemented with the help of Beatroot library by Simon Dixon, GNU GPL v2.

@@ -467,7 +467,7 @@ TDuration& TDuration::operator+=(const TDuration& t)
// toDurationList
//---------------------------------------------------------

QList<TDuration> toDurationList(Fraction l, bool useDots, int maxDots)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the addition of printRestRemains is a remaining of debug? If yes, can you remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for the main code. I use this function also to estimate the count of shown musical durations of some given duration during the analysis, in that case there is no need to print any debug output because some intermediate durations can't be fully representable in music notes anyway.
So, this change was intended, in a separate commit: 7c577e8
Is that fine?

lasconic added a commit that referenced this pull request Jul 30, 2014
MIDI import: the step to a new level
@lasconic lasconic merged commit e7e9d9f into musescore:master Jul 30, 2014
@trig-ger trig-ger deleted the midi_import branch July 30, 2014 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants