Setmusic enhancements

Moderator: Graf Zahl

User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Setmusic enhancements

Post by Paul »

Is there an option the next release of Gzdoom could include a couple changes to the ACS Command Setmusic, please? I kindly ask for 2 additional paremeters.

Setmusic(str songname,opt int pattern, opt int fadeinout, opt int randomposition)

My request are the two last params. Fade in and out would fade the music in and out from and to silence. The randomposition would make the song begin at randomised timing.

I belive not only I would benefit from it, as there is a lot of wads that change music during the game.
From my side, I have a script that dynamically toggles the music when engagin in battle against the enemy. It's not a necessity, but this nice feature would break the monotony a bit.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

fading may be possible (no guarantee) - but starting at a random position is a definitive no.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Thanks. Looks like I'll have to cut up my music tunes to little pieces, make a str array of them, and make them load randomly. That is, all must be 20 seconds.

Fading in / out is already satysfying though, thank you ;)
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

I haven't confirmed anything yet. ;)
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Rrrrrr8. It's all in your hands anyway Graf. Like I said, it's really minor so don't let it gain any higher priorities than somethine else :)
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

I'd like to request an option to set music to play only once, and then stop immediately when it's finished. It's too much of a hassle to calculate the number of tics needed for the song to play, and it's also highly prone to errors as it stands (performance issues could cause the song to end too soon or too late, and pausing screws it up completely).
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

An alternative there brother would be to make the music an ambient sound and playing it with

{
(...)
ambientsound("mytune",255);
}
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

What if the player has -nomusic set? I would assume that the "music" would play regardless of this, and I imagine some players might be somewhat annoyed at the fact that they can't properly disable music in a wad that handles things like that.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Unless there is an option to check wether music was disabled or not (and I presume there isn't) a script would block the sound(music-one time) from being played.
if(nomusic>0){don't play sound}

Feature request one-time playing music I say.
User avatar
BlazingPhoenix
Posts: 488
Joined: Sun Aug 28, 2005 5:11
Contact:

Post by BlazingPhoenix »

that fadeinout thing would kick total ass, it could help for boss fights...and such..like cutscenes :P.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Btw, what is the third paremeter of setmusic-"transition"?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Unused.
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany
Contact:

Post by Tormentor667 »

Graf Zahl wrote:fading may be possible (no guarantee) - but starting at a random position is a definitive no.
So what about starting at a precise position of a MP3/WAV/OGG?
User avatar
The Ultimate DooMer
Persecution Complex
Posts: 152
Joined: Tue Nov 08, 2005 23:04
Location: Industrial Zone
Contact:

Post by The Ultimate DooMer »

wildweasel wrote:I'd like to request an option to set music to play only once, and then stop immediately when it's finished. It's too much of a hassle to calculate the number of tics needed for the song to play, and it's also highly prone to errors as it stands (performance issues could cause the song to end too soon or too late, and pausing screws it up completely).
Or pausing, saving/loading games, other programs yanking you out of fullscreen or of course crashes.

(that's why I'm going to put "do not pause or save/load game" messages before my timed-to-music Hexen map :p)
User avatar
BlazingPhoenix
Posts: 488
Joined: Sun Aug 28, 2005 5:11
Contact:

Post by BlazingPhoenix »

BUMP, is there any progress on this? can it be done?
Locked

Return to “Closed Feature Suggestions”