# How is loop information encoded in FLAC files?

I'm trying to convert .wav files (samples for a sampled instrument) into FLAC format. The .wav files have loop information in the smpl chunk. I understand that various sample players support loops in FLAC files. However, I can't find a converter that converts .wav to .flac and preserves the loop information. I could code it myself (say, by postprocessing results from SoX), but can't find any information on how loops are encoded in FLAC files.

I'm using this for sampled instruments with hundreds of .wav files and so need to be able to do batch processing.

Sorry if this is the wrong forum. It's not quite stackoverflow or sounddesign.

The information is in the flac file format specifications. Look up seekpoints or cues based on what suits better for your purpose.

• I couldn't find in the documentation where it said that seekpoints could be used to specify a loop. Fortunately, I did find that the flac command line tool supports --keep-foreign-metadata and that works for my purpose. – Jeff Learman Apr 24 at 14:01