LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-16-2010, 11:54 PM   #1
sawtode
LQ Newbie
 
Registered: Apr 2005
Posts: 5

Rep: Reputation: 0
Triggered record/playback (like a parrot) - can it be done with Linux commands?


Hi,
I want to set up some parrot-like effects which will in fact be used with "demons" in my haunted house. I had cannabilized and augmented one of those parrot toys in the past but the circuit is unreliable.

The task is to wait until a sound above a volume threshold is heard then record for 5 seconds. When the recording is complete, play it back once at a slightly increased speed/pitch. After the playback, wait for another sound and do it all over. This must run automatically, with no GUI required.

I was looking at the Linux "record" command and 1) it can be set to trigger at a loudness threshold and 2) the recording length can be limited. But the reference documentation didn't specify if the command will terminate after a time-limited recording is complete. So the first question is, will record do what I want? It would seem that this would work: [ record -t 00:05 -L 2000 audiofile ]

I looked at the Linux "play" command. Is this command line player I should look at? The sourceforge page on sox is not clear to me, but seems to suggest I could use [ play audiofile speed 2 ]

I assume I can put this in a simple script like:

loop:
record -t 00:05 -L 2000 audiofile
play audiofile speed 2
goto loop

or like this to make adjustments easy

loop:
record -t 00:$1 -L $2 audiofile
play audiofile speed $3
goto loop

Lastly - I am a newbie because I banged my head against Linux documentation a few years ago and by now don't remember much. I would like to put this process together on a flash drive version of Linux so I can boot it into any PC. What would be the best distro choice of Linux to do that? I would want a distro that sets itself up on the flash drive without a lot more work on my part.

Thanks in advance for any suggestions.

Last edited by sawtode; 10-17-2010 at 08:54 AM.
 
Old 10-18-2010, 11:17 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,205

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
man arecord
man aplay
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: MythTV - Record and playback all your favourite TV soaps in GNU/Linux LXer Syndicated Linux News 0 09-14-2006 03:54 PM
Cannot record from microphone device, playback via speakers work correctly habala Linux - Laptop and Netbook 0 01-16-2005 03:41 PM
[ALSA] Noisy playback after I record from line in halfzware_shag Linux - Software 0 11-27-2004 08:49 AM
Audio: Full duplex (playback/record) Utah Linux - Hardware 2 07-17-2004 11:29 AM
Audio: Full Duplex Playback/Record Utah Linux - General 0 07-16-2004 04:53 PM


All times are GMT -5. The time now is 08:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration