Page 1 of 1

problem importing audio files

Posted: Wed Oct 19, 2011 7:33 am
by maxs
OK I need to use a decent sound editing program, (not quicktime) to record my voice. I tried SoundTrack pro, Soundbooth, and SoundConverer, and a few other programs, all of which save to both .aif and .wav. But when I import them to Livecode all I get is stactic.

How can I get decent audio into Livecode?

Max

Re: problem importing audio files

Posted: Wed Oct 19, 2011 10:52 am
by Dixie
maxs...

I am making the assumption that the audio file that you have plays without a problem outside of the liveCode environment...

To play a file from liveCode that you have not imported as an audioClip try something like this...

Code: Select all

on mouseUp
   answer file "Select Audio File to play"
   if it is not empty then
      play it
   end if
end mouseUp
To play an audioClip that you have imported into liveCode

Code: Select all

on mouseUp
   play audioclip 1
end mouseUp
Hope that helps

Dixie

Re: problem importing audio files

Posted: Wed Oct 19, 2011 11:19 am
by Klaus
Hi Max,

LiveCode does only supports a few (OLD!) formats for internal sound!
AIFF and WAV, but UNCOMPRESSED!
AU, which is compressed by nature.

For everything else you should use external files "referenced" in a player object.


Best

Klaus

Re: problem importing audio files

Posted: Sun Oct 30, 2011 2:45 pm
by johnmiller1950
Max,

I had a problem like this. I tried to use LiveCode's record command, but the sound was terrible. Then I experimented with the various recording settings. Now, I get pretty good recordings inside LiveCode. The code I use is attached below.

Best Regards,
John Miller

on mouseUp
set the recordInput to "imic"
set the recordformat to "aiff" --- CAN ALSO USE "WAVE", "ULAW" & "MOVIE"
set the recordChannels to 2 -- STEREO
set the recordCompression to "raw " -- NONE
set the recordRate to 48.00
set the recordsampleSize to 16
put specialfolderpath ("Desktop") & "/My Recording.aiff" into fileXX
record sound file fileXX
end mouseUp

Re: problem importing audio files

Posted: Sun Oct 30, 2011 7:33 pm
by maxs
Thank you John.

That must have been a bit of experimenting. It's great to have the right numbers. At least I can record now, even though I still can't use soundtrack pro or Soundbooth with these settings .

Max

Re: problem importing audio files

Posted: Tue Nov 29, 2011 8:41 am
by maxs
Hi Klaus,
When you say internal sound --- do you mean 'imported' sounds?

I tried importing uncompressed AU, aiff and wav files from other apps, like soundbooth, but they screech, too.
LiveCode does only supports a few (OLD!) formats for !
AIFF and WAV, but UNCOMPRESSED!
AU, which is compressed by nature.


Max

Re: problem importing audio files

Posted: Tue Nov 29, 2011 9:53 am
by Klaus
Hi Max,
maxs wrote:Hi Klaus,
When you say internal sound --- do you mean 'imported' sounds?
Yes, the ones that won't play on iOS! 8)
maxs wrote:I tried importing uncompressed AU, aiff and wav files from other apps, like soundbooth, but they screech, too.
LiveCode does only supports a few (OLD!) formats for !
AIFF and WAV, but UNCOMPRESSED!
AU, which is compressed by nature.
Theses formats SHOULD work, but that is not guaranteed! :?
So I finally ended with imported sounds in AU format and use a player object with external files whenever possible.

LiveCode really needs an overhaul of its multimedia playback engine for sounds and video!


Best

Klaus

Re: problem importing audio files

Posted: Wed Nov 30, 2011 8:02 am
by maxs
Thanks Klaus,

I'm so glad I am not the only one who believes audio and video files need a overhaul.

Max

Re: problem importing audio files

Posted: Sun Dec 11, 2011 1:04 pm
by teacherguy
I was surprised to see how old this thread was, yet I was still having audio import issues... the "static" mentioned above. Changing my sounds to 16 bit fixed the problem for me.