MakeMusic
SmartMusic Finale Garritan MusicXML

Steps or Ways to Convert MusicXML file to MIDI file!

Moderator: Michael Good

Steps or Ways to Convert MusicXML file to MIDI file!

Postby Bryanation » Wed Mar 18, 2015 7:00 am

Hi! I'm doing a thesis that deals with the conversion of MusicXML file to MIDI file. I am completely lost on how to do it. Can anyone help? Thanks alot. :D :D
Bryanation
 
Posts: 5
Joined: March, 2015
Reputation: 0

Re: Steps or Ways to Convert MusicXML file to MIDI file!

Postby Mogens Lundholm » Wed Mar 18, 2015 4:43 pm

My basic principle is:
The Music Xml file is divided in parts. The Midi-file is divided in tracks (format 1). Each part in Music Xml becomes a Midi track.
My program has a state machine, which reads the Music Xml file and saves data in a array with an element for every time division. This array called NoteInfo. Each element in NoteInfo is a record/structure of three sets. One set of notes to start at this time division (NoteOn), one set of notes to stop at this time division (NoteOff) and one set for notes to continue (NoteContinue). All notes has a duration value, but can be tied - then the note is added to the continue-set and prolonged later when the tied note continues.

When the whole file is read into NoteInfo, then the data in NoteInfo is processed into Midi-events.

Midi-events come with a delay called Delta. When a note is in the NoteOff-set the Midi-event NoteOff will be generated with a delta corresponding the the number of time divisions since last event. When a note is in the NoteOn-set the Midi-event NoteOn will be generated with a delta corresponding the the number of time divisions since last event.

Of cause thing are more complicated - ties may have no end - there are grace notes and arpeggiata. A short pause must be generated between notes and the note shortened accordingly etc.. But the basic principle is the above.

I am working on a programming manual.
Mogens Lundholm
 
Posts: 60
Joined: March, 2014
Reputation: 0

Re: Steps or Ways to Convert MusicXML file to MIDI file!

Postby Michael Good » Wed Mar 18, 2015 6:05 pm

Mogens provides a good outline about how to write your own MusicXML to MIDI converter. If you just need to convert MusicXML files to MIDI for your thesis, and don't need to write your own software, there are lots of programs that can do this for you, including Finale, Sibelius, MuseScore, and many many more.
Michael Good
VP of MusicXML Technologies
MakeMusic, Inc.
User avatar
Michael Good
 
Posts: 2197
Joined: March, 2014
Reputation: 0

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron