using sounds / QuickTime TimeCode track

mark mitchell cowhead at
Thu Aug 22 09:47:01 EDT 2002

Nicholas  wrote:

> I am also having trouble with audio files. I am trying to simply play
> a sound file (QT/ AIFF) that is in the same directory as the RR
> stack. I have aound 3Gb of audio files that I absolutely do not want
> to segment and embed. In Hypercard I can play any selected chunk. In
> RR I can't even get a squeak!
> I haven't found the documentation that specifies the format of
> soundfiles, is there such a thing?

The metacard help went into some detail on available formats. If I 
recall, AIFF was not one of them that could be embedded.  But if you do 
not want to embed and you are going to use QT and a player, then I would 
convert to MP3, simply because its more universal (and then you can play 
it on your iPod too!).  You cannot embed MP3 though, so for embedding I 
would use something like Next(sun) and Klaus  just wrote that he likes 
something else.

I notice you come from Hypercard.  So in Rev you need to look at help 
under "players" and related topics.  It can be confusing coming from 
hypercard.  If the sound is not embedded you first create a player, then 
"set the filename of player myplayer to mySoundFile".  If you do not use 
the full path of the file, it will look in the default folder.  So use 
the full path to be safe.  Try:

   answer file "what?"
   put it into myFile
   create player "myPlayer"
   set the showController of player myplayer to true
   set the fileName of it to myFile
   choose browse tool
   start player "myPlayer"

You can also play selected chunks of a sound file using the using the QT 
units.  For example, if you want to stop playing the file before the end 

set the playSelection of player myPlayer to true
   set the endTime of player myPlayer to myEndTime

By manually stopping a player (where you want it stopped) you can then 
open its properties (property manager > player) and see the current QT 
'time' unit.  So it is very easy to find exactly where you want to start 
and stop a sound.   All of this is pretty well documented in 'help' but 
look under 'players' and related and not 'play'.  It's confusing coming 
from hypercard, I know!


mark mitchell

More information about the Use-livecode mailing list