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: 113
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-14 15:00
Hein

Registered: Apr 2004
Posts: 933
Does this also mean that the reSID emulation (used in GT-editor) is not correct? Or, on what line does it start playing?

I've encountered this problem as well, playing a tune in VICE compared to the GT editor is sometimes different (depending on the sound settings), even be it a one speed tune.
2008-08-14 16:17
Conrad

Registered: Nov 2006
Posts: 833
According to the current version of GT player code, each voice is updated in the following order (if buffer SID-writes is ON):

1.) Attack/Decay
2.) Sustain/Release
3.) Pulse Lo
4.) Pulse Hi
5.) Frequency Lo
6.) Frequency Hi
7.) WAVEFORM + Gate ... Gate/Test bits are set LAST

The other thing is, you can't really tell when the waveform/gate register is set because of how much raster-time the player uses, because Goat-Tracker seems to re-compile the player code to match what's necessary for the music (e.g. requests portamento, vibrato, funk tempo, etc) so the code size and CPU time is flexible to how detailed your tune is.

Maybe on the safe see you could modify the player to write SID data to temporary memory and then use the content of that memory to write to SID registers at another raster-time position, bearing in mind that it doesn't go over a bad line. I had this problem with 2SID tune, and that's how I got around it. Again, this is only towards 1x tunes mainly.
2008-08-14 16:22
Jammer

Registered: Nov 2002
Posts: 1289
playing in vice/gt doesn't guarantee all. i always test final in hoxs64 - sometimes results surprise me ;)
2008-08-14 16:44
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: According to the current version of GT player code, each voice is updated in the following order (if buffer SID-writes is ON):

1.) Attack/Decay
2.) Sustain/Release
3.) Pulse Lo
4.) Pulse Hi
5.) Frequency Lo
6.) Frequency Hi
7.) WAVEFORM + Gate ... Gate/Test bits are set LAST

The other thing is, you can't really tell when the waveform/gate register is set because of how much raster-time the player uses, because Goat-Tracker seems to re-compile the player code to match what's necessary for the music (e.g. requests portamento, vibrato, funk tempo, etc) so the code size and CPU time is flexible to how detailed your tune is.

Maybe on the safe see you could modify the player to write SID data to temporary memory and then use the content of that memory to write to SID registers at another raster-time position, bearing in mind that it doesn't go over a bad line. I had this problem with 2SID tune, and that's how I got around it. Again, this is only towards 1x tunes mainly.


"Maybe on the safe see you could modify the player to write SID data to temporary memory and then use the content of that memory to write to SID registers at another raster-time position".

This is exactly what buffered SID-writes do together with ghost registers...
2008-08-14 17:07
cadaver

Registered: Feb 2002
Posts: 1153
I could someday make it possible for ghostregs to be in any memory location.

Meanwhile, remember the existence of the alt-writeorder - waveform first - player, which is activated by having an HR ADSR value of Fxxx (like F800 or so.) It is theoretically less susceptible to badlines, but may change other characteristics of your instruments' envelope.
2008-08-14 17:08
Soren

Registered: Dec 2001
Posts: 547
Hmm... if wave+gate is not a part of the buffer routine.. why bother then? :-)

What I have heard is that the best order is:

(1)sustain/release
(2)attack/decay
(3)wave/gate

Not sure if the order of the other registers is important.

2008-08-14 18:50
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: I could someday make it possible for ghostregs to be in any memory location.

Meanwhile, remember the existence of the alt-writeorder - waveform first - player, which is activated by having an HR ADSR value of Fxxx (like F800 or so.) It is theoretically less susceptible to badlines, but may change other characteristics of your instruments' envelope.


For The Wild Bunch we altered the ghose-reg player to push the register contents to stack instead. Thus in the raster code we simply did PLA+STA sidreg. Care had to be taken with reversed push-order and reversed speed-play order for the 4x-tune ofcourse.
2008-08-14 20:37
cadaver

Registered: Feb 2002
Posts: 1153
I committed modified sid write order to GT2 svn (http://sourceforge.net/projects/goattracker2), now it's

pulse lo - pulse hi - sr - ad - freq lo - freq hi - wave

which is same as JCH newplayer 21, apart from pulse & freq being swapped, but that has no difference related to note triggering.

According to very preliminary testing this results in better stability against badlines. However, release 1 will certainly bug randomly after this change, so the alt-write player is highly recommended if you need it.

This is yet experimental and I may rollback the change after more testing.
2008-08-14 22:25
HCL

Registered: Feb 2003
Posts: 716
@Jammer: Heh.. as if hoxs64 gave you the right answer :). The only true way is of course to run it on the real thing, and you need 4-5 of em with different SID-properties also i suppose :P.
2008-08-14 23:14
Jammer

Registered: Nov 2002
Posts: 1289
@HCL >> sure, it's still not 100% what was prooved by my 'galaxy bounce remix' - it sounds apparently different on real chip.
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
Case/Padua
Airwolf/F4CG
Krill/Plush
Apollyon/ALD
blitzed
algorithm
Clown
Knut Clausen/SHAPE/F..
Malmix/Fatzone
grip
Yazoo/Arsenic
iAN CooG/HVSC
cobbpg
Guests online: 142
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 Memento Mori  (9.6)
10 Bromance  (9.5)
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 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Elwix  (9.1)
5 A Life in Hell  (9.1)

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