Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Composing > SID out of tune?
2006-06-28 15:28
carlsson

Registered: Nov 2002
Posts: 41
SID out of tune?

Recently a Speccy person elsewhere posted that:

Quote:
The SID .. tended to be out of tune at extreme frequencies (the Speccy's beeper also suffers this problem). Where as the AY is much closer to perfect pitch.


Apart from being typical C64/SID-bashing (most Speccy people despise the SID for muddy sound blah blah blah), does the poster have a point? I can't recall I ever heard a SID tune that suffers from lack of frequency resolution so it sounds out of tune, except from when it was done on purpose or the musician didn't bother to get a good frequency table.

I know from personal experience that the VIC-20 has a very limited frequency resolution, but it is a completely different chip and supposedly nobody mixes up the two. Maybe if one uses very high frequencies (several thousand Hz?) on the SID, these notes will not be in tune, but few people can hear the difference, and it depends on monitor or other speakers if they can reproduce the notes faithfully.
 
... 67 posts hidden. Click here to view all posts....
 
2006-06-30 09:16
Scout

Registered: Dec 2002
Posts: 1570
Quote: Yes, Paper rocked as well .. man, has it been almost 10 years already? :(

What I like about the spectrum demo is that the colours are all over the place. Reminds me of the Hein de Kort comics :)


10 years...yeah :-|

And yes, Hein de Kort! :D



"Aaa! stroke my pussy"
"I can't find a pussy over here"
"but there's a goat that needs some attention"

Heheh

---
Commodore 64 Scenemusic Podcast
http://8bitmayhem.blogspot.com/
2006-06-30 10:56
TNT
Account closed

Registered: Oct 2004
Posts: 189
Quote: Ok.. 3.5MHz, 3.5469MHz .. Ok, I though the framerate was impressive, but with 250% extra cpu power, no wonder.

Clockspeed isn't direct indicator of CPU power, you know. It always megahurts me when someone implies that ;)
2006-07-09 08:53
John West
Account closed

Registered: Aug 2004
Posts: 4
Quoting Graham
And additional to that the frequency is inverse linear which allows the same accuracy at ALL frequencies


It's actually linear: Fout = (Fn*Fs/1677216). The accuracy gets a little worse at lower frequencies (the numbers are smaller, so it has fewer bits to represent them accurately). But it's still pretty good.

The worst are C0 and D0 on PAL machines, with an accuracy of 0.16% and 0.15% respectively. Every other note is better than 0.1%. Every note above A3# (NTSC) or G3 (PAL) gets better than 0.01%. I'm not a musician, but surely that's accurate enough.

Do I have the enthusiasm to track down docs on Spectrum and AY sound and repeat the calculations for them? ... nah.

Lua (http://www.lua.org/) script used to calculate the errors:
step = 2 ^ (1/12)
pal = 985248
ntsc = 1022727
for i = 0, 95 do
	note = 440 / (step^(57-i))
	palS = math.floor( 0.5 + (2^24)*note/pal )
	ntscS = math.floor( 0.5 + (2^24)*note/ntsc )
	palF = pal*palS / (2^24)
	ntscF = ntsc*ntscS / (2^24)
	palE = 100*(palF - note)/note
	ntscE = 100*(ntscF - note)/note
	print( string.format( "%02d %8.2f %04x %04x %8.2f %8.2f % 2.3f % 2.3f",
		i, note, palS, ntscS, palF, ntscF, palE, ntscE ) )
end


It prints desired frequency, SID register settings for PAL and NTSC, actual frequency for PAL and NTSC, and error.
2006-07-09 18:19
John West
Account closed

Registered: Aug 2004
Posts: 4
I did the AY calculations too. If it's the AY-3-8910 that they're talking about, they got it the wrong way around. SID has very accurate notes. The AY-3-8910 is terrible. At 1MHz, the higher notes are up to 1.4% out. That's 1/4 of the way to the next note.
2006-07-10 07:06
Laxity

Registered: Aug 2005
Posts: 459
Quote: Clockspeed isn't direct indicator of CPU power, you know. It always megahurts me when someone implies that ;)

Stupid conclusion, I know!..

I still believe that a z80 variant clocked at 3.5MHz is relatively faster than a 6510 clocked at 0.985MHz/1.023MHz. Might just be me, unless ofcourse most instructions take 10+ cycles on the z80 ;)
2006-07-10 09:56
TNT
Account closed

Registered: Oct 2004
Posts: 189
@Laxity: you get about or over that in everything but carefully crafted code. (Well, the latter is called optimising, isn't it ;)

http://www.geocities.com/SiliconValley/Peaks/3938/z80time.txt

I can calculate some statistics from my own (non-demo) code, but without emulating it instructions inside loops get underrepresented.
2006-07-10 10:27
chatGPZ

Registered: Dec 2001
Posts: 11387
Quote:
I still believe that a z80 variant clocked at 3.5MHz is relatively faster than a 6510 clocked at 0.985MHz/1.023MHz. Might just be me, unless ofcourse most instructions take 10+ cycles on the z80 ;)


its like that actually... in average you need about 4 times the clockfrequency for z80 as you need for 6502 to achive the same execution speed. (ofcourse, depending on the actual code, the one or the other will have an advantage).
2006-07-10 11:09
Laxity

Registered: Aug 2005
Posts: 459
Hmm.. It is slow, indeed.

I did some coding on the Game Boy / Game Boy Color, and I remember those being significantly faster than the 64. The Game boy is clocked slightly higher than the Spectrum(4.1MHz), and has a custom Sharp variant of the Z80 processor which makes my point referance in this matter rather bad, I guess. On top of that all I coded was audio related, which makes it even worse. ;)
2006-07-10 11:24
Graham
Account closed

Registered: Dec 2002
Posts: 990
Quote:
I still believe that a z80 variant clocked at 3.5MHz is relatively faster than a 6510 clocked at 0.985MHz/1.023MHz. Might just be me, unless ofcourse most instructions take 10+ cycles on the z80 ;)

Like groepaz said: Yeps, the Z80 has much much more cycles per opcode than a 6502 cpu. Typically the cycles are in the range of 8 to 14 there. So in practice you need atleast 2 to 3 times the MHz to have the same speed as a 6502. The exact value is depending on the job though, for example on 16 bit math the Z80 is slightly better than on simple bit fiddling jobs. And the Z80 completely lacks indexed adressing modes. You can only index to a fixed number but not a register.
2006-07-10 14:05
Frantic

Registered: Mar 2003
Posts: 1648
[edit]
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Sokratekk
TheEnemy/TREX/THD
Luca/FIRE
trident
rambo/Therapy/ Resou..
Martin Piper
v3nt0r/ibex-crew
kbs/Pht/Lxt
TheRealWanderer
psych
Airwolf/F4CG
Andy/AEG
zscs
iAN CooG/HVSC
Scrap/Genesis Project
Sulevi/Virtual Dreams
sln.pixelrat
Guests online: 163
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.6)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Sprite Bukkake 2  (9.6)
9 Uncensored  (9.6)
10 Comaland 100%  (9.6)
Top onefile Demos
1 Layers  (9.7)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Xmas 2023 Silent Night  (9.5)
6 Katzen-Video.mp4  (9.5)
7 Rainbow Connection  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Fairlight  (9.3)
5 Triad  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.047 sec.