Re: Playing wav sound file in Linux in background?

2010-05-20 Thread Peter Alcibiades

Yes, of course.  I shall have to try this on the printing script.  Thanks!  

There is also, for completeness, the nohup command, which lets a process run
after the terminal session has closed, might come in handy in similar
situations.

Peter
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Playing-wav-sound-file-in-Linux-in-background-tp2220508p2224036.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-20 Thread J. Landman Gay

John Patten wrote:


Here's what i have:

put the effective filename of current stack into theTargetPath
set the itemDel to /
delete last item of theTargetPath
delete first item of theTargetPath
put /  theTargetPath  /recordings/ into theRecordingTarget

convert the date  the long time to seconds
put it into tFileNameRec
put tFileNameRec into cd fld audioFileName

send mouseUp to btn Stop Recording in 10 secs
put arecord -d 10 -fu8 -t wav into tShellCmd
put shell(tschellCmdtheRecordingTargetFilenameRec)

This works fine when I'm in the editor (saves to the recordings folder),

but when I create a standalone the standalone saves the audio file as
student in the location of the directory that I select to build the 
standalone.


I'm not sure what the student file name is all about, but when 
creating your file path, don't remove the first item. Only remove or 
append to the end of the path. That's assuming you want the Recordings 
folder in the same folder with the standalone:


put the effective filename of current stack into theTargetPath
set the itemDel to /
put recordings/ into last item of theTargetPath

Then make sure there really is a folder named recordings in the target 
directory. If not, create it. Otherwise it won't work.


When running a standalone, the defaultfolder is the one containing the 
standalone, and all files will be created there unless directed 
somewhere else by a fully qualified file path.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-19 Thread J. Landman Gay

Peter Alcibiades wrote:

He has a solution, surely, it is to do it from the shell.  His problem is
that when he goes out to the shell, it does not then play in the background.

If he calls the shell command from a separate stack, will it not then leave
the original stack to just go on?  So the effect will be to play in the
background, and leave the user free to interact with the main stack?


If you try this, I'd like to know how it works. I think all scripts will 
pause while another is running, regardless of the stack the script is 
in. But let us know.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-19 Thread Andre Garzia
John,

Try using the command like

shell(aplay path-tofile )

This last  will run the command in the background, the command should
return imediatly to the stack while the sound play (I think, untested)

On Mon, May 17, 2010 at 8:04 PM, John Patten johnpat...@mac.com wrote:

 Hi All...

 I've been having a problem playing back an audio file on a Linux computer
 using an arecord  a shell script to first create the audio file.

 The audio file gets created on the local machine, it then gets uploaded to
 an ftp directory, however when I go to play the sound file locally using
 just Rev it's just static white noise.

 If I again, use the shell script to play the audio file, aplay
 path-tofile, it plays fine. However the user can't do anything with my
 stack until the file completely finishes playing.

 Is there any way to play the audio file via the shell script in the
 background and still allow the user to interact with the stack?

 Thank you!

 John Patten



 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




-- 
http://www.andregarzia.com All We Do Is Code.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-19 Thread John Patten
Thanks Everyone...

... and Andre all try out you suggestion on the shell command when I get a 
second. I solved the issue by just looking a little closer and the man file for 
arecord and discoverd that I could just change the file format to one that 
Revolution could handle. It used -f u8 and that did the trick.

I have one other question about getting the correct path to a directory in a 
standalone where I save my stack saves the audio file. It works fine when I'm 
in Revolution editor, but after I save it as a standalone it saves the audio 
file in the wrong location.  I was under the impression that Windows and Linux 
did not have an issue with file paths when saved as standalones, but I may be 
doing something incorrectly.

Here's what i have:

put the effective filename of current stack into theTargetPath
set the itemDel to /
delete last item of theTargetPath
delete first item of theTargetPath
put /  theTargetPath  /recordings/ into theRecordingTarget

convert the date  the long time to seconds
put it into tFileNameRec
put tFileNameRec into cd fld audioFileName

send mouseUp to btn Stop Recording in 10 secs
put arecord -d 10 -fu8 -t wav into tShellCmd
put shell(tschellCmdtheRecordingTargetFilenameRec)

This works fine when I'm in the editor (saves to the recordings folder), but 
when I create a standalone the standalone saves the audio file as student in 
the location of the directory that I select to build the standalone. 

Any advice on what I'm missing with this little Linux process?

Thank you!

John Patten


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-18 Thread Peter Alcibiades

We need someone like Andre to help on this.  I have had a similar problem
with printing from the shell, the app prints, but if the shell command does
not complete, it hangs, so would like to know the answer to the general
question of how to get shell commands running in the background.  I suspect
you have to spin off the process to a separate stack, and call it from that
with the opening of the second stack (which could be invisible of course). 
Then it will fire up and not affect the message flow in the first one.

But that's just a guess.  Andre could help us.  Andre?
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Playing-wav-sound-file-in-Linux-in-background-tp2220508p2221137.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-18 Thread J. Landman Gay

John Patten wrote:

Hi All...

I've been having a problem playing back an audio file on a Linux 
computer using an arecord  a shell script to first create the audio file.


The audio file gets created on the local machine, it then gets uploaded 
to an ftp directory, however when I go to play the sound file locally 
using just Rev it's just static white noise.


This is a typical symptom of playing back a file format that Rev doesn't 
support. You can't use any kind of compressed file format. Try 
re-recording using an uncompressed format, preferably saving as .au for 
Linux playback if possible.


I'm not sure, even so, whether Rev will wait for the whole file to 
arrive before playing it. I suspect it will.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-18 Thread Richmond Mathewson

 On 18/05/2010 21:14, J. Landman Gay wrote:

John Patten wrote:

Hi All...

I've been having a problem playing back an audio file on a Linux 
computer using an arecord  a shell script to first create the audio 
file.


The audio file gets created on the local machine, it then gets 
uploaded to an ftp directory, however when I go to play the sound 
file locally using just Rev it's just static white noise.


This is a typical symptom of playing back a file format that Rev 
doesn't support. You can't use any kind of compressed file format. Try 
re-recording using an uncompressed format, preferably saving as .au 
for Linux playback if possible.


That seems needlessly bothersome (re-recording); I would be inclined to 
convert them using Audacity:


http://audacity.sourceforge.net/



I'm not sure, even so, whether Rev will wait for the whole file to 
arrive before playing it. I suspect it will.




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-18 Thread stephen barncard
It may be bothersome to re-encode, but one does not get better quality by
decoding then saving as uncompressed. If the files are going to be full
size, why not take advantage of the better quality by 're-encoding'.

On 18 May 2010 11:24, Richmond Mathewson richmondmathew...@gmail.comwrote:

  On 18/05/2010 21:14, J. Landman Gay wrote:

 John Patten wrote:

 Hi All...

 I've been having a problem playing back an audio file on a Linux computer
 using an arecord  a shell script to first create the audio file.

 The audio file gets created on the local machine, it then gets uploaded
 to an ftp directory, however when I go to play the sound file locally using
 just Rev it's just static white noise.


 This is a typical symptom of playing back a file format that Rev doesn't
 support. You can't use any kind of compressed file format. Try re-recording
 using an uncompressed format, preferably saving as .au for Linux playback if
 possible.


 That seems needlessly bothersome (re-recording); I would be inclined to
 convert them using Audacity:

 http://audacity.sourceforge.net/



 I'm not sure, even so, whether Rev will wait for the whole file to arrive
 before playing it. I suspect it will.


 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution




-- 
-
Stephen Barncard
Back home in SF
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Playing wav sound file in Linux in background?

2010-05-18 Thread Peter Alcibiades

He has a solution, surely, it is to do it from the shell.  His problem is
that when he goes out to the shell, it does not then play in the background.

If he calls the shell command from a separate stack, will it not then leave
the original stack to just go on?  So the effect will be to play in the
background, and leave the user free to interact with the main stack?

Of course, he'll have to handle error conditions in the second stack.

This had never occurred to me till he wrote in, but it might be the solution
to my printing problem.  The problem is similar.  You call the shell command
to print, using lp, but if the printer is offline, everything freezes until
it comes back online and can complete.  But if the print command were to
take place from a separate stack, presumably the top stack would just carry
on running having passed over the shell command to the second one?

Peter
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Playing-wav-sound-file-in-Linux-in-background-tp2220508p2221738.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Playing wav sound file in Linux in background?

2010-05-17 Thread John Patten

Hi All...

I've been having a problem playing back an audio file on a Linux  
computer using an arecord  a shell script to first create the audio  
file.


The audio file gets created on the local machine, it then gets  
uploaded to an ftp directory, however when I go to play the sound file  
locally using just Rev it's just static white noise.


If I again, use the shell script to play the audio file, aplay path- 
tofile, it plays fine. However the user can't do anything with my  
stack until the file completely finishes playing.


Is there any way to play the audio file via the shell script in the  
background and still allow the user to interact with the stack?


Thank you!

John Patten


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution