Re: Issues with Intel Macs and writing MIDI files from MusicSequence
Re: Issues with Intel Macs and writing MIDI files from MusicSequence
- Subject: Re: Issues with Intel Macs and writing MIDI files from MusicSequence
- From: Dan Grover <email@hidden>
- Date: Sat, 9 Dec 2006 23:51:26 -0500
Hi all,
Ian O'Keefe posted a while back about a problem with
MusicSequenceSaveSMF writing data with the wrong endianness (i.e. it
writes those bytes in native endianness, not explicitly big endian as
the file spec says).
I went about writing a quick fix -- just reopen the file and swap the
endianness of the parts that need swapping, and succeeded (as my app
writes pretty simple midi files).
But *then* I found three bytes where it *isn't* an issue of
endianness, but rather, it just writes 0's on Intel!
Here are two files exported from my app (SimpleChord): the intel
(invalid) version and ppc (valid, playable) of the chords to "The
Last Supper" from Jesus Christ Superstar. Also, an almost-fixed
version of the intel export.
http://www.wonderwarp.com/files/lastsupper_ppc.mid
http://www.wonderwarp.com/files/lastsupper_intel.mid
http://www.wonderwarp.com/files/lastsupper_almostfixed.mid
The offending three bytes that differ begin at offset 26. In the PPC
version, they're 0b 71 b0, but in the Intel version, they're just 00
00 00.
As a novice, I'm not intimately familiar with the MIDI file format,
or any kind of binary format, but it appears to be in the first
track, where there's just meta stuff.
Any ideas? If this isn't fixed, what would be a good solution to
write MIDI files on the mac? Since it's simple, maybe I oughtta just
roll my own code to write them. My customers really want a universal
binary!
Thanks!
Dan Grover
Wonder Warp Software
www.wonderwarp.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden