Need help scripting Play Clip then fade out action
  • Invisible Ray
    member
    Posts: 46
    Joined: Mon May 16, 2011 11:50 pm

    Need help scripting Play Clip then fade out action

    by Invisible Ray » Tue May 17, 2011 12:15 am

    I purchased Modul8 and have spent the past 3 days trying to learn the modules and scripting. I have not been very successful, although I have thoroughly read the manual, and searched this forum. I have also tried to learn from inspecting code in several relevant modules, but I am still stumped. I have previous experience writing JavaScripts, AppleScripts, and Visual Basic, but I cannot get the syntax right for Modul8.

    Task I need to accomplish:
    With one action, I need to un-hide a layer, trigger a media to play on that layer, then fade out after the media finishes (alpha -> 0). Ultimately, I will trigger via MIDI, but a simple button will work to prove the function.

    I have tried combining and modifying code from these modules:
    (s6) LayerFade (layer), Movie Controler (layer), Movie Restart (layer)

    I still can't make it work. I would appreciate any examples or tips to make this action possible. It seems like it should be a fairly basic thing for a VJ application to accomplish.

    Thanks
  • User avatar
    ghostofelvis100
    activ8 member
    Posts: 99
    Joined: Mon Oct 25, 2010 10:19 pm
    Location: Lampeter, Wales, UK
    Contact:

    by ghostofelvis100 » Tue May 17, 2011 11:03 am

    Hiya,
    Just so that I'm clear on what you're trying to do - what will you be fading out after the media has finished, will it be looping, and then after one pass fading out?

    The midi mapping of m8 is very extensive. You may not need to script this at all.

    If you map a midi controller to the movie scratch, then a 0 value will retrigger the media.
    You could then just map another controller to the layers alpha for the fade.

    The Layer Sequencer mod is very good at handling show/hides of layers. And the bpm router (layer) is also pretty useful, and could automate the fades.

    I have plans to include an envelope function into my gener8 mods which should do just the things you're after, but they are still in beta so this will not be happening just yet.

    Andy

    http://blackearthmedia.co.uk/collected
  • Invisible Ray
    member
    Posts: 46
    Joined: Mon May 16, 2011 11:50 pm

    by Invisible Ray » Tue May 17, 2011 3:02 pm

    More details for you:
    My band plays in front of videos, and our drummer has an Octapad drum trigger. We need to play a long clip which acts as the bed of the song, then trigger shorter clips to play over the long clip and fade out quickly (or just cut). The clips are in Play Once mode, not looping. Each clip would have its own drum pad, but the drummer can't manipulate anything while the clips play. It's a simple start/play/stop/fade out sequence.

    So:
    MIDI signal #1; start long clip
    MIDI signal #2; start short clip on layer in front of long clip, clip plays to end, then layer alpha fades to 0.
    MIDI signal #3; same as #2, but with a different clip
    etc.
  • User avatar
    The Midi Thief
    master
    Posts: 483
    Joined: Thu Sep 29, 2005 7:19 pm
    Location: Stockholm, Sweden
    Contact:

    by The Midi Thief » Tue May 17, 2011 4:57 pm

    How short is the short clip? You can always render the short clip so that it fades to be transparent (alpha) at the end. Render the clip as in png video codec with alpha channel. If it's a long clip (+10 seconds) the clip might get heavy in file size and a bit hard to handle.

    It will make the process a hole lot easier.

    But well, there is an even simpler solution:
    Go to the Fade tab, it's kind of hidden by the play controls (speed, play direction, jog wheels and play button). Select "Fading" and set your fade time. Now if you hide a layer, it will fade out. The back side is that they will fade in if you show the layer.

    A third option would be to maybe use the keyword for enabling the fading to turn fading on after the clip starts.

    Just some ideas. It don't think you need to make a module for doing what you want.

Who is online

Users browsing this forum: No registered users and 14 guests