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 > CSDb Discussions > Track Times in SID files?
2011-02-17 21:33
pmprog
Account closed

Registered: Nov 2005
Posts: 54
Track Times in SID files?

I've always wondered this, but why doesn't any of the SID file formats support a track time.

A couple of extra bytes per subtune per SID wouldn't be a huge loss, and it would mean any individual player doesn't need access to the 3MB file from HVSC to correctly know when to move on to the next track.

Given the database exists, it would also be pretty easy to write a program to go through all the files in HVSC, check if they match whichever SID file format supports the tracks times, and updates them with the tune lengths from the text file.

Does that not seem a good idea?
 
... 68 posts hidden. Click here to view all posts....
 
2011-02-18 19:16
JCB
Account closed

Registered: Jun 2002
Posts: 241
Yeah, it would only really be an issue if the SID file was loaded towards the end of the emulated RAM. Whether coders of any players do anything other than check existing versions is another matter ;)

If something like this is done then maybe any future HVSC releases with the new data in could come with a "stripper" exe to run to revert the files back to the old format.
2011-02-18 21:57
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
The best is to have all crucial info in 1 header, and
not being afraid to make a new format. just do it.
if people want to support new format, they should do so.

This was designed in 1990 by PHS, and all the optimizations to it since, have been limited by "oh no, i have to not break compatibility"

I dont think that goes anywhere positive with a format that is so old.

Values in header, and STIL etc. in a real database format, and the key to read a tune's info, in the header. done!

If "Commando" has db key 147 for STIL and other stuff info, this key will never change. "Commando" stays at 147 forever.

We have been over this again and again, but when it came to the deciding things, actually making the things, real life came in the way every time, so its stranded.

AFAIK e already know a long time what to do, just e are all lame asses and didnt do it.

Ian: just because im not coding this, and because i have left the team because i have no more time, dont mean i dont have ideas, and have a right to speak them.
2011-02-19 08:58
Radiant

Registered: Sep 2004
Posts: 639
Quoting Mr. SID
The idea is that the path name often changes. So the MD5 is a more robust way of identifying the file in question. So it's possible to extract the song length even if the file was not loaded from within the HVSC, as long as the MD5 is in the DB.

But why is calculating the MD5 value such an esoteric task? It should be really simple - right? If people are cheating their way around doing it then clearly something is wrong and the system should be redesigned.

I think the footer idea is good. It won't affect backwards compatibility in most cases, and in those cases where it will and upgrading is not an option, there are workarounds.
2011-02-19 10:40
JCB
Account closed

Registered: Jun 2002
Posts: 241
@rambones, a database would be an ok format for a PC/Mac (plenty of light cross platform options) but then you force slimmer devices (or people who don't require the whole HVSC) to take the entire db just to play a few files..

2011-02-19 12:40
Inge

Registered: Nov 2003
Posts: 144
I've made an example using XML, to point out how flexible it all can be done. Here, all STIL info and songlength info are a part of the file itself, making it much more easy to keep track of all info related to the songs.

One negative thing is that each SID-file will be 3-6 KB larger in size, but that should not be any problem unless you absolutely want to load the file directly in to the C64 memory.

<?xml version="1.0" encoding="UTF-8"?>
<SID type="RSID">
	<Header>
		<LoadAddress="0000">
		<InitAddress="4000">
		<PlayAddress="0000">
		<Songs="20">
		<StartSong="1">
		<Name="Arkanoid">
		<Author="Martin Galway">
		<Released="1987 Imagine">
		<RelocStart="0000">
		<RelocPages="00">
		<Flags>
			<!--   	0 = built-in music player,
					1 = Compute!'s Sidplayer MUS data, music player must be merged.	-->
			<Format="0">
			<!-- 	0 = C64 compatible,
					1 = PlaySID specific (PSID v2NG)
					2 = C64 BASIC flag (RSID) -->
			<Player="0">
			<!-- 	0 = Unknown,
					1 = PAL,
					2 = NTSC,
					3 = PAL and NTSC. -->
			<Clock="1">
			<!--	0 = Unknown,
					1 = MOS6581,
					2 = MOS8580,
					3 = MOS6581 and MOS8580 -->
			<SidModel="1">
		</Flags>
	</Header>
	<STIL>
		<Author>
			<Comment="Martin Galway's own comments are denoted (MG).
				'I will never do rearrangements of those tunes on other instruments,
				the SID is what they're meant to be heard on. It would not be
				'updating' them to put them onto a different instrument. If you ever
				hear music from me on today's instruments, the tunes will be all-new
				(and probably a lot better).' (MG)">
			</Comment>
		</Author>	
		<SID>
			<Comment="This is the very first published tune on the C64 that used samples.
				'I'm glad you spotted 'Cobra' on the Spectrum, whose tune I was in
				love with and HAD to use somewhere else...! I figured no-one would
				complain if I used it a year later on the C64.' (MG) (It got used in
				Arkanoid.)
				'Q: How did you get involved with using sampled sounds?
				MG: I figured out how samples were played by hacking into someone
				else's code... OK, I admit it... It was a drum synthesizer package
				called Digidrums, actually, so you could still say I was the first to
				include samples in a piece of music. [...] Never would I claim to have
				invented that technique, I just got it published first. In fact, I
				couldn't really figure out where they got the sample data, just that
				they were wiggling the volume register, so I tried to make up my own
				drum sample sounds in realtime - which is the flatulence stuff that
				shipped in 'Arkanoid'. [...] After the project was in the shops I
				gained access to some real drum samples, and I slid those into my own
				custom version of the tune. The one that's in the shops is kind of a
				collage of farts & burps, don't you think? [...] Later I was able to
				acquire some proper drum samples and by 'Game Over' it got quite
				sophisticated.' (MG)">
			</Comment>
		</SID>	
	</STIL>
	<Songs>
		<Song1>
			<Length="2:22">
			<STIL>
				<Title="Cobra (Title) [from the Spectrum game]">
				<Artist="Martin Galway">
				<Comment="'I'm glad you spotted 'Cobra' on the Spectrum, whose tune I was in
					love with and HAD to use somewhere else...! I figured no-one would
					complain if I used it a year later [for Arkanoid] on the C64.' (MG)">
			</STIL>
		</Song1>
		<Song2>
			<Length="1:17">
			<STIL>
				<Title="Hiscore [from the arcade game Arkanoid - Revenge of Doh]">
				<Artist="Hisayoshi Ogura (OGR/Zuntata)">
			</STIL>
		</Song2>
	</Songs>
	<Binary>
		(Binary code goes here)
	</Binary>
</SID>
2011-02-19 13:26
iAN CooG

Registered: May 2002
Posts: 3186
<Binary>
(Binary code goes here)
</Binary>

can a binary be included in a plain text xml? Shouldn't it be at least base64 encoded?
Besides converting hvsc to this format will mean to trash *all* existing programs and waiting to be accepted and fully supported. I don't see it forseeable in the near future, if even reading a single sldb txt file is so hard for someone to be implemented....

ps: this is only my opinion, I'm not stopping anyone from proposing ideas, but only ideas are not enough, I'm waiting for someone actually doing some new format with the needed tools to support it, and see if it's usable.
2011-02-19 19:46
pmprog
Account closed

Registered: Nov 2005
Posts: 54
TBH I'm not a fan of XML. I think it's overused, and definately not the best approach for this IMO. What with wanting to keep this small for memory constrained devices.

What I'll do then, I'll try and make a modified version of TitchySID and try a converter tool to take a PSIDv2, add the optional header and see what happens :-)
2011-02-19 20:30
iAN CooG

Registered: May 2002
Posts: 3186
make sure to encode it in brainfuck, so hexpattern searching will be REALLY complicated.
2011-02-19 22:18
pmprog
Account closed

Registered: Nov 2005
Posts: 54
I don't know, Piet is my preferred language
http://www.dangermouse.net/esoteric/piet/samples.html

Also Whitespace is good
https://secure.wikimedia.org/wikipedia/en/wiki/Whitespace_%28pr..

:-)
2011-02-20 09:30
MagerValp

Registered: Dec 2001
Posts: 1074
Quoting pmprog
TBH I'm not a fan of XML. I think it's overused, and definately not the best approach for this IMO. What with wanting to keep this small for memory constrained devices.


An IFF style format would work here. It supports most of the nice XML features (flexible, structured, future proof), but is fast and easy to parse. You'd keep the PSID header for backwards compatibility, and just bump the version number and add a pointer to the extended data, which is appended after the music data:

0000 PSID, with ptr to SIFF block, starting at 1100 here
007c data
1100 SIFF
1104 SIFF size
1108 TIME
110c TIME size
1110 4 bytes time info per subtune

and so on.
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - 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
Apollyon/ALD
Picrard/Mayday
serato/Finnish Gold
psych
zscs
Guests online: 130
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Christmas Megademo  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Morph  (9.5)
9 Dawnfall V1.1  (9.5)
10 It's More Fun to Com..  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Nostalgia  (9.3)
5 Censor Design  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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