📜 ⬆️ ⬇️

Console Audio Tools - a console utility for working with audio files


Hello, dear habr!

Many of us performed various kinds of audio file manipulations. Often you want a lot more than the standard Windows tool called "Recording Sound". Here come to the aid of specialized tools, free and no, which is not a problem to find. But what if you need to perform very specific operations. So specific that the tools for their implementation is still worth looking for? What could it be for operations? What tools are used for this? This will be discussed in this article, it is also a review of the development of the author of the article.


Intro


I would like to begin my narration with a preamble, which will explain well the prerequisites that led me to the development of this software, but in the process it turned out that it has no analogues. But more about that later ...
I work as a programmer and in spite of this I listen to hard music (yes, there are programmers listening to hard music), and due to these circumstances I have for quite a long time a rather expensive hobby - collecting it into physical. carriers. And since some things are rare enough for any impact on them, except for storage in the box, I create copies of disks and tapes for listening to them on the computer from the hard disk, which eliminates such an unpleasant moment when the last album left all over the world heard to the holes and just erased the laser drive :)
This is not a very easy process carried out by ripper programs, which, as a matter of fact, simply remove sound from a disk in WAV format from a disk, and as a rule, to save space, compress it without loss (APE, FLAC, ALAC), or with losses (mp3 and other less common). This process can be compared with the production of well-known disk images. In fact, the process of taking images from audio disks is similar to taking images from data disks, but in the case of audio, the ripper still monitors errors and data integrity and creates a CUE map, which allows you to cut one large image into separate tracks on the fly right when playing, therefore, the advantage of rippers taking images (which requires some knowledge and experience) over the simple way of the disc does not even provide for any discussion and is the de facto standard in a diverse world of music. The resulting files are called rips, from which comes the name of this group of programs. Needless to say, in order to preserve your collection from being destroyed by merciless time, you need 100% copies of materials. Especially with a fine and thoughtful setting used for this codec, you can achieve almost 50% compression of audio material with subsequent unpacking without any loss in quality (according to the principle of zip archives).
These programs are not so many, because few are concerned about the preservation of audio materials (obviously, there is nothing to save). In any case, the Exact Audio Copy program has been the undisputed and unchallenged leader for several years, thanks to its paranoid subtlety of settings. Indeed, this product is extremely difficult to configure for beginners, its optimal parameters for removing the most accurate rips take up several pages, and when you 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 behind, and the process will go as you decide.
Well, the program is fine, the rip is done, but in order not to be a brown mass, sometimes it’s worth sharing your masterpieces with others (let's leave behind the scenes the exclamations of the right holders and we’ll assume that most of the rarest things don’t have right holders a way to protect them from destruction. But more or less modern and well-known things to copy and upload to the Internet is not only illegal, but also a demonstration of disrespect for the work of these groups). As a rule (except for sending in PM to Vkontakte to his girlfriend) this is done by laying out in some well-known file exchange networks and torrent trackers, where they really care about the quality of rips made.
')

Duck about what the whole article?



Yes, yes, I feel that you are no longer eager to rush into battle with her, but we are already gradually revealing its main functions. It often happens that under the file in the WAV format they spread mp3's, pumped up from the free Internet by the father from work. This was especially practiced several 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, this slag was laid out, which even my mother will not listen to! Such cases sometimes happen now, but due to a more thorough check of the quality of the rips, this phenomenon as a whole has come to nothing.
There is another kind of problem. It is logical that the quality of the ripper setting affects the quality of the rips being shot. If improperly configured, a rip can be removed incorrectly, which will be fraught with very harsh clicks (due to skipping or layering of samples), repetition of sound sections after a certain time (if the disc mark toc is damaged) and other very noticeable and unpleasant moments. which can greatly interfere with the enjoyment of the most cruel tin, which can only be imagined, so often pouring out of my powerful speakers while working! : /
And we came to the most important thing: how, after removing the rip from the disk, be sure that it was shot correctly? Or another example: as an administrator (or users) of a popular resource, understand that% username% pours slag in the form of completely unheard of things, and immediately push the administration about it, which, they say,% oldname plays around with old gramophone records! Not a problem, you say, because the admin can download the records posted by the user% username% and listen to them in the evening, relaxing after work, on which he, too, didn’t strain too much ... But bad luck, the admin listens exclusively to music for real men, therefore flatly refuses to listen to the rips of Nadezhda Kadysheva's disks! Pichal. Maybe then try to check the quality of these rips, without listening to them?
Yes! For this, there are utilities called checkers. Their main purpose is clear from their name - to try as best as possible to determine the quality of the rip. There is no one method for this, since several factors are checked by different methods: it is reading and comparing checksums of files, building audio spectra and analyzing the frequency of the received audio stream. Of course, if the rip has already been created incorrectly, no program can accurately identify the problem (this can only be done by the human ear), but definitely, if you have the relevant knowledge and experience, the ability to read the received frequency spectra and analyze the output data, you can determine that is available. Sometimes for this purpose it is enough even to simply view the log that is created by the ripper program for each rip it has made. He can show that the program is set up incorrectly, which already clearly indicates that the rip does not have a high degree of fidelity.
There is also a phenomenon called “upconvert”, in which ordinary mp3 files are simply converted to WAV and can even be compressed with corresponding codecs. It looks quite decent in appearance, but the characteristics of the output file remain unchanged. In this case, with almost 100% probability, the checkers will help us determine that the WAV file is in fact not something that it is trying to expose itself.
Fine! We have a goal. Now let's deal with the tools to achieve it. But that's bad luck: often they are all console, as well as very scattered. It can be said that there is no normal tool for such purposes. Of course, they are there, but as a rule, many sometimes unnecessary actions are required, 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 bother with utilities for advanced 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 maximum convenience at work and the minimum number of actions. Therefore, in addition to heavy music, I really love console utilities. Judge for yourself: we throw the utility where it is necessary, we write a simple batch file for it, pull the necessary file onto 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 this research and manipulation was the software for working with audio files Console Audio Tools.
Yes, somehow it turned out that the article was only about the unknown to most things like checking the quality of audio rips, so to eliminate this annoying shortcoming, it’s worth telling that she can still. And she can do a lot. Let's find out its characteristics and the tools it uses:

- Converting audio files (convert SoX package tool): Although I am an ardent supporter of the original quality without loss, but sometimes I have to resort to converting it, although with inevitable losses. For example, your girlfriend is just crazy about the team of romantic young boys from the team Cannibal Corpse, singing about Luboff. But it’s annoying that she can’t master quite specific methods of working with images of audio CDs, preferring to use good old mp3s. Not a problem, transfer them to mp3 with a couple of clicks. In the literal sense of the pair: /

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

1) The decoding of the compressed file to WAV (if necessary) using flac or ape utilities, depending on the format of the rip.
2) Acquire and write to the sha1 hash file of the audio file. This process is carried out by the shell itself.
3) The resulting file is cut into tracks on the CUE map, if any.
4) Each track is checked by aucdtect utility for compliance with the WAV format. Record the result for audio rips recorded on the screen. If you check a regular audio file - the data it receives is displayed on the screen.
5) The spectrum of the audio file is created using the spectrum tool of the SoX utility in png format.
6) The analysis of the rip removal log is performed for compliance with the required ripper settings. This process is carried out by the shell itself. R word, for this simply 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 just in time. By the way, this opportunity is where it all began .

- Create profiles for external ripper encoders. . It is possible to perform all the above actions automatically right when removing a disk rip.

- Cutting audio files by CUE (shntools package split tool). Perhaps I will tell about it later ...

And in order to somehow dilute the review, its screenshots are offered to your attention. Do you like screenshots? I also love skin shots. Screenshots of the printing of my any drives. But I got distracted ... Let's go!


The main window of the program. That minimalism that I like so much.


Check the log made rip audifayla. How many mistakes! Probably, this rip was downloaded from the same poor-quality file exchanger! I'd rather order a disc on Amazon and rip it off myself.


Check the quality of a separate audio file. Here is an outrage! Under the guise of WAV we slipped nasty mp3! And the program does not even doubt it (95%)!


Let's try again? And here we are incredibly lucky! Before us was pure WAV!

This was a review, it’s my memoirs, and it’s a small excursion into an interesting and informative musical world.

Listen and love music!

See you later.

Source: https://habr.com/ru/post/361429/


All Articles