Xonotic is a free, open source (GPL) ultra-fast, first-person shooter


Follow Xonotic on

Poll: Is it possible in the current version? (please be serious)
Nope
Yay
Nope, but I gotta code it!.
Nope, and I think this is 5h1+
Nope, can someone implement this please?
Yay, I'am gonna show you how to do that
Yay, we do this all the time! Don't you know?
[Show Results]
Note: This is a public poll, other users will be able to see what you voted for.
Post Reply 
Custom music looping! [SOLVED]
05-01-2010, 01:48 PM (This post was last modified: 06-14-2010 10:19 AM by unfa.)
Post: #1
Music Custom music looping! [SOLVED]
Hey all!

Is there any way to set up a custom looping points for music tracks?
For example I want my track to loop from the end to 0:25, not the beginning.

Can I do that in Xonotic?

Also:
Is it possible to layer two instances of music track?
I mean...
the whole track: ##A#######B+-,.
I want it to loop from point A to point B but without cutting the fadeout that continues after point B. It would loop freaking seamlessly that way!

the first instance: ###########+-,.______--#########+-,.
the second one: _____________--#########+-,.__________

It goes like that:
1. the game starts first instance is being played from the beginning (with intro)
2. first instance reaches it's B point, so...
3. second instance is being lauched from it's point A and both are layered
4. second instance reaches it's B point so...
5. first instance that ended earlier is raised again from point A and...
6. it continues from line 2

[Image: BSF48.png][Image: HMITP48.png][Image: S48.png][Image: TLT48.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
05-01-2010, 05:54 PM (This post was last modified: 05-01-2010 06:13 PM by The mysterious Mr. 4m.)
Post: #2
RE: Custom music looping!
Can You try explaining this by using another program as an example? If i understand You correctly, one could run two instances of VLC Media Player, for example, or mix the tracks into one with Audacity.

Edit: Do You mean playing a track from the start, with intro, then looping a sequence within the track, discarding the intro, and mixing-in another track at some point?

4m038105
Visit this user's website Find all posts by this user
Quote this message in a reply
05-02-2010, 07:16 AM
Post: #3
RE: Custom music looping!
Hmm, let's try...

I have a VLC and empty playlist. I also have three files for one track.
Thirst track is the intro with rest of the track but without the fadeout
Second track is everything but intro, with the fadeout mixed with in beginning of it and not in the end

I place them in the playlist like that:
1. First
2. Second
3. Second
4. Second
... etc.

If VLC can play them seamlessly, you would (most likely) hear what I'am aiming for in the game.

---------

As for now the tracks are being looped from end to start. Once the track reaches it's end, it is immidietly started again from the beginning.

But what I asking for is a bit more complicated.

I don't mean two different tracks to be mixed - just two instances of the one, same track.
It is all to avoid the "moment of silece" which is a seam in looping. A smooth seam, but still.
Additionally I want the intro of the track to be played just once - at the beginning of the match. This will also give the musitians (like me) posiibility to make the music warm up the match with intro stage Smile

Someone who was playing with trackers might know what am I aiming for. It is very similiar, but requires also mixing the track's fadeout with the beginning of it's new instance to avoid the CUT effect.

[Image: BSF48.png][Image: HMITP48.png][Image: S48.png][Image: TLT48.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
05-03-2010, 03:29 PM
Post: #4
RE: Custom music looping!
I was just a little confused and unsure. This is definitely something that would be wanted.

4m038105
Visit this user's website Find all posts by this user
Quote this message in a reply
05-06-2010, 10:03 AM
Post: #5
RE: Custom music looping!
Could somebody from the devs please answer?

4m038105
Visit this user's website Find all posts by this user
Quote this message in a reply
05-16-2010, 12:20 PM
Post: #6
RE: Custom music looping!
OGG files support this, I knew about this feature thanks to divVerent. Please see what he added to the Music wiki page here

I don't know how to do this technically, but it'd nice to experiment with your track and document the process Smile
Find all posts by this user
Quote this message in a reply
05-16-2010, 05:02 PM (This post was last modified: 05-16-2010 05:25 PM by unfa.)
Post: #7
RE: Custom music looping!
I have just found this, thanks to you, mand1ga:

Quote:For this the ideal way is to find a start and end sample index, so that that region is perfectly (clickless) loopable. These can be set as LOOP_START and LOOP_END tags in the Vorbis file, and the engine will seek back to LOOP_START when reaching LOOP_END.
Seems like a bit of a solution.

[Image: BSF48.png][Image: HMITP48.png][Image: S48.png][Image: TLT48.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
05-16-2010, 06:18 PM
Post: #8
RE: Custom music looping!
Yeah, please if you managed to do that leave a brief how-to note so I can add it to the wiki. Probably divVerent already knows how to do that but I forgot to ask him today.
If you need any help just ask.

Thank you
Find all posts by this user
Quote this message in a reply
06-14-2010, 10:30 AM (This post was last modified: 06-15-2010 05:14 PM by unfa.)
Post: #9
RE: Custom music looping! [SOLVED]
(05-16-2010 06:18 PM)mand1nga Wrote:  Yeah, please if you managed to do that leave a brief how-to note so I can add it to the wiki.

It works!Not exactly the way I was talking about before but this solution is satysfying me as a musician - big thumb up for the developer who coded it! Thanks! Smile

It's easy to do with Audacity, all you need to do:

Select the region to be looped (use 'Z' key after that to snap to zero-crossing - helps eliminate looping clicks):

.png  screenshot2.png (Size: 5.58 KB / Downloads: 22)

Change to view selection start and end time to samples:

.png  screenshot3.png (Size: 4.5 KB / Downloads: 22)

Save the file adding two special tag entries: LOOP_START and LOOP_END:

.png  screenshot4.png (Size: 28.12 KB / Downloads: 22)

[Image: BSF48.png][Image: HMITP48.png][Image: S48.png][Image: TLT48.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
Music Dynamic music mechanism unfa 13 1,041 10-17-2013 11:48 AM
Last Post: unfa
  More In-game music? satuim 20 1,482 07-01-2013 08:32 PM
Last Post: satuim
  In game music player/streamer end user 1 584 05-03-2013 03:48 PM
Last Post: Mr. Bougo
  Revised in-game music player rafallus 23 3,813 05-20-2012 07:09 AM
Last Post: terencehill
Music Mastering Xonotic music for 1.0 release unfa 5 1,078 05-18-2012 08:36 AM
Last Post: Mepper
  [SOLVED] Machine gun view rocknroll237 6 818 05-14-2012 11:53 AM
Last Post: hutty
  [SOLVED] Race/CTS Help! rocknroll237 10 1,782 02-09-2012 11:24 AM
Last Post: rocknroll237
  A music track. Unbreakable 12 2,783 07-21-2011 03:47 PM
Last Post: Unbreakable
  Mastering game music unfa 4 1,469 10-05-2010 07:29 AM
Last Post: unfa
  Music louder than everything else unfa 12 3,475 09-28-2010 01:36 PM
Last Post: Mr. Bougo

Forum Jump: