Subject:Illegal Sample Loop Error???
Posted by: Illogical
Date:1/25/2007 4:24:33 PM
I opened up some loop files someone sent me in Sound Forge 8 and I got the following error on every single file: 'This file contains an illegal sample loop. The file has been corrected.' What the heck? What does that mean? At first glance it would seem to imply that the loop is taken from a commercial record or something, but I don't think that's the case and I have no idea how SoundForge would even know if it was. Can anyone explain? Thanks in advance!!! |
Subject:RE: Illegal Sample Loop Error???
Reply by: MarkWWWW
Date:1/26/2007 5:27:30 AM
I'd guess that the file contains (or at least SF8 believes it does) some chunks containing loop information, and that the information is illegal in some way - loop length longer than the audio itself, or start or end points outside the audio, or something like that. Have a look at the file in a wav chunk viewer like riifview and you may be able to identify the rogue data. Mark |
Subject:RE: Illegal Sample Loop Error???
Reply by: Illogical
Date:1/26/2007 2:00:44 PM
Thanks, but it's strange that the manual makes no mention of this error (nor does this forum). Your explanation would make sense to me if the word sample wasn't in the error message. They are all 44.1k, 16-bit .wav files. They loop fine when I preview them in Acid. And they seem fine once SoundForge opens them and has me 'OK' out of the error message, but they've been changed somehow because it asks me if I want to save changes. Anyone else seen this? |
Subject:RE: Illegal Sample Loop Error???
Reply by: MarkWWW
Date:1/27/2007 5:41:33 AM
Post one of the wavs somewhere and I'll see if I can determine what is causing it. Mark |
Subject:RE: Illegal Sample Loop Error???
Reply by: Illogical
Date:2/2/2007 3:44:10 PM
MarkWWW sorted me out...he's given permission to post his diagnosis, which may be of help to others: "Well, it is just as I expected - these three wav files all have a "smpl" chunk which contains illegal data, specifically both the loop start and loop end points are set to point to a very large value (FFFFFFFF), so large that it is way beyond the end of the file. Sound Forge quite rightly objects to this and helpfully fixes the problem by doing the best it can - it sets both the start and end values to the nearest legal point, i.e. to the end of the file. That is why you see a sustaining loop at the very end of the file. If you right click on the loop marker (actually it's two markers defining a region, but because they are both set to the end of the file it looks like only one marker unless you zoom right in) and choose Edit... you will be able to see the (corrected) loop information. Most wav file players/editors won't understand the "smpl" chunk and will just ignore it. Even Acid will ignore this chunk as it has its own rather different arrangements for looping, involving the "acid" and "strc" (stretch) chunks, which is why you don't notice anything amiss when you preview the files in Acid. But proper editors like Sound Forge are aware of the "smpl" chunk and will work with it if the data is correct and object if it is not. (The first part of the Looping chapter in the Sound Forge manual discusses the kind of loops that are defined using the "smpl" chunk. The second part discusses the rather different way Acid loop information is defined.) Actually there is another possible problem with these files - each of them actually contain more sample data than the "data" chunk header says they do. You can see this if you open the files in RAW mode - you will see that there is a fraction of a second more data than is shown when you open them in normal WAV mode. This won't be a problem in any well written wav file players/editors as they will correctly use the length specified in the "data" chunk. But I have come across a few badly written editors/players in the past which just assume that everything from the start of the "data" chunk onwards is valid audio data and play it all. When investigating these kinds of things, as well as a standard hex editor/viewer it is helpful to have a suitable riff parser to identify the information in the various chunks in the wav file. Something like Riffed from http://www.alpha-ii.com/ is very useful. Together with some documentation on the various chunks found in wav files, e.g. that to be found at http://www.borg.com/~jglatt/tech/wave.htm, you should usually be able to identify what is going on. Hope that is of some help." THANKS AGAIN, MarkWWW, much appreciated!!! |