[slinkelist] How are CDJIDs generated?

Colby Boles cboles@nirvis.com
Tue, 9 Jan 2001 10:45:52 -0800


I could explain how the CDJID is generated (complicated), but it still would
not be of any use. You need to know the track times as they would be
reported by the Sony changer, which can be different than what a CD-ROM or
other device may report.

Still, here's the code - it's based on maximum-length sequences to do some
noise whitening on the data:

const int CDisc::MLSLEN = 127;
const int CDisc::MLS[127] =
{1,0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,1,1,0,0,1,1,1,0
,1,0,1,0,0,1,1,1,1,1,0,1,0,0,0,0,1,1,1,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,1,0,1,1
,0,1,1,1,1,0,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,1,0,1,1,1,0,0,1,1,0,0,1,0,1,0,1,0
,1,1,1,1,1,1,1,0,0,0,0,0,0};

CString CDisc::CalcCDJID()
{
	CString t,ID;
	int i,j,sum;

	if (nTracks == 0)
		return "0000000000000000";

	for (i = 0; i < 8; i++)
	{
		sum = 0;
		for (j = 0; j < MLSLEN; j++)
		{
			sum += (track[j % nTracks].TimeInSecs() >> (8*(j/nTracks % 2)))*
MLS[(j+i) % MLSLEN];
		}
		t.Format("%02X",sum % 256);
		ID += t;
	}
	return ID;
}

> -----Original Message-----
> From: slinkelist-admin@nirvis.com [mailto:slinkelist-admin@nirvis.com]On
> Behalf Of Taylor Hively
> Sent: Friday, January 05, 2001 5:35 PM
> To: slinkelist@nirvis.com
> Subject: [slinkelist] How are CDJIDs generated?
>
>
> I have a Sony 300 disk changer.  I'm trying to write a simple utility that
> will import an existing cd database (in MS Access) into the CDJ database.
> Since the tracks and albums are only associated by the CDJID I'd like to
> know how to generate the CDJID in order to add it to the database.
> Let's assume I know the artist, title, tracks, minutes, seconds,
> (everything).
>
> Thanks,
>     Taylor Hively
>
> ----- Original Message -----
> From: <slinkelist-admin@nirvis.com>
> To: <slinkelist@nirvis.com>
> Sent: Wednesday, January 03, 2001 6:33 AM
> Subject: slinkelist digest, Vol 1 #492 - 3 msgs
>
>
>
> Send slinkelist mailing list submissions to
> slinkelist@nirvis.com
>
> To subscribe or unsubscribe via the web, visit
> http://www.nirvis.com/mailman/listinfo/slinkelist
> or, via email, send a message with subject or body 'help' to
> slinkelist-request@nirvis.com
> You can reach the person managing the list at
> slinkelist-admin@nirvis.com
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of slinkelist digest..."
>
>
> Today's Topics:
>
>   1. Sending CDJ / Partygui to my TV (Gregg King)
>   2. using hase (Marc Hebert)
>   3. Re: Sending CDJ / Partygui to my TV (Michael Holopainen)
>
> --__--__--
>
> Message: 1
> Date: Tue, 02 Jan 2001 16:15:44 -0500
> To: slinkelist@nirvis.com
> From: "Gregg King" <gking@ontariodie.com>
> Subject: [slinkelist] Sending CDJ / Partygui to my TV
>
> I want to run CDJ from my TV which is with my stereo, in a different room
> than my PC.  I see on the Partygui site that it mentions that it looks
> good on a TV.  My existing video card does not have a TV out port.  I plan
> to send the signal to my TV using wireless products from X10, but need
> help adding hardware to my PC for the TV out.  Can I add a card - like a
> "piggyback" kind of a thing without having to buy another video card?
>
> Any suggestions welcome.
>
> Gregg King
>
>
>
> --__--__--
>
> Message: 2
> Date: Tue, 02 Jan 2001 17:43:38 -0600
> From: Marc Hebert <gorgoesq@swbell.net>
> To: slinkelist@nirvis.com
> Subject: [slinkelist] using hase
>
> Hello,
>
> I'm trying to use the HASE interface to slinkx to control CDJ, and I
> can't quite figure out some syntax.
>
> To be a little more specific, I'm writing a java app in  to send
> commands via a socket to the HASE Socket Slinkx Server.  For now
> atleast, I don't really plan to use vbscript, I'll put all my logic in
> my java app.
>
> I can get my java app to receive responses successfully, from either the
> Socket Slinkx Server or the main HASE program, but I can't send
> commands.  Using the Winsock test client, I can send SSS, for example,
> "commandID sendex cdj:playlist_play" (plus a carriage return), and the
> command is executed, but when I send the same string in my own code,
> nothing happens.  Less important, I can't figure out how to validly send
> the message to the HASE main program (using the default sample.has
> vbscript).  In the latter case, I get an error message (as opposed to
> being ignored).
>
> I haven't seen anything in the log files to shed light on what I'm doing
> wrong.  Any ideas?
>
> TIA,
> Marc
>
>
>
>
>
>
> --__--__--
>
> Message: 3
> Date: Wed, 03 Jan 2001 11:32:01 +0200
> From: Michael Holopainen <michael@laserle.fi>
> Organization: Laserle Oy
> To: "slinkelist@nirvis.com" <slinkelist@nirvis.com>
> Subject: Re: [slinkelist] Sending CDJ / Partygui to my TV
>
> mount one PC to stereo rack, you get inexpensive DVD player & mp3
> player and
> then some...
> and hook it up with your other pc via LAN.
>
> 1. asus Vxxxx cards tv out is not very good(at least PAL haven't yet tried
> NTSC)
> 2. diamond viper 550/770(old, inexpensive both pci and AGP
> models) had IMHO
> good tv out quality
> 3. matrox _should_ have "best" tv out quality (my next card WILL be matrox
> G450eTV)
> 4. Also someone said that ATI has "good" tv out, I do not believe
> that, but
> ATI cards are cheap so...
>
> But it's poitless to talk about cards as 98% of PC2TV picture quality is
> dictated by your tv.
> VGA and TV picture are fundamentally sooooo different that there
> is no good
> pc2tv.
> If you want good picture, then you need to buy big enough monitor to watch
> tv
> from.
> ie. pioneer 50" plasmatv (price approx 20 000USD) is "good"
>
> -michael (A)
>
> Gregg King wrote:
>
> > I want to run CDJ from my TV which is with my stereo, in a
> different room
> > than my PC.  I see on the Partygui site that it mentions that it looks
> > good on a TV.  My existing video card does not have a TV out
> port.  I plan
> > to send the signal to my TV using wireless products from X10, but need
> > help adding hardware to my PC for the TV out.  Can I add a card - like a
> > "piggyback" kind of a thing without having to buy another video card?
> >
> > Any suggestions welcome.
> >
> > Gregg King
> >
> > _______________________________________________
> > slinkelist maillist  -  slinkelist@nirvis.com
> > http://www.nirvis.com/mailman/listinfo/slinkelist
>
> --
>    --"Would you fly on airplane controlled by MS Windows ?"--
> --------------------------------------------------------------------
> | Michael Holopainen | Valuraudantie 25 | Tel: +358-(0)9-35093825  |
> |                    | 00700 Helsinki   | Fax : +358-(0)9-35093850 |
> | Laserle Oy         | Finland          | email: michael@laserle.fi|
> --------------------------------------------------------------------
>
>
>
>
>
>
> --__--__--
>
> _______________________________________________
> slinkelist maillist  -  slinkelist@nirvis.com
> http://www.nirvis.com/mailman/listinfo/slinkelist
>
>
> End of slinkelist Digest
>
>
>
>
> _______________________________________________
> slinkelist maillist  -  slinkelist@nirvis.com
> http://www.nirvis.com/mailman/listinfo/slinkelist
>
>