Getting the best-sounding samples
Moderator: Moderators
Getting the best-sounding samples
I've recently done an overhaul on my sound engine by incorporating the DMC channel into it. The samples I currently have, a gunshot sound effect and an "empty clip" sound effect, sound okay on their own, at least as good as I feel they can sound for 1-bit DPCM (They use the highest sample rate), but when I put them in with the rest of the game, they always seem to be drowned out by the rest of the channels. When I compare it to other games' samples, especially those from sample-heavy games like Konami and Sunsoft games, theirs just seem a lot richer and louder overall. I guess I am currently just using the DMC channel as a glorified noise channel, so it kinda gets drowned out by the actual noise channel.
Basically I'm just wondering if there's any auditory techniques or anything that can be done to make samples sound as good as they can; not fidelity-wise, but more volume-balance-wise. I know this is kind of a vague question, and I can elaborate better if need be.
Basically I'm just wondering if there's any auditory techniques or anything that can be done to make samples sound as good as they can; not fidelity-wise, but more volume-balance-wise. I know this is kind of a vague question, and I can elaborate better if need be.
Re: Getting the best-sounding samples
The DPCM channel is just not good at high-frequency content. It can only do it quietly, if at all.
For this specific case, you might find my tool to convert samples to a noise channel sequence useful.
For this specific case, you might find my tool to convert samples to a noise channel sequence useful.
Re: Getting the best-sounding samples
The obvious thing would be to scale down the volume of the other channels. E.g., only use volume levels 0-7. If you look at many songs from commercial games I think you'll find they mostly operate on the lower range of the pulse volumes.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Getting the best-sounding samples
A few years ago RushJet1 made a DPCM tool:
viewtopic.php?t=6975
One of the options it has is just an easy way to experiment with different amounts of pre-gain to try and find a good balance between clipping and quantization.
I think a more ideal tool would have maybe a well formed EQ and not just gain (and probably a more advanced sample encoder), but I don't think anyone's really made the perfect DMC tool yet.
lidnariq: that looks pretty neat. For a long time I've had a "convert FFT to best-fit NES APU registers at 60hz" note on my to do list, so it's pretty cool to see someone actually has done it, at least for noise.
viewtopic.php?t=6975
One of the options it has is just an easy way to experiment with different amounts of pre-gain to try and find a good balance between clipping and quantization.
I think a more ideal tool would have maybe a well formed EQ and not just gain (and probably a more advanced sample encoder), but I don't think anyone's really made the perfect DMC tool yet.
lidnariq: that looks pretty neat. For a long time I've had a "convert FFT to best-fit NES APU registers at 60hz" note on my to do list, so it's pretty cool to see someone actually has done it, at least for noise.
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Getting the best-sounding samples
Three tips:
1) I don’t know about best, but you can get them smaller and reduce hi-frequency noise at the same time by speeding the clip up to a higher pitch, save, import, then play it back in your sound engine at a slower speed (ultimately this means fewer samples per second and as a result a treble roll-off). This might even suffice as a good enough lowpass filter instead of hardcoded filtering, if you’re lucky, but check case-for-case.
Castlevania 3 does this. You’ll notice that the grunting noise, the tom, and the thunder is higher in pitch when played back neutrally.
2) Low bitdepth is in an unhappy marriage with dynamic content. Abrupt volume changes result in noise. Try to keep the body of your samples flat, with the help of a limiter, compressor or compander plugin (compressor + expander).
3) Really low frequencies take more energy to push than higher frequencies. If dynamic depth is limited (which it is), you may get better results by filtering out the lowest frequencies, so that they don’t suppress more important frequencies.
1) I don’t know about best, but you can get them smaller and reduce hi-frequency noise at the same time by speeding the clip up to a higher pitch, save, import, then play it back in your sound engine at a slower speed (ultimately this means fewer samples per second and as a result a treble roll-off). This might even suffice as a good enough lowpass filter instead of hardcoded filtering, if you’re lucky, but check case-for-case.
Castlevania 3 does this. You’ll notice that the grunting noise, the tom, and the thunder is higher in pitch when played back neutrally.
2) Low bitdepth is in an unhappy marriage with dynamic content. Abrupt volume changes result in noise. Try to keep the body of your samples flat, with the help of a limiter, compressor or compander plugin (compressor + expander).
3) Really low frequencies take more energy to push than higher frequencies. If dynamic depth is limited (which it is), you may get better results by filtering out the lowest frequencies, so that they don’t suppress more important frequencies.
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Getting the best-sounding samples
I don't know why this would be any different than just initially importing it at the lower pitch to begin with?FrankenGraphics wrote:1) I don’t know about best, but you can get them smaller and reduce hi-frequency noise at the same time by speeding the clip up to a higher pitch, save, import, then play it back in your sound engine at a slower speed (ultimately this means fewer samples per second and as a result a treble roll-off). This might even suffice as a good enough lowpass filter instead of hardcoded filtering, if you’re lucky, but check case-for-case.
Possibly though the resampling mechanism of whatever you're importing with ends up doing some sort of effective filtering by this roundabout process? ...though that kinda points toward what I was saying about wishing RJDMC had an EQ: the DPCM format has a hierarchical bandwidth where low frequencies get priority over high frequencies. EQing a sound (esp. reducing bass) can go a long way to finding a balance that minimizes the distortion.
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Getting the best-sounding samples
Do you mean, in the case of CV like importing trevors' grunting noise at a low sample rate and play it at a higher pitch to produce syphas' grunting noise? As opposed to importing a high-pitched sound and playing it slower to produce syphas' and even slower still to produce trevors'?
I guess else the method is about the same, ie. downsampling the file to a low-resolution collection of averages.
One difference is that you can condition the sound further after the pitch shift, for what good it does.
I guess else the method is about the same, ie. downsampling the file to a low-resolution collection of averages.
One difference is that you can condition the sound further after the pitch shift, for what good it does.
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Getting the best-sounding samples
No, I was speculating about why you were suggesting to pitch up a sample before importing, then pitch it down after importing. This shouldn't really produce a different result than just importing it at the final samplerate, so I was merely speculating that if it does happen to be effective this is maybe some quirk of your importer's resampler acting as a filter conveniently?FrankenGraphics wrote:Do you mean, in the case of CV like importing trevors' grunting noise at a low sample rate and play it at a higher pitch to produce syphas' grunting noise? As opposed to importing a high-pitched sound and playing it slower to produce syphas' and even slower still to produce trevors'?
...or ere you just saying to try a lower target samplerate to see if it sounds better? (It's that you specifically suggested to pitch it up before importing that throws me here... why not just import at the samplerate you want it to be played at?)
Re: Getting the best-sounding samples
I guess the next step up from lidnariq's tool is to use the FFT to determine what frequencies are strongly tonal and what are noise, and then send the tonal frequencies to pulse and the remainder to noise, or the atonal to noise and the residue to DMC.
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Getting the best-sounding samples
Yeah you could do either and the result should be 1:1 provided the export itself has a high enough sample rate. With a pitch shift up and a low output samplerate, you eventually start to push harmonic content outside the window if you go high enough = aliasing and low pass filtering. Of course, if you go low enough with the sample rate only, you get the same result....or ere you just saying to try a lower target samplerate to see if it sounds better? (It's that you specifically suggested to pitch it up before importing that throws me here... why not just import at the samplerate you want it to be played at?)
It is better (more controlled) to condition the sample with EQ:s / filters beforehand, at any rate.
I agree setting just setting the sample rate is more straightforward. I just got used to a method where a sample in audacity is shifted by the count of semitones, and then account for that later.
Re: Getting the best-sounding samples
Another thing to watch out for is where the delta counter is during your sample's playback. If your sample isn't loud enough to reset the "midpoint" of the sample, this can be a thing (and even if it IS loud enough, you can tilt the data toward zero with RJDMC and FamiTracker).
Re: Getting the best-sounding samples
The other suggestions and ideas in this thread are great. It may work to equalize and then compress the sounds at a mid high frequency and then amplify the sound to their maximum volume. I would be interested to look at your samples in Audacity if you would like to post them. Another thing that may work would be to layer the sample sounds with a burst of noise to give them more high frequency pop and volume to the effect.Sogona wrote:I've recently done an overhaul on my sound engine by incorporating the DMC channel into it. The samples I currently have, a gunshot sound effect and an "empty clip" sound effect, sound okay on their own, at least as good as I feel they can sound for 1-bit DPCM (They use the highest sample rate), but when I put them in with the rest of the game, they always seem to be drowned out by the rest of the channels. When I compare it to other games' samples, especially those from sample-heavy games like Konami and Sunsoft games, theirs just seem a lot richer and louder overall. I guess I am currently just using the DMC channel as a glorified noise channel, so it kinda gets drowned out by the actual noise channel.
Basically I'm just wondering if there's any auditory techniques or anything that can be done to make samples sound as good as they can; not fidelity-wise, but more volume-balance-wise. I know this is kind of a vague question, and I can elaborate better if need be.
Re: Getting the best-sounding samples
The only real issue with this is that it reduces the granularity of volume envelopes by half.thefox wrote:The obvious thing would be to scale down the volume of the other channels. E.g., only use volume levels 0-7. If you look at many songs from commercial games I think you'll find they mostly operate on the lower range of the pulse volumes.
How exactly would I go about doing this in audacity?FrankenGraphics wrote:1) I don’t know about best, but you can get them smaller and reduce hi-frequency noise at the same time by speeding the clip up to a higher pitch, save, import, then play it back in your sound engine at a slower speed (ultimately this means fewer samples per second and as a result a treble roll-off). This might even suffice as a good enough lowpass filter instead of hardcoded filtering, if you’re lucky, but check case-for-case.
Go right ahead Just rename the .bin files as .dmc files.cdigi wrote:I would be interested to look at your samples in Audacity if you would like to post them.
Also is there any reason why .wav files aren't allowed? Hopefully 320kb/s mp3's are good enough if anyone wants to try and work with these. I'll try out what's been suggested in a few days when I have more free time.
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: Getting the best-sounding samples
Yes, it does. But i think it’s an allright tradeoff considering the sound of the overall mix. I even go as far as to have pulses’ sustain portions be at 4 and 3, respectively, and on average pretty often. (the difference between the channels i have most of the time also helps the tone distinction). This allows the bass not only to be strong in comparison, but also gets a strong rhythmic, even percussive presence. Same goes for samples.The only real issue with this is that it reduces the granularity of volume envelopes by half.
I don’t have my computer at hand, but under the effects list you have options for changing it. The dialogue allows you to set the pitch/speed difference in semitones, which i found quite handy. Note though that rainwarriors’ suggestion is more straightforward.How exactly would I go about doing this in audacity?
Re: Getting the best-sounding samples
Also note that since the "volume" in NES APU is actually a linear amplitude, the perceived difference between levels 15 and 14 is much less than the difference between 8 and 7, for example. So much of the granularity at the higher end goes to waste anyways.FrankenGraphics wrote:Yes, it does. But i think it’s an allright tradeoff considering the sound of the overall mix. I even go as far as to have pulses’ sustain portions be at 4 and 3, respectively, and on average pretty often. (the difference between the channels i have most of the time also helps the tone distinction). This allows the bass not only to be strong in comparison, but also gets a strong rhythmic, even percussive presence. Same goes for samples.The only real issue with this is that it reduces the granularity of volume envelopes by half.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi