It is currently Tue Nov 13, 2018 12:52 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Apr 25, 2018 8:24 pm 
Offline
User avatar

Joined: Thu Jul 23, 2015 7:54 pm
Posts: 181
Location: USA
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.


Top
 Profile  
 
PostPosted: Wed Apr 25, 2018 8:28 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7714
Location: Seattle
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.


Top
 Profile  
 
PostPosted: Wed Apr 25, 2018 8:31 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3135
Location: Tampere, Finland
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


Top
 Profile  
 
PostPosted: Thu Apr 26, 2018 12:18 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6948
Location: Canada
A few years ago RushJet1 made a DPCM tool:
http://forums.nesdev.com/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. :)


Top
 Profile  
 
PostPosted: Thu Apr 26, 2018 12:32 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1783
Location: Gothenburg, Sweden
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.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Thu Apr 26, 2018 12:48 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6948
Location: Canada
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.

I don't know why this would be any different than just initially importing it at the lower pitch to begin with?

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.


Top
 Profile  
 
PostPosted: Thu Apr 26, 2018 1:25 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1783
Location: Gothenburg, Sweden
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.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Thu Apr 26, 2018 2:36 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6948
Location: Canada
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'?

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?

...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?)


Top
 Profile  
 
PostPosted: Thu Apr 26, 2018 5:44 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20763
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Thu Apr 26, 2018 9:25 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1783
Location: Gothenburg, Sweden
Quote:
...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?)


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.

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.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Fri Apr 27, 2018 12:56 pm 
Offline

Joined: Wed Nov 10, 2004 10:17 pm
Posts: 147
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).


Attachments:
dpcm.png
dpcm.png [ 20.93 KiB | Viewed 2293 times ]
Top
 Profile  
 
PostPosted: Fri Apr 27, 2018 5:43 pm 
Offline

Joined: Fri Apr 27, 2018 11:43 am
Posts: 4
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.


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.


Top
 Profile  
 
PostPosted: Fri Apr 27, 2018 9:28 pm 
Offline
User avatar

Joined: Thu Jul 23, 2015 7:54 pm
Posts: 181
Location: USA
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.
The only real issue with this is that it reduces the granularity of volume envelopes by half.

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.
How exactly would I go about doing this in audacity?

cdigi wrote:
I would be interested to look at your samples in Audacity if you would like to post them.
Go right ahead
Attachment:
gunshot.mp3 [16.33 KiB]
Downloaded 80 times

Attachment:
gunshot.bin [1.41 KiB]
Downloaded 80 times

Attachment:
empty_clip.mp3 [8.24 KiB]
Downloaded 79 times

Attachment:
empty_clip.bin [209 Bytes]
Downloaded 80 times

Just rename the .bin files as .dmc files.
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.


Top
 Profile  
 
PostPosted: Fri Apr 27, 2018 11:24 pm 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1783
Location: Gothenburg, Sweden
Quote:
The only real issue with this is that it reduces the granularity of volume envelopes by half.

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.

Quote:
How exactly would I go about doing this in audacity?
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.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Sat Apr 28, 2018 2:53 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3135
Location: Tampere, Finland
FrankenGraphics wrote:
Quote:
The only real issue with this is that it reduces the granularity of volume envelopes by half.

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.

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.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group