Recording audio with a microphone

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jsburnett
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 110
Joined: Fri Mar 09, 2007 9:47 pm

Recording audio with a microphone

Post by jsburnett » Wed Jul 16, 2014 2:34 pm

Hi,
I was wondering if someone could direct me to a sample stack so that I could look at working code/script with regards to the following:

I would like to record voice from a microphone and save it to a file.

Sounds simple, but I have had trouble doing this on my own.

I have reviewed the examples in the dictionary for:
record sound file filePath
answer record
stop recording
how to set the recording parameters for recordFormat, recordCompression and even the byu.edu 'lesson' on audio Intro.

Generally when I use record sound file filePath (and I designate the filePath with the ask file command) then use stop recording no audio file is generated. At the risk of having too long a post here is the script I use in my button:
on mouseUp
put the label of me into buttonAction
if buttonAction is "record"
then
ask file "Name recording file and where?"
put it & ".aif" into THEfilePath
put THEfilePath
set the recordFormat to "aiff"
set the recordCompression to "raw "
answer record
record sound file THEfilePath
set the label of me to "stop"
else
set the label of me to "record"
stop recording
end if
end mouseUp

I've checked my microphone settings and am able to record using another app (sound editor - I am using windows 7).

I am asking this question here because this is the "Beginners" forum. If this should be posted else where, please let me know.

I think If I can follow a working stack/script, that would help me. I am sure I am missing something simple and obvious ...

Thank you so much.

John

Klaus
Posts: 13821
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Recording audio with a microphone

Post by Klaus » Wed Jul 16, 2014 2:39 pm

Hi John,

short question: Do you have QuickTIme installed?
Sound recording in Lc currently requires QuickTime.


Best

Klaus

jsburnett
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 110
Joined: Fri Mar 09, 2007 9:47 pm

Re: Recording audio with a microphone

Post by jsburnett » Wed Jul 16, 2014 6:27 pm

Klaus,
I did not have QuickTime installed.
I installed QuickTime and ... it works.
As others have said so many times in this forum, "Klaus, you are a life saver!"

Thanks so much.

John

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Recording audio with a microphone

Post by tyarmsteadBUSuSfT » Fri Aug 08, 2014 12:29 am

Does the record function only work on desktop?
Ty

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Recording audio with a microphone

Post by Simon » Fri Aug 08, 2014 1:20 am

Hi Ty,
Yep.
But there are externals for iOS, have you looked at Monte's stuff?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Recording audio with a microphone

Post by tyarmsteadBUSuSfT » Fri Aug 08, 2014 12:19 pm

Yes, I have many of his externals, but I no longer see the microphone external.
TY

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: Recording audio with a microphone

Post by tyarmsteadBUSuSfT » Mon Aug 11, 2014 7:00 pm

Simon,
I think I found it. I was looking for the rrMicrophone and it looks like mergAV is the way to go.
Thank you

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”