Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Playing Sounds from PDF Presentations

As mentioned above, I use powerdot for generating overhead presentations in PDF format from LaTeX source. In this section, I describe how I make clickable sound links in PDF presentations.

The LATEX macro invocation

\soundexamplewav{Bb Clarinet}{bcq705}
creates a link ``Bb Clarinet'' in the PDF which plays the soundfile bcq705.wav. The macro \soundexamplewav is defined as
\newcommand{\soundexamplewav}[2]{\href{\playcmd \wavpath{#2}}{#1}}
and
\newcommand{\wavpath}[1]{\soundpathroot/wav/#1.wav}
where, for Web documents, I use
\newcommand{\playcmd}{} % just use a bare URL, no ``command''
\newcommand{\soundpathroot}[1]{http://ccrma.stanford.edu/~jos/}
while for on-the-road, self-contained laptop presentations, I use instead
\newcommand{\soundpathroot}[1]{..}
\newcommand{\playcmd}{run:} % Windows PDF
%\newcommand{\playcmd}{run:play } % Linux PDF
These PDF soundfile links are just like media links in HTML Web pages: The application registered for ``.wav'' files is launched to play the sound in the usual way when you click on the link. Therefore, it is good to find a sound-player that does not insist on bringing a window to the foreground, since that distracts from the full-screen presentation mode. For windows, I find WinAmp (any version) to be perfect for this purpose. For Linux, in Firefox, go to Edit / Preferences, select the Content tab, select ``File Types .. Manage...'', and set your soundfile handler there (e.g., a shell script that invokes the play command installed by sox).


Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download mycomputers.pdf
[Comment on this page via email]

``My Computers'', by Julius O. Smith III, Web document.
Copyright © 2014-03-25 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA