CoderLine / alphaTab

alphaTab is a cross platform music notation and guitar tablature rendering library.
http://www.alphatab.net
Mozilla Public License 2.0
1.23k stars 199 forks source link

Import MIDI files? #150

Open extraPaul opened 7 years ago

extraPaul commented 7 years ago

Your environment

Expected Results

A new Importer to open MIDI files.

Observed Results

Currently, alphaTab supports MusicXML and GuitarPro files imports. AlphaTab can create MIDI files and read them to generate sound, but it cannot import existing MIDI files.

Possible Solution

I'm willing to contribute to this repository and help implement this feature.

Danielku15 commented 7 years ago

In theory it should be possible to import general MIDI formatted files. There seveal challenges to overcome:

I'd be happy if you want to contribute this feature to alphaTab. Feel free to fork this repository and give it a try.

nascent commented 6 years ago

I would like this, it's not clear from the website whether this feature is available since many standalone programs never get the import right, to do this on the web would be a major accomplishment.

Danielku15 commented 6 years ago

You need to understand that midi only contains note playback information over time, no real music notation details. From a given list of played note heights and durations libraries need to try to derive possible notes that result in the same playback. Usually fhe playback matches quite good but it is rarely how people would actually play the song on their instuments.

There are a lot better formats to store music sheet information, thats mainly why this feature is currently low priority.

nascent commented 6 years ago

I understand where you are coming from on this, it's just that for music that is composed in a DAW, i.e. Cubase, it would be great to be able to just update a MIDI file and have it displayed in the manner of AlphaTab.

Saying that, I will be looking at Guitar Pro as an intermediate format since it (Guitar Pro) has educational pricing, and as well another program called Forte is the only application I have found that does not mess with the MIDI data that Cubase outputs.

MusicXML on the other hand often crashes my DAW's (windows) at least, so if this works it will be a great help.

All the best

hd-i commented 4 years ago

Method MidiFileGenerator.GenerateMidiFile( score ) doesn't work correctly. Created midi file cannot run with media players. Please test your method with these guitar pro files. I created a repo and upload two files there.

https://github.com/daaneshfar/GuitarProSampleFiles

Danielku15 commented 4 years ago

@daaneshfar This issue is about the feature request to support midi files as input for alphaTab to display them as music notation. If you have some dedicated findings on the generated midi files please open a new bug report following the template. This will help reproducing the concrete issues you are facing.

Just as a small note on the your request: Please note that midi files are not just like any other media file like mp3s. Not all media players support playing midi out of the box.