It is currently Sun Dec 10, 2017 11:03 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 26 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Feb 25, 2013 10:21 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2981
Location: Tampere, Finland
James wrote:
I'm emulating the sound channels at 1.79MHz, low-pass filtering with a 512-tap FIR filter, and downsampling by 37 to get ~48kHz output. I suppose I haven't compared with a critical ear, but I don't notice any particularly scratchy differences between this method and the blipbuf method that I currently used.

Your method is fine, there's no audible aliasing when doing that. It's basically the same thing that the real NES is doing.

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


Top
 Profile  
 
PostPosted: Mon Feb 25, 2013 12:46 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6503
Location: Seattle
Blipbuf is basically a space-for-time optimization; by memoizing the result of all the lowpassed edges, you can just natively generate audio at the sample rate, rather than needing to generate all 1.8MS/s and lowpass it.


Top
 Profile  
 
PostPosted: Mon Feb 25, 2013 7:56 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
peacedev, bandlimited synthesis is key here. This is just emulating at the NES rate, lowpass filtering with cutoff below half the output sampling rate (Nyquist frequency), then decimating. James does this literally (going by his description), and blipbuf turns the algorithm inside-out and does the same thing with a fraction of the computing power. You have to do the lowpass before decimating (downsampling); yoiu can't just do it on the output, because aliasing has already corrupted the output with spurious frequencies all throughout the audible band.

Maybe someone could write an aliasing test that plays a clean frequency sweep up beyond audible.


Top
 Profile  
 
PostPosted: Tue Feb 26, 2013 10:23 am 
Offline

Joined: Sat Feb 23, 2013 12:41 pm
Posts: 10
Now with luck, I am able to integrate bandlimited to wave form generation.

Here is the result.
https://dl.dropbox.com/u/30815442/downl ... 08-0_3.mp3
and
https://dl.dropbox.com/u/30815442/downl ... -solid.mp3

May I ask for your opinion ?

_________________
Peace Synthesizer Framework
http://peacedeveloper.appspot.com/docs/ ... index.html


Top
 Profile  
 
PostPosted: Tue Feb 26, 2013 2:38 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
It's hard to tell with the material you're using. Can you do a simple mono frequency sweep from 100 Hz to 30000 Hz, lasting say 20 seconds? If you have a program to show the frequency spectrum, aliasing is really easy to spot (I've moved to Linux and am not familiar yet with one to do this). Try that with the square, and with the triangle (separately). I'm also curious as to how you've implemented bandlimiting.


Top
 Profile  
 
PostPosted: Tue Feb 26, 2013 2:57 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2981
Location: Tampere, Finland
blargg wrote:
It's hard to tell with the material you're using.

What's obvious though, is that there's some other problem in your emulation not related to aliasing. The music sounds choppy (almost seems like timing is off, but could be just wrong note lengths or something playing with my ears).

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


Top
 Profile  
 
PostPosted: Tue Feb 26, 2013 4:56 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
Yeah, that's distracting when listening to familiar material like the beginning Castlevania. I take it that this thing is scripted at the command-line level, thus timing will necessarily be pretty jittery.


Top
 Profile  
 
PostPosted: Tue Feb 26, 2013 5:34 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6503
Location: Seattle
blargg wrote:
If you have a program to show the frequency spectrum, aliasing is really easy to spot (I've moved to Linux and am not familiar yet with one to do this).
Audacity is cross-platform and works nicely for this. (Click on the name of the track in the upper-left corner of the waveform, and select "spectrogram")


Top
 Profile  
 
PostPosted: Tue Feb 26, 2013 8:54 pm 
Offline

Joined: Sat Feb 23, 2013 12:41 pm
Posts: 10
blargg wrote:
It's hard to tell with the material you're using. Can you do a simple mono frequency sweep from 100 Hz to 30000 Hz, lasting say 20 seconds? If you have a program to show the frequency spectrum, aliasing is really easy to spot (I've moved to Linux and am not familiar yet with one to do this). Try that with the square, and with the triangle (separately). I'm also curious as to how you've implemented bandlimiting.




Using Impulse training method with my own tweaks.
I already run tests in native square wave and alias was gone well.
I can see now wave shape was altered.

Like you said, In general (not by testing freq sweep) the alias thing is hard to detect by human ear.
I wonder if it really worth to use bandlimitting in typical conditions.

_________________
Peace Synthesizer Framework
http://peacedeveloper.appspot.com/docs/ ... index.html


Top
 Profile  
 
PostPosted: Tue Feb 26, 2013 8:58 pm 
Offline

Joined: Sat Feb 23, 2013 12:41 pm
Posts: 10
thefox wrote:
blargg wrote:
It's hard to tell with the material you're using.

What's obvious though, is that there's some other problem in your emulation not related to aliasing. The music sounds choppy (almost seems like timing is off, but could be just wrong note lengths or something playing with my ears).



It is realtime parsing data. It cause latency some time.
I will improve this later with compile time. Thanks for notify.

_________________
Peace Synthesizer Framework
http://peacedeveloper.appspot.com/docs/ ... index.html


Top
 Profile  
 
PostPosted: Thu Feb 28, 2013 6:38 am 
Offline

Joined: Sat Feb 23, 2013 12:41 pm
Posts: 10
After Optimization !!!!


https://dl.dropbox.com/u/30815442/downl ... imized.mp3


Now I am very happy with the result after tuneup. Thank you very much for all comment !!!!!



:lol: :lol: :lol: :lol:

_________________
Peace Synthesizer Framework
http://peacedeveloper.appspot.com/docs/ ... index.html


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 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