{"id":942,"date":"2009-09-11T09:03:01","date_gmt":"2009-09-11T13:03:01","guid":{"rendered":"http:\/\/www.red-sweater.com\/blog\/?p=942"},"modified":"2009-10-16T11:47:09","modified_gmt":"2009-10-16T15:47:09","slug":"convert-to-mp3","status":"publish","type":"post","link":"https:\/\/redsweater.com\/blog\/942\/convert-to-mp3","title":{"rendered":"Convert To MP3"},"content":{"rendered":"<p><\/p>\n<p>I store most of my iTunes tracks in Apple&#8217;s AAC encoding format, but from time to time I find it useful to convert some tracks in my library to MP3 format. While AAC is convenient and works on my iPod, iPhone, etc., I have to concede that MP3 format is a little more universal.<\/p>\n<p>In the iTunes &#8220;Advanced&#8221; menu you&#8217;ll find a convenient conversion item, which lets you convert the encoding of a selected song file to whatever your default import encoding is.&nbsp;The problem is, since I&#8217;m always importing as AAC, the only option it gives me is to convert to AAC:<\/p>\n<p><\/p>\n<p style=\"margin-bottom:2em;\">\n<img decoding=\"async\" src=\"http:\/\/www.red-sweater.com\/blog\/images\/CreateAAC-20090910-130838.jpg\"\/>\n<\/p>\n<p>\nTo use iTunes to convert a song to MP3 format, I would have to open up Preferences, click the Import Settings button, and change my default encoding choice to the MP3 encoder. Then I would have to close preferences, do the conversion, and then preferences and switch my encoding choice back to AAC.\n<\/p>\n<p>\nYUCK!\n<\/p>\n<p>\nAppleScript to the rescue. Because iTunes exposes an attribute &#8220;current encoder&#8221;, and because AppleScript exposes a command &#8220;convert&#8221;, I can do all the mucking about behind the scenes in a quick-running script that performs theses steps:\n<\/p>\n<ol>\n<li>Save the current encoding setting.<\/li>\n<li>Switch to the MP3 encoder.<\/li>\n<li>Convert the selected songs.<\/li>\n<li>Set the encoder back to whatever it was<\/li>\n<\/ol>\n<p>\nDownload the <a href=\"http:\/\/www.red-sweater.com\/AppleScript\/ConvertToMP3.zip\">Convert to MP3<\/a> script. Install it in [Home] -> Library -> Scripts -> Applications -> iTunes. It will show up in <a href=\"http:\/\/www.red-sweater.com\/fastscripts\/\">FastScript&#8217;s<\/a> iTunes-specific section, where you can assign a keyboard shortcut if you like.\n<\/p>\n<p>\nNow when I want to convert songs to MP3 format, I just select them in iTunes, and press the keyboard shortcut I assigned to the script in FastScripts:\n<\/p>\n<p style=\"margin-bottom:2em;\">\n<img decoding=\"async\" src=\"http:\/\/www.red-sweater.com\/blog\/images\/ConvertToMP3-20090910-131558.jpg\"\/>\n<\/p>\n<p>The conversion happens immediately and my encoding preference is not disturbed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I store most of my iTunes tracks in Apple&#8217;s AAC encoding format, but from time to time I find it useful to convert some tracks in my library to MP3 format. While AAC is convenient and works on my iPod, iPhone, etc., I have to concede that MP3 format is a little more universal. In [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,6],"tags":[],"class_list":["post-942","post","type-post","status-publish","format-standard","hentry","category-applescript","category-fastscripts"],"_links":{"self":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/comments?post=942"}],"version-history":[{"count":7,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/942\/revisions"}],"predecessor-version":[{"id":960,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/942\/revisions\/960"}],"wp:attachment":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/media?parent=942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/categories?post=942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/tags?post=942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}