No, if f = 1f = 1 - f sets f to 0, f || f++ sets it to 1
Quote:
Aha, but why not just process the current data?
Because we don't know where the logical record ends,
we know only where it begins (for mp3s we could use the empty line as a record separator, but not for flacs, this code handles both types).
---------- Post updated at 02:33 PM ---------- Previous update was at 02:32 PM ----------
Quote:
Originally Posted by MrZehl
Thanks for the explanation.
So it's just a complex way to say 'f=1-f'.
Or if it's possible in awk: even shorter f=!f
[...]
Hmm isn't it possible to include echo 'start' and echo 'end' in the exec part of find? If you can process the current data, the part after 'END' can be removed.
Maybe even something like echo 'start %filename'; id3 -Rl .. ;echo 'end %filename'. That would make more flexible too, because it makes it possible to to add other formats which maybe have no option to output the filename itself.
Yes, you heard it.. other formats.
I'll gonna play with this code and try to make support it even more formats.
Hmm isn't it possible to include echo 'start' and echo 'end' in the exec part of find? If you can process the current data, the part after 'END' can be removed.
Maybe even something like echo 'start %filename'; id3 -Rl .. ;echo 'end %filename'. That would make more flexible too, because it makes it possible to to add other formats which maybe have no option to output the filename itself.
This is not possible with the current implementation, because for performance reason I'm passing 1000 or more filenames at a time to id3 and metaflac.
So you'll end up with:
And then we process all the data with a single awk invocation.
It could be easily modified in order to process one file at a time,
but the performance will be very different.
But why the END block bothers you in the first place?
Quote:
Yes, you heard it.. other formats.
I'll gonna play with this code and try to make support it even more formats.
This is not possible with the current implementation, because for performance reason I'm passing 1000 or more filenames at a time to id3 and metaflac.
It could be easily modified in order to process one file at a time,
but the performance will be very different.
But why the END block bothers you in the first place?
In the latest version there is only an extra function call, so it's no big deal anymore. Before that it was a lot of extra code. I don't know yet if that will be a problem with the other formats yet. If filenames can be included in the output there should be no problem.
Only I like to have things clear, so I prefer to process current data instead of processing data of the file before this. Just seems neater. And prevents bugs. The wrongly reported mp3 file was because of this. But now it works so it's okay.
But I just need to understand the find part.
What makes that you send all files in one go? I thought the exec command did always all files one by one. Appearently I'm mistaken here. Please enlighten me.
How should this line look like if the files are sent one by one?
And if added echo start and echo end, how should that look like? Maybe I don't need it know, but I'll like to understand this.
Last edited by MrZehl; 12-22-2010 at 10:59 AM..
Reason: typo
Only I like to have things clear, so I prefer to process current data instead of processing data of the file before this.
Just seems neater. And prevents bugs.
I agree, make it clear and avoiding bugs are valid reasons.
The only problem is that often you could just not afford it,
because of the input format.
Quote:
What makes that you send all files in one go? I thought the exec command did always all files one by one.
I'm using a particular syntax. This one process the files one by one:
Thanks. It seemed I needed that for ogg files. I added support for ogg and it works.
I renamed the mp3 and flac variables to id3 and vorbis, which are the names of the tag format. And I messed up the output the get it on one line which makes it easier to count the list. It's more compact now. Sorry for that.
To squeeze it a little more.. would something like this be possible?
Oh.. I found 16000 invalid audio files. I guess I'll need a script that can fill most of them automaticly.
I have a lot number audio files in the MP3 proprietary format, I want to convert them to 'opus' the free and higher quality format, with keep metadata also.
My selection command-line programs are SoX (Sound eXchange) for convert MP3 files to 'AIFF' format in order to keep quality and metadata*... (1 Reply)
Hi All , I have seen a lot of code samples which suggest how to remove the junk data from and XML , I need a code in unix which removes the junk characters as well as the valid characters those are not in XML tags , for example my XML is as follows :
<?xml version="1.0"... (6 Replies)
I'm trying to record audio using Audacity 2.0.5 installed from SlackBuilds. My system is 64-bit Slackware 14.1 and a sound card is Intel HD Audio. I didn't change my sound system to OSS. (Default sound system in Slackware 14.1 is ALSA, isn't it?) First, I set Internal Microphone slider in KMix... (2 Replies)
Hi All,
I have next to zero knowledge on what I am about to ask so I will just ask it in plain English :)
I am wondering how best to go about manipulating audio files server side. The manipulations required are join files one after the other, eg, audio1 + audio2 + audio3 + audio4 = audio5
... (0 Replies)
I am having following folder structure.
/root/audios/pop
/root/audios/jazz
/root/audios/rock
Inside those pop, jazz, rock folders there are following files,
p1.ul, p2.ul, p3.ul, j1.ul, j2.ul, j3.ul, r1.ul, r2.ul, r3.ul
And I have a file named as "audio.txt" in the path /root/audios,... (11 Replies)
Hi, I would like to write a shell script that will:
-search the files of a specific user to find any audio files with a bandwidth iqual or greater than 192 kps
- on the results i should see the file name along with all the whole file route and each file's size
So I guess i should be using... (1 Reply)
Hi All,
Looking for an assistance on how to access the speakers of my machine and play audio files using C.
Any tutorials will be of great help.
Regards,
Sayantan. (1 Reply)