Author Topic: Question about playMusic  (Read 3295 times)

0 Members and 1 Guest are viewing this topic.

Offline niffiwan

  • 211
  • Eluder Class
Question about playMusic
I'm proposing a change (bugfix?) to the way playMusic sets the volume.  Currently, it ignores the players music volume setting.  The player can change the volume, but when the script runs again (e.g. a new track starts) I believe the music volume returns to that set by the script (edit: tested & confirmed that this does occur)

The change is to ignore the volume set by the script and instead use the players music volume.  Does anyone have any comments/feedback regarding this?

Some more info is available in this mantis ticket.
« Last Edit: May 20, 2013, 04:45:51 pm by niffiwan »
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Question about playMusic
You could turn it into a relative modifier based on the volume the player has set.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Question about playMusic
yeah, that did cross my mind, but I thought that if the player set the music volume it'd "override" the scaling.  But.. best way is to test it of course :)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Question about playMusic
Well, either way it could require some guys to go back and edit their missions and/or scripts. However, I think it's better to unify the music playing system. All music played should be in the music channel and obey the same volume rules. It's just simpler that way in the long-run, IMO.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Question about playMusic
I'm proposing a change (bugfix?) to the way playMusic sets the volume.  Currently, it ignores the players music volume setting.  The player can change the volume, but when the script runs again (e.g. a new track starts) I believe the music volume returns to that set by the script.

The change is to ignore the volume set by the script and instead use the players music volume.  Does anyone have any comments/feedback regarding this?

Some more info is available in this mantis ticket.

i love the fact that people used my script :D

making the volume for the playMusic optional and defaulting to player-set volume would be a good solution

but honestly, i believe it would be a better investment of time to make a proper working sexp for playing music files and call it a day?

(i'll take a look later this week, but no promises)
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Question about playMusic
We have a proper working SEXP for playing music files, as long as you're willing to accept no other play-sound-from-files being used for the duration.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Question about playMusic
We have a proper working SEXP for playing music files, as long as you're willing to accept no other play-sound-from-files being used for the duration.

Then that's not a proper sexp for it. Effects and Music are separate channels in some way, shape or form.. being able to only play one or the other is not the best solution.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Question about playMusic
Well, either way it could require some guys to go back and edit their missions and/or scripts. However, I think it's better to unify the music playing system. All music played should be in the music channel and obey the same volume rules. It's just simpler that way in the long-run, IMO.

I'd like to understand this a bit better :)

The proposed change (or the scaling change The_E suggested) won't change the number of arguments to playMusic so existing scripts should continue to work.  The difference would only be the volume level, which I believe will be overridden in most cases by the player anyway, either by changing the in-game volume (with the inherent annoyance of the volume resetting when new tracks start) or by changing the OS volume.  In the case of the BtA Demo, all calls of the script set the volume to 100%.  If that's indicative of the normal use case for playMusic then there should not need to be any change in missions/scripts (unless there's a need to rebalance the volume of the music files in order to have a specific impact on the player).

On the topic of a unified music playing system, underneath everything there currently isn't a single channel dedicated to music.  Music is just assigned a free audio channel.  i.e. you could have two music tracks playing at the same time (although you probably don't want to do that, unless you want a 2-part canon ;)).  Changes in music volume are done by checking every in-use audio channel and changing the volume for all that have a "music type" (ASF_EVENTMUSIC or ASF_MENUMUSIC).

Anyway, am I correct in saying that the second part of your last statement means you prefer the change to just use the players music volume setting?
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Question about playMusic
Anyway, am I correct in saying that the second part of your last statement means you prefer the change to just use the players music volume setting?

Yup.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.