0

I have about 500 cd's that need backing up, they contain old sessions.

I need a library that can be used by either (Java / Python) to rip these cd's

It does not need to support 'nix and must support *Windows*

Bonus points given for a framework that can also handle metadata attached to tracks.

I have been looking for ages now, I cannot find anything and this question is on-topic

We feel the best Stack Overflow questions have a bit of source code in them, but if your question generally covers … software tools commonly used by programmers … then you’re in the right place to ask your question!

Edit:

Still not found freeware libraries that support audio-cd ripping

Jakob Bowyer
  • 33,878
  • 8
  • 76
  • 91
  • The no windows thing is dumb also when you could just get vmware player (or similar) and use linux to do it. – Adam Gent Apr 01 '12 at 16:48
  • Im not going to boot an entire virtual machine on the clients computer just to rip some audio disks. – Jakob Bowyer Apr 01 '12 at 16:48
  • 2
    I actually think the question is _on-topic_ – Jakob Bowyer Apr 01 '12 at 16:50
  • Why not use some existing software? O.o – stanwise Apr 01 '12 at 16:51
  • Like what? I can't find any that offer good intergration – Jakob Bowyer Apr 01 '12 at 16:52
  • The requirements stated are concise enough for this to be answered objectively (IMHO, aka constructively). However, you might want to cover some of the things discussed in comments within your question. – Tim Post Apr 01 '12 at 17:05
  • No idea who downvoted this. Clearly the answer is **not** easy to find (at least I couldn't find any java SDK with a quick google serach either) and the requirements are more precise than those for most questions here. – Voo Apr 01 '12 at 17:31
  • Thank you! I spent most of the morning trying to find an API or SDK for either language so that I could turn this into a full application for my client – Jakob Bowyer Apr 01 '12 at 17:37

4 Answers4

2

Java has a sound api http://www.oracle.com/technetwork/java/index-139508.html

This site has some good resources, examples and source code: http://www.jsresources.org/examples/ And this:

that read audio CDs directly to extract the sound data. The examples utilize the package javax.sound.sampled.

http://www.jsresources.org/examples/audio_cdda.html

Gurnard
  • 1,773
  • 22
  • 43
2

I can't find anything on Windows that has a direct API either, but you might get what you want by search for "command line". I found things like:

Which you could then integrate into either a java or python process which managed the larger conversion process. You could then use a tool like Mutagen to add the appropriate audio metadata for your recordings.

Also, keep in mind that if you can find some way to mount the audio CD as a data disc (I don't know what current Windows behavior is, but MacOS X can do this, for example), you can just copy the CDA files from the disk and use a larger variety of tools and libraries to do the file type conversion.

Nick Bastin
  • 30,415
  • 7
  • 59
  • 78
  • @JakobBowyer: You didn't ask for something that was *free*, and I'm sure that they both cost less than the value of your time if you had to write them yourself. That being said, there were more options to be investigated if your search includes the term "command line", so you may be able to find something free. – Nick Bastin Apr 01 '12 at 20:53
0

I'm pretty sure the the Windows Media Player COM API includes ripping functions. Semi-guaranteed to be on your Windows computer. Here's the C++ IWMPCdromRip interface (MSDN)

Shot in the dark Python solution would be pywin32 for COM added to the WMP COM API - should get you what you want, though I'm also curious why you wouldn't want to just rip using WMP (or something else) and then post-process the resulting files as suggested by Adam Gent. With 1 or 500+ CDs, I'd expect the big time sink to be physically loading the media and waiting for it to rip, not operating the buttons for ripping.

I haven't done too much with COM under either Java or Python (I don't use Windows for dev much any more), but years ago it was easy enough from C/C++ using the Windows gcc port (so no help from MSVS/CLR), Pascal, etc., so I can't imagine it wouldn't be available in Java (and of course it's there for Python using pywin32).

rsandwick3
  • 566
  • 4
  • 7
0

If I could I would have done a "let-me-google-that-for-you-link"...

http://www.foobar2000.org/

Foobar2000 seems to do what you want and has an SDK. You could use Python CTypes although truthfully I don't think you will need to do any programming for what you want to do.

Addendum:

Python Option:

You might want to also check out: http://code.google.com/p/quodlibet/ . Its written in Python and is cross platform with some rather powerful tagging capabilities (thanks to Mutagen which is free). However (from a cursory glance) it does not look like it supports ripping but you could use another tool for that.

Java Option:

I haven't tried atunes but it looks promising: http://www.atunes.org/?page_id=6 . According to their site there is a windows installer but "For ripping, lame, flac or oggenc must be installed."

Adam Gent
  • 47,843
  • 23
  • 153
  • 203
  • And this gives me direct integration in python or java how? – Jakob Bowyer Apr 01 '12 at 17:00
  • Well my question is what do you need to do with the ripped music that is programmatic. I mean foobar will rip your CDs for you with metadata. After the data is ripped then just post-process with a script. And no it does not provide direct integration with Python. If you want that: http://www.foobar2000.org/SDK + http://docs.python.org/library/ctypes.html – Adam Gent Apr 01 '12 at 17:53