Recording player audio then switching to external mic

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
msiskin
Posts: 4
Joined: Thu Oct 26, 2006 9:13 pm

Recording player audio then switching to external mic

Post by msiskin » Fri Dec 15, 2006 1:34 am

I am helping with a research project where the researcher wants to play a sound and have the subject record their response. She wants to record the prompt and the subject's response all in one file.

First, is there a way to record a sound that Revolution plays?

Second, is there a way to switch inputs while a recording is occuring?

Can we set the recording to stereo and use one track for the internal sound and the other for the microphone input?

Is there another way that I haven't determined yet?

Thank you,
Marc Siskin

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Dec 15, 2006 10:42 am

Hi Marc,

To record sound, use the record sound command. To switch the input, use the recordInput property. You can't switch inputs while the sound is being recorded.

You could create a new stack for each internal sound and response. Record the sound to disc, then import it into the stack and delete the sound file on disc. User the import command to import sound files from disk.

Play the imported audioclip with the command play audioclip.

If the researcher is playing a sound first, doesn't that mean that the sound is (can be) recorded before the experiment starts? Play the sound, wait for the playStopped message, start the recording automatically, and save the recorded sound. Now copy the first sound to a new stack and import the new sound into the same stack. Save the stack and delete the sound file. Should work.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Multimedia”