Gnus development mailing list
 help / color / mirror / Atom feed
* all you MP3 people out there... a fix for lars!
@ 1998-10-28 18:16 William M. Perry
  1998-10-28 22:24 ` Wes Hardaker
  0 siblings, 1 reply; 37+ messages in thread
From: William M. Perry @ 1998-10-28 18:16 UTC (permalink / raw)


Hey lars, think this would help in your eternal quest for the perfect sound 
solution? :)

http://www.mdc.net/~paulb/cajun/

-Bill P.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-28 18:16 all you MP3 people out there... a fix for lars! William M. Perry
@ 1998-10-28 22:24 ` Wes Hardaker
  1998-10-29  1:04   ` William M. Perry
                     ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: Wes Hardaker @ 1998-10-28 22:24 UTC (permalink / raw)
  Cc: ding

>>>>> On 28 Oct 1998 13:16:12 -0500, wmperry@aventail.com (William M. Perry) said:

William> http://www.mdc.net/~paulb/cajun/

I refuse to be that much of a geek.  I was certain my family and
friends were going to leave me when I told them I was digitizing my
CDs...  If I told them I wanted to buy another computer to put in my
card with a 11gb hard drive in it, I'm afraid I'd be alone for the
rest of my life.

I must say "random play" on a whole ton of CDs is way too cool.

Lars, do you have an application for getting the serial number off of
a CD in the drive (ascii output)?  Thats the only thing I can't do in
my script.  I have to run something like xmcd to get it, and then feed
that to my script (which then uses the cddb to get the
artist/album/song-titles).

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-28 22:24 ` Wes Hardaker
@ 1998-10-29  1:04   ` William M. Perry
  1998-10-29  1:28     ` Wes Hardaker
  1998-10-29  2:17   ` Mark R. Boyns
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 37+ messages in thread
From: William M. Perry @ 1998-10-29  1:04 UTC (permalink / raw)
  Cc: ding

Wes Hardaker <wjhardaker@ucdavis.edu> writes:

> >>>>> On 28 Oct 1998 13:16:12 -0500, wmperry@aventail.com (William M. Perry) said:
> 
> William> http://www.mdc.net/~paulb/cajun/
> 
> I refuse to be that much of a geek.  I was certain my family and friends
> were going to leave me when I told them I was digitizing my CDs...  If I
> told them I wanted to buy another computer to put in my card with a 11gb
> hard drive in it, I'm afraid I'd be alone for the rest of my life.

  You wouldn't be alone, you'd have _US_. :)

> I must say "random play" on a whole ton of CDs is way too cool.
> 
> Lars, do you have an application for getting the serial number off of a
> CD in the drive (ascii output)?  Thats the only thing I can't do in my
> script.  I have to run something like xmcd to get it, and then feed that
> to my script (which then uses the cddb to get the
> artist/album/song-titles).

  What unix MP3 encoder do people recommend?  I haven't been able to find
one in cursory searches.  I figure I'd join the crush as I'm getting sick
of swapping cd's (my main cache is _downstairs_, and running up and down
for them in batches of 20 is too much luck exercise).

-Bill P.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29  1:04   ` William M. Perry
@ 1998-10-29  1:28     ` Wes Hardaker
  1998-10-29  2:11       ` Harald Meland
  0 siblings, 1 reply; 37+ messages in thread
From: Wes Hardaker @ 1998-10-29  1:28 UTC (permalink / raw)
  Cc: Wes Hardaker, ding

>>>>> On 28 Oct 1998 20:04:46 -0500, wmperry@aventail.com (William M. Perry) said:

>> hard drive in it, I'm afraid I'd be alone for the rest of my life.

William> You wouldn't be alone, you'd have _US_. :)

Even worse!

William> What unix MP3 encoder do people recommend?  I haven't been
William> able to find one in cursory searches.

Finding free ones are harder to come by...

However, I've been using this one, which is fine:

5:26pm des [161]: bladeenc -h

Blade's MP3 Encoder v0.72  Homepage: http://bladeenc.home.ml.org
=========================  This is freeware!

Error: '-h' is not a recognized switch or filetype!
Usage: BladeEnc [<switches>] [sample1] [<sample2>] [<...>]

General switches:
     -[bitrate]    = Set MP3 bitrate. Default is 128 (64 if output is mono).
     -CRC          = Include checksum data in MP3 file.
     -DELETE       = Delete sample after successfull encoding.
     -PRIVATE      = Set the private-bit in the output file.
     -COPYRIGHT    = Set the copyright-bit in the output file.
     -COPY         = Clears the original-bit in the output file.
     -MONO         = Produce mono MP3 files.
     -QUIT         = Quit without waiting for keypress when finished.

 Mono MP3 files are always produced for mono samples.

Press ENTER...

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29  1:28     ` Wes Hardaker
@ 1998-10-29  2:11       ` Harald Meland
  1998-10-29  5:05         ` Wes Hardaker
                           ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Harald Meland @ 1998-10-29  2:11 UTC (permalink / raw)


[Wes Hardaker]

> William> What unix MP3 encoder do people recommend?  I haven't been
> William> able to find one in cursory searches.
> 
> Finding free ones are harder to come by...

I'd guess Lars is using L.A.M.E., found on
<URL:http://student.uq.edu.au/~s302585/>.

(Just guesswork, of course, but he _is_ getting thanks in the NEWS
section :-)

L.A.M.E. is an Open Source patch to the ISO dist10 reference
implementation (as I understand it).  It is much faster than dist10,
but produces identical output.

L.A.M.E. also claims to be much faster than BladeEnc, whereas BladeEnc
seems to be claiming the opposite :)
-- 
Harald


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-28 22:24 ` Wes Hardaker
  1998-10-29  1:04   ` William M. Perry
@ 1998-10-29  2:17   ` Mark R. Boyns
  1998-10-29 11:15   ` Lars Magne Ingebrigtsen
  1998-10-29 12:57   ` Darren/Torin/Who Ever...
  3 siblings, 0 replies; 37+ messages in thread
From: Mark R. Boyns @ 1998-10-29  2:17 UTC (permalink / raw)


wjhardaker@ucdavis.edu writes:

> Lars, do you have an application for getting the serial number off of
> a CD in the drive (ascii output)?  Thats the only thing I can't do in
> my script.  I have to run something like xmcd to get it, and then feed
> that to my script (which then uses the cddb to get the
> artist/album/song-titles).

The following document explains how to calculate this disc id given
the cd toc info:

    http://www.cddb.com/ftp/cddb-docs/cddb_howto.txt



^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29  2:11       ` Harald Meland
@ 1998-10-29  5:05         ` Wes Hardaker
  1998-10-29  5:20         ` David Hedbor
  1998-10-29  7:21         ` Lars Magne Ingebrigtsen
  2 siblings, 0 replies; 37+ messages in thread
From: Wes Hardaker @ 1998-10-29  5:05 UTC (permalink / raw)
  Cc: ding

>>>>> On 29 Oct 1998 03:11:13 +0100, Harald Meland <Harald.Meland@usit.uio.no> said:

Harald> L.A.M.E. also claims to be much faster than BladeEnc, whereas BladeEnc
Harald> seems to be claiming the opposite :)

I'll put them to the test and let you know!

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29  2:11       ` Harald Meland
  1998-10-29  5:05         ` Wes Hardaker
@ 1998-10-29  5:20         ` David Hedbor
  1998-10-29  7:21         ` Lars Magne Ingebrigtsen
  2 siblings, 0 replies; 37+ messages in thread
From: David Hedbor @ 1998-10-29  5:20 UTC (permalink / raw)


Harald Meland <Harald.Meland@usit.uio.no> writes:

> [Wes Hardaker]
> 
> > William> What unix MP3 encoder do people recommend?  I haven't been
> > William> able to find one in cursory searches.
> > 
> > Finding free ones are harder to come by...
> 
> I'd guess Lars is using L.A.M.E., found on
> <URL:http://student.uq.edu.au/~s302585/>.
> 
> (Just guesswork, of course, but he _is_ getting thanks in the NEWS
> section :-)
> 
> L.A.M.E. is an Open Source patch to the ISO dist10 reference
> implementation (as I understand it).  It is much faster than dist10,
> but produces identical output.
> 
> L.A.M.E. also claims to be much faster than BladeEnc, whereas BladeEnc
> seems to be claiming the opposite :)

Anyone made a test themselves? :) Anyway, I just wanted to say that
BladeEnc will soon be released under GPL (reported on /.org).

-- 
[ Below is a random fortune, which is unrelated to the above message. ]
Barach's Rule:
	An alcoholic is a person who drinks more than his own physician.



^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29  2:11       ` Harald Meland
  1998-10-29  5:05         ` Wes Hardaker
  1998-10-29  5:20         ` David Hedbor
@ 1998-10-29  7:21         ` Lars Magne Ingebrigtsen
  1998-10-29 18:00           ` Wes Hardaker
  2 siblings, 1 reply; 37+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-10-29  7:21 UTC (permalink / raw)


Harald Meland <Harald.Meland@usit.uio.no> writes:

> I'd guess Lars is using L.A.M.E., found on
> <URL:http://student.uq.edu.au/~s302585/>.

I'm actually using Mike Cheng's version of 8hz, but that's the same
thing, only different.

> (Just guesswork, of course, but he _is_ getting thanks in the NEWS
> section :-)

I had to do *something* to relax before the Gnus talk a couple of
weeks ago, so I hacked away at LAME.  :-)

> L.A.M.E. also claims to be much faster than BladeEnc, whereas BladeEnc
> seems to be claiming the opposite :)

Here are the tests I did; 8hz and LAME are virtually identical
speed-wise. 

orig.wav (/ 56812604.0 (* 44100.0 4)) => 322.07
blade-128.mp3 (/ (+ (* 29 60) 18) 322.07) => 5.46
8hz-128.mp3 (/ (+ (* 18 60) 54) 322.07) => 3.52
encode-128.mp3 (/ (+ (* 25 60) 95) 322.07) => 4.95
blade-256.mp3 (/ (+ (* 24 60) 16) 322.07) => 4.52
8hz-256.mp3 (/ (+ (* 18 60) 6) 322.07) => 3.37
encode-256.mp3 (/ (+ (* 20 60) 31) 322.07) => 3.822
m3enc-128.mp3 (/ (+ (* 9 60) 39) 30) => 19

This is on a K6.  These number say that 8hz compresses at a 3.52:1
time rate, while blade does it on a 5.46:1 rate, which means that
blade is, er, 70% slower than 8hz.

This is with Cheng's version of 8hz, mind you -- the original 8hz
version from the 8hz people is slower.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-28 22:24 ` Wes Hardaker
  1998-10-29  1:04   ` William M. Perry
  1998-10-29  2:17   ` Mark R. Boyns
@ 1998-10-29 11:15   ` Lars Magne Ingebrigtsen
  1998-10-29 17:56     ` Wes Hardaker
  1998-10-29 21:09     ` Darren Stalder
  1998-10-29 12:57   ` Darren/Torin/Who Ever...
  3 siblings, 2 replies; 37+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-10-29 11:15 UTC (permalink / raw)


Wes Hardaker <wjhardaker@ucdavis.edu> writes:

> Lars, do you have an application for getting the serial number off of
> a CD in the drive (ascii output)?

I use cdda2wav; it reads the track info and computes the CDDB number.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-28 22:24 ` Wes Hardaker
                     ` (2 preceding siblings ...)
  1998-10-29 11:15   ` Lars Magne Ingebrigtsen
@ 1998-10-29 12:57   ` Darren/Torin/Who Ever...
  1998-10-29 17:57     ` Wes Hardaker
  3 siblings, 1 reply; 37+ messages in thread
From: Darren/Torin/Who Ever... @ 1998-10-29 12:57 UTC (permalink / raw)
  Cc: wmperry, ding

-----BEGIN PGP SIGNED MESSAGE-----

Wes Hardaker, in an immanent manifestation of deity, wrote:
>Lars, do you have an application for getting the serial number off of
>a CD in the drive (ascii output)?  Thats the only thing I can't do in
>my script.  I have to run something like xmcd to get it, and then feed
>that to my script (which then uses the cddb to get the
>artist/album/song-titles).

If you're willing to use Perl, I'll be uploading Net::CDDB to CPAN
sometime in November.  I can provide a working Linux snapshot now but
the interface is still be hashed out...

Darren
- -- 
<torin@daft.com> <http://www.daft.com/~torin> <torin@debian.org> <torin@io.com>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @
@		     Make a little hot-tub in your soul.		      @

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNjhmRY4wrq++1Ls5AQFUvwP+MoBqr3eny4Tl26JIzRDu5h+p8qY4M/13
66x3N+q0SPdjG0Rccvz4PnoZThjOr9gbR4e86Zm8pcoDLQ3jSANtV1vMha7MGUFV
SG5dEhyKmie1ew9NqMPjzSK1cf/+99g9+/SBm+Z5xJcX62lOEvwpVroWYXsF0jBv
KVjF0j+KtxA=
=Vcci
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29 11:15   ` Lars Magne Ingebrigtsen
@ 1998-10-29 17:56     ` Wes Hardaker
  1998-10-29 21:09     ` Darren Stalder
  1 sibling, 0 replies; 37+ messages in thread
From: Wes Hardaker @ 1998-10-29 17:56 UTC (permalink / raw)


>>>>> On 29 Oct 1998 12:15:10 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

Lars> I use cdda2wav; it reads the track info and computes the CDDB
Lars> number.

Really?  Mine didn't...  Maybe I missed the option.

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29 12:57   ` Darren/Torin/Who Ever...
@ 1998-10-29 17:57     ` Wes Hardaker
  1998-10-29 20:55       ` Darren Stalder
  0 siblings, 1 reply; 37+ messages in thread
From: Wes Hardaker @ 1998-10-29 17:57 UTC (permalink / raw)
  Cc: Wes Hardaker, wmperry, ding

>>>>> On 29 Oct 1998 04:57:42 -0800, "Darren/Torin/Who Ever..." <torin@daft.com> said:

Darren> If you're willing to use Perl, I'll be uploading Net::CDDB to
Darren> CPAN sometime in November.  I can provide a working Linux
Darren> snapshot now but the interface is still be hashed out...

Willing?  Heck, thats what my "cdrec" script is currently written in.
Was there another alternative???
      
-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29  7:21         ` Lars Magne Ingebrigtsen
@ 1998-10-29 18:00           ` Wes Hardaker
  1998-10-31 13:32             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 37+ messages in thread
From: Wes Hardaker @ 1998-10-29 18:00 UTC (permalink / raw)


>>>>> On 29 Oct 1998 08:21:19 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

Lars> This is on a K6.  These number say that 8hz compresses at a
Lars> 3.52:1 time rate, while blade does it on a 5.46:1 rate, which
Lars> means that blade is, er, 70% slower than 8hz.

Ehhheww...  I've gotta switch.

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29 17:57     ` Wes Hardaker
@ 1998-10-29 20:55       ` Darren Stalder
  1998-10-30 16:10         ` William M. Perry
  0 siblings, 1 reply; 37+ messages in thread
From: Darren Stalder @ 1998-10-29 20:55 UTC (permalink / raw)
  Cc: wmperry, ding

-----BEGIN PGP SIGNED MESSAGE-----

Wes Hardaker, in an immanent manifestation of deity, wrote:
>Willing?  Heck, thats what my "cdrec" script is currently written in.
>Was there another alternative???

Okay.  I've gotten the impression on ding that if it ain't e-lisp, it
ain't nuthin.  I need to make a recent change to cd->query and then I
can send a snapshot to anyone that wants it.

Darren
- -- 
<torin@daft.com> <http://www.daft.com/~torin> <torin@debian.org> <torin@io.com>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @
@		     Make a little hot-tub in your soul.		      @

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNjjWSLQuaHP6LBjxAQF8NAP/YRmFOyEtZnycstUkMeseUjp1upSwuypm
cQP6K/SjXlcG29Oq9oNK8Lrc1iCoNwcLaj/SbQRULG73Kad9VRemwrSxqtp9TB9W
QeyEG0RWC4NKqsYPdL4W2ge/KVl05624i/c3s5APMG9eyDfm/RNsBtg4lQh3HIC6
OFyXVOrvH34=
=YMfz
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29 11:15   ` Lars Magne Ingebrigtsen
  1998-10-29 17:56     ` Wes Hardaker
@ 1998-10-29 21:09     ` Darren Stalder
  1998-10-31 13:31       ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 37+ messages in thread
From: Darren Stalder @ 1998-10-29 21:09 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----

Lars Magne Ingebrigtsen, in an immanent manifestation of deity, wrote:
>I use cdda2wav; it reads the track info and computes the CDDB number.

Might I suggest cdparanoia III?  It says that it's still in alpha but I
find it works much better than cdda2wav with much better sound.

Darren
- -- 
<torin@daft.com> <http://www.daft.com/~torin> <torin@debian.org> <torin@io.com>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @
@		     Make a little hot-tub in your soul.		      @

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNjjZdrQuaHP6LBjxAQH7XgQAvy2W+GmiA3Vuks6/CBmIhUyPjgMMw6p/
gz74WTw/QkY678jxQ41yWXZD0M6rNAcZ7KFTHEw2MqAkR9UUalPvozDw7BsnKYcG
zyzkujx03Z6oAF+gq+VbM3u+c6dBCVd9BxzxKS9Bme9YS2zKDuxmv3WzpqFwZqMt
WCsaJKPwWaM=
=z6R3
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29 20:55       ` Darren Stalder
@ 1998-10-30 16:10         ` William M. Perry
  1998-10-30 18:10           ` William M. Perry
  0 siblings, 1 reply; 37+ messages in thread
From: William M. Perry @ 1998-10-30 16:10 UTC (permalink / raw)
  Cc: Wes Hardaker, ding

Darren Stalder <darren@u.washington.edu> writes:

> -----BEGIN PGP SIGNED MESSAGE-----
> 
> Wes Hardaker, in an immanent manifestation of deity, wrote:
> >Willing?  Heck, thats what my "cdrec" script is currently written in.
> >Was there another alternative???
> 
> Okay.  I've gotten the impression on ding that if it ain't e-lisp, it
> ain't nuthin.  I need to make a recent change to cd->query and then I
> can send a snapshot to anyone that wants it.

  And for those that really do think if it aint-e-lisp, its crap, here's a
first pass at cddb.el.  It can use cdda2wav or cdparanoia to get the TOC
from the CD, computes the discid, and can either look up the CD in a local
CDDB database, or do it remotely.  It even works through my socks.el stuff, 
wheee. :)

  Try evaluating (cddb-get-entry) when you have a CD in the drive.  It will
pull back the XMCD style info.  Next on the list is actually parsing this
out.  I want to eventually have a suite of elisp scripts that will just
take a CD, convert the whole damn thing to mp3, and create an appropriate
.XAM file (the xaudio album format).

  Or perhaps just go all the way and write an MP3 player in elisp and make
the playlists, etc, controllable via custom, and album files in a nice easy 
to (read ...) format.

  Any interest? :)

-Bill P.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-30 16:10         ` William M. Perry
@ 1998-10-30 18:10           ` William M. Perry
  1998-11-04  8:08             ` Matt Simmons
  0 siblings, 1 reply; 37+ messages in thread
From: William M. Perry @ 1998-10-30 18:10 UTC (permalink / raw)
  Cc: Wes Hardaker, ding

[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]

wmperry@aventail.com (William M. Perry) writes:

> Darren Stalder <darren@u.washington.edu> writes:
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > 
> > Wes Hardaker, in an immanent manifestation of deity, wrote:
> > >Willing?  Heck, thats what my "cdrec" script is currently written in.
> > >Was there another alternative???
> > 
> > Okay.  I've gotten the impression on ding that if it ain't e-lisp, it
> > ain't nuthin.  I need to make a recent change to cd->query and then I
> > can send a snapshot to anyone that wants it.
> 
>   And for those that really do think if it aint-e-lisp, its crap, here's a
> first pass at cddb.el.  It can use cdda2wav or cdparanoia to get the TOC
> from the CD, computes the discid, and can either look up the CD in a local
> CDDB database, or do it remotely.  It even works through my socks.el stuff, 
> wheee. :)
> 
>   Try evaluating (cddb-get-entry) when you have a CD in the drive.  It will
> pull back the XMCD style info.  Next on the list is actually parsing this
> out.  I want to eventually have a suite of elisp scripts that will just
> take a CD, convert the whole damn thing to mp3, and create an appropriate
> .XAM file (the xaudio album format).
> 
>   Or perhaps just go all the way and write an MP3 player in elisp and make
> the playlists, etc, controllable via custom, and album files in a nice easy 
> to (read ...) format.
> 
>   Any interest? :)

  Duh, here's the attachment.

-bp


[-- Attachment #2: cddb.el --]
[-- Type: text/plain, Size: 16831 bytes --]

;;; cddb.el --- CD DataBase interface
;; Author: William M. Perry <wmperry@aventail.com>
;; Created: October 29, 1998
;; Version: 0.1
;; Keywords: multimedia

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Copyright (c) 1998 Free Software Foundation, Inc.
;;;
;;; This file is not part of GNU Emacs, but the same permissions apply.
;;;
;;; GNU Emacs is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2, or (at your option)
;;; any later version.
;;;
;;; GNU Emacs is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Emacs; see the file COPYING.  If not, write to the
;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;;; Boston, MA 02111-1307, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defconst cddb-version "0.1"
  "Version # of CDDB package.")

(defvar cddb-cdparanoia-program "cdparanoia"
  "*Where to find the cdparanoia program.")

(defvar cddb-cdda2wav-program "cdda2wav"
  "*Where to find the cdda2wav program.")

(defvar cddb-cdda2wav-arguments '("-N" "-t" "1" "-d" "1")
  "*Arguments to pass to cdda2wav to get CD track information.")

(defvar cddb-cd-query-function nil
  "*Function to call to get CD track information for a device.")
  
(defvar cddb-hosts '("/opt/kde/share/apps/kscd/cddb/"
		     "/usr/local/share/apps/kscd/cddb/"		     
		     "/usr/share/apps/kscd/cddb/"
		     ("cddb.moonsoft.com" 8880)
		     ("cddb.sonic.net" 888)
		     ("sunsite.unc.edu" 8880)
		     ("www.cddb.com" 8880)
		     ("cddb.netads.com" 8880)
		     ("cddb.kagomi.com" 8880)
		     ("cddb.celestial.com" 888))
  "*A list of CDDB database locations to search.
Entries in this list can be strings to specify a local directory
structure to search, or a list of (hostname portnumber) to specify a
remote CDDB server.
")

(defvar cddb-possible-probe-programs
  '((cddb-cdparanoia-program . cddb-cdparanoia-get-info)
    (cddb-cdda2wav-program . cddb-cdda2wav-get-info))
  "*Possible programs to probe for CD characteristics.
This is used if you have not explicitly set `cddb-cd-query-function'.

It is an assoc list.  The car of each entry is a symbol name that
holds the program name.  The cdr of each entry is a function name that
should be used as the value of `cddb-cd-query-function' if the program
is found.")


(defsubst cddb-sum-digit (i)
  (let ((sum 0))
    (mapc (lambda (char)
	    (setq sum (+ sum (string-to-int (char-to-string char)))))
	  (int-to-string i))
    sum))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Various ways to extract the information we need to do CDDB queries using
;;; external programs.
;;;
;;; Please feel free to add more!  Just please email them to the maintainer
;;; so other people can enjoy them as well.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun cddb-cdparanoia-get-info (&optional device)
  "Extractinformation about a cd using cdparanoia.
Returns a list of (DISCID TRACKS LENGTH TRACKINFO)

DISCID - the CDDB discid of the cd
TRACKS - the # of tracks on the cd
LENGTH - the total running time of the cd
TRACKINFO - a list of the frame offsets of each track
"
  (save-excursion
    (set-buffer (get-buffer-create " *cdparanoia*"))
    (erase-buffer)
    (let ((exit-status (if device
			   (call-process cddb-cdparanoia-program nil t nil "-d" device "-Q")
			 (call-process cddb-cdparanoia-program nil t nil "-Q")))
	  (track-info nil)
	  (track-time-info nil)
	  (sums 0)
	  (tracks 0)
	  (length 0)
	  (last-offset 0))
      (if (/= exit-status 0)
	  (error "Could not get execute `%s'" cddb-cdparanoia-program))
      (goto-char (point-min))
      (while (re-search-forward "\\([0-9]+\\)[^0-9]+[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9].\\s-+\\([0-9]+\\)" nil t)
	(push (string-to-int (match-string 2)) track-info)
	(setq last-offset (+ (string-to-int (match-string 1)) (string-to-int (match-string 2)))))
      (setq track-info (reverse track-info)
	    tracks (length track-info)
	    track-time-info (mapcar (lambda (offset) (+ 2 (/ offset 75))) track-info)
	    length (- (+ 2 (/ last-offset 75)) (car track-time-info))
	    sums (apply (quote +) (mapcar (quote cddb-sum-digit) track-time-info)))
      (list (format "%02x%04x%02x" sums length tracks)
	    tracks
	    length
	    track-info))))

(defun cddb-cdda2wav-get-info (&optional device)
  "Extractinformation about a cd using cdda2wav.
Returns a list of (DISCID TRACKS LENGTH TRACKINFO)

DISCID - the CDDB discid of the cd
TRACKS - the # of tracks on the cd
LENGTH - the total running time of the cd
TRACKINFO - a list of the frame offsets of each track
"

  (save-excursion
    (set-buffer (get-buffer-create " *cdda2wav*"))
    (erase-buffer)
    (let* ((exit-status (if device
			    (apply 'call-process
				   cddb-cdda2wav-program nil t nil 
				   "-D" device
				   cddb-cdda2wav-arguments)
			  (apply 'call-process
				 cddb-cdda2wav-program nil t nil
				 cddb-cdda2wav-arguments)))
	  (track-info nil)
	  (track-time-info nil)
	  (sums 0)
	  (tracks 0)
	  (length 0)
	  (last-offset 0))
      (if (/= exit-status 0)
	  (error "Could not get execute `%s'" cddb-cdda2wav-program))
      (goto-char (point-min))
      (if (not (re-search-forward "starting sectors.*" nil t))
	  (error "Could not understand output of `%s'" cddb-cdda2wav-program))
      (delete-region (point-min) (match-end 0))
      (while (re-search-forward "\\s-*\\([^\(]+\\)\(\\s-*\\([0-9]+\\)\),?" nil t)
	(push (string-to-int (match-string 2)) track-info))
      (setq last-offset (pop track-info))
      (setq track-info (reverse track-info)
	    tracks (length track-info)
	    track-time-info (mapcar (lambda (offset) (+ 2 (/ offset 75))) track-info)
	    length (- (+ 2 (/ last-offset 75)) (car track-time-info))
	    sums (apply (quote +) (mapcar (quote cddb-sum-digit) track-time-info)))
      (list (format "%02x%04x%02x" sums length tracks)
	    tracks
	    length
	    track-info))))    

\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; XMCD file parsing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defsubst cddb-parse-valid-p ()
  (save-excursion
    (goto-char (point-min))
    (looking-at "# xmcd")))

(defun cddb-parse-get-item (name)
  (goto-char (point-min))
  (let ((regexp (format "^\\s-*%s=\\(.*\\)" name))
	(value ""))
    (while (re-search-forward regexp nil t)
      (setq value (concat value (match-string 1))))
    value))

(defun cddb-parse-info (&optional buffer)
  (save-excursion
    (set-buffer (or buffer (current-buffer)))
    (if (not (cddb-parse-valid-p))
	nil
      )))
	
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Local searching
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun cddb-local-search-internal (discid dir)
  (let ((subdirs (directory-files dir nil nil nil 5))
	(subdir nil)
	(matches nil)
	(entry nil))
    (if (file-exists-p (expand-file-name discid dir))
	(push (expand-file-name discid dir) matches))
    (while subdirs
      (setq subdir (pop subdirs))
      (if (or (string= "." subdir) (string= ".." subdir))
	  nil
	(setq entry (cddb-local-search-internal discid (expand-file-name subdir dir)))
	(if entry
	    (setq matches (append matches entry)))))
    matches))

(defun cddb-local-search (info dir)
  (if (not (file-exists-p dir))
      nil
    (message "Searching locally: %s" dir)
    (let ((matches (cddb-local-search-internal (car info) dir))
	  (discid nil)
	  (filename nil)
	  (title nil))
      (if (not matches)
	  nil
	(save-excursion
	  (set-buffer (get-buffer-create " *cddb*"))
	  (while matches
	    (erase-buffer)
	    (insert-file-contents (car matches))
	    (push (car matches) filename)
	    (push (cddb-parse-get-item "DISCID") discid)
	    (push (cddb-parse-get-item "DTITLE") title)
	    (pop matches)))

	(if (= (length discid) 1)
	    (setq discid (car discid)
		  title (car title)
		  filename (car filename)))

	(if (listp discid)
	    (let ((choices nil)
		  (completion-ignore-case t))
	      (while title
		(push (cons (pop title) (cons (pop filename) (pop discid))) choices))
	      (setq title (completing-read "Multiple matches, choose: " choices nil t))
	      (if (not title)
		  (error "Must choose an item from the list."))
	      (setq filename (car (car (assoc title choices)))
		    discid (cdr (car (assoc title choices))))))
	(save-excursion
	  (set-buffer (get-buffer-create " *cddb*"))
	  (erase-buffer)
	  (insert-file-contents filename)
	  (buffer-string))))))

\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Remote searching
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun cddb-build-query-string (info)
  (format "cddb query %s %d %s %d\r\n"
	  (nth 0 info)
	  (nth 1 info)
	  (mapconcat 'int-to-string (nth 3 info) " ")
	  (nth 2 info)))

(defsubst cddb-process-live-p (process)
  (memq (process-status process) '(run open)))
	
(defsubst cddb-get-multiple-data (process)
  (goto-char (point-min))
  (while (not (re-search-forward "^\\.\r?$" nil t))
    (if (not (cddb-process-live-p process))
	(error "CDDB Connection unexpectedly closed."))
    (accept-process-output process))
  (replace-match "")
  (prog1
      (buffer-substring (point-min) (match-beginning 0))
    (delete-region (point-min) (match-beginning 0))))

(defun cddb-get-response (process &optional error-string)
  "Handles getting a response from a CDDB server.
Return value is a list of (CODE DATA EXTENDEDDATA)

CODE is the numerical response code
DATA is the single-line textual response from the server
EXTENDEDDATA is the extra data from the server (for x1x responses)
"
  (let ((response-code nil)
	(response-data nil)
	(extended-data nil)
	(major-code nil)
	(minor-code nil))
    (goto-char (point-min))
    (while (not (re-search-forward "^\\([0-9]+\\)\\s-+\\([^\r\n]*\\)\r*\n" nil t))
      (if (not (cddb-process-live-p process))
	  (error (or error-string "Error: %s") "Connection unexpectedly closed."))
      (accept-process-output process)
      (goto-char (point-min)))

    (setq response-code (string-to-int (match-string 1))
	  response-data (match-string 2)
	  major-code (/ response-code 100)
	  minor-code (/ (- (% response-code 100) (% (% response-code 100) 10)) 10))
    (replace-match "")
    (case major-code
      (1 nil)				; Informative message
      (2 nil)				; Command OK
      (3 nil)				; Command OK so far, continue
      (4				; Command Ok, but cannot be performed
       (error (or error-string "Cannot perform command: %s") response-data))
      (5				; Command unimplemented, incorrect, or program error
       (error (or error-string "Error: %s") response-data))
      (otherwise			; Unknown major response code!
       (error "Unknown major response code: %d" response-code)))

    (case minor-code
      (0 nil)				; Ready for further commands
      (1				; More server-to-client output follows
       (setq extended-data (cddb-get-multiple-data process)))
      (2 nil)				; More client-to-server input follows
      (3 nil)				; Connection will close
      (otherwise nil))			; Unknown minor code is ok?

    (list response-code response-data extended-data)))

(defun cddb-remote-search (query host port)
  "Perform a search on a remote HOST for a given cddb query QUERY"
  (message "Searching remotely: %s:%d" host port)
  (save-excursion
    (set-buffer (get-buffer-create " *cddb*"))
    (erase-buffer)
    (let ((process (open-network-stream "cddb" (current-buffer) host port))
	  (response nil)
	  (category nil)
	  (discid nil)
	  (title nil)
	  (entry nil))

      ;; This is just so we don't see the annoying (to me)
      ;; 'Process foo exited abnormally with code ###'
      ;; at the end of every connection.
      (set-process-sentinel process 'ignore)

      ;; Slurp in the opening banner
      (cddb-get-response process "Cannot connect to server: %s")

      ;; Send/receive the hello
      (process-send-string process
			   (format "cddb hello %s %s cddb.el %s\r\n"
				   (user-real-login-name)
				   (system-name)
				   cddb-version))
      (cddb-get-response process)

      ;; Actually send the query
      (process-send-string process query)
      (setq response (cddb-get-response process "Could not send query to server: %s"))

      (let ((query-response-regexp "\\(\\w+\\)\\s-+\\(........\\)\\s-\\(.*\\)"))
	(case (car response)
	  (200
	   ;; Found exact match
	   (if (string-match query-response-regexp (nth 1 response))
	       (setq category (match-string 1 (nth 1 response))
		     discid (match-string 2 (nth 1 response))
		     title (match-string 3 (nth 1 response)))))
	  (202
	   ;; No matches found
	   )
	  ((210 211)
	   ;; 210 = Found multiple exact matches, list follows
	   ;; 211 = Found inexact matches, list follows
	   (setq response (split-string "\r?\n" (nth 2 response)))
	   (while response
	     (if (string-match query-response-regexp (car response))
		 (progn
		   (push (match-string 1 (car response)) category)
		   (push (match-string 2 (car response)) discid)
		   (push (match-string 3 (car response)) title))
	       (error "Can not understand query response: %s" (car response)))
	     (pop response)))))
      (if (listp category)
	  (let ((choices nil)
		(completion-ignore-case t))
	    (while title
	      (push (cons (pop title) (cons (pop category) (pop discid))) choices))
	    (setq title (completing-read "Multiple matches, choose: " choices nil t))
	    (if (not title)
		(error "Must choose an item from the list."))
	    (setq category (car (car (assoc title choices)))
		  discid (cdr (car (assoc title choices))))))
      (if (not category)
	  ;; Didn't find _any_ matches, or the user didn't like what they found
	  ;; let's move on to the next server.
	  nil
	(process-send-string process (format "cddb read %s %s\r\n" category discid))
	(setq response (cddb-get-response process "Error during `cddb read': %s")
	      entry (nth 2 response)))
      (process-send-string process "quit\r\n")
      (cddb-get-response process "Problem disconnecting from server: %s")
      (if (and entry (string-match "\r\n" entry))
	  (progn
	    ;; Has \r\n crap, clean it up
	    (erase-buffer)
	    (insert entry)
	    (goto-char (point-min))
	    (while (re-search-forward "\r\n" nil t)
	      (replace-match "\n"))
	    (setq entry (buffer-string))
	    (erase-buffer)))
      entry)))

\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Main entry points
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun cddb-init ()
  (if (not cddb-cd-query-function)
      (let ((paths nil)
	    (possible-probes cddb-possible-probe-programs)
	    (probe nil)
	    (program-name nil))

	(while possible-probes
	  (setq probe (car possible-probes)
		possible-probes (cdr possible-probes)
		paths exec-path
		program-name (symbol-value (car probe)))
	  (while paths
	    (if (and (file-exists-p (expand-file-name program-name (car paths)))
		     (file-executable-p (expand-file-name program-name (car paths))))
		(setq paths nil
		      possible-probes nil
		      cddb-cd-query-function (cdr probe)))
	    (setq paths (cdr paths))))))
  (if (not cddb-cd-query-function)
      (save-window-excursion
	(set-buffer (get-buffer-create "*CDDB Error*"))
	(erase-buffer)
	(insert "*** ERROR ***\n\n"
		"An error occured while trying to determine how to get CD track "
		"information on your system.\n\n"
		"None of the following programs was found on your system.  "
		"Please customize one of the variables and try again.")
	(fill-region (point-min) (point-max))
	(insert "\n")
	(mapcar (lambda (v)
		  (insert (symbol-name (car v)) " -- " (symbol-value (car v)) "\n"))
		cddb-possible-probe-programs)
	(display-buffer (current-buffer))
	(read-string "An error occured - press RETURN to continue...")
	(error "Aborting"))))

(defun cddb-get-entry (&optional device)
  (cddb-init)
  (let* ((current-host nil)
	 (hosts cddb-hosts)
	 (info (funcall cddb-cd-query-function device))
	 (entry nil)
	 (query (cddb-build-query-string info)))
    (while (and hosts (not entry))
      (setq current-host (car hosts)
	    hosts (cdr hosts))
      (if (stringp current-host)
	  (setq entry (cddb-local-search info current-host))
	(setq entry (apply 'cddb-remote-search query current-host))))
    entry))

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29 21:09     ` Darren Stalder
@ 1998-10-31 13:31       ` Lars Magne Ingebrigtsen
  1998-11-01 16:18         ` William M. Perry
       [not found]         ` <x7btmsejes.fsf@peorth.gweep.net>
  0 siblings, 2 replies; 37+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-10-31 13:31 UTC (permalink / raw)


Darren Stalder <darren@u.washington.edu> writes:

> Might I suggest cdparanoia III?  It says that it's still in alpha but I
> find it works much better than cdda2wav with much better sound.

It's much better than cdda2wav -- if you've got a normal CD-ROM.  I've
got a Plextor Ultraplex, which does DAE flawlessly at 20x.  It's a
wonder to behold.  

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-29 18:00           ` Wes Hardaker
@ 1998-10-31 13:32             ` Lars Magne Ingebrigtsen
  1998-11-02 18:59               ` Wes Hardaker
  1998-11-04  5:51               ` Matt Simmons
  0 siblings, 2 replies; 37+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-10-31 13:32 UTC (permalink / raw)


Wes Hardaker <wjhardaker@ucdavis.edu> writes:

> Lars> This is on a K6.  These number say that 8hz compresses at a
> Lars> 3.52:1 time rate, while blade does it on a 5.46:1 rate, which
> Lars> means that blade is, er, 70% slower than 8hz.
> 
> Ehhheww...  I've gotta switch.

I've put Cheng's version of 8hz at
<URL:http://www.stud.ifi.uio.no/~larsi/other/8hz-mp3-cheng.tar.gz>.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-31 13:31       ` Lars Magne Ingebrigtsen
@ 1998-11-01 16:18         ` William M. Perry
       [not found]         ` <x7btmsejes.fsf@peorth.gweep.net>
  1 sibling, 0 replies; 37+ messages in thread
From: William M. Perry @ 1998-11-01 16:18 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Darren Stalder <darren@u.washington.edu> writes:
> 
> > Might I suggest cdparanoia III?  It says that it's still in alpha but I
> > find it works much better than cdda2wav with much better sound.
> 
> It's much better than cdda2wav -- if you've got a normal CD-ROM.  I've
> got a Plextor Ultraplex, which does DAE flawlessly at 20x.  It's a
> wonder to behold.  

  Let's just mail lars our CD's. :)

-Bill P.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
       [not found]         ` <x7btmsejes.fsf@peorth.gweep.net>
@ 1998-11-01 17:22           ` Brian Edmonds
  1998-11-01 20:46             ` William M. Perry
  0 siblings, 1 reply; 37+ messages in thread
From: Brian Edmonds @ 1998-11-01 17:22 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:
> About the only way to be sure is to try cdda2wav and listen to what it
> spits out.  If you hear popping noises, you'll want to use cdparanoia
> instead.

I find cdparanoia's progress indicator to be a nice feature.

Brian.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-01 17:22           ` Brian Edmonds
@ 1998-11-01 20:46             ` William M. Perry
  1998-11-07 13:41               ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 37+ messages in thread
From: William M. Perry @ 1998-11-01 20:46 UTC (permalink / raw)


Brian Edmonds <brian@gweep.bc.ca> writes:

> Stainless Steel Rat <ratinox@peorth.gweep.net> writes:
> > About the only way to be sure is to try cdda2wav and listen to what it
> > spits out.  If you hear popping noises, you'll want to use cdparanoia
> > instead.
> 
> I find cdparanoia's progress indicator to be a nice feature.

  Both of them seem to randomly spaz out on me on certain tracks... they
just loop over and over.  I started snarfing a CD before I went to bed last
night (~12a) using cdparanoia.  Just a 20 track CD, but it got hung up
reading the _2nd_ track, and was still there when I came back up to the
office ~8a this morning.  The progress indicator was still going and
everything.  Anyone seen something similar?

-Bill P.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-31 13:32             ` Lars Magne Ingebrigtsen
@ 1998-11-02 18:59               ` Wes Hardaker
  1998-11-04  5:51               ` Matt Simmons
  1 sibling, 0 replies; 37+ messages in thread
From: Wes Hardaker @ 1998-11-02 18:59 UTC (permalink / raw)


>>>>> On 31 Oct 1998 14:32:19 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

>> Ehhheww...  I've gotta switch.

Lars> I've put Cheng's version of 8hz at
Lars> <URL:http://www.stud.ifi.uio.no/~larsi/other/8hz-mp3-cheng.tar.gz>.

Thanks!

I just built Lame, and if I remember your stats, I don't think it
makes much of a difference between the two, but I'll check it out.

Wes


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-31 13:32             ` Lars Magne Ingebrigtsen
  1998-11-02 18:59               ` Wes Hardaker
@ 1998-11-04  5:51               ` Matt Simmons
  1998-11-10 16:22                 ` Justin Sheehy
  1 sibling, 1 reply; 37+ messages in thread
From: Matt Simmons @ 1998-11-04  5:51 UTC (permalink / raw)


>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

    Lars> Wes Hardaker <wjhardaker@ucdavis.edu> writes:
    Lars> This is on a K6.  These number say that 8hz compresses at a
    Lars> 3.52:1 time rate, while blade does it on a 5.46:1 rate, which
    Lars> means that blade is, er, 70% slower than 8hz.

    Lars> I've put Cheng's version of 8hz at
    Lars> <URL:http://www.stud.ifi.uio.no/~larsi/other/8hz-mp3-cheng.tar.gz>.

I'll see your farm of PIIs, and raise it an E10000.[1]  None of this
silly multimachine synchronization stuff.

galette[2] -f WAV -a track
for i in track*.wav ; do
  8hz-mp3 $i $i:r.mp3 &
done
wait

Of course, you run into contention problems when the CDs have more
than 64 tracks, but I'm not worried.

I love working for a hardware company. =)

Matt

Footnotes: 
[1]  http://www.sun.com/servers/enterprise/10000/

[2]  A CDDA reader for Solaris (SPARC, and hopefully Intel once I get
     a good drive for my Intel machine).  Be warned - it's _very_
     picky about the cleanliness of CDs.  http://www.cybersoft.org/galette/

-- 
     Matt Simmons  -  simmonmt@acm.org  -  http://www.netcom.com/~simmonmt
     Every society honours its live conformists and its dead troublemakers.
			      --Mignon Mclaughlin


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-10-30 18:10           ` William M. Perry
@ 1998-11-04  8:08             ` Matt Simmons
  1998-11-04 10:42               ` William M. Perry
  0 siblings, 1 reply; 37+ messages in thread
From: Matt Simmons @ 1998-11-04  8:08 UTC (permalink / raw)
  Cc: simmonmt

Could you add this diff to cddb.el?  It adds support for galette, a
CDDA ripper for Solaris.

I've been trying to use socks.el, and I keep running into the
`Connection not allowed by ruleset' message.  What does it mean?  Is
it something on my end, or is it something in the proxy?

Matt

--- cddb/cddb.el	Tue Nov  3 23:48:36 1998
+++ cddb.el	Tue Nov  3 23:49:29 1998
@@ -34,6 +34,9 @@
 (defvar cddb-cdda2wav-program "cdda2wav"
   "*Where to find the cdda2wav program.")
 
+(defvar cddb-galette-program "galette"
+  "*where to find the galette program.")
+
 (defvar cddb-cdda2wav-arguments '("-N" "-t" "1" "-d" "1")
   "*Arguments to pass to cdda2wav to get CD track information.")
 
@@ -58,7 +61,8 @@
 
 (defvar cddb-possible-probe-programs
   '((cddb-cdparanoia-program . cddb-cdparanoia-get-info)
-    (cddb-cdda2wav-program . cddb-cdda2wav-get-info))
+    (cddb-cdda2wav-program . cddb-cdda2wav-get-info)
+    (cddb-galette-program . cddb-galette-get-info))
   "*Possible programs to probe for CD characteristics.
 This is used if you have not explicitly set `cddb-cd-query-function'.
 
@@ -118,6 +122,49 @@
 	    tracks
 	    length
 	    track-info))))
+
+(defun cddb-galette-get-info (&optional device)
+  "Extract information about a CD using galette.
+Returns a list (DISKCD TRACKS LENGTH TRACKINFO)
+
+DISCID - the CDDB discid of the cd
+TRACKS - the # of tracks on the cd
+LENGTH - the total running time of the cd (in seconds)
+TRACKINFO - a list of the frame offsets of each track
+"
+
+  (save-excursion
+    (set-buffer (get-buffer-create " *galette*"))
+    (erase-buffer)
+    (let ((exit-status (if device
+			   (call-process cddb-galette-program nil t nil "-d" device "-i")
+			 (call-process cddb-galette-program nil t nil "-i")))
+	  (track-info nil)
+	  (length 0)
+	  (num-tracks 0)
+	  (discid nil))
+      (if (/= exit-status 0)
+	  (error "Could not execute `%s'" cddb-galette-program))
+      (goto-char (point-min))
+      
+      ;; Get the frame offsets
+      (while (re-search-forward "^CDROM: |\\s *[0-9]+ | AUDIO |\\s *\\([0-9]+\\) |" nil t)
+	(push (string-to-int (match-string 1)) track-info)
+	(setq num-tracks (1+ num-tracks)))
+      (setq track-info (reverse track-info))
+      
+      ;; Get the disk length.  Easier to divide frames by 75 than to parse
+      ;; mm:ss, so grab the frames
+      (re-search-forward "^CDROM: | TOTAL |\\s +|\\s *\\([0-9]+\\) |" nil t)
+      (setq length (/ (string-to-int (match-string 1)) 75))
+
+      (message (match-string 1))
+      
+      ;; Get the disk ID
+      (re-search-forward "^CDROM: disk id = \\([a-f0-9]+\\)" nil t)
+      (setq discid (match-string 1))
+
+      (list discid num-tracks length track-info))))
 
 (defun cddb-cdda2wav-get-info (&optional device)
   "Extractinformation about a cd using cdda2wav.


-- 
     Matt Simmons  -  simmonmt@acm.org  -  http://www.netcom.com/~simmonmt
      Always take time to stop and smell the roses... and sooner or later,
			      you'll inhale a bee.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-04  8:08             ` Matt Simmons
@ 1998-11-04 10:42               ` William M. Perry
  1998-11-05  8:05                 ` Matt Simmons
  0 siblings, 1 reply; 37+ messages in thread
From: William M. Perry @ 1998-11-04 10:42 UTC (permalink / raw)
  Cc: ding, simmonmt

Matt Simmons <simmonmt@acm.org> writes:

> Could you add this diff to cddb.el?  It adds support for galette, a CDDA
> ripper for Solaris.
> 
> I've been trying to use socks.el, and I keep running into the `Connection
> not allowed by ruleset' message.  What does it mean?  Is it something on
> my end, or is it something in the proxy?

  Sure, applied, and I'll start putting it on
ftp://ftp.cs.indiana.edu/pub/elisp/cddb/cddb.el

-Bill P.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-04 10:42               ` William M. Perry
@ 1998-11-05  8:05                 ` Matt Simmons
  1998-11-05 13:15                   ` William M. Perry
  0 siblings, 1 reply; 37+ messages in thread
From: Matt Simmons @ 1998-11-05  8:05 UTC (permalink / raw)
  Cc: simmonmt

How hard would it be to make cddb.el get the CDDB records through
HTTP?  Via a proxy?

Dammit.  There were other things I was supposed to be doing tonight.

CAVEATS:
  1. It works for me.  Using galette, it grabs the info for the Out of 
     Sight sound track, and retrieves the record.  I don't have a local 
     database, so my regression testing was limited to retrieving that 
     same CD through a direct socket connection.
  2. The code isn't the prettiest in the world.  See especially line
     442.  I'm also not particularly fond of the name of
     cddb-get-rest, nor of the way I determine whether or not I should 
     call it.
  3. Note that the cddb-hosts variable has changed format for all
     types of servers.
  4. It does NOT implement the CDDB encoding for weird characters, but 
     I don't think it needs to, unless they come up with a category
     name that can't go in a URL.

Matt

-- 
     Matt Simmons  -  simmonmt@acm.org  -  http://www.netcom.com/~simmonmt
       An economist is an expert who will know tomorrow why the things he
	 predicted yesterday didn't happen today.  --Laurence J. Peter
--- -	Thu Nov  5 00:01:51 1998
+++ cddb.el	Wed Nov  4 23:57:37 1998
@@ -43,20 +43,24 @@
 (defvar cddb-cd-query-function nil
   "*Function to call to get CD track information for a device.")
   
-(defvar cddb-hosts '("/opt/kde/share/apps/kscd/cddb/"
-		     "/usr/local/share/apps/kscd/cddb/"		     
-		     "/usr/share/apps/kscd/cddb/"
-		     ("cddb.moonsoft.com" 8880)
-		     ("cddb.sonic.net" 888)
-		     ("sunsite.unc.edu" 8880)
-		     ("www.cddb.com" 8880)
-		     ("cddb.netads.com" 8880)
-		     ("cddb.kagomi.com" 8880)
-		     ("cddb.celestial.com" 888))
+(defvar cddb-hosts '((file "/opt/kde/share/apps/kscd/cddb/")
+		     (file "/usr/local/share/apps/kscd/cddb/")
+		     (file "/usr/share/apps/kscd/cddb/")
+		     (remote "cddb.moonsoft.com" 8880)
+		     (remote "cddb.sonic.net" 888)
+		     (remote "sunsite.unc.edu" 8880)
+		     (remote "www.cddb.com" 8880)
+		     (remote "cddb.netads.com" 8880)
+		     (remote "cddb.kagomi.com" 8880)
+		     (remote "cddb.celestial.com" 888)
+		     (http "cddb.sonic.net" "~cddb/cddb.cgi" 80))
   "*A list of CDDB database locations to search.
-Entries in this list can be strings to specify a local directory
-structure to search, or a list of (hostname portnumber) to specify a
-remote CDDB server.
+Entries in this list are themselves lists that specify the server
+location and access method.  The lists can be:
+
+ (file \"path\")             ;; Local database
+ (remote \"host\" port)      ;; Direct socket connection to remote server
+ (http \"host\" \"path\" port) ;; Server accessible via HTTP
 ")
 
 (defvar cddb-possible-probe-programs
@@ -322,7 +326,46 @@
       (buffer-substring (point-min) (match-beginning 0))
     (delete-region (point-min) (match-beginning 0))))
 
-(defun cddb-get-response (process &optional error-string)
+(defsubst cddb-get-rest ()
+  (let ((start (point)))
+    (re-search-forward "^\\.\r?$" nil t)
+    (buffer-substring start (match-beginning 0))))
+
+(defconst cddb-response-regexp "^\\([0-9]+\\)\\s-+\\([^\r\n]*\\)\r*\n")
+
+(defun cddb-get-remote-response (process &optional error-string)
+  "Handles getting a response from a CDDB server over a direct socket.
+Return value is a list of (CODE DATA EXTENDEDDATA)
+
+CODE is the numerical response code
+DATA is the single-line textual response from the server
+EXTENDEDDATA is the extra data from the server (for x1x responses)
+"
+    (goto-char (point-min))
+    (while (not (re-search-forward cddb-response-regexp nil t))
+      (if (not (cddb-process-live-p process))
+	  (error (or error-string "Error: %s") "Connection unexpectedly closed."))
+      (accept-process-output process)
+      (goto-char (point-min)))
+
+    (cddb-get-response process error-string))
+
+(defun cddb-get-http-response (&optional error-string)
+  "Handles getting a response from a CDDB server via HTTP.
+
+Return value is a list of (CODE DATA EXTENDEDDATA)
+
+CODE is the numerical response code
+DATA is the single-line textual response from the server
+EXTENDEDDATA is the extra data from the server (for x1x responses)
+"
+  (if (not (re-search-forward cddb-response-regexp nil t))
+      (error "Malformed HTTP response"))
+
+  (cddb-get-response nil error-string))
+  
+  
+(defun cddb-get-response (process error-string)
   "Handles getting a response from a CDDB server.
 Return value is a list of (CODE DATA EXTENDEDDATA)
 
@@ -335,13 +378,10 @@
 	(extended-data nil)
 	(major-code nil)
 	(minor-code nil))
+    
     (goto-char (point-min))
-    (while (not (re-search-forward "^\\([0-9]+\\)\\s-+\\([^\r\n]*\\)\r*\n" nil t))
-      (if (not (cddb-process-live-p process))
-	  (error (or error-string "Error: %s") "Connection unexpectedly closed."))
-      (accept-process-output process)
-      (goto-char (point-min)))
-
+    (re-search-forward cddb-response-regexp nil t)
+    
     (setq response-code (string-to-int (match-string 1))
 	  response-data (match-string 2)
 	  major-code (/ response-code 100)
@@ -361,7 +401,8 @@
     (case minor-code
       (0 nil)				; Ready for further commands
       (1				; More server-to-client output follows
-       (setq extended-data (cddb-get-multiple-data process)))
+       (setq extended-data (if process (cddb-get-multiple-data process)
+			     (cddb-get-rest))))
       (2 nil)				; More client-to-server input follows
       (3 nil)				; Connection will close
       (otherwise nil))			; Unknown minor code is ok?
@@ -387,7 +428,7 @@
       (set-process-sentinel process 'ignore)
 
       ;; Slurp in the opening banner
-      (cddb-get-response process "Cannot connect to server: %s")
+      (cddb-get-remote-response process "Cannot connect to server: %s")
 
       ;; Send/receive the hello
       (process-send-string process
@@ -395,54 +436,29 @@
 				   (user-real-login-name)
 				   (system-name)
 				   cddb-version))
-      (cddb-get-response process)
+      (cddb-get-remote-response process)
 
       ;; Actually send the query
       (process-send-string process query)
-      (setq response (cddb-get-response process "Could not send query to server: %s"))
+      (setq response (cddb-get-remote-response process "Could not send query to server: %s"))
 
-      (let ((query-response-regexp "\\(\\w+\\)\\s-+\\(........\\)\\s-\\(.*\\)"))
-	(case (car response)
-	  (200
-	   ;; Found exact match
-	   (if (string-match query-response-regexp (nth 1 response))
-	       (setq category (match-string 1 (nth 1 response))
-		     discid (match-string 2 (nth 1 response))
-		     title (match-string 3 (nth 1 response)))))
-	  (202
-	   ;; No matches found
-	   )
-	  ((210 211)
-	   ;; 210 = Found multiple exact matches, list follows
-	   ;; 211 = Found inexact matches, list follows
-	   (setq response (split-string "\r?\n" (nth 2 response)))
-	   (while response
-	     (if (string-match query-response-regexp (car response))
-		 (progn
-		   (push (match-string 1 (car response)) category)
-		   (push (match-string 2 (car response)) discid)
-		   (push (match-string 3 (car response)) title))
-	       (error "Can not understand query response: %s" (car response)))
-	     (pop response)))))
-      (if (listp category)
-	  (let ((choices nil)
-		(completion-ignore-case t))
-	    (while title
-	      (push (cons (pop title) (cons (pop category) (pop discid))) choices))
-	    (setq title (completing-read "Multiple matches, choose: " choices nil t))
-	    (if (not title)
-		(error "Must choose an item from the list."))
-	    (setq category (car (car (assoc title choices)))
-		  discid (cdr (car (assoc title choices))))))
+      ;; There must be a better way of turning chosen-record into the three
+      ;; three variables (hopefully eliminating the need for chosen-record),
+      ;; but I don't know what it is.
+      (setq chosen-record (cddb-process-query-response response))
+      (setq category (nth 0 chosen-record)
+	    discid (nth 1 chosen-record)
+	    title (nth 2 chosen-record))
+      
       (if (not category)
 	  ;; Didn't find _any_ matches, or the user didn't like what they found
 	  ;; let's move on to the next server.
 	  nil
 	(process-send-string process (format "cddb read %s %s\r\n" category discid))
-	(setq response (cddb-get-response process "Error during `cddb read': %s")
+	(setq response (cddb-get-remote-response process "Error during `cddb read': %s")
 	      entry (nth 2 response)))
       (process-send-string process "quit\r\n")
-      (cddb-get-response process "Problem disconnecting from server: %s")
+      (cddb-get-remote-response process "Problem disconnecting from server: %s")
       (if (and entry (string-match "\r\n" entry))
 	  (progn
 	    ;; Has \r\n crap, clean it up
@@ -455,6 +471,98 @@
 	    (erase-buffer)))
       entry)))
 
+(defun cddb-http-search (query host url port)
+  "Perform a search on a remote HOST via HTTP for a given cddb query QUERY"
+  (message "Searching via HTTP: %s:%d" host port)
+  (save-excursion
+    (let (url-buffer cddb-command cddb-hello response chosen-record)
+
+      ; Send query
+      (setq cddb-hello
+	    (format "hello=%s+%s+cddb.el+%s&proto=1"
+		    (user-real-login-name)
+		    (system-name)
+		    cddb-version))
+      
+      (setq cddb-command
+	    (format "cmd=cddb+query+%s+%d+%s+%d"
+		    (nth 0 info)
+		    (nth 1 info)
+		    (mapconcat 'int-to-string (nth 3 info) "+")
+		    (nth 2 info)))
+
+      (setq url-buffer
+	    (cdr (url-retrieve
+		   (format "http://%s:%d/%s?%s&%s"
+			   host port url cddb-command cddb-hello))))
+
+      (setq response (cddb-get-http-response "Problem getting query result"))
+      (kill-buffer url-buffer)
+
+      (setq chosen-record (cddb-process-query-response response))
+      
+      (if (not category)
+	  ;; Didn't find _any_ matches, or the user didn't like what they found
+	  ;; let's move on to the next server.
+	  nil
+	(setq cddb-command (format "cmd=cddb+read+%s+%s"
+				   (nth 0 chosen-record) (nth 1 chosen-record)))
+	
+	(setq url-buffer
+	      (cdr (url-retrieve
+		    (format "http://%s:%d/%s?%s&%s"
+			    host port url cddb-command cddb-hello))))
+	
+	(setq response (cddb-get-http-response "Error during `cddb read': %s")
+	      entry (nth 2 response))
+	(kill-buffer url-buffer))
+      
+      (if (and entry (string-match "\r\n" entry))
+	  (setq entry (replace-in-string entry "\r\n" "\n")))
+      entry)))
+
+(defun cddb-process-query-response (response)
+  "Process the result of a CDDB query command."
+  
+  (let ((query-response-regexp "\\(\\w+\\)\\s-+\\(........\\)\\s-\\(.*\\)")
+	category discid title)
+    (case (car response)
+      (200
+       ;; Found exact match
+       (if (string-match query-response-regexp (nth 1 response))
+	   (setq category (match-string 1 (nth 1 response))
+		 discid (match-string 2 (nth 1 response))
+		 title (match-string 3 (nth 1 response)))))
+      (202
+       ;; No matches found
+       )
+      ((210 211)
+       ;; 210 = Found multiple exact matches, list follows
+       ;; 211 = Found inexact matches, list follows
+       (setq response (split-string "\r?\n" (nth 2 response)))
+       (while response
+	 (if (string-match query-response-regexp (car response))
+	     (progn
+	       (push (match-string 1 (car response)) category)
+	       (push (match-string 2 (car response)) discid)
+	       (push (match-string 3 (car response)) title))
+	   (error "Can not understand query response: %s" (car response)))
+	 (pop response)))))
+  (if (listp category)
+      (let ((choices nil)
+	    (completion-ignore-case t))
+	(while title
+	  (push (cons (pop title) (cons (pop category) (pop discid))) choices))
+	(setq title (completing-read "Multiple matches, choose: " choices nil t))
+	(if (not title)
+	    (error "Must choose an item from the list."))
+	(setq category (car (car (assoc title choices)))
+	      discid (cdr (car (assoc title choices))))))
+
+  (list category discid title))
+
+
+
 \f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Main entry points
@@ -506,7 +614,20 @@
     (while (and hosts (not entry))
       (setq current-host (car hosts)
 	    hosts (cdr hosts))
-      (if (stringp current-host)
-	  (setq entry (cddb-local-search info current-host))
-	(setq entry (apply 'cddb-remote-search query current-host))))
+      (case (car current-host)
+	(file
+	 (setq entry (cddb-local-search info
+					(cadr current-host))))
+
+	(remote
+	 (setq entry (apply 'cddb-remote-search
+			    query (cdr current-host))))
+
+	(http
+	 (setq entry (apply 'cddb-http-search
+			    info (cdr current-host))))
+
+	(t
+	 (concat "Unknown connection type " (symbol-name
+					     (car current-host))))))
     entry))


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-05  8:05                 ` Matt Simmons
@ 1998-11-05 13:15                   ` William M. Perry
  1998-11-07 13:54                     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 37+ messages in thread
From: William M. Perry @ 1998-11-05 13:15 UTC (permalink / raw)
  Cc: ding, simmonmt

Matt Simmons <simmonmt@acm.org> writes:

> How hard would it be to make cddb.el get the CDDB records through
> HTTP?  Via a proxy?
> 
> Dammit.  There were other things I was supposed to be doing tonight.

  Hehe, and that I was supposed to be doing this (early) morning. :)  I put 
in HTTP support in a slightly different manner, and cleaned up some of the
code.  It fully encodes the query in application/x-www-form-urlencoded
format, just like you were submitting a real form.

  One thing I _cannot_ believe is that the cddb people require a specific
_ordering_ to the stuff in the query.  Completely BGOUS.  That's the whole
point of having NAMES for those damn things in the format, right?  *sigh*
Even after 5 1/2 years of working on web stuff, people still come up with
ways to disgust me. :)

  A new version will be up on
ftp://ftp.cs.indiana.edu/pub/elisp/cddb/cddb.el as soon as my #!%@ing ISP
answers the phone.

-bill p.


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-01 20:46             ` William M. Perry
@ 1998-11-07 13:41               ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 37+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-07 13:41 UTC (permalink / raw)


wmperry@aventail.com (William M. Perry) writes:

>   Both of them seem to randomly spaz out on me on certain tracks... they
> just loop over and over.  I started snarfing a CD before I went to bed last
> night (~12a) using cdparanoia.  Just a 20 track CD, but it got hung up
> reading the _2nd_ track, and was still there when I came back up to the
> office ~8a this morning.  The progress indicator was still going and
> everything.  Anyone seen something similar?

I saw this not-too-infrequently.  About 10% of my cd's spazzed out in
this way before I got my Plextor.  Mmmm.  Plextor.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-05 13:15                   ` William M. Perry
@ 1998-11-07 13:54                     ` Lars Magne Ingebrigtsen
  1998-11-09 16:05                       ` Wes Hardaker
  1998-11-11  7:10                       ` Matt Simmons
  0 siblings, 2 replies; 37+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-07 13:54 UTC (permalink / raw)


wmperry@aventail.com (William M. Perry) writes:

>   One thing I _cannot_ believe is that the cddb people require a specific
> _ordering_ to the stuff in the query.  Completely BGOUS.  That's the whole
> point of having NAMES for those damn things in the format, right?  *sigh*
> Even after 5 1/2 years of working on web stuff, people still come up with
> ways to disgust me. :)

Everything about the cddb format disgusts me.

Let me count you the ways, but first, here's a typical cddb entry:

# xmcd CD database file
#
# Track frame offsets:
#	150
#	15660
#	42115
#	70277
#	94335
#	127810
#
# Disc length: 1869 seconds
#
# Revision: 0
# Submitted via: IdiotJukebox 1.0 (Emacs 20.3.1)
#
DISCID=46074b06
DTITLE=Isotope 217 / The Unstable Molecule
TTITLE0=Kryptonite Smokes The Red Line
TTITLE1=Beneath the Undertow
TTITLE2=La Jeteé
TTITLE3=Phonometrics
TTITLE4=Prince Namor
TTITLE5=Audio Boxing
EXTD=
EXTT0=
EXTT1=
EXTT2=
EXTT3=
EXTT4=
EXTT5=
PLAYORDER=

Ok, we have something that looks like comments first, and then data.
But, no.  Everything in the "comments" section has to be there, and
has to be there in that order.  First we have the track frames, and we
see that they cleverly neglected to include the concluding track
frame, which means that there really is no way to say exactly how long
a CD is.  One can approximate by looking at the "Disc length" entry,
but that's only with second granularity.  So, they throw away info.

That DISCID thing looks really clever, doesn't it?  32 bits; that
should be four billion possibilities, right?  Nope.  The last byte is
the number of tracks, so this byte is usually in the 09-0f range.  The
two previous bytes are the track offsets added together (!), which
means that the range used here is limited as well.  That leaves the
first byte, which is actually uses a bit of %-ing to get at, which
means that it's pseudo-random.  I guesstimate that the likelihood that
two cd's generate the same ID is about one in a million, which is
quite a feat.

Next, we have the DTITLE.  We see that they cleverly put the artist
and the album title in the same string, separated by " / ", which
means that the "/" characted can't be included in an artist name or
album title.  Groovy!

Then the track titles follow, and if a title is longer than 70
characters, one gets

TTITLE0=Big Car (Remix Vocal Edit) very very very very very very very very
TTITLE0= very long title

Clever, huh?  

Then, at the end, we have the comments, and no client ever fills out
track comments, but they have to be there anyway.

I really couldn't have come up with a more stupid format if I were
stoned out on alcohol.  It's totally unflexible, loses information,
un-extendable, disallows certain inputs, and is verbose.

Ptui.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-07 13:54                     ` Lars Magne Ingebrigtsen
@ 1998-11-09 16:05                       ` Wes Hardaker
  1998-11-10  4:51                         ` Lars Magne Ingebrigtsen
  1998-11-11  7:10                       ` Matt Simmons
  1 sibling, 1 reply; 37+ messages in thread
From: Wes Hardaker @ 1998-11-09 16:05 UTC (permalink / raw)


>>>>> On 07 Nov 1998 14:54:49 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

Lars> I really couldn't have come up with a more stupid format if I
Lars> were stoned out on alcohol.  It's totally unflexible, loses
Lars> information, un-extendable, disallows certain inputs, and is
Lars> verbose.

Tell us how you really feel Lars!  Stop holding your emotions back!


-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-09 16:05                       ` Wes Hardaker
@ 1998-11-10  4:51                         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 37+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-10  4:51 UTC (permalink / raw)


Wes Hardaker <wjhardaker@ucdavis.edu> writes:

> Tell us how you really feel Lars!  Stop holding your emotions back!

It sucks!  It sucks!  It sucks!  

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-04  5:51               ` Matt Simmons
@ 1998-11-10 16:22                 ` Justin Sheehy
       [not found]                   ` <x7g1br8nh3.fsf@peorth.gweep.net>
  0 siblings, 1 reply; 37+ messages in thread
From: Justin Sheehy @ 1998-11-10 16:22 UTC (permalink / raw)


So, after all this talk about various mp3 encoders, what are most
people here using as their preferred mp3 decoder/players?

-Justin


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
       [not found]                   ` <x7g1br8nh3.fsf@peorth.gweep.net>
@ 1998-11-10 21:35                     ` David Hedbor
  1998-11-12 21:34                       ` Brian Edmonds
  0 siblings, 1 reply; 37+ messages in thread
From: David Hedbor @ 1998-11-10 21:35 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> "JS" == Justin Sheehy <justin@linus.mitre.org> writes:
> 
> JS> So, after all this talk about various mp3 encoders, what are most
> JS> people here using as their preferred mp3 decoder/players?
> 
> Woo-jae Jung's splay.  Simple and direct.

I am using amp, which is significantly faster than splay, and somewhat
faster than mpg123.

amp test.mp3	2.61s user 0.21s system 19% cpu 14.609 total
mpg123 test.mp3 2.86s user 0.06s system 19% cpu 14.970 total
splay test.mp3  3.97s user 0.05s system 27% cpu 14.657 total

-- 
[ Below is a random fortune, which is unrelated to the above message. ]
FORTUNE PROVIDES QUESTIONS FOR THE GREAT ANSWERS: #15
A:	The Royal Canadian Mounted Police.
Q:	What was the greatest achievement in taxidermy?



^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-07 13:54                     ` Lars Magne Ingebrigtsen
  1998-11-09 16:05                       ` Wes Hardaker
@ 1998-11-11  7:10                       ` Matt Simmons
  1 sibling, 0 replies; 37+ messages in thread
From: Matt Simmons @ 1998-11-11  7:10 UTC (permalink / raw)


>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

    Lars> DISCID=46074b06

    Lars> That DISCID thing looks really clever, doesn't it?  32 bits; that
    Lars> should be four billion possibilities, right?

Hah!  Shows how little you actually grasp of the deeper meanings of
the CDDB format.  You actually thought that the DISCID was a number!
What could possibly have made you think that?  Was it that it looks
like a base 16 number?  pfeh.  Maybe it was the fact that the
components of the DISCID are themselves numbers?  uhm, no.

If you gain enlightenment, you will of course realize that the DISCID
is... a string!  Why else would a request for DISCID 410fd10 fail to
match the record with DISCID 0410fd10?  Specifically, why else would
it whine about a badly formed DISKID?  Why else would I have to ask
Bill to apply the following to cddb.el to work around a galette bug?
Grrr.

---------------------------------------------------8<-----------------
RCS/cddb.el,v  -->  standard output
revision 1.2
--- -   Tue Nov 10 23:07:54 1998
+++ cddb.el     Tue Nov 10 23:07:45 1998
@@ -262,7 +262,7 @@
       
       ;; Get the disk ID
       (re-search-forward "^CDROM: disk id = \\([a-f0-9]+\\)" nil t)
-      (setq discid (match-string 1))
+      (setq discid (format "%08x" (string-to-int (match-string 1) 16)))
 
       (list discid num-tracks length track-info))))
 

----------------->8---------------------------------------------------

Matt

-- 
     Matt Simmons  -  simmonmt@acm.org  -  http://www.netcom.com/~simmonmt
     The man who smiles when things go wrong has thought of someone he can
			   blame it on.  --Jones' Law


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: all you MP3 people out there... a fix for lars!
  1998-11-10 21:35                     ` David Hedbor
@ 1998-11-12 21:34                       ` Brian Edmonds
  0 siblings, 0 replies; 37+ messages in thread
From: Brian Edmonds @ 1998-11-12 21:34 UTC (permalink / raw)


David Hedbor <david@hedbor.org> writes:
> I am using amp, which is significantly faster than splay, and somewhat
> faster than mpg123.

And I'm using mpg123 with tk3play.  I tried x11amp for a few days, but
it had a tendency to skip when switching between virtual desktops (over
10% of the time), especially if the CPU was busy (eg. compiles).

I've found tk3play rock solid, with skips per week countable on one
hand.  And I've got my system going full out with RC5, occasional
password cracking, kernel compiles, and the usual XEmacs, Netscape and
other misc crap.

Brian.


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~1998-11-12 21:34 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-28 18:16 all you MP3 people out there... a fix for lars! William M. Perry
1998-10-28 22:24 ` Wes Hardaker
1998-10-29  1:04   ` William M. Perry
1998-10-29  1:28     ` Wes Hardaker
1998-10-29  2:11       ` Harald Meland
1998-10-29  5:05         ` Wes Hardaker
1998-10-29  5:20         ` David Hedbor
1998-10-29  7:21         ` Lars Magne Ingebrigtsen
1998-10-29 18:00           ` Wes Hardaker
1998-10-31 13:32             ` Lars Magne Ingebrigtsen
1998-11-02 18:59               ` Wes Hardaker
1998-11-04  5:51               ` Matt Simmons
1998-11-10 16:22                 ` Justin Sheehy
     [not found]                   ` <x7g1br8nh3.fsf@peorth.gweep.net>
1998-11-10 21:35                     ` David Hedbor
1998-11-12 21:34                       ` Brian Edmonds
1998-10-29  2:17   ` Mark R. Boyns
1998-10-29 11:15   ` Lars Magne Ingebrigtsen
1998-10-29 17:56     ` Wes Hardaker
1998-10-29 21:09     ` Darren Stalder
1998-10-31 13:31       ` Lars Magne Ingebrigtsen
1998-11-01 16:18         ` William M. Perry
     [not found]         ` <x7btmsejes.fsf@peorth.gweep.net>
1998-11-01 17:22           ` Brian Edmonds
1998-11-01 20:46             ` William M. Perry
1998-11-07 13:41               ` Lars Magne Ingebrigtsen
1998-10-29 12:57   ` Darren/Torin/Who Ever...
1998-10-29 17:57     ` Wes Hardaker
1998-10-29 20:55       ` Darren Stalder
1998-10-30 16:10         ` William M. Perry
1998-10-30 18:10           ` William M. Perry
1998-11-04  8:08             ` Matt Simmons
1998-11-04 10:42               ` William M. Perry
1998-11-05  8:05                 ` Matt Simmons
1998-11-05 13:15                   ` William M. Perry
1998-11-07 13:54                     ` Lars Magne Ingebrigtsen
1998-11-09 16:05                       ` Wes Hardaker
1998-11-10  4:51                         ` Lars Magne Ingebrigtsen
1998-11-11  7:10                       ` Matt Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).