The Eat at Joe's Kawai K5000 Message Board Digest The KA1 File Format ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ Understanding KA1 Files And Identifying Corrupt Ones Monday, 06-Apr-98 11:05:22 194.172.230.108 writes: I suppose that some readers of this board are interested in processing or generating patch files in the K5000-specific "KA1" format with their own software. I think I found out how this format is defined, and it is very simple. But I cannot give any guarantee that the following information is correct, so use it at your own risk! The KA1 patch file format is identical with the "ADD tone data" contained in the sys-ex patch dump format. This is described in chapter 3.1.1.b of the MIDI implementation that comes with the K5000 manual. - That's all. With this, you can conclude the tone structure from the file size. You can also detect if the file size was changed by an erroneous transfer, because only the listed sizes are valid: File Size Number Of Sources 254 bytes 2 PCM 340 bytes 3 PCM 426 bytes 4 PCM 512 bytes 5 PCM 598 bytes 6 PCM 1060 bytes 1 PCM + 1 ADD 1146 bytes 2 PCM + 1 ADD 1232 bytes 3 PCM + 1 ADD 1318 bytes 4 PCM + 1 ADD 1404 bytes 5 PCM + 1 ADD 1866 bytes 2 ADD 1952 bytes 1 PCM + 2 ADD 2038 bytes 2 PCM + 2 ADD 2124 bytes 3 PCM + 2 ADD 2210 bytes 4 PCM + 2 ADD 2758 bytes 3 ADD 2844 bytes 1 PCM + 3 ADD 2930 bytes 2 PCM + 3 ADD 3016 bytes 3 PCM + 3 ADD 3650 bytes 4 ADD 3736 bytes 1 PCM + 4 ADD 3822 bytes 2 PCM + 4 ADD 4542 bytes 5 ADD 4628 bytes 1 PCM + 5 ADD 5434 bytes 6 ADD Jens Groh ------------------------------------------------------------------------------------------ Re: Understanding KA1 Files And Identifying Corrupt Ones Wednesday, 08-Apr-98 13:31:45 192.86.155.104 writes: Does this mean all you have to do to convert KA1 files to SYX files is change the file extension, or is there some kind of header for either of these formats. This would be useful for importing KA1 files directly into Sound Diver. If it's a matter of more than just changing the file extension then one of us should write a conversion utility. -Kenji ------------------------------------------------------------------------------------------ Re: Re: Understanding KA1 Files And Identifying Corrupt Ones Thursday, 09-Apr-98 05:04:43 194.172.230.108 writes: I don't know what a SYX file contains and what not, but a sysex MIDI message has to have a header before the data that tells the receiving device what kind of data the message carries. Something like this: " Sytem exclusive / Hello devices listening on channel 4 / This is a Kawai message / It's for a K5000 series synthesizer / This is a bank A single source dump / It's meant to be stored to patch # 42 / The data... / End " The KA1 file contains only the data. Jens Groh ------------------------------------------------------------------------------------------ Re: Understanding KA1 Files And Identifying Corrupt Ones Friday, 10-Apr-98 15:42:11 130.67.2.181 writes: It looks like I have wasted some time debugging .KA1 files. At any rate, the version 2.0 MIDI specification that I have corresponds with the .KA1 file layout as far as I am able to check it. Tore tl001@online.no ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ Sysex and KA1 Saturday, 18-Apr-98 04:04:16 153.37.15.26 writes: Whew....it's been quiet around here lately! There is a difference between the SYX and KA1 formats. The sysex file format adds a small header at the beginning of the file and a trailing byte as explained in the midi specs for the K5000. If you want to convert a KA1 file to SYX you just add this to the beginning (these are only the bytes for bank A, slot 1): F0 40 00 20 00 0A 00 00 00 and this to the end: F7 Those values are in hexidecimal. I'll probably write a conversion utility this weekend. That way people can convert KA1 files and import them straight into Sound Diver as SYX files. I already tried this by adding the bytes manually and it works. I really think it was pretty dorky of emagic to not allow for the importing of KA1 files in Sound Diver. It's all in the specs, and as you can see there really isn't much to it! -Kenji ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------