macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

Building Interactive iPod Experiences
Pages: 1, 2

Adding Basic Markups

Markups allow you to extend the power and flexibility of your Notes presentations. They add interactive components that provide your users with the ability to navigate your content using their discretion, and presentation components that help you control how the notes act and appear.



For example, the following note produces the screen shown in Figure 7: From this screen, you can visit the <A HREF="helloworld.txt">hello world</A> text file, see the picture of the <A HREF="MyPictures/foxnkit.jpg">fox and her kit</A>, or listen to a recent <A HREF="song=Ven Aqui">song of the week</A>. Notice the three underlined links. The user can select the desired link using the scroll wheel and then activate it by pressing the center button on the iPod. The blue color indicates the currently selected link.

Figure 7
Figure 7. Users can scroll through links using the scroll wheel. Selected links are displayed in blue.

To be very frank, there are only two basic markups you'll use for authoring your multimedia: the title tag and the anchor tag. (When I said "limited," I really meant it.) Here are descriptions and examples for both.

Titles

Titles allow you to change the title line in the Notes display. Simply add <TITLE>Your Title Here</TITLE> to the start of any note, as shown in Figure 8. Contrast this with the default presentation shown in Figure 3:

<TITLE>Hello World</TITLE>

Hello World

Figure 8
Figure 8. The TITLE tag adds custom text to the title bar.

Links

Links allow you to connect one note with another, to view images, and to launch audio and video from Notes. The anchor tag looks and acts like the one you find in HTML. For example, <A HREF="step2.txt">Step Two</A> adds a link to a note called step2.txt. <A HREF="fox.jpg">Fox</A> links to the fox.jpg JPEG image. <A HREF="song="My Way">My Way</A> links to the My Way audio file, and so on.

Tip: Always use uppercase tags for your notes.

Notes, Photos, and Folders

To link to notes, photos, and folders, you must understand how to use the Notes folder hierarchy. In a nutshell, it goes like this:

  • / is the top of the hierarchy. It corresponds to the Notes folder on your iPod. Any link beginning with a slash starts in the Notes folder and goes from there. Any link that starts without a slash is relative, starting in the same folder as the note.
    For example, if a note in /Notes/myfolder refers to "/helloworld.txt," it means /Notes/helloworld.txt. If it refers to "helloworld.txt," it means /Notes/myfolder/helloworld.txt. If it refers to "mysub/helloworld.txt," it means /Notes/myfolder/mysub/helloworld.txt. And if it refers to "/mysub/helloworld.txt," it means /Notes/mysub/helloworld.txt.
  • You cannot use Unix-style conventions like "." or ".." as part of your path name.
  • The characters / and \ are interchangeable. mysub/helloworld.txt and mysub\helloworld.txt point to the same file. In theory, the colon (:) is equivalent as well, but I have had inconsistent results using it and recommend against trying.
  • To use a literal "/", "\", or ":" in folder names, precede each one with a backslash, e.g., Trip Report 10\/21\/06.

Always use the full name of each file, e.g., "foo.txt" or "foo.jpg" not "foo". To link to a folder rather than a specific file, omit the file name. For example, <A HREF="/myFolder">Link to Notes/myFolder</A>.

Tip: You can use a URI file scheme as well as the Notes-equals-root scheme. <A HREF="file:///"> is identical to <A HREF="/">. Both link to the Notes folder. I personally always use the Notes-equals-root scheme. It works consistently.

Songs and Videos

To link to songs, use "song=" in your anchor. For videos, use "video=". For example, <A HREF="song=My Way">My Way</A> or <A HREF="video=SpongeBob Episode 1">SpongeBob</A>. Type the exact name of your audio or video file as it appears in iTunes, spaces and all.

Playlists and Song Groups

Using ipod:music creates links to groups or categories of songs. You can use most iTunes metatags such as artist, composer, and genre. Some examples:

<A HREF="ipod:music?genre=pop">Pop Music</A>

<A HREF="ipod:music?playlist=my faves">My Favorite Music</A>

<A HREF="ipod:music?artist=Rascal Flatts">Rascal Flatts</A>

and so on... Just be aware that you can't use ampersands. Skip the genre=Country & Western or artist=Hall & Oates references. If you need to use an ampersand--or, for that matter, a percent symbol--in links, substitute them out with their escape equivalents: %26 for "&", %25 for "%".

Putting It All Together

This base set of features you've just seen (notes + links + pictures + your iTunes library) can be surprisingly flexible. The simple ability to create presentations and lists of items that can be accessed and linked in a user-driven way offers tremendous power for anyone who wants to create an open-ended experience.

Consider a walking tour of a sculpture garden, where at each sculpture visitors can read about the artwork, listen to the artist, and see a video about the sculpture's installation. Or an electronics lab that discusses each project, shows how to put it together, and gives step-by-step audio about each part of the construction. All this is possible by using iPod Notes to unite these multimedia elements.

Start by planning out your experience, drawing out a map of the experience and the media that could support each portion of it. Consider whether you'll need audio or text descriptions, art or photographs, or whether a video would make a greater impact.

Figure 9
Figure 9. Drawing a map helps you plan the interactive experience.

Next, develop and assemble these materials. Import the audio and video into iTunes and place the pictures into your Notes folder. Build your basic notes text files and start connecting them to one another and to your media using links. Build your project slowly and carefully, as you would when developing web pages: check your links, your titles, your spelling, and so forth, and test out your presentations on sample groups before going "live."

Conclusions

Although limited in scope, the base iPod Notes features are surprisingly effective because they leverage the power of the text, image, audio and video they link to. They create a flexible skeleton that allows nonlinear access to iPod media, adding a new level of complexity to the player. While the base set of features are quite narrow, they do what they need to. They provide the basis to organize and present access to the more interesting and more important elements hosted elsewhere on the iPod.

In the next article of this two-part series, you'll see how to kick it up a notch and how to exploit some of the more obscure features of iPod Notes, such as the "Notes only" mode that prevents users from accessing normal iPod functions.

In the meantime, here are some resources you'll find helpful to discover more about iPod Notes and how to develop them.

Erica Sadun has written, co-written, and contributed to almost two dozen books about technology, particularly in the areas of programming, digital video, and digital photography.


Return to the Mac DevCenter.