Play a Song From CD

Scott Rossi scott at tactilemedia.com
Fri Jan 4 01:34:12 EST 2008


Recently, Mark Greenberg wrote:

> I'm updating a stack originally made in another multimedia authoring
> tool. It was easily scripted in that tool, so I'm thinking it should
> be easily done in Rev as well. Here's the scenario:
> 
> 1. Student launches stack and clicks to begin the game.
> 2. Stack prompts student to put in the music CD.
> 3. Student puts the music CD into the computer.
> 4. Stack plays a small portion of one song.
> 5. Student identifies song (or property of song like tempo, style,
> key, etc.)
> 6. Repeat steps 4 & 5 until done.
> 
> It seems easy enough, but I can't get to first base with this stack.
> I have experimented with the simple starter code below just to see if
> I can get a song to play from CD, and all I get is static.  Can
> anyone help me out here?

Here's the thing Mark: the files on audio CDs are not directly accessible by
Rev -- the audio must be played by an appropriate player, which can be
controlled by Rev, or the audio must be converted into a format which Rev
can handle natively.

To do the former, one can use AppleScript on Macintosh to control a player,
such as iTunes, and MCI (or possibly Rev's new VB support) on Windows to
control CD playback.  It may seem odd that there is no built-in CD control,
but I would guess in these days of digital music files the demand for CD
control is not that great.

A few years ago, I took a stab at making a Mac based iTunes controller
called Conductor, which you might want to take a look at (I hope it still
works):

  http://www.tactilemedia.com/conductor/conductor_demo.zip

Someone else on the list may have additional input on this.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design





More information about the use-livecode mailing list