Music looping guide using tags

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
Post Reply
User avatar
Xeotroid
Posts: 436
Joined: Sat Jun 23, 2012 7:44 am
Graphics Processor: nVidia with Vulkan support
Location: Czech Rep.

Music looping guide using tags

Post by Xeotroid »

If you ever made music for your mod that isn't MIDI, you probably wondered how to make the end and beginning connect well to each other without a big silence, killing the action. This isn't a big deal for music that has a real finishing part or an ending, the problem is when the music needs to be looped.
WARNING: THIS IS SUPPORTED ONLY BY OGG VORBIS AND FLAC FORMATS, NOT MP3

What we will need:
  • A music track
  • Audacity and basic knowledge of working in it
THE WRONG WAY:
Spoiler:
So, how do we make the music loop seamlessly everywhere except the first few seconds? Very easily, using ZDoom's audio tags.

THE RIGHT WAY:
Spoiler:
I hope I helped you and that I made this understandable. Trying to formulate a guide is harder than I thought (k, begging for forgivenness is over)!
Last edited by Xeotroid on Sun Apr 19, 2015 8:57 am, edited 4 times in total.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Music looping guide using tags

Post by Nash »

I need to try this. Have always wondered how to create loop points in non-tracker music.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Music looping guide using tags

Post by Gez »

This lacks a wikilink to [wiki]audio loop[/wiki].
User avatar
Xeotroid
Posts: 436
Joined: Sat Jun 23, 2012 7:44 am
Graphics Processor: nVidia with Vulkan support
Location: Czech Rep.

Re: Music looping guide using tags

Post by Xeotroid »

Gez wrote:This lacks a wikilink to [wiki]audio loop[/wiki].
Right, I forgot about that, thanks ;)
User avatar
Zanieon
Posts: 2059
Joined: Tue Jan 13, 2009 4:13 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Somewhere in the future
Contact:

Re: Music looping guide using tags

Post by Zanieon »

Hmm i didn't saw this before but i have to say that
Actually i'm very professional on making those loops :)

Well i didn't used those tags on them, but make a intro and make a loop from a point isn't a prob for me
User avatar
XanderBFG
Posts: 4
Joined: Tue Mar 20, 2018 3:32 pm
Graphics Processor: ATI/AMD (Modern GZDoom)
Location: Chile

Re: Music looping guide using tags

Post by XanderBFG »

IT WORKS! I have searched many places on how to repeat my custom music in gzdoom and you saved my life.Thank you so much! :)
fredistehboss
Posts: 3
Joined: Wed Mar 11, 2020 3:19 pm
Graphics Processor: nVidia with Vulkan support

Re: Music looping guide using tags

Post by fredistehboss »

XanderBFG wrote:IT WORKS! I have searched many places on how to repeat my custom music in gzdoom and you saved my life.Thank you so much! :)
How does ZDoom know where to line up the music track? Am I missing something here? Is this just to make it closer to gapless or something?
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Music looping guide using tags

Post by Gez »

fredistehboss wrote:How does ZDoom know where to line up the music track? Am I missing something here? Is this just to make it closer to gapless or something?
You're missing on reading the [wiki]audio loop[/wiki] link.
fredistehboss
Posts: 3
Joined: Wed Mar 11, 2020 3:19 pm
Graphics Processor: nVidia with Vulkan support

Re: Music looping guide using tags

Post by fredistehboss »

Gez wrote:
fredistehboss wrote:How does ZDoom know where to line up the music track? Am I missing something here? Is this just to make it closer to gapless or something?
You're missing on reading the [wiki]audio loop[/wiki] link.
Okay so I read it, I'm just having a hard time understanding it. I see that you create "tags" to mark the times of the track.
But how it would "sound" for a song that isn't intended to loop? I'm trying to imagine it is all. When I have time to try it I will.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Music looping guide using tags

Post by wildweasel »

You'd have to specify exactly where in the song you want the loop to start and end. This will, naturally, depend largely on the song itself, and not all songs will loop gracefully no matter what you do with them.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Music looping guide using tags

Post by Gez »

fredistehboss wrote:Okay so I read it, I'm just having a hard time understanding it. I see that you create "tags" to mark the times of the track.
But how it would "sound" for a song that isn't intended to loop? I'm trying to imagine it is all. When I have time to try it I will.
This is just the way you tell the engine at which points the song loops. Of course, that means you have to find these points yourself -- the engine cannot possibly try to guess. Without such points, the behavior is to loop back to the start of the audio file once the end of the audio file is reached. And of course, if a song isn't intended to loop, it's possible that there isn't any point where a loop would sound good -- in that case, the best scenario is to allow the song to end and then to restart normally. Loop points are for songs that can be made to loop; don't expect miracles.
Post Reply

Return to “Tutorials”