{"id":355,"date":"2002-07-28T15:27:00","date_gmt":"2002-07-28T22:27:00","guid":{"rendered":"http:\/\/www.dreness.com\/blog\/?p=355"},"modified":"2002-07-28T15:27:00","modified_gmt":"2002-07-28T22:27:00","slug":"applescript-mania","status":"publish","type":"post","link":"https:\/\/dreness.com\/blog\/archives\/355","title":{"rendered":"applescript mania"},"content":{"rendered":"<p>I wrote this little script today to help demonstrate the differences between media encoded at various bitrates using the AAC (mpeg4) codec, compared to straight uncompressed aiff and a 128Kbit mp3 for reference. Feel free to use this for your purposes. In order to function, the directories track1, track2, track3, and track4 would each contain the various versions of the track encoded in different bitrates. The script then opens up all the files for a specific track and plays them all at the same time). The user can then switch between windows and the audio source will follow along (just like the demo they did @ macworld). Oh yeah, this was designed to run on a machine withi a Cinema HD, so if you have too many different bitrates for each track, some of the windows will be placed off the bottom of your screen.<\/p>\n<p><!--more teh skript--><\/p>\n<pre>\r\ntell application \"QuickTime Player\"\r\n\tdisplay dialog \"This applescript will open multiple versions of the same tracks encoded at various bitrates using the new AAC codec.\r\nTo compare the tracks, click on the various windows while they are playing, and the audio source will change accordingly.\"\r\n\tdisplay dialog \"Which track would you like to compare? (enter a number 1 through 4)\" default answer \"1\"\r\n\tset answer to the text returned of the result\r\n\tif answer is \"1\" then\r\n\t\tset the source_folder to (\"Macintosh HD:Users:Shared:aac_test:track1\") as alias\r\n\t\tset the item_list to list folder source_folder without invisibles\r\n\t\tset source_folder to source_folder as string\r\n\t\tset i to \"1\"\r\n\t\trepeat until i > (count of item_list)\r\n\t\t\tset open_me to item i of item_list\r\n\t\t\tset this_item to (source_folder & open_me) as alias\r\n\t\t\topen this_item\r\n\t\t\tset position of the front window to {3, ((100 * i))}\r\n\t\t\tset i to i + 1\r\n\t\tend repeat\r\n\t\tset i to \"1\"\r\n\t\trepeat until i > (count of item_list)\r\n\t\t\tplay movie [i]\r\n\t\t\tset i to i + 1\r\n\t\tend repeat\r\n\tend if\r\n\tif answer is \"2\" then\r\n\t\tset the source_folder to (\"Macintosh HD:Users:Shared:aac_test:track2\") as alias\r\n\t\tset the item_list to list folder source_folder without invisibles\r\n\t\tset source_folder to source_folder as string\r\n\t\tset i to \"1\"\r\n\t\trepeat until i > (count of item_list)\r\n\t\t\tset open_me to item i of item_list\r\n\t\t\tset this_item to (source_folder & open_me) as alias\r\n\t\t\topen this_item\r\n\t\t\tset position of the front window to {3, ((100 * i))}\r\n\t\t\tset i to i + 1\r\n\t\tend repeat\r\n\t\tset i to \"1\"\r\n\t\trepeat until i > (count of item_list)\r\n\t\t\tplay movie [i]\r\n\t\t\tset i to i + 1\r\n\t\tend repeat\r\n\tend if\r\n\tif answer is \"3\" then\r\n\t\tset the source_folder to (\"Macintosh HD:Users:Shared:aac_test:track3\") as alias\r\n\t\tset the item_list to list folder source_folder without invisibles\r\n\t\tset source_folder to source_folder as string\r\n\t\tset i to \"1\"\r\n\t\trepeat until i > (count of item_list)\r\n\t\t\tset open_me to item i of item_list\r\n\t\t\tset this_item to (source_folder & open_me) as alias\r\n\t\t\topen this_item\r\n\t\t\tset position of the front window to {3, ((100 * i))}\r\n\t\t\tset i to i + 1\r\n\t\tend repeat\r\n\t\tset i to \"1\"\r\n\t\trepeat until i > (count of item_list)\r\n\t\t\tplay movie [i]\r\n\t\t\tset i to i + 1\r\n\t\tend repeat\r\n\tend if\r\n\tif answer is \"4\" then\r\n\t\tset the source_folder to (\"Macintosh HD:Users:Shared:aac_test:track4\") as alias\r\n\t\tset the item_list to list folder source_folder without invisibles\r\n\t\tset source_folder to source_folder as string\r\n\t\tset i to \"1\"\r\n\t\trepeat until i > (count of item_list)\r\n\t\t\tset open_me to item i of item_list\r\n\t\t\tset this_item to (source_folder & open_me) as alias\r\n\t\t\topen this_item\r\n\t\t\tset position of the front window to {3, ((100 * i))}\r\n\t\t\tset i to i + 1\r\n\t\tend repeat\r\n\t\tset i to \"1\"\r\n\t\trepeat until i > (count of item_list)\r\n\t\t\tplay movie [i]\r\n\t\t\tset i to i + 1\r\n\t\tend repeat\r\n\tend if\r\nend tell\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I wrote this little script today to help demonstrate the differences between media encoded at various bitrates using the AAC (mpeg4) codec, compared to straight uncompressed aiff and a 128Kbit mp3 for reference. Feel free to use this for your &hellip; <a href=\"https:\/\/dreness.com\/blog\/archives\/355\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-355","post","type-post","status-publish","format-standard","hentry","category-lj"],"_links":{"self":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/comments?post=355"}],"version-history":[{"count":0,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"wp:attachment":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}