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 Coding > NTSC/PAL agnostic music
2021-02-26 23:15
Raz
Account closed

Registered: Aug 2003
Posts: 16
NTSC/PAL agnostic music

My apologies if this has already been addressed: during 2020 I rewrote quite a bit of timer code to work with all variants of PAL and NTSC (including the odd-ball PAL65) - this was mainly due to a Gauntlet-like game project I started with may at some point mature into something neat.

However, I was considering making NTSC/PAL dual versions of some of my demo effect (including some so far unreleased stuff), but oddly enough the limitation I continue to come back to is not code but MUSIC:

How do the rest of you approach making a dual PAL/NTSC releases music-wise? As far as I know there are two main things to consider:

1) 60hz vs. 50hz
2) SID 6581 vs. SID 8580

Around point 1) I was considering (with some help of the musicians) that a solution would be to separate the tempo (progression of the tune) from the actually SID value tables. So that for PAL (50Hz) one version of per-frame SID values would be used for each sound and another would be used for NTSC, and the progression of the tune would then be make independent (e.g. on beats of 1/10 of a second which would be every 5/6 frames depending on the system).

Around point 2): Different filters etc? Which would you recommend?

Any feedback would be welcome
-Raz
2021-02-26 23:44
Krill

Registered: Apr 2002
Posts: 2839
For PAL vs. NTSC, the simplest solution is to simply call player with a 50 Hz timer interrupt, or call the PAL player only 5 out of 6 videoframes on NTSC when being bound to video frames.
This may sound okay or not. If not, some more modifications can be tried, such as modifying note durations for NTSC to be 20% longer, possibly using a fixed-point duration variable.
Then you might also want to modify filter and pulse sweep and similar step sizes.
Then the SID itself runs at a different clock frequency on NTSC, so the base note frequency table should also be adjusted accordingly, to avoid an ever so slightly detuned scale.

Artefacts exists as an NTSC incarnation as well, with modifications to the music player. There i only changed the base frequencies* and skipped the player call on every 6th video frame. The source is linked there, so you might want to have a look. :)

* Note that equal temperament is used there, which is rather uncommon. But PAL vs NTSC frequency settings differ by a fixed constant based on the ratio of the clock frequencies, which is in that source somewhere.
2021-02-26 23:46
Raz
Account closed

Registered: Aug 2003
Posts: 16
Hi Krill

Thanks for the feedback - I'll have a look at Artefacts =)

Cheers
-Raz
2021-02-26 23:51
TheRyk

Registered: Mar 2009
Posts: 2069
It's not that hard to do, IIRC PlayEm64 V1.2 Tools (and Music) Collection adjusts NTSC-flagged .SID to PAL files by extra-calls. Vice versa (after some code detecting PAL or NTSC) ain't any harder to code (in that case you skip jsr $play every so-and-so-manieth frame) :)

It's of course the sledge hammer approach

The 2nd question 6581 vs 8580 is harder. You can detect SID type but there are only few so-so solutions to adaot filter reg writes, more often than not this has to be done manually.
2021-02-27 00:04
Krill

Registered: Apr 2002
Posts: 2839
Yes, porting tunes between oldsid and newsid may even be quite impossible to get to sound close enough (by some definition), depending on the type of sounds used (new waveforms on newsid etc.). Some people have strong opinions about the superior SID version, too. :)
2021-02-27 00:07
TheRyk

Registered: Mar 2009
Posts: 2069
yeah not to speak of the golden ears that swear the REV makes all the difference ^^ (in fact same REVs even of same assembly line and date may vary noticeably in terms of filter feats and one SID depending on surrounding capacitor might sound differently on different boards) Pandora's black box...
2021-02-27 00:12
Krill

Registered: Apr 2002
Posts: 2839
I was talking about the differences in digital circuitry of 6581 vs 8580, though. Those arguments about the analogue differences with different revisions of either usually go a tad too much into audiophile esoteric cult stuff to me, mostly. :)
2021-02-27 00:14
TheRyk

Registered: Mar 2009
Posts: 2069
yeah "airy" versus "earthen" sounds... never quite got what those ppl are talkin about ^^ either I'm too deaf or they are whacko (or both)
2021-02-27 00:20
Raz
Account closed

Registered: Aug 2003
Posts: 16
Quote: I was talking about the differences in digital circuitry of 6581 vs 8580, though. Those arguments about the analogue differences with different revisions of either usually go a tad too much into audiophile esoteric cult stuff to me, mostly. :)

I was considering the "skip frame 6" approach, but though that might be too crude. But perhaps I should just test it out (I only have hardware for PAL).

An additional issue I ran across was the 6581 vs. 8580 issue: Just for fun I was considering making an NTSC version of Gumbo Revised (Gumbo Revised), and I'm a bit concerned here, that it sounds really terrible on 6581, and as I far as I know the majority of real NTSC systems has this chip.
2021-02-27 00:38
TheRyk

Registered: Mar 2009
Posts: 2069
Quoting Raz
I was considering the "skip frame 6" approach, but though that might be too crude. ...
Seriously, even the afore-mentioned "golden ears" won't notice ^^

However, there are people that believe to distinguish if sth is played at 50.00 or 49.?? Hz
2021-02-27 00:42
Krill

Registered: Apr 2002
Posts: 2839
Quoting TheRyk
Quoting Raz
I was considering the "skip frame 6" approach, but though that might be too crude. ...
Seriously, even the afore-mentioned "golden ears" won't notice ^^

However, there are people that believe to distinguish if sth is played at 50.00 or 49.?? Hz
Only skipping every 6th frame can sound noticeably different. I tried that and the other things i mentioned for Softwired but it still sounded weird on NTSC. Not sure if things like the hard restart need to be adjusted as well, ceased to bother before i went that far. =)
 
... 6 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - 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
cba
curtcool
Menace/Spaceballs
Scooby/G★P/Light
ThunderBlade/BLiSS
Acidchild/Padua
Krill/Plush
Guests online: 103
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 S!R  (9.9)
3 Antitrack  (9.8)
4 Mr Zero Page  (9.8)
5 OTD  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.05 sec.