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 > How to deal with multispeed tunes?
2008-08-12 22:35
Higgie

Registered: Apr 2002
Posts: 127
How to deal with multispeed tunes?

hello you coders!

i'm currently doing my first (except for some bullshit from back in the late 80s/early 90s) steps in coding and while checking out some tunes from HVSC as background music i stumbled across some 'multispeed' tunes. some questions came up my mind...

1. am i right saying that multispeed means calling the playroutine multiple times per frame?

2. is it just calling the routine at any time, just calling it often enough in every frame?

3. or does replaying multispeed tunes require a special timing?

4. would loose $d012 polling be sufficient? (no stable interrupt)

i have to admit that i haven't tried out yet and wanted to get the theoretical background before i started off into the (possibly) wrong direction.

thanx in advance!
 
... 31 posts hidden. Click here to view all posts....
 
2008-08-13 11:14
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Not all CIA timed sids are multispeed. Some simply have a fixed speed, or are 60 hz.

To check if a tune is multispeed, go read the code at the start of the play address. If it is switching values for dc04/dc05, then it is multispeed.

The values for dc04/dc05 are:

1x - $4CC7
2x - $2663
3x - $1997
4x - $1331
5x - $0F5A
6x - $0CCB
8x - $0998
10x - $07AC
12x - $0665
16x - $04CB

So when you want to use a 4x tune with d012, you take 312 rasterlines / 4, and place the jsr to music at even spaced interval. Remember the first call is to the music player, then next 3 calls are to the speed routine.

Players usually have 1003(play) 1006 or 1009 (speedplay).

So
d012=0 jsr 1003
d012+4e jsr 1006
d012+4e+4e jst 1006
d012+4e+4e+4e jsr 1006

Or something like that
2008-08-13 11:43
Stryyker

Registered: Dec 2001
Posts: 468
Just use the tune and see if it sounds like it should. You will notice a difference especially if you listen for drum sounds or arpeggios.

It really only matters that the music sounds good for your use.
2008-08-13 11:45
Higgie

Registered: Apr 2002
Posts: 127
hey jan!

many thanx for your detailed explanation. now there is some hope again for me to use the tune i want with my code. :)

is there always a speed routine involved that i have to call or could it also be repetitive calls of the play routine?

if there is a rule of thumb it would be great to have such info added to the sid files in HVSC. would that be possible?

btw: i'm still open for exclusive tunes! hint!!! ;)

2008-08-13 11:45
chatGPZ

Registered: Dec 2001
Posts: 11386
also not all multispeed tunes are originally played in even spaced intervals :)
2008-08-13 12:34
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Correct.

Anyhow, wilfred bos looked at that sidtune, and:
It plays at 115Hz while the demo plays it at 100Hz.

sid is now fixed.
2008-08-13 12:36
Steppe

Registered: Jan 2002
Posts: 1510
For the majority of tunes the timing is not critical, I'd say. I know that GRG and DJB made some very timing dependent tunes, but if it's just a 2x or 4x tune it mostly doesn't matter really.

Also, not every player has a specific speedcall. For example Goattracker uses only $1003 for play.
2008-08-13 12:38
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Quote: hey jan!

many thanx for your detailed explanation. now there is some hope again for me to use the tune i want with my code. :)

is there always a speed routine involved that i have to call or could it also be repetitive calls of the play routine?

if there is a rule of thumb it would be great to have such info added to the sid files in HVSC. would that be possible?

btw: i'm still open for exclusive tunes! hint!!! ;)



Only tune i know that does repetitive call is rainbow dragon (jsr exxx, jsr exxx, same address) - thats not real multispeed.

In 99.8% cases, there is a speed routine you must call on 2nd and the rest of calls.
2008-08-13 13:24
HCL

Registered: Feb 2003
Posts: 728
@Rambones: Multispeed is multispeed, no matter where your jsr goes :).

Btw. i also experienced that some multispeed .sid-tunes sound different when i ran them in Vice, so i believe there is some difference to sidplay anyways. ..and yes, i know how to play a multispeed tune in Vice :).
2008-08-13 13:39
Dane

Registered: May 2002
Posts: 423
And some multispeed tunes do not even have a second JSR for playback. Instead some idiot came up with the idea to just transfer zeropage values into D400. Totally lame.
2008-08-13 13:43
assiduous
Account closed

Registered: Jun 2007
Posts: 343
HCL: the Resid tab in Sid settings in Vice will tell you what sampling method is in use. if its set to fast there`s no difference to Sidplay2. using cycle based sampling (interpolation or higher) makes some difference to sound reproduction quality but you wont get any new sounds as in Higgie's example;)
Previous - 1 | 2 | 3 | 4 | 5 - 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
Jetboy/Elysium
kbs/Pht/Lxt
Andy/AEG
XmikeX
Peacemaker/CENSOR/Hi..
Sulevi/Virtual Dreams
slimeysmine
megasoftargentina
grass/LETHARGY
Hagar/The Supply Team
t0m3000/hf^boom!^ibx
Guests online: 166
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (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-2024
Page generated in: 0.057 sec.