Home   Help Search Login Register  

Author Topic: Why won't music fade out..?  (Read 892 times)

0 Members and 1 Guest are viewing this topic.

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Why won't music fade out..?
« on: 05 Jun 2004, 20:58:49 »
 I'm having trouble getting the fademusic command to work. It plays ok... but then just stops suddenly rather than fading away at the end of my intro cutscene.

 The music is defined in the description.ext as follows

class CfgMusic
{
   tracks[] = {Music1, Music2, Music3};
   class Music1
   {
      name = "Requiem";
      sound[] = {"\music\Mozart1.ogg",db+50,1.0};
   };

   class Music2
   {
      name = "AveMaria";
      sound[] = {"\music\AveMaria.ogg",db+50,1.0};
   };

   class Music3
   {
      name = "Allover";
      sound[] = {"\music\Allover.ogg",db+50,1.0};
   };

};


 My script for the cutscene starts with

playmusic "Music2"

 then goes through all the camera moves, and ends like this

4 fademusic 0.0
~4.5
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
enableradio true
showcinemaborder false
clipend = true
exit

 I've searched through the forums... and as far as I can tell it should all work fine. But it doesn't... any ideas?

Offline sim

  • Members
  • *
  • Hot! Real hot! Damn Hot!
Re:Why won't music fade out..?
« Reply #1 on: 05 Jun 2004, 22:12:40 »
hey

I don't think you need to put 0.0 after the fadeMusic command, just put 0.

Hope this helps   ;D

sim
The Unsung Campaign Team Leader

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Why won't music fade out..?
« Reply #2 on: 05 Jun 2004, 22:21:44 »
Thanks for the quick reply sim.  :)

 I've already tried that and it doesn't make any difference whatsoever! Whether it's 0.0 or just 0, the music still cuts out abruptly.  :-\

Rokket

  • Guest
Re:Why won't music fade out..?
« Reply #3 on: 06 Jun 2004, 05:41:41 »
I'm not experienced enough to probably be much help, but maybe the 4.5 sec delay is affecting it. You might not need it, and still get the delay with a fadeout, as in:

1 fademusic 0

titlecut [" ","BLACK OUT", 1]
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
; fade back in over 1 seconds
titlecut [" ","BLACK IN", 1]
enableRadio true
exit
 

O Neil

  • Guest
Re:Why won't music fade out..?
« Reply #4 on: 06 Jun 2004, 06:12:55 »
Hey

Yea, a long time ago I had this very same prob, but I never got any help. In the end (about a year later) I found that that to be the excact reason why the music cut out (rokkets' idea). So follow his idea & you should be sweet

(O'Neil

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Why won't music fade out..?
« Reply #5 on: 06 Jun 2004, 23:17:45 »
Still no luck I'm afraid...  :-\

The reason the delay was in there in the first place was to give the camera time to black out. Now the end of the description.ext looks like this:

4 fademusic 0
titlecut [" ","BLACK OUT",4]
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
enableradio true
showcinemaborder false
clipend = true
exit

...and it still cuts the music out abruptly, but also blacks out the screen instantly! I have not put in a fade camera in again command before the end because you get a quick glimpse of the player before getting to the briefing page if I do that.

 I also tried doing it with triggers. One trigger over the whole area,
activated by anybody,
once
to start the music.

 Another trigger acted by
player,
not present,
once,
on activation 4 fademusic 0,  

to fade it out again when the player left a certain area.
 This didn't work either!  :(

 I have no idea why this command is giving me so much grief!!!

Rokket

  • Guest
Re:Why won't music fade out..?
« Reply #6 on: 07 Jun 2004, 06:10:15 »
I just tried a test, it worked great several tiems. Music fades, shot fades to black, fades back in from black (no shot of Player in there):

playmusic "track5"
0 fademusic 1

_camera = "camera" camcreate [-64177.43,-52723.59,6.90]
_camera cameraeffect ["internal", "back"]
titlecut [" ", "black in", 4]

_camera camSetTarget ranger1
_camera camSetPos getpos CAM1
_camera camSetFOV 0.7
_camera camCommit 0
@camCommitted _camera
~10

4 fademusic 0
~4

titlecut [" ","BLACK OUT", 5]
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
; fade back in over 1 seconds
titlecut [" ","BLACK IN", 1]
enableRadio true

exit

Maybe you've got a weird OFP bug. Before v1.85 I used to get units placed in odd places, miles from where I'd put them, and sometimes units would ignore their WPs and just follow a bizarre route miles from their WPs

Can you make a test in a new mission folder? Just a short version of script with player and the target unit, and see what happens. It really should work.

O Neil

  • Guest
Re:Why won't music fade out..?
« Reply #7 on: 07 Jun 2004, 06:22:41 »
Hey

Lol, then we can have a competition on the fastest person to come up with a solution ;)

Jks

Anys, try this first man (end part of the script) :



titlecut [" ","BLACK OUT", 5]
~0

4 fademusic 0

titleText [" ", "PLAIN"]
~4

_camera cameraeffect ["terminate", "back"]
camdestroy _camera

; fade back in over 1 seconds
titlecut [" ","BLACK IN", 1]

enableRadio true

exit



If that doesn't work . . . I think I will kill myself ;)

(O'Neil

Offline Clue

  • Members
  • *
    • Clue's OFP Page
Re:Why won't music fade out..?
« Reply #8 on: 07 Jun 2004, 14:57:47 »
Ok... I think I've got it sorted.    :)

 The end of the cutscene now looks like this:

6 fademusic 0
titlecut [" ","BLACK OUT", 4]
~6.5
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
enableradio true
showcinemaborder false
clipend = true
exit

...where 'clipend' is the trigger to end the cutscene. It works... but not as well as I'd hoped. It seems the music won't start to fade out until the camera has almost completely faded out, and then the music fades over about 2 seconds rather than 6! I was trying to make the music and picture fade out at the same time...   :-\
 
 Thanks for all the help guys, I couldn't have got this far without your suggestions.

 :)

Offline Archangel Scream

  • Former Staff
  • ****
  • OFPEC Former Staff: Audio editing & mission review
    • Britecorp
Re:Why won't music fade out..?
« Reply #9 on: 13 Jun 2004, 16:44:40 »
Heh, nice to see it fixed. :)