SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

SimpleCDR 1.64 by John Tobin.
Homepage: http://ogre.rocky-road.net/cdr.shtml E-mail: ogre@sirinet.net

WARNING:These docs are full of incomplete thoughts and broken logic! :)

Not to mention probably out of date a bit. Be sure to enter Setup before attempting to any burning.

Contents
1. Introduction 2. Compiling and Execution 3. Known Issues 4. CD Ripping functions/MP3 encoding functions 5. CD Burning/Audio CD mastering/CD copying 6. Data CD Mastering 7. To Do 8. Version history 9. Bug reporting 10. Closing
  1. Introduction

The general purpose of SimpleCDR is to act as a simple frontend for cdparanoia, cdda2wav, LAME, Blade Encode, Vorbis OGG, MAD (MPEG Audio Decoder), cdrecord, and CDRDAO. I didn't think that any of the mainstream frontend software was sufficient for my needs. XCDRoast didnt't have a one-button audio CD copy function, and it didn't allow disc at once recording. Also none of the software that I have found will decode a MP3 file and write it to CD, I implemented that in my Audio CD Mastering Function. Ultimately, no one has made an all-in-one solution for CD-ripping, MP3 encoding, and CD burning. That is what I have tried to accomplish with SimpleCDR and I think that I have done a pretty good job of making a simple, no frills program that can almost do it all.

SimpleCDR is a console based program and only requires that your computer has and can run the software that it is a frontend for. SimpleCDR should compile one most any computer as long as ncurses 5.1 or higher and a recent version of gcc is installed. I have no idea how cross platform this program is. I don't have any incarnation of BSD installed or any other NIX type OS. The commands are similar across all NIX platforms and ncurses is the standard curses interface now so I hope that this program will run on most any *NIX type operating system. If you have success running this program on an OS other than Linux please drop me an e-mail.

CDParanoia and cdda2wav are used for cd-ripping. CDparanoia does the best job of all ripping software to make sure that no skips are recorded into the outputed wav file.

Blade Encode and LAME are fast,high-quality MPEG Level 3 encoders.

OGG Encode is the encoder for the new Vorbis sound format, the quality equals or betters that of MP3 at roughly the same file size and it is completely open source.

MAD is the only command-line MPEG decoder that I have found that will output wav files. I also use it for MP3 playback. Its sound quality IMHO is better than that of mpg123.

CDRecord is the basic software that is needed to write CDs.

CDRDAO is a piece of software that allows Disc-At-Once copying for a precise copy of the original disc.

2. Compiling and Execution

Compilation is a snap:

type 'make' and that is it.

'make install' is not necessary but if you want this will install SimpleCDR into your '/usr/local/bin directory'

type 'make clean' to remove the object files and do a complete rebuild

type './cdr' to execute SimpleCDR

Enter the setup menu and fill in the values that you need. It is no longer necessary to fill in all values with version 1.60.

Note: This program may not compile on computers with an ncurses version lower than 5.1. I attempted to compile this program on a computer using 5.0 and 5.1 on another. It would only compile on the 5.1 system. Once I upgraded the 5.0 system to 5.1 the program compiled. Ncurses appears to have some kind of problem with me including <string> and <fstream> in the function. If it won't compile, use the binary.

This program should probably be run as root unless you have given all the permissions to a user for the cdr and cdrom devices and the temporary directories.

3. Known Issues

As with any program, this one has a few small bugs in it and quirks in functioning.

As noted above, the program may not compile on systems without Ncurses 5.1 or higher, if your have success or a fix please let me know.

KDE's Konsole in ver 1.1.2 won't display the Ncurses menus. Xterm and GNome terminal work though, this is an issue with your terminfo, try downloading the terminfo package from the site to see if this corrects the problem.

You may need to make you terminal wider if you plan on running this program in an X terminal as I usually do to make sure all the lines fit on the screen.

The file listing in Audio CD Mastering can only handle approx. 400 files, the file listing in Data CD Mastering an handle approx. 2000 in a single listing. If you attempt to include more files than this, the program will have a Segmentation fault..

4.1 CD Ripping

SimpleCDR will use the program CDParanoia to extract your audio tracks no matter how you rip them. CDParanoia is somewhat slow, but if your CDs look anything like some of mine you will be glad to have CDParanoia. It will remove many of the skips that you may have on the original CD.

The CD-Ripping functions will allow you to rip an entire CD to the HD or whatever tracks you select. Depending on your CD Digital Audio Extraction speed, how many tracks you are ripping, and the condition of your CD, the process should last anywhere from 1

In this option you also have the option to put the ripped tracks wherever you want on the HD. Currently this function doesn't use the Temporary directory as the CD-Burining/Mastering Functions do.

This menu also gives you the option to play your wav files. This is executed by the "play" command. Some systems us "splay." If you are on such a system, simply make a symbolic link from it to "play" unless you feel like going into the source code and changing the command.

4.2 MP3/OGG Encoding

This function uses the Blade Encode/LAME/OGGenc programs to convert the wav files to MP3 format.

You have several options in this function. You can rip an entire CD to MP3, ripping and encoding used in conjunction, selected tracks, or just a single wav file.

You also have the option to play an MP3 file in this menu. This function uses the "madplay" command which is part to the MAD(MPEG Audio Decoder) package. The source is available on my website. MAD has dual functionality and that is why I chose to use it over mpg123. It allows output to wav files on disk and it can also playback at a quality IMHO superior to that of mpg123. The decoding to disk function is also EXTREMELY FAST, on my computer anyway (Athlon T-Bird 900). It
does all conversion using integer operations, no floating-point operations. This probably eliminates some error that may take place with floating point numbers with rounding and truncation.

The encoders LAME and Blade Encode are extremely fast MP3 encoders that encodes at very high quality, especially in the most recent version (.92). On my comptuer Blade Encode usually encodes a wav file at 160 kbps at 2.60 times the normal play length. LAME will encode at roughly 4.5 to 5 times the normal play length. OGG Encode encodes at about 2.5 times faster than normal length.

5.1 CD Copying

This menu isn't very complicated. All operations are non-interactive.

Option 1 will use CDparanoia to rip all the audio tracks from a CD in your reader device and burn them to a CD using cdrecord.

Option 2 will use CDRDAO to make an exact duplicate of you cd. Reading from the source CD and placing the image in your temp dir. Then using that image to burn to your recorder device.

Option 3 is a bit strange and I put it in to be able to copy a CD if my drive didn't work woith CDRDAO. It takes the middle SCSI bus number that you entered in setup and mount the "/dev/scd(scsi number)" into a directory it creates in your temp directory. Mkisofs then proceeds to make an image that will use the RockRidge and Joliet extensions. Then it will burn the image to your recorder.

5.2 Master Audio CD

This function is probably the most useful function to some for creating audio CDs anyway. You can do pretty much anything with this function when it concerns creating an audio CD image.

The CD time calcuator is now precise since I added a class that actually reads the WAV header and gets the time. This works much better than the hack that I had in place.
Most options are self explanatory.

Option R rips a track(s) off a CD to the temp directory.

Option C moves a track to a different track (i.e. move track 5 to track 25).

Option S sets the prefered directory to take mp3 and wav files from. When you use option 1 or 2 you will be asked if you want to use the prefered directory. If you choose "yes," you will only have to type the filename that is kept in the prefered directory. If you select "no," you will have to enter the full path and filename.

When you write the CD with cdrecord, automatically pads the tracks in case they aren't perfectly compatible with CD Audio. This happens with MP3 files converted to wav. It doesn't add any noise, just binary 0s which are absolute silence.

6. Data CD Mastering

The way that this option works is very similar to the concept the Audio CD mastering function was built on. The main difference is that when you are setting up your image you don't copy the files into the temporary directory itself, the program makes symlinks to the file's position on the disk to save space and time. This means that if you want to use the symlink way of doing things you must have you temp directory on an ext2 filesystem otherwise SimpleCDR will use the copy funtion. You set the fs to use in setup. Mkisofs then creates the image, you have a choice between ISO9660/RockRidge and ISO9660
The open subdirectory option does not work with symlinks.

The rest of the options should be self explanatory.

Multisession works!

In order to do multisession follow these steps: For the first session type 'm' and select '1'. Then add your files and write.

For the next session select 'm' and then select '2'. Then add you files and write.

After writing is complete you may need to eject your CDR and reload it to read the freshly written files.

7. To Do

I have been working on the goals that I set for the program. It has become more object-oriented and currently I am replacing the old line based menues with new ncurses based menus. I hope that this change does not affect the use of my program on some systems, most all of you should have ncurses installed be default unless you went out of your way to make sure it wasn't installed. Ncurses has been a rocky learning process but I am getting the hang of it now from looking at some code and my book in conjunction.

The suggestions that you as a user make! I'm one person and I don't speak for the world. If there is an annoying thing that you feel should be changed, let me know. Something that works well for me probably doesn't for someone else.

8. Version History
1.64- Added option to master a cd from a XMMS playlist. Fixed bug that wouldn't let you encode anything at all. Fixed Data CD mastering bug that wouldn't delete the image.

June 18, 2001
1.63- Added Faitunes.com message, Time estimation in Audio CD Mastering now includes the 2

      second gaps between tracks in estimation. Option to add custom cdrecord options added.
      Added SCSI ID and Drive identification labels to cdrecord -scanbus output. Code updated
      to compile with gcc 3.0.

June 1, 2001
1.62- Fixed the loop that the cd ripping programs would go into if you didn't enter a track

          to rip. Added the option to stop playing a wav file after it has started. When you
          play a track from Audio CD Mastering the current track number will not be reset.

May 13, 2001
1.61- You can now start the program if the config file isn't present, oops. There are

      default settings now also if you aren't sure what to put for all the options. Prompts
      in CD ripping and mp3 encoding won't continue without input. Config file's location
      moved to $HOME/.simplecdr.

1.60- CDparanoia and cdda2wav now can rip directly to MP3 or OGG by piping through

      the stdin and stdout, thus there are no intermediate wav files generated. 
      Setup has been modified so that you no longer have to fill in all of the options
      if you just want to use one specific feature of the program. Pretty color coded 
      menus too!

1.50- Bugs from the 1.49 release fixed. This included a bunch of bugs in Data

      CD Mastering, I think I have caught them all. The meny layout has changed a 
      little now too, more options are on the main menu now.

1.49- Source code has been made much more modular, separate classes for each function

of the program are now implemented. Some small bugs fixed.

1.20- OGG decoding supported, commands tweaked, Joliet/Rockridge/iso9660 disc

          format selection, CDRW blanking, Multisession actually works!, 
          CD Audio time estimation is now precise, elimination of some unnecessary code.

1.11- Updated to support newer ogg encoders.

1.10- Memory leaks from the Ncurses menus are gone. CD Ripping reworked,I

          finally changed the fscked up individual track ripping. About 150 lines 
          of unnecessary code was able axed because of the rewrite.

1.02- Added selection of CDRDAO Source disc driver. You now get an error

message when trying to calculate an image size over 1 GB.

1.01- Letters replace numbers in most menus.

Dec 17, 2000
1.00- Menus are being transitioned to a ncurses based menu system for greater

      flexibility. Currently Data and Audio CD mastering use the new menuing
      system.

.419- Cleaned up code for cd ripping and various interface changes.

.417- Multisession may be fixed, I can't get it work on my recorder, but I did

      it by the book. If this works for someone let me know!
     -Size estimation for CD Audio fixed.
     -The same devices are no longer listed for the recorder and reader.

.416- The /dev device for you writer and reader must be specified in the

      configuration, it is input in the "Set SCSI ID options." This was put in
      because before I parsed the SCSI ID to determine the /dev device and
      that doesn't work on systems with multiple SCSI buses. Also a bug was
      fixed that impaired the cd ripping function. This was the result of
      restructuring the code and moving parts to libraries. Two lines needed to
      be moved down two more lines. A thanks to Richter Falk for pointing these
      out.

.415- Code restructured, migration of certain functions to classes

.413- Not released, 'lndir' replaces 'ln -s' command used for importing files

      into Data CD Mastering
     -Added ability for disc swapping for making multiple copies of the same
      Audio CD

.412- Made all CDRDAOdrivers available for selection in setup.

     -Added a prompt to change CDsif you use the same drive for Ripping and
      Burning.

.411- OGG Encode bug fixed in which it would write the *.ogg to your current

      directory versus the directory the source file is in.
     -Prompt added before CD Writing in Audio CD Mastering(overlooked that one)

.410- Almost all bugs stemming from the .400 release and the subsequent

      additional options fixed (I hope).
     -LAME now works, Vorbis OGG Encode now
      supported.
     -Menus now quit to previous, not longer to main.

.406- LAME removed as encoder(temporarily) until the issues with it are fixed.

-Fixed cd to MP3 encoding.

.405- You can now descend into a directory that is linked in Data CD Mastering

     -Fixed prefered directory bug (couldn't import from other locations if
      pref directory is set)       LAME available as encoder and decoder
     -Remove all option added to Audio CD Mastering

.401- Fixed bug where the rip and add function wouldn't put the wav files in

      the Audio CD Temp directory
     -Fixed bug in which you couldn't use the encode entire cd option
      w/cdda2wav

.400- Data CD Mastering

     -cdda2wav can now be used to copy audio CDs, oops!
     -Size calculation now works right

.326- Added driver selection for CDRDAO driver in setup

-Fixed Setup menu bugs

.325- Changed setup to a menu based system

-support for cdda2wav as a ripper implemented, select default in setup

October 20, 2000
.315- First mainstream release

     -Fixed the menu bugs
     -Prefered directory added to cd mastering

.311- Move and remove track function added to Audio CD Mastering

.301- Minor bugs fixed

.300- Audio CD Mastering initially implented

.291- CD copying implemented

Setup implemented

Many revisions inbetween

Late Sept 2000
.200- First version number assigned.

Started with cd-ripping, mp3 encoding, and rip cd to mp3

9. Bug Reporting

If you find any bug or something that you think is a bug DO NOT HESITATE to send an e-mail at one of the two addresses listed in the file. I have attempted to make this program relatively bug free but things are never completely bug free, except when the program is 5 lines long. This program has grown to 2000 lines with the .499 release. Now it is at 3928, 2924 of them have been written my self and I am far from claiming myself as being a great programmer.

10. Closing

That's it the docs are over.

Now I will thank a few people.

Chris Winquist - Got me into Linux, programming, and added valuable insight

for better programming style and structure.

Timothy J. Weber - Though didn't participate directly in the making of SimpleCDR,

                   he authored the wave.cpp/rifffile.cpp classes that I use to 
                   calculate the times of wave files and I think he deserved a mention.

All the users, especially the ones that gave me bug reports and suggestions.

Everyone that helped make the great software tools that this program uses.

homepage: http://ogre.rocky-road.net/cdr.shtml e-mail: ogre@sirinet.net


Sponsored Links

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.