General Project Thread & Feedback

Discussion in 'Sonic 2 HD (Archive)' started by steveswede, Apr 29, 2010.

Thread Status:
Not open for further replies.
  1. saxman

    saxman

    Oldbie Tech Member
    Here's a summary of what the sound engine does:



    * Genesis/Mega Drive sound emulation with support for VGM/VGZ and GYM playback

    * Compressor to allow for full, thick layer of sound

    * Tempo and pitch control to allow variations in sound (e.g. revving spindash)

    * OGG Vorbis playback support to showcase Tee's music

    * Interpolation used to generate ultra-clean, high definition sampling above CD quality
     
  2. Hamneggs

    Hamneggs

    Official Breakfast of S2HD Member
    303
    0
    0
    TEXAS
    Networked lighting
    So we now know what the sound engine does. How goes progress in the grand unification of the things?
     
  3. steveswede

    steveswede

    Member
    5,032
    1
    16
    Ask my hand
    Fighting against the Unitary State of Europe
    Saxman already mentioned the progress so far on the 10th.
     
  4. dsrb

    dsrb

    Member
    3,149
    0
    0
    What? You'd better not be pushing the myth that upsampling magically generates additional 'quality', 'cleanliness', or 'definition' from thin air.
     
  5. saxman

    saxman

    Oldbie Tech Member
    Well, look at the 2xSai filter on Gens -- that's all interpolation, and it does a fairly decent job at rendering non-existant stuff from existing stuff. The same type of thing can be done on sound. I'm not sure why you'd suggest it's a myth...
     
  6. dsrb

    dsrb

    Member
    3,149
    0
    0
    It doesn't generate more detail. It just blurs edges. It looks pretty ugly, actually. Anyway, it's a bad analogy:

    Interpolation to a higher sampling rate just fills in blanks that the output hardware's DAC would take care of anyway. Square steps are rounded, yadda yadda. No information is generated past the Nyquist frequency of the original sampling rate (I.e. 22.05 kHz for a 44.1 kHz signal, etc.) unless you're using some filter that generates added noise based on the input signal, in which case it's not useful information anyway. Actually, that last bit sounds a bit like 2xSAI! Still a poor analogy, though.

    Feel free to Google for information on this if you don't believe me. You could check Hydrogenaudio or some other non-hokum audio site. Seriously, it's an old and played-out myth.
     
  7. Hamneggs

    Hamneggs

    Official Breakfast of S2HD Member
    303
    0
    0
    TEXAS
    Networked lighting
    It's done, and generates nearly negligible effects. Let it be. It's not a tree or anything. Hopefully stuff's nearly done—and can actually soon get there—provided nobody forces deep-rooted changes like modifying sound engine behaviour.
     
  8. dsrb

    dsrb

    Member
    3,149
    0
    0
    Behaviour that shouldn't have existed in the first place, never mind being hyped as something that actually does anything, was my point. But sure, whatever!

    Edit: Besides,—
    —how could I force anything? I have no standing or influence here. I was just disagreeing with the benefits claimed for this pointless 'feature' and recommending some outside reading on my reasoning. If this turns out to have been fruitless, and they want not only to retain this pseudo-processing but also to market it as an enhancement, this humble flinger of peanuts certainly doesn't have the authority to force anything.
     
  9. saxman

    saxman

    Oldbie Tech Member

    You've proven you know some basic theory of sound, but with all due respect, I'll suggest that you don't really know what interpolated sound even sounds like. If you have a standard base sound card, you probably almost definitely don't know. Cheap sound cards don't do a very good job at upsampling. The S2HD sound engine ensures that the sound is processed with the best quality it can have without a performance deduction. We have HD graphics, so why not better sound? So let me side-step all the technical talk and provide you with two very simple OGG files I have archived in a zip file and uploaded to my file sharing space on 4shared.com:

    http://www.4shared.com/zip/rpBtIULy/SonicAmpInterpExample.html

    The "in.ogg" file is a 11,025 Hz recording. The "out.ogg" file is the original file resampled using the sound engine at 96,000 Hz. Take a listen. I can clearly hear the quality difference without even trying. The sound on the output file is brighter and not as flat as the original. Relying on my soundcard to upsample doesn't produce the same quality, I can tell you that for sure.

    I'd like everyone reading this to take a listen to those files. You can be the judge. If anyone believes the original sounds better, then I suppose we'll have to agree to disagree. I feel the interpolated version is an improvement.
     
  10. dsrb

    dsrb

    Member
    3,149
    0
    0
    But there is a problem with citing a sound-card that's doing it wrong as support for your assertion that your processing should always be done. It could also be (mis?)read as implying that said card's making the input signal sound worse than it would on reference hardware proves that interpolation makes the same input signal sound better than it would on reference hardware.

    At least limit your upsampling to 44.1 kHz. Unless you're about to tell me that anyone benefits from higher sampling rates, which could be fun!

    I guess I'm just reflexively reactive against claims that I read as potentially being audio voodoo. Upsampling does not improve quality from a reference perspective; that's a fact.

    And if one's hardware has such a bad resampler that it audibly degrades quality, the correct response is probably not a workaround but rather a replacement. After all, otherwise they'll think they can continue to get away with selling crap.
     
  11. saxman

    saxman

    Oldbie Tech Member
    Theory can be thrown around all day long, but even sound engineers disagree on anything and everything. But those sound files I uploaded don't lie. You were arguing in your original post that the sound quality couldn't be improved at all, that things couldn't just appear "out of thin air". But I know a whole lot about this subject. I didn't use Google to help write the sound engine. I am respectfully telling you that you're mistaken.
     
  12. Falk

    Falk

    Member
    1,569
    10
    18
    You've proven you know some basic theory of sound, but with all due respect, the results aren't better in the least, so yes, we're going to have to agree to disagree. What you've done is generate aliased or spectrum-mirrored content that wasn't even in the original. Do this with a pure sine or square wave running from 0Hz up to Nyquist and tell me how that sounds. There is a reason why the Nyquist theory exists, and why every single DAC/resampling algorithm worth its weight cuts off at it. You may say it sounds 'dull'. It's better dull than aliased.

    Also, here your 2xSAI analogy comes back to haunt you. There's a reason your project's graphics and music aren't being massaged from the original retro material. I don't understand the sounds aren't being simply re-done from the ground up at 44.1/48kHz to begin with for ACTUAL clarity rather than aliased, generated/interpolated garbage.

    I'm also, like dsrb, unsure why you think that for general consumer use, anything past 44.1kHz is even a good idea, especially if all content past a certain point is all interpolation in the first place. You're essentially taking a 480p image, blowing it up 10x with trilinear filtering enabled then displaying the result on a 720p monitor (I.e. most consumer cards will just DAC at 44.1 or 48kHz when presented with anything higher, in essence going through yet another driver or hardware resampling which you seem to think is bad in the first place)

    And before you work off the assumption that I base all my knowledge/experience off middleware and that I don't get my hands dirty with actual code, or that I have no idea what I'm talking about with regards to -audio- in general let me present this.

    ----

    The dickish side of me out of the way though, like I said in my second post in this thread I'm glad you got the problem resolved, and if it works for you, it works for you. It's just that dsrb put it best with the term "audio voodoo". Spectrum mirroring from interpolation may subjectively sound better, but it also leads to ear fatigue much quicker due to the amount of inharmonic content being generated. This is me talking as an audio specialist, not a retro gamer. I'm well aware of the bitcrush-esque quality of how things sounded back then and how used to it we all are.
     
  13. dsrb

    dsrb

    Member
    3,149
    0
    0
    Edit: Falk posted before me. And what a post it was! I'm so glad someone who actually has adequate knowledge to back this standpoint up has chimed in for me (who doesn't). Thanks for that! Scrapping my old post accordingly.

    Flight of the Edit: I thought about it a bit more. The source of the apparently low quality in the original sample, to which you present aliasing noise as an improvement, is due to your apparent insistence upon porting Mega Drive sound-effects and writing an emulator-y sound engine. Why do that? Interpolation doesn't really accord with ‘high definition’; deterministically added noise does not qualify as an enhancement. Isn't that why you didn't just (to borrow your analogy [whoops!]) 2xSAI the graphics and be done with it? If anything, complain to those who created the original SFX, even though they may well have had no other option—and then to yourself for accepting the same limitations, albeit with a few band-aids thereon, a decade and a half later.
     
  14. saxman

    saxman

    Oldbie Tech Member
    I'll post the link again in case anyone missed it:

    http://www.4shared.com/zip/rpBtIULy/SonicAmpInterpExample.html

    I'm going to poll people on this. Turn up your speakers or wear headphones to better hear the change. The sound engine does just as I said it does, and I am confident that people will see it that way. I think you'll find that an overwhelming majority like "out" better than "in". I asked my girlfriend to come in the room and sample them and tell me which one she liked. She had no prior knowledge of our discussion. It was presented to her in a completely bias-free way. She told me she liked the "out" version. When asked why, she said the piano sounded prettier. And it does! The aliasing (often considered an evil word in the audio realm) actually helps give the music more presense in this case. And of course a 11,025 Hz sound file is going to have more noticeable aliasing artifacts than a 22,050 or 44,100 file because, by it's nature, there's less information and therefore, more educated guessing. Imagine what it does with a 44,100 file played at 192,000 though. I've tried it, and in my opinion, it is more pleasing on the ears.



    Regarding using sound effects, nobody ever said we weren't going to have high definition sound effects. I've never discussed it or ever been involved in any discussions with the team about this, so I won't give you a definitive answer. But certainly we could do that. We're doing it with music by using Tee's material. Just because there's an emulator built into the sound engine doesn't mean we're not going to use other stuff or that we're not going to use any effects to make some sounds stand out far and beyond what they do on the Genesis. But there's nothing wrong with many of the sounds in the Sonic games -- some stuff should just be left alone (like the ring sound -- who really wants that redone?) But really, everything is on the table right now as far as what we'll eventually use sound-wise.
     
  15. dsrb

    dsrb

    Member
    3,149
    0
    0
    >implying you can hear anything beyond about 16–18 kHz, never mind up to 96 kHz

    Oh boy! I give up.

    Oh, also >implying the result of a sighted (read: not double-blind/controlled) test is valid for anything except comedic effect
     
  16. saxman

    saxman

    Oldbie Tech Member
    Have you ever tried listening to a 20 kHz sinewave at 44.1 kHz? You can't because they're basically square waves. Higher sampling rates does in fact improve the audiable frequencies.
     
  17. dsrb

    dsrb

    Member
    3,149
    0
    0
    Please provide double-blind test results obtained from competent hardware.

    Otherwise, it just looks like tired old audiophool myths bolstered by the placebo effect and/or a sub-par sound-card to me.

    Honestly, I'm not meaning to sound like a dick here. But I can't stand unsubstantiated woo of any kind, and the audio world is no stranger to it. Something you might currently think gives you exactly the right warm and fuzzy feeling might miraculously vanish once your assumptions and biases (not to mention confounding factors of hardware) are eliminated.

    Again: Not on a sound-card that isn't total shit, they're not. This is the myth that digital is bad because the square steps you see in Audacity or whatever are what actually comes from your audio output. Falk covered this. DACs that actually work have filters to exclude all post-Nyquist frequencies, thereby rounding the waveform and eliminating any need for soft interpolation.

    Interpolation that adds high frequencies is a nonsensical concept, especially when you refer to frequencies far beyond the threshold of audibility in humans—never mind something as ridiculous as 96 kHz and upsampling thereto from 44.1 kHz when the latter more than exceeds the hearing ability of any mere mortal.
     
  18. Aerosol

    Aerosol

    Not here. Moderator
    10,854
    208
    43
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Layman here.

    Out has more clarity, sure. But I prefer In because that's what the song sounds like. If we're going to be able to use the audio files ripped straight out of the game, who cares if it has been discombobulated and then reconstructed and then magickified into something with a higher sampling rate or what have you? That's what Tee Lope's soundtrack is for to begin with, ain't it?

    But hey, let's comprimise. Why not do what emulators already do, and let the user choose what sampling rate they want to listen to stuff at?
     
  19. saxman

    saxman

    Oldbie Tech Member
    This is my last post regarding if it sounds better or not, because really this has gotten out of hand. The only reason I decided to have this debate is, from the standpoint that I want S2HD to succeed and it's our sound engine being discussed, I don't desire to see people come in and try to define the product for other people just because their views on audio skew a certain way. I believe in letting people decide for themselves. So I felt I owed it to my team to defend what I think is a sound (pardon the pun) component of a game that is really, I think, shaping up to be a wonderful product. But in trying to be professional about this, I'm now thinking it's best to get out of this debate and let the files I uploaded speak for themselves.

    http://www.4shared.com/zip/rpBtIULy/SonicAmpInterpExample.html

    Honestly, if you like the "in" version better, that's fine. But my primary point in all of this is I would never tell people something about S2HD that is false or based purely on a myth. That's not me. I hope people can see where I'm coming from here. So let's move on to more productive discussions.


    EDIT: And I like what AerosolSP said -- I think giving people a choice would be a nice solution. I'll talk about it with the team. In the end, we may not even use the interpolation for the purpose that I described in the features list (e.g. higher sound quality). Interpolation was always put in primarily and first-and-foremost to allow 44.1kHz samples to be resamples at 48kHz, and vice-versa. But it is a feature. I don't know, we'll see =)
     
  20. Cinossu

    Cinossu

    Administrator
    2,829
    16
    18
    London, UK
    Sonic the Hedgehog Extended Edition
    While I agree with dsrb and Falk here, I have a different question entirely.

    Why the bloody hell have you added support for GYM playback, of all things?
     
Thread Status:
Not open for further replies.