AIFF files: strip initial "whitespace" - audio

I have a folder full of AIFF files that have a little gap at the beginning where no sound is heard. How would I go about writing a script/tool that'd remove this gap?
Basically the files look like this in Audacity (I want to get only the selected part):
I can't really use Audacity because I have hundreds of the files so doing it by hand is not an option.
I don't care too much about the OS / language, as long as it works.

since you are asking on a programmer's website and have programming experience (peeked at your profile) -- if you look in the sources, you will see Audacity has some scripting support.
there are also commercial tools (e.g. batch processors) for this.
i wouldn't recommend getting your hands too dirty with this file format (i.e. writing a C program could easily take more time than doing it manually in the editor).

In the end it was just easier to hack up a quick C++ solution using libsndfile.
Feel free to steal it from https://github.com/houbysoft/short/blob/master/removeInitialSilence.cpp.

Related

Reverse-engineer Cubase .cpr format

I don't have an opportunity to buy Cubase, but my partner uses it a lot. I wanted to simplify his life and provide him with cpr projects instead of plain wav files, but no other software can open/save this format.
I looked at a sample cpr he sent me and it seems like the file does not contain audio data itself, it rather contains the mark-up and effects.
I wanted to know the following things:
Is it legal to try to reverse-engineer cpr files?
Is it difficult and who tried?
If someone knows other ways to transfer project files between Audacity/Rosegarden and Cubase? The main thing is the support of several tracks and their timing in one project, nothing fancy.
Cpr files comes from a proprietary format. You can have a look on this question.
I suppose it is pretty hard... and I didn't tried !
To my knowledge, there is no way to export/import a project between cubase and Audacity or Rosegarden. The OMF format which could be a good candidate, is not supported by Audacity or Rosegarden for now. You can still import/export the audio mix, the separated tracks, and the midi files separately. This method is really fastidious, but it probably provides the advantage to let you play and edit your projects in the next decades, that isn't obvious with project files.

Audio support for programming languages

I want to start on a hobby project that focuses on displaying audio files in a folder in a certain fashion and has the ability to play such an audio file and shows basic control options for playing. However, i'm struggling to find a fit programming language for this.
The displaying part shouldn't be too hard and can probably be done in most of the programming languages. The audio part is what concerns me the most since it's not the main focus of the project and should only do limited things (so it shouldn't be too hard) and i do not know anything about sound support in the programming languages i currently know. (Java, C and C++)
Specifically i would like to be able to do these things:
Play a sound file
Stop/pause a playing song
Adjust volume
Show a bar that displays the current position in the song
Most files will be .mp3 files but being able to process other formats is certainly a plus. Since this is just a small project it's ok if it runs just on Windows. Scalabilty would be nice but not required.
It would be nice to have a small overview of audio support/audio libraries of programming languages (i'm always up for something new) that can accomplish these simple things, in a not too complicated way, aswell as personal experiences.
In this way i hope to create a better understanding of which programming language fits my project best. (i would very much like to not have to change language mid-way the project)
--
Edit:
This is only for a later stage of the project if the first part was successfull: i will want to change the file names of the audio files that are displayed. (to make them follow a specific format)
I haven't written audio processing programs much, but I know a lot of them exist for C and C++. For Java perhaps, too, but I don't know Java. I had used audio with SDL in a game, but that doesn't have that many features and I don't recommend it.
There's this question asking for a library in C, and there are a couple of similar questions that SO brings up on the side. You may want to take a look at those.
You would also need to look for a library that loads different file types. SDL at least, only opens .wav files, which I believe most of the playback libraries would support. For MP3, you will most likely need an additional library. I know Audacity uses LAME Mp3 so I'm guessing that should be good.
Some of the functionalities you want is also doable by yourself. For example, knowing the length of the music and the amount you have already read, you will know how far in the audio you are. Adjusting the volume is also a multiplication (in the simplest case) that you can do on the audio data if the library doesn't provide it.
A very good choice seems to be PortAudio which is used by Audacity, and also recommended in the accepted answer of the question I mentioned above.
I've done audio apps in both Java and C++. Java development goes way faster because it's a more powerful language and has garbage collection, but JavaSound is a pretty awful solution for audio. Of course, there are wrappers for FFMPEG and other stuff, so you can get a lot of things working. Here's an example of a Java audio app: http://www.indabamusic.com/help/mantis
OTOH, C++ gives you lots of control, low latency and wealth of libraries. (another answer mentioned Portaudio, which is, indeed, great.) But you will definitely find it also has a much longer development cycle.
You can certainly do everything you want to do with either language.

Forbid decompressing for UPX Win32/PE compressed files

Actually dont want people to decompress my Win32/PE executables.
I found a solution from one russian guy. His tool is named "UPX shell" and was at http://bash.x2i.net/, but website is down for now(it is not the same as upxshell.sourceforge.net)
His tool has option "Protect file from decompression" and it works just great(even with latest UPX)!
upx shell from russian guy doesn't have command line interface at all, which is needed for automatically compressing files with Visual Studio Post-Build.
Okay, it is not really cool for me, and I want to know how it works to write own command line solution, and is there any modern solutions for protecting .exe files from decompressing?
Depends a lot on your goals. Why don't you want people decompressing your PE?
If you are looking to stop people from "cracking" your software then even the "Russian guy"'s UPX Shell won't help. Code will get decompressed in memory when the EXE is running, so someone could simply read that memory.
My guess is UPX Shell just wraps the UPX compressed PE in another layer. Like making an executable zip file of an EXE. If this is the case just use another PE compressor on top of UPX, like PECOmpact http://pecompact.com/pecompact.php
Protection schemes are not unbreakable, on the contrary, a good amount of them are easely breakeable. There's a ton of tutorials for breaking a bunch of protetion schemes. So, I really don't recommend relying on this kind of protection.

Free sound editor / converter?

I'm looking for something like paint.net or Gimp, but for audio files, and runs on windows.
Audacity is fantastic
As already mentioned, Audacity is fantastic. If you're looking to batch convert sound files at the command line, check out mencoder and (for MP3s only) LAME.
Audacity is painfully limited. If you are looking to do something a little more complicated. You should check out Reaper. It has a 60 day free trial and if you are still doing editing and recording after that long, the price to buy is extremely cheap when compared to other fully functional editing software. Pro Tools is crazy expensive.
Personally I use REAPER for "complex" tasks (tracking, mastering, batch processing) and Audacity for basic cutting/normalizing/exporting to MP3.
If you need free alternative for Audacity for basic mono or stereo file processing, you may try Wavosaur or other software that has realtime previews.
NCH Wavepad is also the best application for the audio. it's easy to understand
Reaper has always worked very well for me. It is free to download and try for 60 days and requires a cheap license after that (there are two different price options). Highly recommended.
Here is the website link:
http://www.reaper.fm/

Libraries of audio samples (spoken text)

For a project we're currently working on, we need a library of spoken words in many different languages.
Two options seem possible: text-to-speech or "real" recordings by native speakers. As the quality is important to us, we're thinking about going the latter path.
In order to create a prototype for our application, we're looking for libraries that contain as many words in different languages as possible. To get a feeling for the quality of our approach, this library should not be made up of synthesized speech.
Do you know of any available/accessible libraries?
A co-worker just found this community based library, which is nice, but rather small in size:
Forvo.com
I've just found this on the Audacity wiki: VoxForge. From their site:
VoxForge was set up to collect transcribed speech for use with Free and Open Source Speech Recognition Engines (on Linux, Windows and Mac).
We will make available all submitted audio files under the GPL license, and then 'compile' them into acoustic models for use with Open Source speech recognition engines such as Sphinx, ISIP, Julius and HTK (note: HTK has distribution restrictions).
There is also Old time radio, not sure if this is the sort of spoken word you're after though.
My guess is that you won't find a library anywhere that consists of just individual words. Whatever you find, you're going to have to open the audio up in an editor (like Pro Tools or Cool Edit) and chop it up into individual words.
You would probably be better off creating a list of all the words you need for each language, and then finding native speakers to read them while you record. You can have them read slowly, so that you'll have an easy time chopping up each individual word.
One I use to use a lot: http://shtooka.net/index.php
Easy access to the recordings.

Resources