Graphics

 View Only
  • 1.  Using one scene director to fade audio while another director is playing

    Posted 02-09-2017 22:29
    We have a "Rock/Paper/Scissors game ready to go but I want to put a few finishing touches on it. Basically I have a master director that animates the game on/off. I have three directors (Paper, Rock, Scissors) fired using keyboard shortcuts. I also have Win & Lose directors, these are also fired by keyboard shortcuts. When the AltW macro fires (WIN) I have a cheering crowd and confetti which plays for a max of 30 seconds. Here is my question: The master director animates the game on and pauses, the game is played, a winner is declared and the cheering crowd plays. Back on the master director (paused) the operator simply hits enter and that director animates the game off screen and then takes the scene off line. So far, so good. I want to be able to fade the cheering sound effect from within the master director and then have it take the scene off line even though the sound effect is fired from within a WIN director.

    Thanks in advance


  • 2.  RE: Using one scene director to fade audio while another director is playing

    Posted 03-06-2017 15:40
    I have something like this for playing audio clips. I have a GPI check the frame buffer and layer to see if an audio scene is playing. If so, it gets the Scene Director position, then sets it to fade out from there. Sounds like you would be triggering this from the master scene director, perhaps put in a Script Scene Director Clip.
    I tried to update this for what you describe. Hope it works.

    dim sceneDir as xpSceneDirector
    dim AudioFileClip, offlineEventClip as xpSceneDirectorClip
    dim AudioTrack, eventTrack as xpSceneDirectorTrack
    dim startFade, endFade as long

    Scene.GetSceneDirectorByName("MasterDirector",sceneDir)
    sceneDir.GetTrackByName("Audio1",AudioTrack)
    AudioTrack.GetClipByName("YourAudienceApplpause",AudioFileClip)

    ' Set start fade and end fade position
    startFade = Clng(sceneDir.Position)
    endFade = Clng(sceneDir.Position) + 40

    ' Set keyframe at current position, then fades out over 40 frames
    AudioFileClip.AddKeyFrame(startFade)
    AudioFileClip.SetKeyFrame(endFade,Clng(0))

    ' This positions the offline event clip to sit after the fade is oevr. You may not need this.
    sceneDir.GetTrackByName("Track1",eventTrack)
    eventTrack.GetClipByName("OfflineEvent",offlineEventClip)
    offlineEventClip.Position = endFade
    #XPression


  • 3.  RE: Using one scene director to fade audio while another director is playing

    Posted 03-07-2017 16:07
    @mike I like the way you think on this one. I will give this one a shot.
    #XPression