Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > Bug Reports & Feature Requests > N163 whine enabled regardless of channel count Owner: MovieMovies1 New post
Page 1 of 1 Sort:  
N163 whine enabled regardless of channel count Posted: 2015-02-26 17:46 Reply | Quote
MovieMovies1

Avatar

Member for: 4374 days
Location: Norway
Status: Offline

#66341
I discovered that the serial multiplexing of the N163 is not disabled if using 6 channels or less. This creates an audible ringing that would have been inaudible on a N163. This does not happen in 0.4.2. I can confirm that this has been going on since 0.4.3.

I am fearing that this may actually be an intentional decision, but I am reporting it anyways.

Posted: 2015-02-26 23:43 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#66353
That is correct, blip-buffer does a good job with the filtering so the there is no need for separate mixing methods depending on the channel count.

But what makes you think that it would be inaudible though? Actual N163 carts sounds way worse than famitracker on all channel configs, if that's what you meant.

_______________________
Programmer and developer
Posted: 2015-02-27 01:20  (Last Edited: 2015-02-27 01:23) Reply | Quote
MovieMovies1

Avatar

Member for: 4374 days
Location: Norway
Status: Offline

#66356
Check the mp3 file. It first plays the multiplexing noise with 8 channels enabled. Then I play the same thing using 4 channels.
With 4 channels, the multiplexing noise is at 29830Hz according to the nesdev wiki, and if I have understood things right, it should by all means be inaudible at 4 channels. However, when I play the file, there is still a very obvious ringing noise, and as I have already said, it would not be audible at 29830hz.
This happens on all channel combinations.


Attachments:
8ch4ch.mp3 (273 Kb)
Posted: 2015-02-27 04:06  (Last Edited: 2015-02-27 04:07) Reply | Quote
jrlepage
Moderator

Avatar

Member for: 4983 days
Location: Canada
Status: Offline

#66361
I just checked -- this hiss is indeed audible on my Megami Tensei II cart. Not much, but it's definitely there.

_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Posted: 2015-02-27 07:07 Reply | Quote
MovieMovies1

Avatar

Member for: 4374 days
Location: Norway
Status: Offline

#66363
Since this seems to be how the actual hardware behaves, I think it would be a good idea if somebody recorded the multiplexing noise with differing amounts of channels, so comparisons can be done against FamiTracker and other software, to potentially make emulation more accurate.

Just in case somebody really wants to record all hiss variations, I have already prepared NSF files for this purpose. They can be found in the ZIP file attached below.


Attachments:
n163_mp.zip (34 Kb)
Posted: 2015-02-27 10:52  (Last Edited: 2015-02-27 10:52) Reply | Quote
jrlepage
Moderator

Avatar

Member for: 4983 days
Location: Canada
Status: Offline

#66365
I think the way the tracker handles the N163's mixing is fine the way it is, and no major changes are warranted.

_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Posted: 2015-02-27 15:17 Reply | Quote
MovieMovies1

Avatar

Member for: 4374 days
Location: Norway
Status: Offline

#66370
I guess you are right about the emulation of the N163 in FamiTracker, but there's still the problem of the multiplexing whine being aliased when downsampled, which makes it sound a bit too sharp when running at 96khz, and outputs what seems to be an A#3 tone when set to 48khz.
This is actually a problem that I reported before, but as was said by both jsr and rainwarrior:

[quote=jsr]I've checked it but cannot find any obvious problems. There might be some audible differences due to the filtering when switching between sample rates, that's hard to avoid.

A multiple of A#3 is close to the 15kHz signal that appears when using 8 channels, but that's the case for both 44,1kHz and 48kHz.
[/quote]

[quote=rainwarrior]The high frequency switching leaks through the downsampling filter and appears as an unrelated aliased frequency in the audible range. The exact frequency heard depends on the samplerate and the nature of the filter.

It's pretty difficult to create a filter that can get rid of this entirely. Strong high frequency tones like the one produced by the N163 are a difficult problem.
[/quote]

Perhaps adding some sort of oversampling could help reduce the issue.

Posted: 2015-02-27 22:59 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#66384
If you run the audio at 96kHz then it's important that both windows and your sound card can handle that sample rate correctly, otherwise it's very likely that you'll get additional distortion due to resampling. It's usually recommended to stick to the default rate of 44.1kHz.

I've attached an example of N163 with 4 channels and the default triangle wave playing a C. You'll hear that there are a lot more high frequency noise than in famitracker, this is because there's some extra filtering in famitracker to make the noise more bearable (but it's still very evident that it's there).

_______________________
Programmer and developer
Attachments:
4chans.flac (242 Kb)
Posted: 2015-02-28 00:17 Reply | Quote
MovieMovies1

Avatar

Member for: 4374 days
Location: Norway
Status: Offline

#66392
The thing is that I have set my soundcard to run at 48khz. I want to run FT at this rate as well, but the fact that an audible A# note is produced at this sample rate is really off-putting to me.
This A# note obviously shouldn't be there. rainwarrior's NSFPlay has no such A# downsampling aliasing, so a fix for this should be possible somehow.

Posted: 2015-02-28 01:16 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#66394
Ok I see what you mean now about the A# tone. It's kept at a level of about -50dB so I wouldn't say the down-sampling filter does a particularly bad job, but it's unfortunate that it results into such a low frequency (and audible) tone.

I'll check if there's any way to adjust the filtering.

_______________________
Programmer and developer
Page 1 of 1 Sort: