Login:
Menu:
Post: Author:
FamiTracker > General > FamiTracker Talk > Version 0.3.8 Beta Owner: jsr New post
Page 16 of 25 Sort: Goto Page: << Previous [1] [2] [3] ... [15] [16] [17] ... [23] [24] [25] Next >>
Posted: 2012-04-18 21:25 Reply | Quote
jrlepage
Moderator

Avatar

Member for: 1662 days
Location: Quebec
Status: Offline

#33700
I took this test earlier... Those frequencies are atrocious! 22k I couldn't hear, but 21 felt like there were tiny insects in my ears shredding my eardrums apart. Unbearable.

_______________________
Follow me on Twitter.
Posted: 2012-04-18 22:56 Reply | Quote
jsr
Administrator

Avatar

Member for: 2604 days
Location: Sweden
Status: Offline

#33712
gyms: I'm using a library called blip-buffer to generate alias free waveforms, and it works very well when using as intended.

My idea was that it might also work for the N163 mixing model since it also operates as a low-pass filter which would remove the switching noise above the nyquist frequency, but I think that is pushing it a little as it's clear that some noise is leaking through (changing the sample rate proves that too). There are probably ways to improve it further that might be worth looking into. Although it is true that this is complicated, Nezplug++ deals with this by completely turning off the switching mode when using less than 8 channels

_______________________
Programmer and developer
Posted: 2012-04-19 00:44 Reply | Quote
gyms



Member for: 863 days
Status: Offline

#33729
jsr wrote:
Nezplug++ deals with this by completely turning off the switching mode when using less than 8 channels


Would you consider making this sort of compromise for FamiTracker? It seems this would be the best option without going through the trouble of developing some new anti-aliasing method just for the problems unique to the N163.


Earlier I ran some things through a spectral analyzer out of curiosity, to see what was going on exactly. jsr, I'm sure you're already well aware of all this, but I'll go ahead and post what I found here for anyone else who's interested.


Description: These are comparisons of N163 waveforms as generated by the current beta(4) of FamiTracker. In order to best study the aliasing effects of the N163 switching-noise, I chose the 32-long sine wave sounding a C-0, the lowest note possible on the N163 in Famitracker. I have rendered this note under each possible N163 channel setup under two sample rates: 44.1kHz and 96kHz.

I'll give brief descriptions for those who might not be able to read what the data is showing. Note that the spectral analysis window changes its displayed bandwidth depending on the file's sample rate. It's important to compare data and not shapes.



Number-of-channels comparison @ 44.1kHz:

To start, one-channel produces no significant aliasing artifacts and is a good reference for how it should look and sound when using 5 channels or less. Since this is a sine(ish) wave, there should be no large spikes other than the one to the far left, the fundamental frequency.

see
hear

8-channels: The 15kHz noise is introduced. There should be no large spikes present between the fundamental spike and the switch-noise spike. However, there are. This is the result of aliasing and produces extra tones, ringing noises, that should not be there and would not be present if this were the actual hardware. This concept applies to the remainder of these examples.

see
hear

7-channels: The switch-noise is higher. Aliasing artifacts present. The ringing tones should not be there.

see
hear

6-channels: This pattern continues...

see
hear

5-channels: At this point, the switch-noise has gone above the limits of 44.1kHz, yet the resulting aliasing tones are still very present and audible.

see
hear

4-channels: Continues...

see
hear

3-channels: The switch-noise starts to lose its influence on the audible spectrum, but there is still enough audible aliasing artifacts that can still be heard.

see
hear

2-channels: No problematic aliasing to speak of...

see
hear

1-channel, again:

see
hear


Number-of-channels comparison @ 96kHz: A massive improvement as far as the the audible ring-tones are concerned. There are still some present here and there, but this is a classic example of how higher sample rates combat aliasing artifacts. Note the width of the spectrum analyzer has expanded to show the new possible frequencies of 96kHz. You can see the resulting overtones of the switch-noise extending way past the audible range into supersonic territory.


8-channels:

see
hear

7-channels:

see
hear

6-channels:

see
hear

5-channels:

see
hear

4-channels:

see
hear

3-channels:

see
hear

2-channels:

see
hear

1-channel, again:

see
hear


So as you can see, and hear, this is a problem. The extra ringing tones would not be present and is not faithful to the hardware. And as jrlepage and EHII helped demonstrate, you can't hear anything past 22kHz. The switch-noise would not be audible past the 6-channel setting. Even if it were possible, there's practically no speaker available that's capable of producing frequencies that high, but the resulting alias-artifacts are still clearly heard.

Posted: 2012-04-19 00:47  (Last Edited: 2012-04-19 00:47) Reply | Quote
jrlepage
Moderator

Avatar

Member for: 1662 days
Location: Quebec
Status: Offline

#33730
gyms wrote:
Number-of-channels comparison @ 96kHz: A massive improvement as far as the the audible ring-tones are concerned.

Surely you must be joking.

8 channels @ 96 kHz makes me want to tear my eardrums out.

_______________________
Follow me on Twitter.
Posted: 2012-04-19 00:50 Reply | Quote
gyms



Member for: 863 days
Status: Offline

#33731
jrlepage wrote:
gyms wrote:
Number-of-channels comparison @ 96kHz: A massive improvement as far as the the audible ring-tones are concerned.

Surely you must be joking.

8 channels @ 96 kHz makes me want to tear my eardrums out.


That's the sound of the piercing 15kHz noise, but the aliasing tones are gone; it's hardware accurate.

Posted: 2012-04-19 01:53 Reply | Quote
Xyz_39808

Avatar

Member for: 860 days
Location: South Texas
Status: Offline

#33736
Finally got a chance to play with beta4. Compared to 8Channel, 7Channel is SOOO pleasant.

Posted: 2012-04-19 01:54  (Last Edited: 2012-04-19 02:04) Reply | Quote
rainwarrior

Avatar

Member for: 829 days
Location: Canada
Status: Offline

#33737
Well, the N163 waveforms themselves are supposed to have their own aliasing, due to their internal playback samplerate (which itself is aliased again second time through the CPU/15*chans cycling rate), not to mention other harmonic distortion from quantization (these are only 4-bit samples, remember). There is no way to make a clean sine wave on an N163.

What I mean is, gyms, that using a C tone might not be a good test; because the frequency of that C waveform itself will be aliased as well by the switching; and that aliasing is desired behaviour. (Probably not that strong an effect; but it still muddies the water a little, because that particular aliasing should be kept.)

The aliasing we have here that is a problem is simply aliasing of of frequencies generated above the nyquist frequency of our own samplerate. The FTM I posted two pages back is as pure/harsh a demonstration of it as possible, all waveforms 0 except one channel playing 15, which generates the strongest possible harmonics of the switching frequency. I don't think there's too much need to analyze it here; jsr seems to have a handle on it.

Also, lots of audio speakers (cheap and expensive) are quite capable of producing ultrasonic frequencies (you can try this out on a dog). Some speakers are designed to filter them out, but usually our ears are the limiting factor there, or other intentional limiting factors in the audio producing hardware (e.g. using a 44kHz samplerate).

Posted: 2012-04-19 01:59 Reply | Quote
jsr
Administrator

Avatar

Member for: 2604 days
Location: Sweden
Status: Offline

#33739
gyms wrote:
Would you consider making this sort of compromise for FamiTracker? It seems this would be the best option without going through the trouble of developing some new anti-aliasing method just for the problems unique to the N163.

Sure it would be a possible compromise to turn it off when using less than say 7 or 6 channels, but I can do some recordings from a real cart later that can be compared with your recordings here. I wouldn't be surprised if there are some audible distortion there too.

_______________________
Programmer and developer
Posted: 2012-04-19 02:10  (Last Edited: 2012-04-19 02:12) Reply | Quote
cak

Avatar

Member for: 993 days
Location: oregon
Status: Offline

#33740
Less than 7 sounds about perfect to me.

I started doing a bit of test listening with different sample rates and channel combinations, and the results aren't so predictable as 96k being an improvement across the board. I'll post my results later today.

Also, I think it'd be best to test the noise by playing the lowest (least audible) note? Otherwise the tones simply modulate.

Posted: 2012-04-19 02:16 Reply | Quote
InterrobangPie

Avatar

Member for: 878 days
Location: England
Status: Offline

#33741
I've had no idea what you've all been going on about for the last 7 pages.

_______________________
iGotno_scope wrote:
im going to continue making this crazy stuff then after a while my style will be so sick that you will be like damn suuun that shit is so sick i dont even get it. i will be like bro its ok.. you dont have to.
Posted: 2012-04-19 02:39  (Last Edited: 2012-04-19 08:12) Reply | Quote
gyms



Member for: 863 days
Status: Offline

#33744
rainwarrior wrote:
Well, the N163 waveforms themselves are supposed to have their own aliasing, due to their internal playback samplerate (which itself is aliased again second time through the CPU/15*chans cycling rate), not to mention other harmonic distortion from quantization (these are only 4-bit samples, remember). There is no way to make a clean sine wave on an N163.


Yea, I wasn't questioning that. The 1-channel sample @ 44.1 shows this(assuming that the switch-noise had absolutely no influence at that point, which seems it doesn't for this 1-channel example given the patterns of its influence). I'm assuming that the 1-channel sample I have here is an example of what the tone looks and sounds like, aliasing and all, completely untouched by the switch-noise artifacts.


rainwarrior wrote:
What I mean is, gyms, that using a C tone might not be a good test; because the frequency of that C itself will be aliased as well by the switching; and that aliasing is desired behaviour. (Probably not that strong an effect; but it still muddies the water a little, because that particular aliasing should be kept.)


My thinking in choosing that was to get the fundamental as far away from the switch-noise as possible, to establish home position of sorts and see how the switch-noise caused this pattern to distort.

rainwarrior wrote:
The aliasing we have here that is a problem is simply aliasing of of frequencies generated above the nyquist frequency of our own samplerate. The FTM I posted two pages back is as pure/harsh a demonstration of it as possible, all waveforms 0 except one channel playing 15, which generates the strongest possible harmonics of the switching frequency. I don't think there's too much need to analyze it here; jsr seems to have a handle on it.


Yea, that would have been a much better way to see the effects. I overlooked that post of yours. Cak just brought up a good point too, that I should have at least used the lowest volume. But either way, the data I have here still shows how the switch-noise affects the note, and it's very obviously inharmonic distortion; has nothing to do with the C fundamental, its quantization noise or non existant harmonic-overtones(despite the sine being heavily quantized).


jsr wrote:
I can do some recordings from a real cart later that can be compared with your recordings here. I wouldn't be surprised if there are some audible distortion there too.


That would be great! Please share if you ever get around to it, I'd love to hear what the hardware actually does.


*EDIT: Also,
my guess as to where those extra tones between my C-0 fundamental the the switch noise come from, is that, due to the sample rate, the higher frequencies tend to get sampled during scattered parts of the cycle, making them sound like lower frequencies.

The second example here touches on what I'm thinking.

Posted: 2012-04-19 02:55  (Last Edited: 2012-04-19 05:30) Reply | Quote
cak

Avatar

Member for: 993 days
Location: oregon
Status: Offline

#33748
Hmm, does anyone have beta 3?
edit: Thanks icesoldier.

Posted: 2012-04-19 04:12 Reply | Quote
icesoldier

Avatar

Member for: 789 days
Location: Texas, United States
Status: Offline

#33750
Eeeyup.

_______________________
YouTube channel
Website (includes FTM's of my covers)
Split channels of any file GME can read
Posted: 2012-04-19 09:13 Reply | Quote
gyms



Member for: 863 days
Status: Offline

#33757
rainwarrior wrote:
What I mean is, gyms, that using a C tone might not be a good test; because the frequency of that C waveform itself will be aliased as well by the switching; and that aliasing is desired behaviour. (Probably not that strong an effect; but it still muddies the water a little, because that particular aliasing should be kept.)


I just tested it out. Red is your ring test and Blue is my C-0 test. They both match up perfectly; the defining peaks from the channel-switch aliasing is exactly the same.

gyms wrote:
due to the sample rate, the higher frequencies tend to get sampled during scattered parts of the cycle, making them sound like lower frequencies.


I'm almost certain that this is what we're dealing with here.


Attachments:
ring_test_vs_c0_44.png (32 Kb)
Posted: 2012-04-19 09:27  (Last Edited: 2012-04-19 09:41) Reply | Quote
rainwarrior

Avatar

Member for: 829 days
Location: Canada
Status: Offline

#33758
gyms wrote:
gyms wrote:
due to the sample rate, the higher frequencies tend to get sampled during scattered parts of the cycle, making them sound like lower frequencies.


I'm almost certain that this is what we're dealing with here.


That is the definition of aliasing, i.e. a frequency at N-X acts as an alias for frequency at N+X, where N = the nyquist frequency, or 1/2 of your samplerate.


And by the way, what I meant before is that unrelated to this beta's aliasing problem, is that the switching frequency is the N163's internal samplerate, which means it produces aliasing of its own. Additionally the channel has its own playback frequency which produces yet another layer of aliasing. This is why I suggested the other test, which is much simpler to evaluate: its result should be silent except for the switching tones and their harmonics.

Page 16 of 25 Sort: Goto Page: << Previous [1] [2] [3] ... [15] [16] [17] ... [23] [24] [25] Next >>