itunes

A Linux shell script to rename files with a counter and copy them

As a quick note, I used this shell script to copy many files with the same name into a directory named tmpdir, giving them all new names during the copy process:

count=1
for i in `cat myfiles`
do
    fname=`basename $i`
    cp $i tmpdir/${count}-${fname}
    count=`expr $count + 1`
done

Unix: How to find files with multiple filename extensions

As I mentioned in my How to find multiple filenames with Linux find tutorial, you can use find command syntax like this to find files with multiple filename extensions:

find iTunes \( -name "*.mp3" -o -name "*.m4a" \)

As that command shows, I ran this find command to find all of my music files under my iTunes directory, including .mp3 and .m4a filename extensions.

While I’m in the neighborhood, this is the full find command I use to backup all of my iTunes files that have changed or been added in the last 180 days:

find iTunes \( -name "*.mp3" -o -name "*.m4a" \) -type f -mtime -180 -print0 | xargs -0 tar rvf NewMusic.tar

There’s probably an easier way to do this, but that backup command works for me.

How to redesign the Twitter user interface (UI)

Twitter UI redesign: After using Twitter for the last several months, it seems like their user interface is out of sync with how I want to use their data. As I was waiting for dinner to cook last night I spent a few minutes thinking about the Twitter user interface (UI) and how I might redesign it. Here are my thoughts.

The current Twitter web interface

The things the Twitter web interface does well currently are:

Simple iTunes AppleScript script examples

If you’ve never used AppleScript, here are two iTunes AppleScript examples to get you going. First, This one tells iTunes to play the playlist named “My Favorites”:

tell application "iTunes"
    play playlist "My Favorites"
end tell

That script starts playing a random song from that playlist. If you want to start by playing the first song of that playlist, this script will do the trick:

How I significantly improved my iTunes song quality

It was driving me crazy that the quality of the songs I was streaming from a website known as Bandcamp sounded better than the quality of the songs I was playing from my iTunes collection. In my case, I recently bought a Marian Call CD named “Something Fierce”, and had imported the songs from that CD into iTunes. But the songs I streamed from Bandcamp sounded better than the songs I imported from the CD; how could this be?

List iTunes album names - Display a list with An AppleScript app

iTunes album list AppleScript FAQ: How can I create a list of iTunes album names (a unique list of all iTunes album names)? (Also written as: Can you help me create an AppleScript to list all iTunes album names?)

As mentioned in my previous article, for a variety of reasons I'd really like to be able to generate a unique list of iTunes album names. For some reason iTunes doesn't let you do this well, so in my previous article I showed how to create an iTunes album list using iTunes.

How to create an iTunes album list

iTunes album list FAQ: How can I create a list of iTunes album names (a unique list of all iTunes album names)?

When I listen to iTunes, I often like to listen to a complete album at one time, rather than a mix of songs from different albums. I especially like to do this when I'm working, because the music and volume level is consistent. It's always surprised me that Apple doesn't provide a simple iTunes album list view, where you can see all your albums, then click a button to listen to one album or another.

Apple's free iTunes iPhone remote app alvin November 1, 2010 - 8:56pm

As part of my work on my Mac speech recognition software, I've been digging into the use of an iPhone as a Mac remote control. While that hasn't been much of a success yet, I did stumble across the Apple iTunes iPhone/iPad remote app.

This iTunes/iPhone remote app is a free app from Apple that lets you control some iTunes functions. Apple's iTunes remote control app doesn't blow me away, however; for me, it has many flaws, including:

iTunes AppleScript examples (command examples)

iTunes AppleScript FAQ: Can you share some iTunes AppleScript examples (example scripts)?

As I've been working a lot with Mac speech recognition software lately, AppleScript has once again become important in my life. I've been writing a lot of small AppleScript scripts, including AppleScript iTunes scripts, and I thought I'd share snippets of code from those iTunes scripts here for anyone else they might benefit.