Console Audio Tools - a package of utilities for checking and converting audio files



    Hello, dear Habr!

    Many of us performed various kinds of manipulations with audio files. Often here you want a lot more than the standard Windows tool called “Sound Recording” allows. Here specialized tools come to the rescue, paid and free, which is not a problem to find. But what to do if very specific operations are required? So specific that the tools for their implementation are still worth looking for? What kind of operations can these be? What tools are used for this? This will be discussed in this article; it is also an overview of my new product.

    Intro


    I would like to start my story with a preamble that will well explain the premises that encouraged me to develop this software. In the process, it turned out that it has no analogues. But more about that later ...

    I work as a programmer and despite this I listen to heavy music (yes, there are programmers listening to heavy music), and due to these circumstances I have long had a rather expensive hobby - collecting it for a physical person. carriers. And since some things are too rare for any effect on them, except for storage in a box, I create copies of disks and tapes for listening to them on a computer from a hard drive, which eliminates such an unpleasant moment when the last album left around the world turned out to be heard to the holes and just worn out with a laser drive.



    This not-so-easy process is carried out by ripper programs, which, in essence, simply remove the sound in WAV format from the disk, and, as a rule, to save space, compress it without loss (FLAC, ALAC, APE), or with losses ( mp3, ogg, wma and other less common). This process can be compared to obtaining well-known disk images. In fact, the process of taking images from audio disks is similar to removing images from data disks, but in the case of audio, the ripper program also controls errors and data integrity and creates a CUE card, which allows you to cut one large image into separate tracks on fly right during playback, so the advantage of taking images with rippers (which requires some knowledge and experience) over a simple disk image does not even provide for any discussion and is the de facto standard in the world of music. The resulting files are called rips, where the name of this group of programs comes from. There is no need to say that in order to save your collection from destruction in a ruthless time, you need 100% copies of the materials. Especially with the optimal configuration of the codec used for this, it is possible to achieve almost 50% compression of audio material with subsequent unpacking without any loss in quality (by the principle of zip archives).

    Hmm ... This is perhaps very important ... And how can this be done?


    There are not so many data programs, for few are concerned about the preservation of audio materials (obviously, there is nothing to save). In any case, the absolute and unchanging leader for several years here is the program Exact Audio Copy, due to its simply paranoid subtlety settings. Indeed, this product is extremely difficult to configure for beginners, its optimal parameters for removing the most accurate rips take several pages, and at the first start you need to carefully check them as with a pre-flight magazine. But it's worth it, because here you are sure that nothing is left overboard, and the process will go as you decided.

    Well, fine, the program is tuned, rip done. But in order not to be a brown mass, sometimes it’s worth sharing your things with others (let’s leave behind the exclamations of copyright holders and say that we are talking about most of the rarest things that no longer have copyright holders, and this is the only way to protect them from destruction by time or from banal nonexistence, but more or less modern and well-known things to copy and upload to the Internet is not only illegal, but it is also a demonstration of disrespect for the work of these groups). As a rule (in addition to sending Vkontakte to your girlfriend in PM) this is done by uploading it to some well-known file-sharing networks and torrent trackers, where they take great care of the quality of the rips made.

    What is the article about?


    Yes, yes, I feel that you can’t wait to start working with disk images from your collection, but we are already gradually revealing the main functions of this software. It often happens that under a WAV file upload mp3 downloaded from the free internet from my dad from work. This was especially practiced a few years ago when RuTracker still had a rating that doubled with the author if his distribution was popular and well distributed. Therefore, under the guise of good and high-quality rips, a slag was laid out that even my mother would not listen! Such cases sometimes occur even now, but due to a more thorough quality control of rips, this phenomenon as a whole has come to naught.

    There is another problem. It is logical that the quality of the rips is affected by the correctness of the ripper settings. If improperly configured, the rip may not be recorded correctly, which will result in the production of extraneous sounds in the form of clicks (due to skipping or layering of samples), repetition of sound sections after a certain time (if the toc disk layout is damaged), and other points that can interfere greatly when enjoying the most fierce gesture that you can imagine, so often pouring during work from my powerful speakers! : /

    And we came to the most important thing: how, after removing a rip from a disk, to be sure that it is removed correctly? And how does the administrator (or users) of some popular resource understand that% username% is pouring slag in the form of completely inaccessible things, and immediately trick the administration about it, saying that, they say,% username% indulges in old voice recorders! Not a problem, you say, because the admin can download the% username% records posted by the user and listen to them in the evening, relaxing after work, on which he also didn’t bother too much ... But it’s bad, the admin listens exclusively to music for real men, therefore refuses to listen to the rips of the discs of Philip Kirkorov!



    Pichal. Maybe then try to check the quality of these rips without listening to them? Of course! For this, there are utilities called checkers. Their main purpose is clear from their name - to try as much as possible to determine the quality of the rip. There is no one technique for this, as several factors are checked by various methods: reading and comparing file checksums, creating audio spectra, and analyzing the frequency of the resulting audio stream. If the rip has already been created incorrectly, no program can accurately determine the problem (only the human ear can do this), but definitely, with the appropriate knowledge and experience, the ability to read the received frequency spectra and analyze the output, you can determine that the problem exists. Sometimes for this it’s enough just to look at the log, which is created by a ripper program for every rip he makes. It can show that the program is not tuned correctly, which is already clearly hinting that the rip is not very faithful.

    There is also a phenomenon called “upconvert”, in which ordinary mp3 files are simply converted to WAV and can even be compressed with the corresponding codecs. In appearance, everything looks quite decent, but the characteristics of the output file remain unchanged. In this case, the checkers with almost 100% probability will help us determine that the WAV file is not really what it is trying hard to expose itself.



    Excellent! We have a goal. Now we will deal with the tools to achieve it. But this is bad luck: often they are all cantilever and also very fragmented. It can be said that there is no normal tool for such purposes. Of course they are, but as a rule they require many, sometimes unnecessary actions, because operations of this kind are usually monotonous, and do not require constant changes in conditions. But we can’t wait to listen to music, because we have no time to mess with utilities for cool computer scientists, right? Therefore, I will be brief: once I decided that why not combine the console utilities necessary for this into one convenient and simple shell? To be honest, I myself am a supporter of the maximum convenience at work and the minimum number of actions. Therefore, in addition to heavy music, I really like console utilities! Judge for yourself: we throw the utility where necessary, write a simple batch file for it, pull the desired file on it, the console opens and the necessary actions are performed. Beauty! Well, the maximum you can press y / n or numbers to select the desired action ... In general, the result of these studies and manipulations was software for working with audio files Console Audio Tools.

    Something else?


    Yes, somehow it turned out that the article was only about things unknown to most, such as checking the quality of audio rips, so to eliminate this annoying drawback, it’s worth saying that she can do it again:

    Convert audio files(SoX package convert tool). Although I am an ardent supporter of the original quality without losses, sometimes I have to resort to its conversion, albeit with inevitable losses. For example, your girlfriend is just crazy about the collective of romantic young boys from the Cannibal Corpse collective singing about louboff. But it’s annoying that she can’t learn enough specific methods of working with images of audio disks in any way, preferring to listen to good old mp3s, refusing to even listen to what a terrible evil this is! But we don’t want to spoil relations with her because of such a trifle, right? Not a problem, transfer them to her in mp3 a couple of clicks. In the literal sense, a couple: /

    Checking the quality of audio files . For rips, the operation is performed in several stages, which differ slightly depending on the file format opened in the program:

    1) The compressed file is decoded in WAV (if necessary) by flac or ape utilities, depending on the rip format.
    2) Receive and write to the sha1 hash file of the audio file. This process is carried out by the shell independently.
    3) The resulting file is cut into tracks on the CUE card, if any.
    4) Each track is checked with auCDtect for compliance with the WAV format. Recording the result for audio rips is written to a file. If a regular audio file is checked, the data it receives is displayed on the screen.
    5) The creation of the spectrum of the audio file is carried out with the spectrum tool of the SoX utility in png format.
    6) The rip removal log is analyzed for compliance with the necessary ripper settings. This process is carried out by the shell independently. To do this, just open the log file in the program.

    Creating spectra of audio files . If you are a fan of analyzing something, this function will suit you very well. By the way, this opportunity is where it all began .

    Creating profiles for external ripper encoders . All of the above actions can be done automatically right when you remove the rip disk.

    CUE audio file slicing (shntool package split tool). Perhaps I will say more about this later ...

    And in order to somehow dilute the review, its screenshots are offered to your attention. Do you like screenshots? I also love screenshots. Printing screenshots of my any disks! But I was distracted ...



    The main window of the program. This is the first thing you see when opening an audio file in the program.
    The minimalism that I like so much!



    Check the log of the ripped audio file. How many mistakes! Probably, this rip was downloaded from the same low-quality file hosting! Thanks! Better I order a disc on Amazon and rip from it myself ...



    Check the quality of a separate audio file. What a mess! Under the guise of WAV we slipped a vile mp3! And the program does not even doubt it (95%)!



    Will we try again? Excellent! Here we are just incredibly lucky! Before us was clear water WAV!



    For those who like to perceive sound not only with their ears: SoX builds great spectra! The image is clickable.

    Well, and what kind of program review can do without a link to a project in SourceForge ?

    Outro


    Here is such a review, it’s my memoirs, and it’s a short excursion into the interesting and informative music world.

    Listen and love music and programming!

    See you.

    Also popular now: