From: Tim E. R. <ter...@ro...> - 2011-10-24 20:17:45
|
Whew! This was a tough one. Some freakin' weird timing issue in MidiFile::write() Possibly revealed some fundamental flaw with MidiFileTrack or MPEvent? If you are interested, please see the ChangeLog and comments in MusE::exportMidi() and MidiFile::write() Also some not fully understood useage of meta 0x0F/0x01 text events in MusE::exportMidi(). Hopefully correct... Tested OK many times with files exporting to SMF 0 and 1. Tim. > > 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. > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > Lmuse-developer mailing list > Lmu...@li... > https://lists.sourceforge.net/lists/listinfo/lmuse-developer > |