Sonic and Sega Retro Message Board: The "REAL" Sonic 2 HD Sound Engine - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

The "REAL" Sonic 2 HD Sound Engine

#1 User is offline saxman 

Posted 05 July 2012 - 11:55 PM

  • Oldbie
  • Posts: 2625
  • Joined: 08-April 04
  • Gender:Male
  • Location:United States of America
  • Wiki edits:136
As some of you are aware, my sound engine wasn't used in S2HD because our lead programmer supposedly could not get it working. It doesn't deserve to sit and go to waste, not after all the work I put into it. It's a good, solid library that I would love to see be adopted by other C/C++ based games.

Today, I decided to go ahead and test the waters with a small demonstration of the engine to show that it works.

http://www.4shared.c...ExampleApp.html

Check out the readme file for instructions on how to use the example application. The major features are as follows:

- Support for VGM, VGZ, GYM, OGG, and WAV files
- YM2612 (FM) and SN76489 (PSG) synthesis
- Use driver with any number of channels up to 127
- Compression algorithms to allow more headroom for other sounds
- Flexible volume and panning controls
- Pitch and tempo controls
- Load and unload only sound data that is needed

If you're writing a program in C or C++ and would like to use the library in your program, let me know! I'm offering the library on a limited release basis. If there's enough demand for it, I'll do a general public release, but otherwise I'll keep the release more constrained for the time being.

#2 User is offline Cinossu 

Posted 06 July 2012 - 01:54 PM

  • inverted with love~
  • Posts: 2718
  • Joined: 21-June 04
  • Gender:Male
  • Location:London, UK
  • Project:Sonic the Hedgehog Extended Edition
  • Wiki edits:474
180
Very noice.

Out of curiosity, are we talking tempo/pitch effects on just vgms, or full audio too? I'd love to see a sample with it using them on that EHZedit ogg. I take it it supports loop points within the ogg/wav too?

#3 User is offline Master Emerald 

Posted 06 July 2012 - 05:53 PM

  • Posts: 2874
  • Joined: 14-December 07
  • Gender:Male
  • Location:Rio de Janeiro - Brazil
  • Project:College
  • Wiki edits:22
You forgot sound upsampling :P

#4 User is offline dsrb 

Posted 06 July 2012 - 07:53 PM

  • Posts: 3150
  • Joined: 10-June 09
  • Gender:Male
  • Wiki edits:196

View PostMaster Emerald, on 06 July 2012 - 05:53 PM, said:

You forgot sound upsampling :P
Oh you ;)

#5 User is offline Techokami 

Posted 06 July 2012 - 09:49 PM

  • For use only on NTSC Genesis systems
  • Posts: 1101
  • Joined: 19-November 05
  • Gender:Male
  • Location:HoleNet!
  • Project:Sonic Edge
  • Wiki edits:63
Impressive! This would actually be really interesting to try and make a MMF2 extension with, but I don't know enough about making extensions to take a crack at doing it myself. I know at least one person who would kill for it to happen, though.

#6 User is offline saxman 

Posted 08 July 2012 - 11:46 AM

  • Oldbie
  • Posts: 2625
  • Joined: 08-April 04
  • Gender:Male
  • Location:United States of America
  • Wiki edits:136

View PostCinossu, on 06 July 2012 - 01:54 PM, said:

Very noice.

Out of curiosity, are we talking tempo/pitch effects on just vgms, or full audio too? I'd love to see a sample with it using them on that EHZedit ogg. I take it it supports loop points within the ogg/wav too?

Only VGM and GYM support this. Originally, we wanted to do it for PCM too. However, performance issues were a real problem in testing, so I didn't implement that feature for PCM. You are correct about looping though. A loop marker can be used for PCM.


View PostMaster Emerald, on 06 July 2012 - 05:53 PM, said:

You forgot sound upsampling :P

I didn't forget. But you're right, it does this.


View PostTechokami, on 06 July 2012 - 09:49 PM, said:

Impressive! This would actually be really interesting to try and make a MMF2 extension with, but I don't know enough about making extensions to take a crack at doing it myself. I know at least one person who would kill for it to happen, though.

That's a great idea! I don't know anything about making those extensions other than Visual C++ is used, but if someone wants to attempt this, I'll support that inititive.

#7 User is offline Falk 

Posted 08 July 2012 - 05:26 PM

  • Posts: 1419
  • Joined: 03-October 11
http://www.clickteam...t&Number=167139

Someone's semi-gotten fmod working, so it's not impossible at all to plug an audio engine into MMF2 as an extension. The forum's a great resource on getting started on extensions.

#8 User is offline Mr Lange 

Posted 10 July 2012 - 11:27 AM

  • A wise guy eh. I know how to DEAL with wise guys.
  • Posts: 895
  • Joined: 27-August 10
  • Gender:Male
  • Location:The Land of Waldos
  • Project:Helix, NASF DX, Sonic Overture
  • Wiki edits:1
I'm thoroughly interested in this and would like to use the library.

#9 User is offline Flipside 

Posted 15 July 2012 - 11:40 PM

  • Posts: 32
  • Joined: 07-June 12
  • Gender:Male
127 Channels... NICE! Does it also support FLAC or some other lossless music types suggested? Can you make it alternate between playing the ring sound on the left and right side?

I would try downloading it, but I don't want to sign up for a new website or make iLivid my home page.

I might just be stubborn about it, but not all hope is LOst for S2HD yet... I'd love to see a sound engine like this I could use in C++ if I could get it working! :)

#10 User is offline saxman 

Posted 16 July 2012 - 09:13 AM

  • Oldbie
  • Posts: 2625
  • Joined: 08-April 04
  • Gender:Male
  • Location:United States of America
  • Wiki edits:136

View PostFlipside, on 15 July 2012 - 11:40 PM, said:

127 Channels... NICE! Does it also support FLAC or some other lossless music types suggested? Can you make it alternate between playing the ring sound on the left and right side?

I would try downloading it, but I don't want to sign up for a new website or make iLivid my home page.

I might just be stubborn about it, but not all hope is LOst for S2HD yet... I'd love to see a sound engine like this I could use in C++ if I could get it working! :)


Only OGG is supported in terms of lossless music. You can pan the audio to one side or the other, allowing the ring to chime like it does in the games.

There is no sign-up required for 4shared.com. It's free. You also don't have to change your home page. I have downloaded stuff for years from 4shared.com. Trust me, it's safe =)

#11 User is offline Hinchy 

Posted 17 July 2012 - 06:07 PM

  • Up And Down And All Around
  • Posts: 1629
  • Joined: 04-September 08
  • Gender:Not Telling
  • Location:Apartment 0xFF
  • Project:Sonic Melponterations
  • Wiki edits:32
I'm the programmer and co-designer of a game called Here Comes Launchman.

We've just been using SDL for our sound and it's honestly garbage, all the other libraries are expensive as fuck to use commercially (e.g. fmod), proper looping support is something we need, SDL has so few sound channels that often times sound effects in the game get pre-empted, and flexible panning for directional sound is a massive perk too.

So yeah, I'm extremely interested in this!
This post has been edited by Hinchy: 17 July 2012 - 06:08 PM

#12 User is offline Techokami 

Posted 17 July 2012 - 07:16 PM

  • For use only on NTSC Genesis systems
  • Posts: 1101
  • Joined: 19-November 05
  • Gender:Male
  • Location:HoleNet!
  • Project:Sonic Edge
  • Wiki edits:63

View Postsaxman, on 16 July 2012 - 09:13 AM, said:

There is no sign-up required for 4shared.com. It's free. You also don't have to change your home page. I have downloaded stuff for years from 4shared.com. Trust me, it's safe =)
Are you sure? I think they changed that recently. Log out from 4shared and try to download your file from the link you provided. You'll be stopped by a page that says "You should Sign Up or Login to download this file".
I'm going to make a mirror for it here (be gentle, please!) so those that do not want to sign up for 4shared can download the file. I WAS going to use MediaFire to make a mirror, but they got rid of anonymous uploading...

#13 User is offline steveswede 

Posted 17 July 2012 - 07:33 PM

  • Posts: 3368
  • Joined: 13-April 09
  • Gender:Male
  • Location:Birthplace of Lara Croft
  • Project:Bowel reconstruction
  • Wiki edits:6
@Techokami

Thanks for the other link.

@Saxman

This is really sweet what you have done though I really think you could expand on it more to make it the sound engine to go to, like build a mini DAW into it so us none programmers can make some tunes.

#14 User is offline Flipside 

Posted 18 July 2012 - 10:58 AM

  • Posts: 32
  • Joined: 07-June 12
  • Gender:Male
This is ridiculously awesome, saxman! Thanks for the mirror, Techokami.

That music was great. especially loved that 4th song.

Only problem I have with it is when you click outside of the window, the music repeats the 2 notes it's on til' you click on the window again. I'm not sure this would be a problem in a game engine though.

#15 User is offline Foxeh 

Posted 19 July 2012 - 07:20 AM

  • Animator
  • Posts: 17
  • Joined: 10-April 10
  • Gender:Male
  • Location:unfixed
  • Project:Still working on them. wont show till after summer.

View PostFlipside, on 18 July 2012 - 10:58 AM, said:

Only problem I have with it is when you click outside of the window, the music repeats the 2 notes it's on til' you click on the window again. I'm not sure this would be a problem in a game engine though.


I believe that whole bit depends if you allow your app/game to continue playing when it's in the background.


I'd really love to learn to slap this into Unity3d, mainly for the "point A to point B" loops (I really don't know the proper term for this) unfortunately, I don't know if Unity already has something built in for it. Either way, it would be fun to just learn how this was put together!


"Gapless looping (Android/iOS only) Use this when compressing a seamless looping audio source file (in a non-compressed PCM format) to ensure perfect continuity is preserved at the seam. Standard MPEG encoders introduce a short silence at the loop point, which will be audible as a brief "click" or "pop"." ....... never mind...

actually, just to learn to incorporate this into any game engine would just be dandy to know! So I'm all in for trying to make this work because I'd love to use it!

I'll just ask you at a later time when I'm ready to use it

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

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