- KDT1 (Suikoden 2, Silent Hill, etc.) to MIDI converter (Python script) by Nisto at 5:36 PM EDT on October 24, 2015
- Just finished writing a basic converter for Konami's sequenced format "KDT1", used in many of their PS1 and PS2 games.
EDIT: now on Github: https://github.com/Nisto/kdt-tool
Usage should be simple. Provided you're on Windows with a typical Python 3 installation done with the MSI installer, you should be able to just drop a .KDT file onto the script to convert the file. For command-line users, it should be self-explanatory; supply the path to a .KDT file as the first argument.
A quick warning: for some reason, a lot of the files I've tried converting (e.g. C.KDT from SH1) unfortunately doesn't play correctly in foobar2000 and Renoise, and there's probably other programs with similar issues. However, Reason and (according to mrjaredbeta) Fruity Loops should both play them as expected. It's my first time working with MIDI data, so it may well be that it's me doing something wrong here. Therefore, I'd really appreciate it if someone more experienced could have a look at the code and tell me if anything needs fixing.
I haven't actually tested it with Suikoden 2 yet. But I wanted to mention that if anyone does try it with that or any game other than SH1, and the tempo seems off, see if changing line 135 to bpm = self.cmdarg & 0x7F fixes it.
As for soundfonts -- VGMTrans can convert VABs to SF2, which is supported by foobar2000, Reason and lots of other programs. That's all I know personally. If anyone knows if there's anything that converts SCEIVers banks to soundfonts, I'd love to know.
Please post feedback, fixes, questions, whatever. Would also appreciate more reports on the compatibility with players that support MIDI.
edited 4:35 PM EDT October 25, 2015
- by mrjaredbeta at 12:22 PM EDT on October 25, 2015
- I'm trying to use the Python script through command-line but it is giving me syntax errors. How exactly do you use it? I type in "py kdt-tool-v2.py" and the path to the .KDT file but I guess I'm doing something wrong.
- by hcs at 12:40 PM EDT on October 25, 2015
- IPFS mirror: kdt-tool-v2.py
(though github is probably a better place for this)
- by mrjaredbeta at 12:58 PM EDT on October 25, 2015
- Oops nevermind, I just had to install Python 3. I just converted the C.KDT and it still seems to work perfectly in FL. Thank you so much for this.
- by Nisto at 1:41 PM EDT on October 25, 2015
- Cool, thanks for the feedback mrjaredbeta. I assumed it would since you said the preliminary conversion I did by hand played fine. Just curious if any other players are having issues.
hcs, thanks again for mirroring. Yeah I've been thinking a lot about hosting my stuff on Github. I signed up quite a while ago and certainly have been using my account, but I never got around to posting much besides a couple of gists for demonstrating some things. How do I create a standard project page, and how do I post/update stuff on it? Sorry about the noob-ish questions. I have no idea how pushing/pulling and all that stuff works, and in general, I'm not familiar with the git protocol. Is there a user-friendly way that doesn't require knowing all the ins and outs of git? Would love to start posting projects on Github, but never could be arsed to figure it all out. Thanks.
edited 2:09 PM EDT October 25, 2015
- by punk7890-2 at 2:58 PM EDT on October 25, 2015
- Nice work Nisto! You wouldn't happen to know if Zone of the Enders: The 2nd Runner uses the same format for sequences/sample data would you? I've tried my luck with simple PSF2 creation tools but nothing.
- by hcs at 3:23 PM EDT on October 25, 2015
- Nisto: You really just have to create a repository and put some files in it, you can do all this right from the web site. Create a new repo, make sure you select the checkbox to make it initialize the repo with a README.md.
When you have a repo there is a + link with the tooltip "Create a new file here", like if you have newrepo it will appear as "newrepo / +" above the file list (which will only have README.md initially).
Then you can just paste it in as you would with a gist. And you can edit files by clicking them and then clicking the pencil to edit it, leaving a commit message describing the change.
You can edit the README.md to write up a description of the project that will show up when someone initially goes to the repo page.
For this project it might be a good idea to first put in the first version of kdt-tool.py that you had written before, then edit the file and drop in the new v2 code. This way you can have some history showing how the project developed.
It wouldn't hurt to run through the GitHub Bootcamp exercises, though, to learn how to use git locally. It can be really helpful for tracking changes locally, as well.
edited 3:27 PM EDT October 25, 2015
- by Nisto at 4:01 PM EDT on October 25, 2015
- Ah great. I was giving it a try before you replied and initially didn't create the repository with a README, so I kept getting prompted to run some git commands and wasn't able to even view the repository. So started over from scratch with a README file and now I can view it and add files and everything. Well, this is pretty cool. Thanks hcs. I did as you suggested with the old/new code. Here's the Github project page: https://github.com/Nisto/kdt-tool
punk7890-2: I don't have that game at hand, but I can try to have a look at some point. Can you try opening the disk image in a hex editor (such as HxD) and searching for "KDT1" or "KDT2"? Or have you done that already?
edited 4:24 PM EDT October 25, 2015
- by punk7890-2 at 4:34 PM EDT on October 25, 2015
- Hmm, I didn't find any KDT1 or KDT2's but I did find a bunch of KDT's that may or may not be them. How should I go about extracting them or testing if it is them?
- by Nisto at 3:09 AM EDT on October 26, 2015
- I don't think what you found are actual headers. But I've had a look at the files now, and I can't verify myself if it has any KDT data. My guess is that the data is compressed. There's lots of signs in the main executable of zlib being used, but I don't know where, or for what exactly. If there was any way to decompress(?) module.ipk you may at least be able to tell if there's a KDT driver hiding. I didn't see any signs of a driver in the main executable at least, but it could very likely be in a module, as it is in Silent Hill 2.
HCS Forum Index
Go to Page 0 1
Search this thread
Show all threads
Reply to this thread:
Halley's Comet Software