Category Archives: audio

Cyclic sound MP3 audio recording in ubuntu

I work in a relatively safe environment, yet it may very well happen that I need to prove something that someone said in my office, so I can hold it against them when the time comes.

My laptop is always turned on, so I could use it to record the environmental sounds around it, with a couple of requirements:

  • the recording must be totally unattended, starting when I turn on the pc, and stopping when I turn it off, without any user intervention
  • the recorded files must be somehow purged, starting from the oldest ones, so that my disk doesn’t get filled with audio files

As in the Ubuntu spirit, I tried to search for something that did the job right away, but with no luck.

So, still in the Ubunt spirit, I had to arrange it myself: the idea is to record the audio in chunks of 10 minutes, and each time delete the oldest files, so that there is a chosen number of max files inside the recording folder.

You will need the audio-recorder package for the job, install it as follows:

sudo apt-add-repository ppa:osmoma/audio-recorder
sudo apt-get update
sudo apt-get install audio-recorder

when the program is installed, open it (Alt-F2 and then launch audio-recorder), click on the “additional settings” button, and setup your default recording folder there, in this example it’s the folder “audiofiles” directly under your home folder.
Also I suggest changing the file naming standard to %Y-%m-%d-%H:%M:%S so that each recording can be easily associated with the time of starting.

Then, you need to make a bash script that will deal with starting a new recording, while closing the previous one, this is what I came up with:

#!/bin/bash

/usr/bin/audio-recorder --display=:0.0 -c stop
/usr/bin/audio-recorder --display=:0.0 -c start
cd /home/username/audiofiles
rm `ls -t | awk 'NR>150'`

which does exactly the following: stops a previously open (if existing) instance of the program, and starts a new one, then deletes the oldest recorded audio chunks so that there are maximum 150 files inside the recording folder (if you want a different amount, just replace 150 with the number you prefer); please note that the recording folder written in this bash script must be the same that is set in the additional settings, so if you want to use a different folder make sure to set it up both in audio-recorder and in this bash script.
Also, please note that the username part of the path must be replaced with your ubuntu username.

You can create this bash script as a “recordaudio.sh” file in your home folder, and then be sure to chmod +x recordaudio.sh so you can execute it.

Then, you need something that actually starts the recording, and cron is our friend here.

Run the command

crontab -e

and if it’s the first time you run it,  you should be presented with a choice screen asking you which editor you prefer… absolutely choose nano!

Inside the editor screen, paste this:

*/10 * * * * /home/username/recordaudio.sh

where “username” must be replaced with you ubuntu username, then press Ctrl-X to save the file (press Y is prompted to confirm).

What this cron line does, is running the bash script we just created every ten minutes, so the recorded sound files will be 10 minutes long. If you want to change this length, just change the 10 in the command to the number of minutes you prefer.

Restart the pc, and notice how files are being created inside of your folder. After a while, you will also get over the set limit for the files, and you will notice how the number of files will always stay the same, with the oldest files being deleted.

Free music files, MIDI soundtracks and MP3 sound effects for download

Disclaimer: ALL the files here contained are legally distributable over the Internet. In fact, I have downloaded them myself from websites where they are (legally) distributed; they are NOT covered by any rights of profit. This means you CAN’T buy them anywhere, that you can’t find the digital or analogic recording of these files in stores or in ANY discographic house, and that there is NO person, institution, system, which legally deals with them by any commercial means.

GUESS THE SONGS

I am dying to find the artists and titles of these two songs (especially #1), recorded from FM radio years ago, the clips togheter are less than 300kb worth, please listen to them and tell me via the comments at the end of the page if you know them! Thanks!

Clip1Clip3

Chrono Trigger MIDI Soundtrack

This is the full MIDI soundtrack of the BEST IMHO RPG game for SNES, as distributed by Squaresoft Inc., and freely downloadable, since not protected by any right of exploitation. I made it only available in ZIP compressed format, with all the .MID files included. Goes without saying that the samples are BEST listened with a wavetable soundcard, such as all the SoundBlaster ones since the AWE32 model, and any other decent one.

King’s Quest Series MIDI Soundtrack

Another famous game title, and another MIDI soundtrack. As above, this is not covered by any rights of exploitation. Available in ZIP compressed format.

Monkey Island Series MIDI Soundtracks

No introduction needed. These files should be on the Hard Disks of every fan, which means, of everyone. For legal buggers: everything goes as explained for the above downloads. BTW, MI4 Soundtrack is not provided here, because I don’t like it.

Final Fantasy Series MIDI Soundtracks

Only the FF5 and FF6 MIDI OSTs. Legal babble, read above.

Sound FX

Very few for now, but better few than nothing.

Download Audio Video utility ZIP files

After the website was moved to the new domain and converted to PHP, a lot of utilities linked here have been massively updated, disappeared, or become obsolete/useless. I removed the obsolete/useless ones, and added “google” near the ones which are not hosted in here but you should google for, while the downloads you can find in here are pretty rare, bust still useful ones

GUESS THE SONGS

I am dying to find the artists and titles of these two songs (especially #1), recorded from FM radio years ago, the clips togheter are less than 300kb worth, please listen to them and tell me via the comments at the end of the page if you know them! Thanks!

Clip1Clip3

VirtualDub (google)

The leading tool for video-editing in the “free” scene, here in the “official” version, that is without VBR MP3, ASF, freezes check support.

AVIDefreezer (google)

Fixes freezes in DivX movies, used in combination with VirtualDub, the HTML user’s guide is included in the archive.

DivFix (google)

Lets you watch unfinished downloads of DivX movies, also great to fix DivX’s which seem totally lost even using AVIDeFreezer.

MSTalkit!

Free program by Microsoft, used to synthetize voice in English and Spanish (!), with various, nice accents. Doesn’t save WAV files, but you can see how to do this anyway, in the HowTo’s section.

Quick MP3 Tag Maker

Adds ID3v1 tags to all of my MP3’s… it is perfect especially for albums, since you can use jolly chars to define how the file name (which you can easily change with Magic Renamer, see in the Downloads/Tools section) must be “translated” into the ID3v1 tag.

MP3 Trim (google)

Especially useful when you need to increase the volume of an MP3 which sounds so flebile… move a slider, and it’s done.

The Matrix Screensaver

Makes your monitor look exactly like the computer screens in The Matrix!

CDex (google)

Audiograbber was lately made into a free limited version, anyway CDex, which I discovered recently, is a completely free tool which misses nothing compared to the full commercial version of the former: CDA to WAV, CDA to MP3, WAV to MP3, MP3 to WAV, CDDB support, external codecs support. You won’t find only the animated buttons, but who cares. Just uncompress into a folder of your choice and run CDex.exe, the program’s ready. To update the LAME extension download the LAME codec and copy the lame_enc.dll file over the one provided with this program.

LAME encoder (google)

THE MP3 codec, and it’s free. Bitrates from 32 to 320 kbps, 3 methods of VBR (the only way to the intelligent encoding) . Use the included lame_enc.dll file to overwrite the one you may have already provided with other programs that use this codec, thus updating the codec itself.

Nokia Ringtone Kit

This is the downloadable package to which refers the guide for writing Nokia Ringtones in the HowTo’s section.

SubAdjust (Subtitle Adjuster) (google)

The leading minitool to synchronize subtitles, mainly support the SubViewer format, but after you adjust the text file in that format you can convert it in all the other ones.