Xonotic Forums
Revised in-game music player - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Music and Sound Development (https://forums.xonotic.org/forumdisplay.php?fid=33)
+--- Thread: Revised in-game music player (/showthread.php?tid=2650)



Revised in-game music player - rafallus - 02-24-2012

Instead of making a track tied to map (as in same map always plays the same track), how about making tracks play like in games with licensed soundtrack, as in when one is over, next is played (or shuffled), with ability to disable specific ones in menu, if you feel like it. This could have a few benefits:

-It will diversify tracks you hear, especially handy for freshly added ones, which would otherwise be unheard for a while.
-You can make artist/title displayed on-screen as track begins, which will increase recognition of those who made them.
-Those who don't like changed tracks, can have "Repeat" retained as an option.


RE: Revised in-game music player - rocknroll237 - 02-24-2012

Great idea. In Red Eclipse, you have the option to choose map-specific songs or random songs, but this sounds even cooler.


RE: Revised in-game music player - unfa - 02-24-2012

+1


RE: Revised in-game music player - Lee_Stricklin - 02-24-2012

Seems interesting, though I'd like the option to tie tracks to specific maps and have them loop as well.


RE: Revised in-game music player - hutty - 02-24-2012

The mapmakers can always add a button in the map to change the music ... thus making a music dj control room...

if anything does change .... it should not break this funtionality


RE: Revised in-game music player - divVerent - 02-25-2012

I still think map specific tracks are the way to go, as the music helps define the atmosphere of the map. Shuffle may become an option, but sure not default.


RE: Revised in-game music player - hutty - 02-25-2012

I agree .. just think of the akwerdness if the glowplant malfunction track started playing on space elevator....


RE: Revised in-game music player - rafallus - 02-25-2012

A little mockup for how I imagine the form looking like (sans skins and proper fonts).

When "use map defaults" is checked, list would be grayed out.


RE: Revised in-game music player - jaykay - 02-25-2012

ideally, tracks should be made specifically for a map to fit its artstyle and gameplay. a music player would not be an option then.

the tracks should not be something you can simply replace with other tracks. the artstyle of maps can't be changed to the users liking as well.


but the artists around here probably do not have that level of professionalism (no offense) necessary to make tracks and maps that perfectly fit each other... still, i vote for one track per map and nothing else.


RE: Revised in-game music player - .Danny. - 02-26-2012

(02-24-2012, 12:50 PM)Lee_Stricklin Wrote: Seems interesting, though I'd like the option to tie tracks to specific maps and have them loop as well.

I agree


RE: Revised in-game music player - divVerent - 02-27-2012

The feature already ALMOST exists: there is playlist support in the engine which you can configure via a .cfg, which then overrides whatever maps do.

It is done using the following cvars:

music_playlist_list0 - space separated list of tracks to play
music_playlist_random0 - 0 respective 1 for repeat respective shuffle
music_playlist_index - set this to 0 to activate playlist mode, to -1 to go back to per-map music mode

If any volunteers want to make the required menu controls for this, go ahead. I just insist that default stays as is, i.e. map specific tracks.


RE: Revised in-game music player - rafallus - 02-27-2012

Sweet.

A few things:
1. Can settings be saved to work after restart?
2. music_playlist_current seems to be stuck and only plays manually set track, regardless of sequential/random setting.
3. Can menu song be made independent from playlist?


RE: Revised in-game music player - divVerent - 02-28-2012

1. if we make the cvars saved in defaultXonotic.cfg, then yes
2. no idea, may be buggy. Never tried it, never cared for it. Patches welcome
3. not really, with quite some extra code yes, though


RE: Revised in-game music player - terencehill - 05-13-2012

I tried to implement a music player in the menu, you can test it checking out the branch terencehill/music_player
It's possible to play all the available tracks with buttons to control playback, checkbox for randomization and buttons to set/reset the menu track.

When the music player is enabled the game will only play the playlist tracks regardless of the map track.
The Stop button also disables the music player: after 3 seconds the menu track starts playing and plays back until the next map change, unlikely there seems to be no way to resume or restart the current map track.

I'm planing to make each track selectable like in the rafallus mockup.

Screenshot:
   


RE: Revised in-game music player - rafallus - 05-14-2012

Looking good, I will definitely give it a test when it will be in autobuild.

I have an idea for in-game mockup showing of name/artist, but I'm not sure ogg tags are set.


RE: Revised in-game music player - W4RP1G - 05-14-2012

I like the idea, but I would be fine with a keybind that changes the music to a random track, that way when i get sick of hearing a track I can change myself. You have to figure that some tracks are only a couple minutes long, so in a 20 minute match that is a lot of different tracks being played.


RE: Revised in-game music player - rocknroll237 - 05-14-2012

Would love to see this in the autobuild sometime soon. Looks good.


RE: Revised in-game music player - chooksta - 05-15-2012

great stuff , but this will require alot of tunes imo, so music nerds will have to work alot harder and submitt , etc.

i'm wondering if there is an overall size cap to the file that holds all the tunes in game.
i mean , with all the super nerd computers with massive hard drives , it wont matter , but are the devs hoping to keep the download size of the game to a certian amount?

smaller the better , yes , but how many tunes is too much?

i would like to see alot of tunes , alot of variety , but you know :p

t

:^


RE: Revised in-game music player - .Danny. - 05-15-2012

ultimately as long as I can still play itunes whilst playing xonotic I´m not much bothered by this any of this.


RE: Revised in-game music player - unfa - 05-17-2012

I'd love it.


RE: Revised in-game music player - WiFiDi - 05-20-2012

it should be possible to add music that you own to the player so you can listen to it in game. Cool


RE: Revised in-game music player - terencehill - 05-20-2012

(05-20-2012, 12:47 AM)WiFiDi Wrote: it should be possible to add music that you own to the player so you can listen to it in game. Cool
That's not possible. The only thing you can do is to put your music in the directory data\sound\cdtracks, in ogg format.

(05-14-2012, 11:55 AM)W4RP1G Wrote: I like the idea, but I would be fine with a keybind that changes the music to a random track, that way when i get sick of hearing a track I can change myself. You have to figure that some tracks are only a couple minutes long, so in a 20 minute match that is a lot of different tracks being played.

Try this:
Code:
alias random_track "menu_cmd rpn /_rand 8 rand def; wait; cd loop $_rand"
bind p random_track
Then press p (change it to whatever key you like more) to switch to a random track

EDIT: I have an old version of xonotic-music.pk3 in GIT so instead of 8 put 14 in the alias, that's the number of tracks.


RE: Revised in-game music player - terencehill - 05-20-2012

(05-14-2012, 09:56 AM)rafallus Wrote: Looking good, I will definitely give it a test when it will be in autobuild.
Ehm... it won't be in autobuild anytime soon, likely it will never be, I'm not sure Xonotic team has any interest on this.

(05-14-2012, 09:56 AM)rafallus Wrote: I have an idea for in-game mockup showing of name/artist, but I'm not sure ogg tags are set.
Sorry but currently there's no way to read ogg tags, so tracks can only be displayed with their filenames


RE: Revised in-game music player - terencehill - 05-20-2012

Anyway, I've made some improvements to the music player:
There's now a real playlist where it's possible to add tracks from the list of all the available tracks.
Tracks in the playlist can be arranged in the preferred order by dragging them or removed by pressing the DELETE button