Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sounds not identified or converted #25

Open
gingerbeardman opened this issue May 19, 2024 · 4 comments
Open

Sounds not identified or converted #25

gingerbeardman opened this issue May 19, 2024 · 4 comments

Comments

@gingerbeardman
Copy link

http://discmaster.textfiles.com/browse/661/FM%20Towns%20Free%20Software%20Collection%206.iso/gear/gakumon/rekishi/h_onsei

@Sembiance
Copy link
Owner

Hrm, not sure what sound formats these are, latest dexvert doesn't handle them either.
Doesn't apear to have any magic strings to help identify the file. Looks like the first 8 bytes are a zero terminated filename. Then some bytes differ per file.
Using sox and treating the data as raw audio with various bitrates/signed/channels I can hear the audio, but a lot of static because there are likely some extra data in there.
Someone would need to reverse engineer the format more or come up with a sox command that can convert it properly.
This would be worthwhile to do if this was a common FM-Towns format that would appear lots of different places, but if it's specific to just these 24 or so .snd files, less useful.
I should probably see if I can find some FM-Towns developer docs or something to see if there were common sound file formats for the system.

@gingerbeardman
Copy link
Author

gingerbeardman commented May 22, 2024

Ah, I assumed wrongly that they would be known by the file extension. My bad.

I can't say how widely FM-Towns sound files can be found

@Sembiance
Copy link
Owner

Sembiance commented May 23, 2024

I really appreciate you submitting the initial report :)

I looked into this a bit more and found a page that describes the format a bit (https://wiki.multimedia.cx/index.php/FM_TOWNS_SND) and it linked to some code.

It does appear to be a common 'FM-TOWNS SND' file format, so it's worth adding support for.

Using this info, dexvert now properly 'identifies' these sound files and thus discmaster 2 will properly detect them and you'll be able to search for them specifically.

However dexvert can not yet convert them. I was able to get them to 'kinda' convert using SOX by grabbing the rate from the header, multiply by 1000, divide by 98 and then skip the first 32 bytes header and convert the rest as raw 8-bit mono PCM data, but I get a lot of static/distortion s2.wav.zip

The attached ggxsnd-0.8.1.tar.gz code in theory can load and play these files. By examining the code, someone could figure out how the data is structured and a converter could be coded. Sadly I don't know much of anything about sound, so that unfortunately won't be me.

So dexvert now detects them and if any time in the future a converter is available, I'll add it to dexvert and then discmaster 2 will be able to re-process them and convert them.

I'll leave this bug open just in case anyone ever decides to dig into the attached code and figure out how to properly convert these to WAV/PCM.

@gingerbeardman
Copy link
Author

Sounds good (sorry, bad pun)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants