Page 1 of 1

playing a sound

Posted: Tue Aug 05, 2008 2:40 am
by dgm
Why can't I simply play a sound? I download a file from the internet. I import the sound into my program as an audiofile. then I write the code
on mouseUp
play audioclip "oops"
end mouseUp

And.. nothing happens. I get a click, and nothing else. Why doesn't this work?
It's a .wav file. I have tried it as is, opening with quicktime, opening with iTunes, etc. but still just a quick clicking sound and then nothing. What gives??
As a side note, I can get some sound files to play, but only some.
Also, how can I see which audio files I have imported? I can see fields, images, etc. in the Inspector, but no audio files. Thanks.

playing a sound

Posted: Tue Aug 05, 2008 3:07 am
by dgm
If I do this (with or without the audioclip keyword, both will work)...

play audioclip "C:\Documents and Settings\Desktop\Sounds\dave.wav"
and it will play the sound.

But when I try another sound form the same folder...

play audioclip "C:\Documents and Settings\\Desktop\Sounds\oops.wav"
and nothing happens. (of course, Quicktime will play either sound)

Posted: Tue Aug 05, 2008 5:44 am
by Janschenkel
To display which audioclips and videoclips are embedded in your stack, go to the 'Preferences' tab 'Application Browser' and tick the checkboxes for 'Show audio clips' and 'Show video clips'.
Now you can see the audio and video clips in your stack by using the 'Application browser' which you can find in the 'Tools' menu.

When you use audioClip and videoClip features, you're not using QuickTime directly. And Revolution may not support all variations of the AU, WAV and AIFF audio compression formats.
So if QuickTime can play it, try using a player control and point that to your audio file. Then you can use the 'start player' and 'stop player' commands to do your thing.

Jan Schenkel.

Posted: Tue Aug 05, 2008 10:18 am
by Klaus
Hi dgm,

"play ac XYZ" will only play uncompressed AIFF and WAVE files!

If possible, use player-objects, which require QuickTime to be installed, as Jan already suggested.


Best

Klaus

Playing a sound

Posted: Wed Aug 06, 2008 7:59 pm
by dgm
Thanks for the info. The sound that was giving me fits was a IMA ADPCM formattted sound. Revolution doesn't like it. I experimented with importing a sound and with direct access and both work with plain-jane PCM formats of wav. So I guess I just need to be careful about what format the sounds are. BTW, the sound won't play without adding the .wav to the name. (or some other endings I assume)

DGM