{"id":280,"date":"1997-09-09T01:36:29","date_gmt":"1997-09-09T09:36:29","guid":{"rendered":"http:\/\/www.birdhouse.org\/betips\/?p=280"},"modified":"1997-09-09T01:36:29","modified_gmt":"1997-09-09T09:36:29","slug":"rip-audio-tracks-from-cds","status":"publish","type":"post","link":"https:\/\/www.betips.net\/?p=280","title":{"rendered":"Rip\n audio tracks from CDs"},"content":{"rendered":"<p>The following little script will help you if you not only want to grab a few audio tracks but whole CDs in one go:<br \/>\n&#8212;&#8212;&#8211;Begin Script&#8212;&#8212;&#8212;&#8212;-<\/p>\n<pre>\ncddrive=\/dev\/disk\/ide\/atapi\/0\/slave\/0\/raw\ntrack=\nalltracks=`play $cddrive 0 0 | wc -l` \t\t#get number of Tracks on CD + one\necho\necho \"Number of Tracks on CD is: \" `expr $alltracks - 1`\necho\nif  [ \"$1\" = \"all\" ]\t\t#see if you want to grab whole CD\n\tthen\n\ttrack=1\t\t#beginn with Track 1\n\techo \"Starting to grab the whole CD...\"\n\t\twhile [ $track -lt $alltracks ] \t#continue until all Tracks have been saved\n\tdo\n\t\tplay $cddrive 7 $track \"Track$track\"\t#Saving Track No n as \"Trackn\"\n\t\ttrack=`expr $track + 1`\n\tdone\n\techo\n\techo \"All Tracks have been saved to disk.\"\nelse\n\techo \"Grabbing following tracks: $*\"\n\tfor each\n\tdo\n\t\tplay $cddrive 7 $each \"Track$each\"\t#Saving Track No n as \"Trackn\"\n\tdone\nfi\n<\/pre>\n<p>&#8212;&#8212;&#8211;End Script&#8212;&#8212;&#8212;&#8212;-<br \/>\nHowever, there is no error handling, so type carefully or implement one yourself. Note also that you may find it easier to simply use Marco Nellisen&#8217;s excellent <a href=\"http:\/\/www.xs4all.nl\/~marcone\/be.html\">CDDA filesystem driver<\/a>, which makes CD ripping completely unnecessary under BeOS, since it lets you view the tracks on your CDs as if they were already .WAV files!<br \/>\nYou&#8217;ll find more information about the shell CD player <code>play<\/code> <a href=\"\/chunga.php?ID=141\">in this tip<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following little script will help you if you not only want to grab a few audio tracks but whole CDs in one go: &#8212;&#8212;&#8211;Begin Script&#8212;&#8212;&#8212;&#8212;- cddrive=\/dev\/disk\/ide\/atapi\/0\/slave\/0\/raw track= alltracks=`play $cddrive 0 0 | wc -l` #get number of Tracks on CD + one echo echo &#8222;Number of Tracks on CD is: &#8220; `expr $alltracks &#8211; [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[10],"class_list":["post-280","post","type-post","status-publish","format-standard","hentry","tag-scripting"],"_links":{"self":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=280"}],"version-history":[{"count":0,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/280\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}