Looping WAV and Flac by Endymion at 4:43 PM EDT on October 17, 2018
I'm trying to loop lossless audio formats by using metadata but somehow I can't manage it. I've already did this with Ogg by renaming it to .logg file and worked perfectly. However .lflac or lwav don't loop the file and not even display the added metadata after the rename. If someone could provide a small example lflac and lwav file, it would be handy. :)

I'm using Foobar2000 with the latest vgmstream plugin.

===EDIT===

I managed to loop WAV with Wavosaur, and now I'm completelly understand how it works. However the program does not support Flac and I'm not a coder for being able to edit the Flac's header to add loop points. Is there a software for that?

edited 6:15 PM EDT October 17, 2018
by wolupgm6 at 10:14 PM EDT on October 17, 2018
I usually just add LOOP_START and LOOP_END using mp3tag. If you’re looking to find the loop points and your favourite software doesn’t support flc, you can always convert the files to WAV, find the loop points and then apply that data to the original FLAC file.
by Endymion at 8:30 AM EDT on October 18, 2018
Yes, that is all I can do. I had hopes for a solution for editing Flac tags thus no converting required. By the way LOOP_START and LOOP_END not works with wav for me, only Wavosaur can insert the loop points. Ogg vorbis works with manual loop points though. Calculating loop points isn't a problem, I did that all the times when I created all of my 1 hour extends for YouTube.
by bxaimc at 12:37 PM EDT on October 18, 2018
Currently, vgmstream has this sort of wacky hacky thing I sort of added. Create an 8 byte .pos file with both loop start and loop end values stored as 32bit little endian values and follow the naming scheme:

Song.lflac (just add l to flac)
Song.lflac.pos

edited 12:38 PM EDT October 18, 2018
by Endymion at 2:15 PM EDT on October 18, 2018
Okay, thank you for the solution. :)
by Endymion at 3:08 PM EDT on October 20, 2018
Seems like I doing something wrong because it not work. The WAV can be looped without .pos file, but I can make neither WAV or FLAC files to loop with .pos file. Maybe I should add something other than just the loop points?

<LOOP_START>=198346
<LOOP_END>=4427427

This is everything I saved for the .pos file as well renamed the FLAC to LFCLAC. The filenames match one enother except for the extra .pos extension.
by datschge at 4:46 PM EDT on October 20, 2018
@Endymion: Is that the content of your .pos file? If so you are doing it wrong. It contains just two 32bit little endian values, nothing else. So the .pos file is exactly 8 bytes in size. You'd create it with a hex editor, not notepad.
by Endymion at 4:58 PM EDT on October 20, 2018
I used a .sli file for example because I don't know anything about these things. Normally I loop only Oggs by creating .logg files but nowdays most of the digital releases makes up from FLAC files and while I don't really care about lossy or lossless encode if the file is already lossless I don't want to ruin its quality even a bit.

Could you link an example .pos file? Maybe I can create mine based on that.
by ArcticJaguar725 at 6:19 PM EDT on October 21, 2018
So, let's say we had a .lflac file that had the loop points you provided above (<LOOP_START>=198346, <LOOP_END>=4427427).

In order to create a .pos file for the loop points, You'll first need to convert the loop points to hexadecimal, or base 16 (try Google). So in this case, you would be left with 306CA and 438EA3 for the respective points.

Secondly, you need to convert the points to little endian by swapping the order of the bytes. Each character of hexadecimal is 4 bits, so two characters make up a byte. So big endian hexadecimal points would look like this: 00 03 06 CA, 00 43 8E A3. A little endian conversion would appear as follows: CA 06 03 00, A3 8E 43 00.

Finally, you need to input the points into the .pos file using a hex editor. Using a program like Notepad will not work. Anyway, the hexadecimal contents of the file will look like this:
CA 06 03 00 A3 8E 43 00

IF you were to open the .pos file in Notepad, it would look like absolute gibberish, or more specifically:
ۊ躣C

ALSO: When making the .pos file, make sure the file name includes the .lflac extension from the audio file preceeding the .pos extension.

edited 6:24 PM EDT October 21, 2018
by Endymion at 9:22 PM EDT on October 21, 2018
Thank you for the help. The explanation was clear and I tried it with multiple FLACs with different starting and looping point and it works. You helped a lot.


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source