Dunno about Rev directly, but you can go out to shell, and then use the Linux command line tools. The easiest gui recording tool is krecord, but there are lots of non-gui ones. Use zenity to get a gui for them. Then when you've captured the file, go out to the shell again to play it. Or maybe this is what you were trying to avoid? Most things that Rev cannot do can be done in the shell.
On Mon Apr 19 15:45:13 CDT 2010
Peter Alcibiades wrote:
> Dunno about Rev directly, but you can go out to shell, and then use the Linux
> command line tools. The easiest gui recording tool is krecord, but there
> are lots of non-gui ones. Use zenity to get a gui for them. Then when
> you've captured the file, go out to the shell again to play it. Or maybe
> this is what you were trying to avoid? Most things that Rev cannot do can
> be done in the shell.
As for how to go about doing what you described in Linux, I'm at a loss.
I have no experience using Rev and Shell scripts in Linux. The reason
why I am interested is that I working on a little utility that allows
students to record an audio response and then ftp the resulting audio
file to a server. This works fine on my Mac, and I presume it will on
Windows too (though have not tested extensively yet).
We have recently begun using Netbooks running Ubuntu Remix with our
students (about 600 of them currently). We do have Audacity on them
for recording audio, among a whole collection of other great software
I would like to be able to get my little utility to work on the
Netbooks too. I have looked up krecord and hunted some discussion
lists related to command line commands for this tool.
I don't see too much in the area of command line language for
Audacity, so I'm guessing we will have to use krecord or ALSA. These
laptops do have ALSA arecord and aplay and I do see an example in man
arecord -d 10 -f cd -t wav -D copy foobar.wav
(I'm guessing in the example above, I would need to give the complete
path when saving the foobar.wav file. Something like ~/home/student/
I have never done anything like this with Rev before and need some
direction. I'm guessing that I'm going to need to create a function
that will contain the shell script and then call it from a button when
I want to record...? But I don't have a clue what it would look like???
Does someone have a simple example stack I can pick apart?
Date: Mon, 19 Apr 2010 12:45:13 -0800 (PST)
From: Peter Alcibiades <[hidden email]>
Subject: Re: Record Audio in Rev on Linux OS?
To: [hidden email] Message-ID: <[hidden email]>
Content-Type: text/plain; charset=us-ascii
Dunno about Rev directly, but you can go out to shell, and then use
command line tools. The easiest gui recording tool is krecord, but
are lots of non-gui ones. Use zenity to get a gui for them. Then when
you've captured the file, go out to the shell again to play it. Or
this is what you were trying to avoid? Most things that Rev cannot do
be done in the shell.
use-revolution mailing list
[hidden email] Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
Invoking the shell command is the easy part. First, you open a terminal and verify that the command or script you want to use works properly from the terminal. For example, if you are going to use krecord you would open a terminal and do
followed by whatever options you want.
(this seems to be the command which opens the app now, seems to me it used to be krecord but still.....)
Now you know that it works as expected in the shell, you can invoke it from Rev:
put shell("krec") -- this will just open the application.
For instance, to execute the command you gave as a sample, from a button, you would just do:
put shell("arecord -d 10 -f cd -t wav -D copy foobar.wav")
This would then record the file in the user's home directory as foobar.wav.
You can execute any shell command like this.
You can also pipe the output of one shell command to the input of another one, in a shell command, as in
ls | gedit
this will have the effect of first listing the current directory contents, then sending the result to gedit, in which the input will be opened. You could use this to send a file, once recorded, to a player. Or, if you have lame installed, you could use it to convert the file to mp3 with soundconverter.
Finally, you might need to execute commands one after the other, which you can also do. To do this, you put your script into a file, for example, myscript.sh, have the first line be a so called 'shebang', make it executable, and put in your commands one after the other. Lets say you wanted the file in the above example to go to the desktop:
#! /usr/bin/env bash
arecord -d 10 -f cd -t wav -D copy foobar.wav
Now you would do, from your button,
put shell (myscript.sh) -- the file would have to be made executable.
The shell is a quite fully featured, if rather antique, programming language, with what you might regard as a huge collection of macros and utilities for all kinds of purposes. Most of the stuff you would expect, flow control, branching, error reporting etc. There are lots of guides to it on the net, but if you're in an academic environment the simplest might be to find someone in IT who has scripting experience and have them write it. If you want to learn it yourself, there is a nice book, full of worked examples, by Glen Smith: Introduction to Shell Scripting. Might be a bit basic for an experienced programmer.
It is antique, but its ideal for this sort of thing, because of the ability to invoke stuff like krec. On Rev, because of the limitations of Rev on Linux at the moment, its a lifesaver.