From: Tim E. R. <ter...@ro...> - 2011-10-17 16:40:51
|
> Hi Tim, > > 2011/10/17 Tim E. Real <ter...@ro...> > > > Fixing Bug 3293339: > > > > Hi folks, hi Robert. > > > > I removed the erroneous 2 bytes and still had problems like you too. > > > > Other programs will now load the file, but there are no notes and no > > track name etc. Worse, MusE will re-import it as two blank tracks. > > > > In midifile.cpp MidiFile::writeEvent() there is this comment: > > > > // we dont save meta data into smf type 0 files: > > if (MusEGlobal::config.smfFormat == 0 && nstat == ME_META) > > return; > > > > Apparently that's not true. According to one of my trusty sources: > > http://www.sonicspot.com/guide/midifiles.html > > > > Guess what? I removed those two lines and presto. > > Now other programs load it fine, and MusE re-imports it fine. > > Track name, notes all there. > > > > Cool! > > > > > > It remains to be seen whether any other unusual user-added > > meta events might cause problems, but it seems that most > > are OK to use in smf 0 files. > > > > Anyone against including meta events in smf 0 (single track) export? > > > > I have no idea why it was done like that in the exporter... It seems to me > it should be ok to use most meta events, even needed.. > so I think it's safe to fix. > > Regards, > Robert > OK thanks. Yes, possibly the reason no notes were displayed is that some metas may be required. I think I may add small dialog box prompting user to select which track (only if there are multiple muse tracks) the smf 0 exporter grabs the single track name and comment etc. from. Because currently it just arbitrarily grabs that info from the last track which happens to be in the track list. So having a muse Track 1 and Track 2, the exporter creates a track named Track 2, having Track 2's comment etc. I think channel too... Tim. |