Minimig Discussion Forum

Discussing the Open Source FPGA Amiga Project
It is currently Tue Nov 21, 2017 4:25 am

All times are UTC




Post new topic Reply to topic  [ 121 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 13  Next
Author Message
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Mon Sep 03, 2012 5:40 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
AW72 wrote:
I reduced all tops of the amplitude from 100% volume to 60% volume on this two samples, using "Audio Master III".


That's not actually necessary because even if the sample reaches the extremities, it's only momentary and thus the standing tone gets lost in the sound itself. The problem occurs when either a nearly-extreme, or nearly-zero value is output constantly.

Quote:
In next step, i looked at the end and the beginning of both samples and faded them in/out to the zero-line of the sample-graphic. Because they weren`t exactly at this before


Thanks for verifying that - I was fairly sure those sound effects had a DC offset, but hadn't actually verified.

Quote:
and i thought maybe this could be the reason, why the game still holds this tone.


Remember that the Amiga chipset operates on 16-bit words at all times, so the minimum sample repeat possible is 2 bytes. Thus, *both* the first two bytes of the sample must be zero. If you did a fade, it's possible the first sample is zero and the second is still non-zero, in which case the standing tone will still occur. (That's assuming Gods parks the sound channel on the first two bytes of the sound effect. That's the most common method, but again, I've not verified it.)

Quote:
but i really can not hear this high-tones. Yesterday i tried it again.


I can't hear it either - but I *can* see it if I sample the Minimig's output using Audacity then amplify the resulting sample.

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Mon Sep 03, 2012 6:22 pm 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
I always had good hear, but... are you telling me I have supernatural powers? :D

No, seriously: my girlfriend and a good friend of mine who's a sound technician can both hear it. I confirmed it with them when I first told boing4000 about all this. Then he introduced the 15KHz "fix", wich in the end was even more annoying and I had to stop playing after a while.

Good thing you can see it, MMrobinsonb5, because I'd feel very strange otherwise...


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Mon Sep 03, 2012 11:04 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
gaula92 wrote:
I always had good hear, but... are you telling me I have supernatural powers? :D


LOL - no, I suspect it's one of those things like the "Mosquito" ringtone that's supposedly only audible to teenagers! There are plenty of other people who can hear it too, but it's well known that as we get older the higher frequencies of our hearing are generally the first to be lost.

Quote:
No, seriously: my girlfriend and a good friend of mine who's a sound technician can both hear it. I confirmed it with them when I first told boing4000 about all this. Then he introduced the 15KHz "fix", wich in the end was even more annoying and I had to stop playing after a while.


I can believe it. I used to be able to hear the flyback whine of a CRT TV, which would be the same frequency. As for the Gods noise, I daresay I'd be able to hear it myself if I used headphones and turned off the main computer (which has one hard-drive that makes enough high-frequency noise that it'd drown out the Minimig noise!).

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Tue Sep 04, 2012 1:24 am 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
"Sam, is daresay a real word?"


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Tue Sep 04, 2012 8:13 am 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
gaula92 wrote:
"Sam, is daresay a real word?"


"You crack me up, little buddy!"

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Mon Sep 17, 2012 10:01 pm 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
Today I got my (lame) Macbook to record Minimig output on Lubuntu after fighting ALSA and Audacity (thanks for the tip about this great open source program, MMrobinsonb5!).

So I have recorded Gauntlet III intro ending, wich clearly shows strange tones player after volume goes down. It also happens in other games, so I guess silencing these tones would help them too (Ghouls'N Ghosts comes to mind).

It's a very similar case to GODS: they seem to be tones standing after volume has gone down enough, ie, when samples shouldn't be sounding anymore, and they don't sound in real hw. So maybe you can easily take these tones out by silencing them in the core, just like you did with GODS, mr Robinson (jeesus lovesyou more than you will know, hoh hoh hoh).

Or maybe I'm doing silly assumptions here :D


Attachments:
gauntletIII_BEEPS.wav.zip [920.09 KiB]
Downloaded 102 times
Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Tue Sep 18, 2012 12:44 am 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
gaula92 wrote:
Today I got my (lame) Macbook to record Minimig output on Lubuntu after fighting ALSA and Audacity (thanks for the tip about this great open source program, MMrobinsonb5!).


No problem - it's a very useful piece of software :)

Quote:
So I have recorded Gauntlet III intro ending, wich clearly shows strange tones player after volume goes down. It also happens in other games, so I guess silencing these tones would help them too (Ghouls'N Ghosts comes to mind).


Hmmmm - interesting that the examples you quote both use Tim Follin's custom music routine.

I have a theory as to what might be happening anyway. It'll be a few days before i have time to test it, though - so give me a nudge if I forget!

Quote:
It's a very similar case to GODS: they seem to be tones standing after volume has gone down enough, ie, when samples shouldn't be sounding anymore, and they don't sound in real hw. So maybe you can easily take these tones out by silencing them in the core, just like you did with GODS,


I could be wrong about this, but my current theory is that it's caused by the samples being played with the channel volume set very low. It's not the standing tone problem from Gods - I *think* it's due to the fact that the Sigma-Delta converter trims off the lower bits of quiet samples in an attempt to keep standing tones out of the audible spectrum. I'll test this by building a core without that truncation.
(What happens is that each 8-bit sample is multiplied by the channel's 6-bit volume, resulting in a 14-bit input into the sigma-delta converter.
Unfortunately, feeding that directly into the sigma-delta converter would result in worst-case standing tones of about 1.7KHz (28Mhz / 2^14) for the lowest possible sample values, which would of course sound awful! So what happens instead is the lower few bits of the multiplied 14-bit sample are trimmed off, making the standing tones higher frequency, but it means that as the volume drops, the sample loses precision. I suspect what's happening is that as the music fades out, what started as 8 bit samples are becoming 7, then 6, then 5.... and finally 1-bit samples, which is where they turn into square-wave sounding bloops. Their losing precision makes them harsher and thus more audible, too. The effect is a bit like overdriving a guitar amp!)

Quote:
mr Robinson (jeesus lovesyou more than you will know, hoh hoh hoh).


LOL! I'd retaliate but I can't think of a song with "Gaula" in the lyrics! :)

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Thu Sep 20, 2012 10:34 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
OK - here's an update. What I've tried is changing the precision of the Sigma Delta modulator, like so:
acculeft[16:0] <= (acculeft[16:0] + {acculeft[16],acculeft[16],~ldatasum[14],ldatasum[13:0]});
assign left = acculeft[16];

Previously it was:
acculeft[12:1] <= (acculeft[12:1] + {acculeft[12],acculeft[12],~ldatasum[14],ldatasum[13:5]});
assign left = acculeft[12];

Notice that I'm now using all 14 bits of ldatasum, whereas before the lower 5 bits were trimmed off.

Now, as I said, this will have the side-effect of making the standing tones audible at very low volume levels, so it's not a solution - but playing Gauntlet III's music with this version of the core is a very good illustration of the standing tone problem!

I've attached both the core and a recording of the same segment of the tune for comparison. Notice how it no longer chops in and out in the last few seconds, but instead plays gradually descending standing tones, modulated by the last vestiges of the tune.

Unfortunately, I think the only way to fix this will be to increase the frequency at which the sigma delta converter operates. Whether that's remotely feasible I don't know. It's currently running at 28Mhz, but ideally we want it running at nearer 1GHz. Any clock rate increase would improve matters, however.

Two other things that might be worth exploring:
* Maybe clamping the volumes so that anything under, say, 5, maps directly to 0
* In combination with that, trimming off one or two bits, finding a balance between resolution and audibility of standing tones.

* It might also be worth trying a PWM-based volume implementation (since that's what the real Amiga uses) - though I'm not sure how that would interact with the Sigma Delta modulator.


Attachments:
GauntletIII_Tail.zip [759.46 KiB]
Downloaded 105 times
minimig_fullresSD.zip [92.62 KiB]
Downloaded 83 times

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net
Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Sun Sep 23, 2012 12:54 pm 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
I got to test these experimental solutions, and I must say Gauntlet III ending sounds a little better now, but the tones are there. Now, the tones are more similar to real notes, not just robotic bleeps. I suppose that's because you now keep more resolution, as you explained.

However, I find the first alternative solution to be very interesting:

Quote:
* Maybe clamping the volumes so that anything under, say, 5, maps directly to 0
* In combination with that, trimming off one or two bits, finding a balance between resolution and audibility of standing tones.


I will happily test that solution. There's also some hissing sound in some games after a sample has finished (not present in real hardware), and I believe it could clear that too.

As for the PWM-based volume implementation, why wasn't it used from the beginning? If that's how Amiga hardware is supposed to work, that shoudln't produce the strange artifacts we're seeing (hearing, actually). Just out of curiosity...


Top
 Profile  
 
 Post subject: Re: Minimig Sigma-Delta and the noise in Gods!
PostPosted: Sun Sep 23, 2012 1:55 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
gaula92 wrote:
Now, the tones are more similar to real notes, not just robotic bleeps. I suppose that's because you now keep more resolution, as you explained.


Yup, that's right. The tones are always there, they're just normally of a high enough frequency to be (a) inaudible, and (b) filtered out by the accumulating capacitor. By increasing the precision without increasing the operating frequency, we've made those tones audible.

In your testing were you aware of any side-effects that aren't present on the previous version?

Quote:
I will happily test that solution. There's also some hissing sound in some games after a sample has finished (not present in real hardware), and I believe it could clear that too.


OK - I'll cook up another build that tries that. I've tried something similar on my C3 board, where instead of clipping off the low bits, I clip them only if the sample is below a threshold. It helps, but it's still not a solution.

Quote:
As for the PWM-based volume implementation, why wasn't it used from the beginning? If that's how Amiga hardware is supposed to work, that shoudln't produce the strange artifacts we're seeing (hearing, actually). Just out of curiosity...


A number of reasons actually:
* I dont think that detail about the Amiga hardware has been known that long,
* intuitively, using a multiplier should give better quality
* It's likely the Amiga designers would have used a multiplier too f it wouldn't have added so much to the cost of Paula!
* I'm not sure what kind of DAC the Amiga uses, but it may well not be sigma-delta; Because both PWMs and Sigma-delta converters operate by rapid gating of a signal over time, using them in conjunction may well result in even *more* unpleasant artifacts than we're currently seeing! (OK, hearing!)

It's still worth a try, though!

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 121 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 13  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Translated by Xaphos © 2007, 2008, 2009 phpBB.fr