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 > Playroutine coding: A new way to represent pitch
2015-03-30 20:49
lft

Registered: Jul 2007
Posts: 369
Playroutine coding: A new way to represent pitch

Introducing the 9-bit pitch technique:

http://www.linusakesson.net/programming/9bitpitch/index.php
 
... 24 posts hidden. Click here to view all posts....
 
2015-04-03 16:28
Hein

Registered: Apr 2004
Posts: 933
Quote: Burglar likes vibrators! ;)

How would you know?
2015-04-03 16:56
Burglar

Registered: Dec 2004
Posts: 1031
Quoting Soren
Burglar likes vibrators! ;)
wtf haha, you edited ur post! (and it was soren who likes vibratos)
2015-04-03 17:33
Hein

Registered: Apr 2004
Posts: 933
Quote: Quoting Soren
Burglar likes vibrators! ;)
wtf haha, you edited ur post! (and it was soren who likes vibratos)


Yeh, I thought so..
It was like 'What is this thread about?'
Editeditedit 'Vibrators!' :)
2015-04-03 20:07
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Question: will it make ANY player faster ? :)
2015-04-03 20:13
Hein

Registered: Apr 2004
Posts: 933
Quote: Question: will it make ANY player faster ? :)

ANY! I double dare you!
2015-04-10 18:52
lft

Registered: Jul 2007
Posts: 369
Quoting Groepaz
mmmh is it accurate enough to compensate for pal/ntsc too? :)


Nah, unfortunately not. That turns out to be approximately a 2.5 microtone difference. With three fractional bits we would get:

ntsc/pal = 1022727/985248 = 1.03804...
2^(1/(12*8))^5 = 1.03676...
2015-04-10 19:03
chatGPZ

Registered: Dec 2001
Posts: 11108
too bad... oh well. might give it a try anyway :)
2015-04-12 06:49
Soren

Registered: Dec 2001
Posts: 547
Burglar: well, your demotivating comment on irc just made me edit my message... :D
2015-04-30 07:10
Pex Mahoney Tufvesson

Registered: Sep 2003
Posts: 50
Quote: @lft: Probably because fine-tune wasn't there in early .mod formats. But yeah... gradual mutations into madness.

That madness isn't my fault, at least! My NoiseTracker didn't do this - madness was invented at a later stage.
2023-05-05 03:54
Bansai

Registered: Feb 2023
Posts: 34
Quoting lft
Introducing the 9-bit pitch technique:

http://www.linusakesson.net/programming/9bitpitch/index.php

I started disassembling the Fred Gray player used in Roadrunner and came across this:
L_MICROTONE_FREQTAB
$FCE5            .byte $97,$7E,$6E,$80,$4D
$FCEA            .byte $82,$32,$84,$1E,$86,$11,$88,$0C
$FCF2            .byte $8A,$0E,$8C,$18,$8E,$29,$90,$41
$FCFA            .byte $92,$62,$94,$8B,$96,$BB,$98,$F4
$FD02            .byte $9A,$35,$9D,$7E,$9F,$D0,$A1,$2B
$FD0A            .byte $A4,$8E,$A6,$FA,$A8,$6F,$AB,$EE
$FD12            .byte $AD,$75,$B0,$06,$B3,$A1,$B5,$45
$FD1A            .byte $B8,$F3,$BA,$AC,$BD,$6E,$C0,$3A
$FD22            .byte $C3,$11,$C6,$F3,$C8,$DF,$CB,$D6
$FD2A            .byte $CE,$D8,$D1,$E6,$D4,$FE,$D7,$23
$FD32            .byte $DB,$52,$DE,$8F,$E1,$D6,$E4,$2B
$FD3A            .byte $E8,$8B,$EB,$F8,$EE,$72,$F2,$F9
$FD42            .byte $F5,$8C,$F9
How he uses it isn't built for speed given the LSR..BNE octave frequency adjust loop, but the above table looks like 48 microtones for one octave.
//------------------------------
L_BRS_($FBB3)_($FBB6) OK
//------------------------------
$FBB3  88        DEY
$FBB4  E9 30     SBC #$30
$FBB6  B0 FB     BCS L_BRS_($FBB3)_($FBB6) OK
$FBB8  18        CLC
$FBB9  69 30     ADC #$30
$FBBB  8C E0 FC  STY $FCE0
$FBBE  0A        ASL A
$FBBF  A8        TAY
$FBC0  B9 E5 FC  LDA L_MICROTONE_FREQTAB,Y
$FBC3  8D D8 FC  STA $FCD8
$FBC6  C8        INY
$FBC7  B9 E5 FC  LDA L_MICROTONE_FREQTAB,Y
$FBCA  8D D9 FC  STA $FCD9
$FBCD  AC E0 FC  LDY $FCE0
$FBD0  F0 09     BEQ L_BRS_($FBDB)_($FBD0) OK
//------------------------------
L_BRS_($FBD2)_($FBD9) OK
//------------------------------
$FBD2  4E D9 FC  LSR $FCD9
$FBD5  6E D8 FC  ROR $FCD8
$FBD8  88        DEY
$FBD9  D0 F7     BNE L_BRS_($FBD2)_($FBD9) OK
//------------------------------
L_BRS_($FBDB)_($FBD0) OK
//------------------------------
$FBDB  AD D8 FC  LDA $FCD8
$FBDE  9D 00 D4  STA $D400,X                          // Voice 1: Frequency Control - Low-Byte
$FBE1  AD D9 FC  LDA $FCD9
$FBE4  9D 01 D4  STA $D401,X                          // Voice 1: Frequency Control - High-Byte
$FBE7  60        RTS
I need to look into the code further as I've only just started with examining this player today, but it appears to suffice for the smooth glides he uses such as in the "That's all Folks!" tune 6 in the PSID file as there are no other writes to $D400/01 used anywhere outside of the usual SID register clearing.
Previous - 1 | 2 | 3 | 4 - 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
megasoftargentina
redback
Guests online: 125
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 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
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 Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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