LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Recording music in linux. (http://www.linuxquestions.org/questions/linux-general-1/recording-music-in-linux-815161/)

stf92 06-19-2010 02:00 PM

Recording music in linux.
 
GNU/Linux 2.6, Slackware 12.0

Hi:
Is there any application common to all linux distros (or at least to Slackware), which I could use to record music coming from the line input connector in my sound card into a file (.wav, .mp3, whatever) and which can be run from the cli? Thanks in advance.

camorri 06-19-2010 04:24 PM

I have used Audacity to record records to .wav files. You can then encode them to any format you like. I have done lots of .mp3's and now .ogg files. Audacity can also be used to edit a .wav file. You can edit pops and clicks that are common from records. Audacity needs exclusive access to the sound card, so turn off any other sound applications before you start Audacity.

stf92 06-19-2010 04:35 PM

Quote:

Originally Posted by camorri (Post 4008824)
I have used Audacity to record records to .wav files. You can then encode them to any format you like. I have done lots of .mp3's and now .ogg files. Audacity can also be used to edit a .wav file. You can edit pops and clicks that are common from records. Audacity needs exclusive access to the sound card, so turn off any other sound applications before you start Audacity.

Thanks for your reply, camorri. I have audacious in kde. I don't know if it's the same (I did 'locate -i audacity and it output
/usr/share/apps/kappfinder/apps/Multimedia/audacity.desktop
)
In any case where can I get Audacity for free? Thanks againg.

camorri 06-19-2010 04:51 PM

Audacious is a player, not a recording app. Here is a link, its on Sourceforge.

http://audacity.sourceforge.net/

Yes its free.

stf92 06-19-2010 04:54 PM

Quote:

Originally Posted by camorri (Post 4008841)
Audacious is a player, not a recording app. Here is a link, its on Sourceforge.

http://audacity.sourceforge.net/

Yes its free.

Thanks. I'll give it a try.

sycamorex 06-19-2010 07:14 PM

Yeah, Audacity is very good when you want to record sound.

stf92 06-19-2010 07:22 PM

Quote:

Originally Posted by sycamorex (Post 4008919)
Yeah, Audacity is very good when you want to record sound.

Alright. But I'd prefer a tool which can be run in text mode (in the linux console).

maruchan 06-19-2010 08:08 PM

Have you tried Ecasound?

Quote:

Ecasound is a software package designed for multitrack audio
processing. It can be used for simple tasks like audio playback,
recording and format conversions, as well as for multitrack effect
processing, mixing, recording and signal recycling. Ecasound supports a
wide range of audio inputs, outputs and effect algorithms. Effects and
audio objects can be combined in various ways, and their parameters can
be controlled by operator objects like oscillators and MIDI-CCs. A
versatile console mode user-interface is included in the package.

frenchn00b 06-19-2010 08:16 PM

TRY this script:

Code:

#!/bin/sh
# script that shall be updated to pipe wav to mp3
seq 0 1 5 | while read i ;
echo "Card number: $i"
printf "Aux,line,number... 0 for default, try higher:>"
read trymynumber
echo "Creating a wav file to Filewavtestcard.wav"
OUTPUT="Filewavtestcard.wav"
arecord -Dplughw:$i,$trymynumber -f cd -vv "$OUTPUT"
ls -ltra "$1"
echo "Testing ... "
mplayer "$OUTPUT"
echo "Removing temp $OUTPUT"
rm "$OUTPUT"
echo "Reloop "
done
echo "Coded by Frenchn00b for stf92. We need a database on Internet of Scripts for text_CLI linux, because everything is possible from CLI!!"


stf92 06-19-2010 08:30 PM

Quote:

Originally Posted by maruchan (Post 4008951)
Have you tried Ecasound?

Does it use the aRts daemon? Because I have a program with a console mode user interface named artsrec and when I run it, it displays the message 'Can't connect to sound server'. However, ps says artsd, obviously the daemon, is running. Starting KRec (a GUI app), the help says its a frontend for aRts. And it runs.

Well. I'd rather try ecasound and see what happens.

stf92 06-19-2010 08:53 PM

Quote:

Originally Posted by frenchn00b (Post 4008956)
TRY this script:

Code:

#!/bin/sh
# script that shall be updated to pipe wav to mp3
seq 0 1 5 | while read i ;
echo "Card number: $i"
printf "Aux,line,number... 0 for default, try higher:>"
read trymynumber
echo "Creating a wav file to Filewavtestcard.wav"
OUTPUT="Filewavtestcard.wav"
arecord -Dplughw:$i,$trymynumber -f cd -vv "$OUTPUT"
ls -ltra "$1"
echo "Testing ... "
mplayer "$OUTPUT"
echo "Removing temp $OUTPUT"
rm "$OUTPUT"
echo "Reloop "
done
echo "Coded by Frenchn00b for stf92. We need a database on Internet of Scripts for text_CLI linux, because everything is possible from CLI!!"


I thank you from my heart. Unfortunately the script gets this error:
line 16: syntax error near unexpected token 'done'

Line 16 is the line containing 'done'. I'll see what can be done.

stf92 06-19-2010 09:44 PM

I think the error is in the 3th statement. If I substitute

seq 0 1 5 | while read i ; do

for

seq 0 1 5 | while read i ;

then bash outputs no errors but arecord does. I'll go on trying to make it work.


All times are GMT -5. The time now is 07:12 AM.