Sonic and Sega Retro Message Board: S3&K Collection (PC) HQ music hack [upd v1.3] - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

S3&K Collection (PC) HQ music hack [upd v1.3] Not music itself, but a hack enabling HQ music inside the game

#61 User is offline nineko 

Posted 25 April 2011 - 03:48 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
Azu: short answer: no. Just open SONIC3K.DS2 in Goldwave as a raw pcm file (22050Hz, 8 bit, mono) to find out what's going on.
The sound format (sample rate, bit depth, channels) isn't specified in that mini-header, there are only the file lengths in there, all the sound effects must be 22050Hz, 8 bit, mono, unless someone alters the exe file.

I'm already working on a pcm importer/exporter by the way, it should be ready in a couple of hours, stay tuned.

EDIT: also suggesting a split since I don't like to derail this music thread with discussions about sfxs.
This post has been edited by nineko: 25 April 2011 - 03:53 PM

#62 User is offline angryzor 

Posted 25 April 2011 - 04:16 PM

  • Posts: 27
  • Joined: 14-April 11
  • Gender:Male
  • Project:S&KC HQ Music
Just had a quick look and @file offset 0xa47c of sonic3k.exe is a 1 byte value that selects the sampling freq:

0x00 = 11025Hz
0x04 = 22050Hz
0x08 = 32000Hz
0x0C = 44100Hz

#63 User is offline nineko 

Posted 25 April 2011 - 04:36 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
angryzor, when will you stop being so awesome? :O

#64 User is offline MainMemory 

Posted 25 April 2011 - 05:39 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2683
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
That's one of the parameters for the function I looked at to figure out the format.

Also late, but I've found a library that should let me convert pcm <-> wav.

#65 User is offline angryzor 

Posted 25 April 2011 - 05:47 PM

  • Posts: 27
  • Joined: 14-April 11
  • Gender:Male
  • Project:S&KC HQ Music
QUOTE (nineko @ Apr 25 2011, 11:36 PM)
angryzor, when will you stop being so awesome? :O

Never! specialed.png

QUOTE (MainMemory @ Apr 26 2011, 12:39 AM)
That's one of the parameters for the function I looked at to figure out the format.

Also late, but I've found a library that should let me convert pcm <-> wav.

... as far as I know, WAV is PCM with a small header attached.

#66 User is offline MainMemory 

Posted 25 April 2011 - 05:59 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2683
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Not all wav files are 8-bit unsigned 22050Hz Mono. This library can convert them.

#67 User is offline nineko 

Posted 25 April 2011 - 06:00 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
Have a first version of Sonic & Knuckles Collection Sound Replacer smile.png


after I imported a file

I wrote it in a couple of hours (literally!) so it might have some bugs, but it seems to work fine.
Remember, all edits are cached, which means that you can import 9000 sound effects but they won't be effective until you click on "save", and you can discard all the changes by clicking on "revert".
It can read a description file which must be named "sonic3k.txt" and must be placed in the same folder as sonic3k.ds2; if it doesn't exist (or is incomplete) then the sound effects won't have a name in the list. Note that sfx 1 in the sound test doesn't seem to exist so be careful when you label them. The format of this txt is simple: number, "description" (one entry per row)

Have fun smile.png

EDIT: fixed a small bug. Redownload if you downloaded it before I wrote this line. Also forgot to mention that I open the file for exclusive access, so if you run Sonic & Knuckles Collection while my program is still running you won't hear any sound. You have to close my program first, and run Sonic & Knuckles Collection afterwards.
I also advise you to make a backup of the original SONIC3K.DS2 (not that it's hard to retrieve it on the internet, but still). Nothing should go wrong, but don't blame me if your SONIC3K.DS2 magically disappears and you don't know how to restore it v.png

EDIT2: updated the pics
This post has been edited by nineko: 25 April 2011 - 06:46 PM

#68 User is offline Tanks 

Posted 25 April 2011 - 06:33 PM

  • They call me... Troll-bo Cop.
  • Posts: 685
  • Joined: 01-July 06
  • Gender:Male
  • Location:Virginia
  • Wiki edits:1
So... We going to get any love for BRSTM? It's the easiest of the VG streams to loop these days...

#69 User is offline angryzor 

Posted 25 April 2011 - 06:43 PM

  • Posts: 27
  • Joined: 14-April 11
  • Gender:Male
  • Project:S&KC HQ Music
QUOTE
Just had a quick look and @file offset 0xa47c of sonic3k.exe is a 1 byte value that selects the sampling freq:

0x00 = 11025Hz
0x04 = 22050Hz
0x08 = 32000Hz
0x0C = 44100Hz


Found out some more:
If this value is OR'd with 0x01, the PCM is stereo.
If it is OR'd with 0x02, it is 16 bit instead of 8 bit.


QUOTE
So... We going to get any love for BRSTM? It's the easiest of the VG streams to loop these days...

It _should_ be supported through the vgmstream suppport. Does it not work?
This post has been edited by angryzor: 25 April 2011 - 06:47 PM

#70 User is offline Tanks 

Posted 25 April 2011 - 06:54 PM

  • They call me... Troll-bo Cop.
  • Posts: 685
  • Joined: 01-July 06
  • Gender:Male
  • Location:Virginia
  • Wiki edits:1
QUOTE (angryzor @ Apr 25 2011, 04:43 PM)
QUOTE
So... We going to get any love for BRSTM? It's the easiest of the VG streams to loop these days...

It _should_ be supported through the vgmstream suppport. Does it not work?

Oh. Did not see that. if that's the case then yeah, it should work. I'll have to test it later. If that's the case though I can literally whip up the whole Sonic 3 VGM set in a matter of minutes.

#71 User is offline nineko 

Posted 25 April 2011 - 06:55 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
QUOTE (angryzor @ Apr 26 2011, 01:43 AM)
stuff
Basically, if I get what you mean:

0 11025Hz, 8 bit, mono
1 11025Hz, 8 bit, stereo
2 11025Hz, 16 bit, mono
3 11025Hz, 16 bit, stereo

4 22050Hz, 8 bit, mono
5 22050Hz, 8 bit, stereo
6 22050Hz, 16 bit, mono
7 22050Hz, 16 bit, stereo

8 32000Hz, 8 bit, mono
9 32000Hz, 8 bit, stereo
A 32000Hz, 16 bit, mono
B 32000Hz, 16 bit, stereo

C 44100Hz, 8 bit, mono
D 44100Hz, 8 bit, stereo
E 44100Hz, 16 bit, mono
F 44100Hz, 16 bit, stereo

This will definitely be useful if one plans to make a brand new SONIC3K.DS2 with high quality sound effects; personally I'd aim for format E since I feel it would be useless to have stereo sound.
I might easily incorporate a selector of some sort in a new release of my program, but I don't think it would be a good idea. Changing the format requires the user to reimport ALL the sound effects to get them to sound right, so it's not something that should be done lightly.

#72 User is offline BSonirachi 

Posted 25 April 2011 - 07:30 PM

  • It's a fact of nature!
  • Posts: 111
  • Joined: 18-December 10
  • Gender:Male
  • Location:United Kingdom
  • Wiki edits:17
I love you so much for putting in BRSTM support. Gives me another use for the custom songs I downloaded for Brawl!

However, for some reason I can't seem to replace song #55 (which I think is the S&K credits medley) with anything, regardless of whether I add "intro_" before the song ID or not. All I get is silence when I try playing it.

EDIT: Never mind, I forgot about the bit in the readme about ending the INI with a new line to let the song register.
This post has been edited by BSonirachi: 25 April 2011 - 07:45 PM

#73 User is offline Azu 

Posted 25 April 2011 - 08:11 PM

  • I must be stupid.
  • Posts: 1317
  • Joined: 23-February 08
  • Gender:Male
  • Location:Home
I like ADX better. Just as easy for loopping. Also, nineko, you're more awesome than I though. For the tool, and the avatar. The cat from Azumanga Daioh.

#74 User is offline nineko 

Posted 25 April 2011 - 08:24 PM

  • I am the Holy Cat
  • Posts: 5238
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
Thanks smile.png

By the way, I crossposted my program here since I felt bad to derail angryzor's thread in this way. Also with a separate thread I can update the first post, publish it on the wiki, et al. But not now, it's almost 3:30am and I'll have to be in my office at 9am, this is what happens when I start programming something I like :U
This post has been edited by nineko: 25 April 2011 - 08:25 PM

#75 User is offline MainMemory 

Posted 25 April 2011 - 11:29 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2683
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
After a bit of hacking SADXsndSharp, I've made SKCsnd, which allows you to import and export WAV files.

Edit: updated, now allows you to change the audio settings to any of the formats in this post. To use it properly, you'll have to Extract All, start a New file, change the setting, then Add all the files. You'll also have to change the byte in SONIC3K.EXE.

Edit2: Wiki'd
This post has been edited by MainMemory: 27 April 2011 - 12:10 PM

  • 6 Pages +
  • ◄ First
  • 3
  • 4
  • 5
  • 6
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users