Offline
Glasgow, Scotland.

After a bit of a fight, I've got my C64 set up with a MSSIAH cart, and it's outputting sound grand.

The other day I hooked up my Gameboy running LSDJ with an Arduinoboy to play the main melody line through the C64 and double it up in the recording. It wasn't till afterwards that I realised something was off with the C64's notes. I eventually got it to sound right by setting 'Transpose' in LSDJ to 05, but that doesn't solve the real problem.

Tonight I tried to play the C64 as more of a synth, over another song - but the tuning issues again got in the way. I got close by setting the 'detune' parameter to 09 on the C64 patch options, but still not perfect. No matter what key I played, I couldn't get any of them to match up with the

I never realised before now that analog synths could go out of tune.

* What causes the tune drift? Is it the SID or the board?
* How much does the 05 LSDJ transposition correspond to in notes/seminotes?
* Is there any way to tune the C64?

Any help welcome!

Offline
Glasgow, Scotland.

I should mention that I've set the MSSIAHCart to PAL (as that's what my TV/C64 are), but with no discernible change.

Offline
perth, WA

does the tuning stabilize if you leave the c64 to sit for half an hour?

edit: on second thought that probably wouldn't do anything because DCOs

Last edited by atomsmasha (Feb 10, 2016 5:55 am)

Offline

I haven't heard of a C64 going out of tune in that way, I guess you can't rule out a hardware issue but I'd think it more likely to be the frequency table in Prophet's code.   That's setup by the coder, so unless it has really extensive detune settings (letting you change each note in the table) I imagine you're stuck with it.    There isn't really a "standard" pitch table on c64, it can vary between tools though it's usually only within a semi-tone or two.  That side comes down to what the coder decides to do.   Maybe try running the same notes in some other editors and see how they match up.

It is a bit weird that switching PAL/NTSC doesn't adjust the pitch table in Prophet, because there is a root frequency difference between playing in those regions so I'd have thought he'd have a different table for each.  However it's only about a semi-tone, not the 5 or so it looks like you require.

edit: I assume Prophet doesn't have a global root note setting? (like a global transpose)

Last edited by 4mat (Feb 10, 2016 11:40 am)

Offline
Glasgow, Scotland.
atomsmasha wrote:

does the tuning stabilize if you leave the c64 to sit for half an hour?

edit: on second thought that probably wouldn't do anything because DCOs

I'm prepared to give it a bash and see!

It is a bit weird that switching PAL/NTSC doesn't adjust the pitch table in Prophet, because there is a root frequency difference between playing in those regions so I'd have thought he'd have a different table for each.  However it's only about a semi-tone, not the 5 or so it looks like you require.

Yeah. It does change it very slightly, but not enough that it sounds in tune sad

I think the only way I could test if it's the cart would be to get a hold of another one, but that'd be an expensive test. Hmm.

Offline

Incidentally, if you do want to check hardware.  Type this in and press space to cycle through C at different octaves.  Again, you're at the mercy of the frequency table I used (which was out of the official programmer's reference guide) but you can check if the sid isn't 5 notes out like described:

10 poke54296,10
20 poke54277,33
30 poke54278,255
40 poke54276,65
45 poke54274,0
48 poke54275,8
50 reada,b
60 if a=999 then restore:goto 50
70 poke54273,a:poke54272,b
80 poke53280,a
90 geta$
100 if a$<>chr$(32) then goto 90
110 goto 50
120 data 1,12,2,24,4,48,8,97,16,195,33,135
130 data 67,15,134,30
200 data 999,0
Offline
New York City

A bad SID can go out of tune. I had one that once had a few notes going awfully wrong.
The best way to check if shit is in tune is with a guitar tuner. As Mat says, maybe the MSSIAH freq tables are shit (wouldn't be surprised).

Did you try using other software like CYNTHCART or RETROSKOI???

Offline
Glasgow, Scotland.
akira^8GB wrote:

A bad SID can go out of tune. I had one that once had a few notes going awfully wrong.
The best way to check if shit is in tune is with a guitar tuner. As Mat says, maybe the MSSIAH freq tables are shit (wouldn't be surprised).

Did you try using other software like CYNTHCART or RETROSKOI???

I haven't. I'll investigate and give them a bash!

Offline
New York City

You can't diagnose a C64 with MSSIAH, it's a shitty piece of software.

Offline
New York City

.double post sowwy.

Last edited by akira^8GB (Feb 10, 2016 6:47 pm)

Offline
Glasgow, Scotland.

If I'm just playing it as a synth (via MIDI) would you recommend CynthCart over MSSIAH in any event? If so I could just get a replacement. (I only have MSSIAH atm).

Offline
New York City

Depends on what you want to do with it. Cynthcart is simpler, but the MIDI enabled version will cover the needs of most people who only want the very simplest SID sounds (which they might as well be sampling tongue)
Cynthcart is free so you can test it anyway.
Sound examples from the official page:
http://www.qotile.net/audio/cynth1.mp3
http://www.qotile.net/audio/cynth2.mp3
http://www.qotile.net/audio/cynth3.mp3
http://www.qotile.net/audio/cynth4.mp3

The MIDI enabled version is available here: http://www.frank-buss.de/kerberos/Cynthcart-1.5.0.prg
MIDI mapping table: https://groups.google.com/d/msg/kerbero … 2qLLB7VE4J

Last edited by akira^8GB (Feb 10, 2016 7:38 pm)

Offline

Would be interresting if you could measure the frequency on the clock pin on the sid-chip. (That Clock is called "Phi2" on Pin 6 on the SID-chip.
I know that this clock is different depending NTSC or PAL Version:
The Clock on PAL machines is (312 * 63 * 50) = 0,982800 MHz
The Clock on NTSC machines is (263 * 65 * 60) = 1,025700 MHz
In the Datasheet of the SID 6581 is a Table for the Clock of 1,000MHz: The value for 880HZ (note A5) is 14764 for the 16-bit value that you have to write into the frequency-register of the SID.
If you have the PAL version the chip is slightly slower, so you (or your software) have to use higher values.
If you have the NTSC-Version the SID works a little bit faster, so you (or your software) have to use lower values.
( I think there are correct formulas out there in the internet to calculate the right frequency for PAL or NTSC)
Also there different Frequencies for the notes - depending if the note scala is tempered or mathematically evenly distributet (with SQRT(12)-Steps).
Usually you use the "well tempered" (i don't know the right english term for that) frequency-scala for the notes so that combinations of them sound "right".

If you have measured the wrong clock on your SID-Chip you may change the crystal in your system to a new one and maybe also the capacitures around them to get a stable correct clock frequency that does not change over temperature.