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 > SID streaming
2015-09-19 12:20
Sasq

Registered: Apr 2004
Posts: 156
SID streaming

I am experimenting with recording SID writes from Vice and replaying them as a stream, and so the question on how to compress the stream comes up.

The naive way is to record value (8bits), sid offset (5 bits) and cycle delta (~16bits). This can then be compressed in various ways.

But I am more interested in the assumptions you can make because of how the SID-chip works. With writes can you reorder for instance? Is there in fact a safe fixed order you can used for single speed songs?

Also is there writes you can skip which have no effect?
 
... 10 posts hidden. Click here to view all posts....
 
2015-09-19 15:33
tlr

Registered: Sep 2003
Posts: 1790
If you get your data from some external high-speed source like those you mention, then go for very light compression or even just the raw writes. Stay off unaligned bit coding if you can.

The cycle delta does not need to be 16 bits. For long deltas you can just stack multiple dummy ones.
2015-09-19 16:26
chatGPZ

Registered: Dec 2001
Posts: 11386
for streaming i'd just send a 16bit timer value plus register+value. not sure if i'd go through the trouble of trying to make it work with (any kind of) samples though - that seems kindof hard for the generic case. when streaming via net or even reading from sd card, i somehow doubt you can keep up with the timing requirements (with those modern sample player things almost all CPU is burned by the sample player already)
2015-09-19 17:14
Soren

Registered: Dec 2001
Posts: 547
Remember this order of storing in sid registers, for the following registers of each voice:

Sustain/Release, Attack/Decay, Wave.

Atleast to my knowledge that's the least buggy way of doing it.

Another thing, you could create a tune that has the same ADSR settings throughout the whole piece, so you only need to set those once... Or stable pulse (perhaps square)and do the same thing...
2015-09-20 08:01
ChristopherJam

Registered: Aug 2004
Posts: 1409
Soren, it really depends on the sequence being programmed. If the original player assumes gate is written before ADSR then swapping to ADSR first could easily trigger the ADSR bug.

For example, if the player's done a hard reset by clearing gate then setting attack and release to zero for two frames, it's perfectly safe to set gate before setting an ADSR of (eg) $00d8, as the rate limit counter will switch to using the attack rate before the release rate is changed.

Set ADSR before gate, and the rate limit counter will be free to escape (it will be using the release rate in the time between setting SR and setting gate, and probably rise past eight). Bam, no note start for another frame and a half.
2015-09-20 08:35
Soren

Registered: Dec 2001
Posts: 547
ok :)
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
Guests online: 104
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 Triad  (9.3)
5 Censor Design  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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