Hi! There is a somewhat meaningfull comparison, that is used also in the mpeg standard: the rms (root mean square) value of the difference. That is, you compare two files by: comparing them sample by sample, compute the square of each difference, add up the squares, divide the sum by the number of samples and take the square root again. If you think of the difference between a modified signal and the original signal as noise, in a sense this is the average of the noise. In the standard, the rms value is used to specify the maximum noise a decoder is allowed to produce (due to numeric inaccuracies), if it is a standard compliant decoder. This measure of noise does not say much about, whether you can hear the noise. If you do not hear 20000Hz, and many do not hear this, you can add an almost arbitrary amount of noise at this frequency and you still dont hear the difference (unless you amplifier freaks out on the overload).
I do have a C program that computes the rms value of two files, that contain samples as HEX values (ascii), if you want, I can send it to you. Martin Ruckert Paul Dejean wrote: >>This is impossible. Only your ears can tell you which sounds closest, >>and other measures of "closeness" are useless for any purpose. > > I disagree. > > It is possible to see how different two files are from each other. > For example if you have a 3 byte file (in hex): > 0F 8E 46 > > It would be permissible to say that: > 0F 8C 45 > > Was more similar to the first file than: > 0F 82 45 > Because the values are closer. > > Maybe it might be possible to convert wav -> mp3 -> wav twice (using > different encoding settings) and compare the two wav outputs with each > other and with the original and seeing which one more closely > resembled the original in a similar method. I don't know of any > program that could do this though, although writing one doesn't seem > to be that hard if the two wavs your comparing are the exact same > number of bytes. > The program could go byte by byte and compare the value of the new wav > with the original wav, get the absolute value of the difference and > add all the values for the different bytes together. This would give > you a "score" in a way. > > However Alexander is right when he says that it wouldn't give the > actual difference between the two files, only the technical > difference. Music is much more then mere data. > > Finally my lurking finished :D > ~= sciwzard =~ > _______________________________________________ > mp3encoder mailing list > [email protected] > https://minnie.tuhs.org/mailman/listinfo/mp3encoder -- ------------------------------------- Prof.Dr.Martin Ruckert Munich University of Applied Sciences FB07 Mathematics and Computer Science Lothstrasse 34 D-80335 Munich GERMANY _______________________________________________ mp3encoder mailing list [email protected] https://minnie.tuhs.org/mailman/listinfo/mp3encoder
