How to perform a CD ripping session
A CD ripper, CD grabber or CD extractor is a piece of software designed for "ripping" raw digital audio (in format commonly called CDDA) from a compact disc to a file or other output with a CD-ROM or DVD-ROM drive in a PC.
Before starting a CD ripping session, Active Sound Recorder needs to be initialized: for this purpose it's mandatory a call to the InitRecordingSystem method; the best place to call this method is usually the container form initialization function: for example, when using Visual Basic 6, it will be the Form_Load subroutine.
Now the control needs to know where and how ripped sound data will be stored; the first thing to decide is the output format of the ripped sound: for this purpose you need to set the EncodeFormats.ForCdRipping property to one of the available encoding formats.
Each encoding format set into the EncodeFormats.ForCdRipping property have its own settings which can be controlled through sub-properties of the EncodeFormats property: for example, if the chosen encoding format should be ENCODING_FORMAT_WAV you would have to modify settings of the EncodeFormats.WAV property, if chosen encoding format should be ENCODING_FORMAT_MP3 you would have to modify settings of the EncodeFormats.MP3 property and so on for the remaining accepted encoding formats.
Before starting a recording session, you could have the need to resample incoming sound data, for example for reducing the final recording size: for this purpose you should check the EncodeFormats.ResampleMode property and choose which of the available resample modes would best fit your needs.
At this point we can proceed in two different ways:
The current ripping session can be stopped at any time through the CdRippingStop method.
The container application will be notified about the start of the CD ripping session through the CdRippingStarted event and about its completion through the CdRippingStopped event. During the ripping session, the container application will be notified about the current advancement percentage through the CdRippingPercentage event and about the disk or memory occupation through the CdRippingSize event.
The current ripping automation session can be stopped at any time through the CdRippingStop method.
The container application will be notified about the start of the CD ripping automation session through the CdRippingAutomationStarted event and about its completion through the CdRippingAutomationStopped event. During the ripping automation session, the container application will be notified about the current advancement percentage with two separate events: the CdRippingPercentage event notifies about the advancement of each single CD track while the CdRippingAutomationTotalPerc event notifies about the advancement of the overall ripping automation session; the container application will be also notified about the disk or memory occupation through the CdRippingSize event.
In either cases you can limit the ripped track's range through a call to the CdRippingSetRange method and reduce the overall output size through resampling: for this purpose you can define resampling parameters through the CdRippingSetResampleParams method.
After completing the ripping of a single CD audio track, output formats like WMA, MP3, OGG Vorbis and MP4 can add song information to the output file through the use of tags: tag's information can be obtained through public Internet databases that support the CDDB protocol: if the CddbAddTagOnCdRipping property is set to TRUE and if an Internet connection is available and open, this control can automatically retrieve and add this information to the output file tags: see the How to get Audio CD info using CDDB servers and Amazon catalogue section for details. Note that CDDB information about the CD album can be retrieved from the server before starting the CD ripping session so, information like the song title and the author name, can be easily used to compose the output file name that will be sent to the CdRippingStart method.
Another feature that can be used before starting a CD ripping session is the ability of the control to retrieve, from the Amazon web site, the cover art of the CD inserted inside the CD drive: see the How to get a CD cover picture section for details.
An important feature for CD ripping session is the ability to normalize the level of audio tracks: see the How to perform a CD ripping session with tracks Normalization tutorial for details.
A couple of samples of usage of CD ripping in Visual C++ 6 and Visual Basic 6 can be found inside the following samples installed with the product's setup package: