# Sound accuracies

7 replies to this topic

### #1 WrathchildOFFLINE

Wrathchild

River Patroller

• 2,002 posts

Posted Mon Oct 13, 2003 3:45 AM

Hi,

Is there an online graph showing Pokey frequencies against real-note freqs?
I think I recall seeing then in an Antic or Compute issue, one each for 8-bit and 16-bit sound settings.

Thanks,

Mark

### #2 emkayOFFLINE

emkay

• 9,451 posts
• What's up?
• Location:Holy Grail ;)

Posted Tue Oct 14, 2003 3:31 AM

I know two formulas to calculate the 8-bit sound:

[Sound]=INT(31960/(f+2))

or
..................32000Hz
Frequency=-----------
...................[AUDF]

In theory there is 32000....125Hz possible.

Let's calculate:

32000Hz/256=125Hz

So the deepest Tone must be a cool base-tone, but it isn't, because it is square-wave based and you will only hear some resulting harmonics.

Another problem is:

32000Hz/440=72,72~

But you can set AUDF only to 72 or 73

etc...

To get clear notes you have only the chance to create a very good, for a musician understandable Sound-editing tool, and he will adjust the sounds by ears...

32000Hz/100Hz=320

This value you can only set by 16Bit

So, a Tool with real 16Bit-support is needed for higher note-accuracy...

Even here, a musician has to "finetune" by ears...

Same thing for Filtering and Triangle-sounds...(and all other sounds POKEY can produce by hardware...

But remember: a Guitar-Man will only play on a Guitar and not on a plank with wires... So build a guitar and he wil play great music on it
A plank with wires and an automated player will not help out here.

### #3 WrathchildOFFLINE

Wrathchild

River Patroller

• Topic Starter
• 2,002 posts

Posted Tue Oct 14, 2003 8:40 AM

Thanks for the tips,

I compared the 16-bit values in the Antic article @ http://www.atarimaga...soundpower.html against an equation I found elsewhere: 440*2^(n/12) e.g. n=0 for A.

Generally the 16-bit notes @ 1.79MHz are faithful enough,
but like you point out - its in the ears of the beholder

Regards,

Mark

BTW: Here's a 16-bit RMT tune I'm working on, hopefully some of you may recognise it

### #4 emkayOFFLINE

emkay

• 9,451 posts
• What's up?
• Location:Holy Grail ;)

Posted Tue Oct 14, 2003 9:42 AM

Thanks for the tips,

I compared the 16-bit values in the Antic article @ http://www.atarimaga...soundpower.html against an equation I found elsewhere: 440*2^(n/12) e.g. n=0 for A.

Generally the 16-bit notes @ 1.79MHz are faithful enough,
but like you point out - its in the ears of the beholder

Regards,

Mark

BTW: Here's a 16-bit RMT tune I'm working on, hopefully some of you may recognise it

Did you use the generator "A" or "6"...
?

16 Bit is very nice. Especially, the waveforms, an YM can't play
But the lower tones are a kind of to distorted (no filter). They can be enhanced by "vibratos".
OK.... by using 2 16Bit channels you can get very good results... but, two channels are lost, which could be used with the "voltage"-Bit to create a very good baseline...the sound-tool has to vary between 50 and 200 updatings and the two "voltage" Voices can be used together for FM...
So, with relative small CPU usage, you will get a cool 16Bit soundchip... with 3 channels for

1 Main voice
2 Attendace
3 Baseline

### #5 WrathchildOFFLINE

Wrathchild

River Patroller

• Topic Starter
• 2,002 posts

Posted Tue Oct 14, 2003 10:29 AM

Did you use the generator "A" or "6"...?

'6', I tried with 'A' and setting AudCtl values but this doesn't seem to work for me in RMT, each instrument shouldn't have different AudCtl values?

But the lower tones are a kind of to distorted (no filter). They can be enhanced by "vibratos".

I've notice that too I'll give that a go as its not a par on the NES version yet

OK.... by using 2 16Bit channels you can get very good results... but, two channels are lost, which could be used with the "voltage"-Bit to create a very good baseline...the sound-tool has to vary between 50 and 200 updatings and the two "voltage" Voices can be used together for FM...
So, with relative small CPU usage, you will get a cool 16Bit soundchip... with 3 channels for

1 Main voice
2 Attendace
3 Baseline

More C64 and ST tunes on the way then...

This tune only has two voices so I'm lucky, the battle tune which I'll do after, has a lot more going on.

Mark

### #6 BryanOFFLINE

Bryan

• 10,925 posts
• Cruise Elroy = 4DB7
• Location:Chesaning, MI

Posted Tue Oct 14, 2003 11:50 AM

Here's the beginnings of some pitch correction stuff I was writing. It's a BASIC/ML program that allows you to choose a pitch, then by pressing START/SELECT/OPTION you can hear:

PITCH, PITCH+1, or the 2 pitches alternated 50/60 times a second. With lower pitches it can give the illusion of a half-step, but the trick is obvious at higher pitches. If the alternating speed was faster (120/100Hz) it would work much better, but I haven't written that yet.

Try a pitch of 100 to start with and oh yes, the mixing sounds better on real hardware than in Atari800Win+.

The ML VBlank routine:

```
.org \$0600

CLV

LDA \$D01F;Consol

AND #\$07

EOR #\$07;Invert

BNE skip

LDA \$CD	;If 0, use old settings

skip

STA \$CD	;CD is the previous setting

LSR A	;Start?

BCC sel

LDX \$CB	;Tone1

BVC sound

sel

LSR A	;Select?

BCC opt

LDA \$14	;Time0

AND #\$01

TAY	;Low bit in Y

LDX \$CB,Y;Alt Tone

BVC sound

opt

LSR A

BCC end

LDX \$CC	;Tone2

sound

STX \$D200;Audf1

end

JMP (\$00CE)

```

-Bry

P.S. I re-uploaded the ATR after modifying the program to make it easier to put in different values.

### #7 BryanOFFLINE

Bryan

• 10,925 posts
• Cruise Elroy = 4DB7
• Location:Chesaning, MI

Posted Tue Oct 14, 2003 2:43 PM

Today I wrote another version that changes the pitch on a scanline basis. It can produce higher pitches with better accuracy, but it seems to be outrunning the emulator (it only works right on real hardware).

-Bry

### #8 raster/c.p.u.OFFLINE

raster/c.p.u.

Chopper Commander

• 221 posts
• Location:Czech Republic

Posted Wed Oct 15, 2003 12:45 AM

'6', I tried with 'A' and setting AudCtl values but this doesn't seem to work for me in RMT, each instrument shouldn't have different AudCtl values?

In RMT there distortion '6' means AUDC=\$0c (bass tones) with automatically AUDCTL set up for join of two generators and 1.79MHz, and 16bit frequency values are stored to two AUDF registers.
Distortion 'A' is for normal "pure" tones, AUDC=\$0a (pure tones) and 8bit frequency value is stored to one AUDF register.

If you use "manual AUDCTL" instrument setting and distortion '6' isn't used, no 16bit values are stored. So, if you urgently need to use some exact own 16 bit value set up, you can use 2 instruments in 2 tracks (one of them with zero volume) and both your 8bit frequency values will be stored to two AUDF registers (low and high byte of 16bit value). Of course, it is quite laborious, but if you really need it, it's possible...

#### 0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users