Animate the opacity of the layer with the expression of the music on / off?

Hi all

I seek to animate the opacity of a layer according to an Audio Amplitude of entry. For example, when a kick in the song occurs with a value of 50 slider I want the active layer and stay until a kick from value 50 turns.


This is what I currently use but it shuts down after reaching the value. Is it possible to write an expression that connects it to a checkbox control?


Music = thisComp.Layer ("audio amplitude"). Effect ("the two Channels")("Slider");

Linear (Music, 45, 70, 0, 200)


Thank you in advance for your help!


-Sean Bradord

This was the solution:

Use the BPM here counter:

http://www.Motionscript.com/design-guide/audio-count.html

but replace the last line with this:

If (n %2) 100 0 otherwise)

Tags: After Effects

Similar Questions

  • Is it possible to get the layer, layerset and layer with status layerset...!

    Hello world!

    Is it possible to get the layer, layerset and layer with the status layerset. Because I met a big problem out of it.

    I have a single PS document which is contain the collection of layer, layer with layer games collection. I need apply the function for each layer and layers and each layer games with of layerset.

    I also tried a code, but its error getting. Please help me out of this code...

    -yajiv

    #target photoshop

    app.bringToFront ();

    level of $= 2;

    var app.activeDocument = docRef;

    Journal of the var ="";

    var x = 0;

    var n = number (docRef.layers.length) - 1;

    for (i = 0; i < n; i ++) {}

    var tm = String (docRef.layers [i]);

    var isLayer = tm.lastIndexOf ("ArtLayer");

    var isLayerSet = tm.lastIndexOf ("LayerSet");

    {if(isLayer!=-1)}

    Check_LayerStructure (DocRef.Layers [i], 'Layer');

    }

    {if(isLayerSet!=-1)}

    Check_LayerStructure (DocRef.layerSets, "LayerSets");

    x = x + 1;

    }

    }

    function Check_LayerStructure (objLayer, objflag, x) {------}

    {if(objflag=="Layer")}

    LayetStructure (objLayer, objLayer.name, BlendMode.NORMAL, 100, 100, 0, true, 'Layer');

    }

    else {if(objflag=="LayerSets")

    LayetStructure (objLayer [x] objLayer [x] .name, BlendMode.PASSTHROUGH, 100, 100, 1, true, 'together');

    m = Number (objLayer [x] .layers. Length)

    for (j = 0; j < m; j ++) {}

    var tm = String (objLayer [x] .layers [j]);

    var isLayer = tm.lastIndexOf ("ArtLayer");

    var isLayerSet = tm.lastIndexOf ("LayerSet");

    {if(isLayer!=-1)}

    Check_LayerStructure (objLayer [x]. Layers [j], 'Layer');

    }

    {if(isLayerSet!=-1)}

    Check_LayerStructure (objLayer [x] .layerSets, "LayerSets", x);

    }

    } / / Loop Layerset

    } / / I loop For

    } //Function loop

    function LayetStructure(layerRef,L,bMode,Opt,fillOpt,S,layVisible,Lref) {}

    {if(layerRef.BlendMode!=bMode)}

    If (confirm (L + Lref + "belend mode was bad...!)) \n"+"do you want to change...? »)) {

    layerRef.blendMode = bMode;

    Journal = Journal + "-" + L + Lref + "belend mode has been changed...! \n\n ";

    e = 1;

    }

    }

    {if(layerRef.Opacity!=opt)}

    If (confirm (L + Lref + ' opacity has been "+ Math.round (layerRef.opacity) +"%...! ")) \n"+"do you want to change...? »)) {

    layerRef.opacity = Opt;

    Journal = Journal + "-" + L + Lref + ' opacity was changed to 100...! \n\n ";

    e = 1;

    }

    }

    If (layerRef.fillOpacity! = fillOpt & & S == 0) {}

    If (confirm (L + Lref + ' Fill has been "+ Math.round (layerRef.fillOpacity) +"%...! ")) \n"+"do you want to change...? »)) {

    layerRef.fillOpacity = fillOpt;

    Journal = Journal + "-" + L + Lref + ' fill has been changed to 100...! \n\n ";

    e = 1;

    }

    }

    {if(layerRef.visible!=layVisible)}

    If (L + Lref + ' left eye...! ") \n"+"do you want to change...? ») {

    layerRef.visible = layVisible;

    Journal = Journal + "-" + L + Lref + ' eye was turn on...! \n\n ";

    e = 1;

    }

    }

    }

    Code of responsible for the action would naturally faster, but if you should be more comfortable with the DOM code, it could be useful to you.

    #target photoshop

    var theLayers = collectLayers (app.activeDocument, []);

    Alert (theLayers.join ("\n"));

    function to collect all the layers.

    function collectLayers (theParent, allLayers) {}

    If (! allLayers) {var allLayers = new Array}

    else {};

    the number of var theParent.layers.length = - 1;

    for (var m = number; m > = 0; m-) {}

    var theLayer = theParent.layers [m];

    apply the function of games of layers;

    If (theLayer.typename == "ArtLayer") {}

    allLayers.push ([theLayer, theLayer.blendMode, theLayer.opacity, theLayer.fillOpacity])

    }

    else {}

    allLayers = (collectLayers (theLayer, allLayers))

    This line includes layer groups;

    allLayers.push ([theLayer, theLayer.blendMode, theLayer.opacity, theLayer.fillOpacity]);

    }

    };

    return allLayers

    };

  • I am one of my apps Android AIR of CS5.5 to animate the portage. I can't download on devices running &lt; 4 Android. The problem seems to be that the default Android SDK of AIR conditioning with Animate is version 20, but &lt; 4 Android devices seems to b

    I am one of my apps Android AIR of CS5.5 to animate the portage.

    I can't download it to devices that run Android 2.3.x versions. The problem seems to be that by default what android SDK of AIR conditioning with Animate is version 20, but the devices running Android 2.3.x seem to be stuck on the AIR 19 runtime. I downloaded Android SDK of AIR 19, but when I tried to switch to it using 'manage AIR SDK... "I get an error message saying that I can't upgrade to a version of AIR lower than the preinstalled version. Still, I have many users using devices that run Android < 4 versions and won't leave stranded. What can I do to fix this?

    Yet can the old way to overlay a term I used in CS5.5, be used? I never tried to superimpose an OLDER version of the SDK on CS5.5, then perhaps it would not have worked either.

    In the part of the descriptor XML app Android, you can set the minimum level of SDK, like this:

    This has been very convenient for the times where I wanted to make sure someone is on Android 4.0 or later. But it may be worth trying as a way to override the default used by AIR. You can try to use the 9 or 10, depending on whether you think that your users would have at least to 2.3.4.

    Or, do not worry them, they always take advantage of your old version.

  • Reduce the opacity of a layer, then export as .png

    Hi all. I would like to create a script (I don't think I can do it in the form of action) in order to reduce the opacity of a layer of 3%, and export the file as a .png. Is this possible? I saw where it would be possible to define a finite number, or 97%, then export, but I hoped that there could be a chance to write one this way. Any help is welcome. I created before but never the scripts of Ps actions.

    var d = activeDocument
    var r = d.activeLayer
    var op = Math.round (r.opacity)-3
    r.opacity = op
    alert(op)
    
  • Frequently, Adobe Edge animate the files with the *.an extension will open with the menu completely empty elements.

    Frequently, Adobe Edge animate the files with the *.an extension will open with the menu completely empty elements.

    The HTML file remains in the folder, it works, but it is impossible to repeat the file Edge animate again. What can I do to restore the file or to prevent other cases like this?

    Above all, why do?

    Maybe because some elements such as an image or a code has been changed while the file *.an was opened while the change has been made?

    Thank you very much

    Paulo Tasca

    NextPage

    Sao Paulo, Brazil

    See my tutorial can help:

    How to fix corrupted files EA - Tutorial #3

  • I can't move a layer with the mouse.

    I can't move a layer with the mouse. Only using the arrow. This happened two days ago and could not get the right set of return I guess. Until I'm able to move a layer with the mouse and arrow keys. When you move the layer with the mouse you he almost jumps back to the original space. I'm only using a bluetooth mouse, wired keyboard with a macbook from apple.

    Photoshop Elements does not respond when you use Mac OS X 10.10 editing tools

  • Photoshop opens the dialog box when you try to fill a layer with locked transparent pixels

    This script should set the layer to lock transparent pixels and then fill the layer with a color. She is doing this, except when it is in the filling phase, it opens the dialog box fill, and you have to hit OK.

    If you omit the transparent pixel line, it works as not expected, no dialog boxes.

    Is there a way to remove the box? Or I'm doing something wrong, which is causing the box to open?

    #target photoshop
    app.bringToFront();
    
    doc = app.activeDocument;
    doc.artLayers[0].isBackgroundLayer = false;
    doc.artLayers[0].transparentPixelsLocked = true;
    app.activeDocument.selection.fill(app.foregroundColor); 
    

    Not sure why this is happening.

    But I would recommend blocking the above and using the AM code for a fill that pays tribute to transparency.

    #target photoshop

    app.bringToFront ();

    doc = app.activeDocument;

    doc.artLayers [0] .isBackgroundLayer = false;

    doc.activeLayer = doc.artLayers [0];

    // =======================================================

    idFl var = charIDToTypeID ("Fl");

    var desc18 = new ActionDescriptor();

    var idUsng = charIDToTypeID ("Usng");

    var idFlCn = charIDToTypeID ("FlCn");

    var idFrgC = charIDToTypeID ("FrgC");

    desc18.putEnumerated (idUsng, idFlCn, idFrgC);

    var idOpct = charIDToTypeID ("PCT");

    var idPrc = charIDToTypeID ("#Prc");

    desc18.putUnitDouble (idOpct, idPrc, 100.000000);

    TSM var = charIDToTypeID ("Md");

    var idBlnM = charIDToTypeID ("BlnM");

    var idNrml = charIDToTypeID ("Nrml");

    desc18.putEnumerated (TSM, idBlnM, idNrml);

    var idPrsT = charIDToTypeID ("PrsT");

    desc18.putBoolean (idPrsT, true);

    executeAction (idFl, desc18, DialogModes.NO);

  • Resize the layer with smart filter without affecting the Smart Filter layer appearance

    I made a wax seals on photoshop with lots of embossing, bevelment and a dynamic filter. It's done and I just need to make it smaller so it fits well on my certificate. When I resize (Ctr + T) it appears a messgae which reads:

    ______________________________________________

    Adobe Photoshop CS6 extended

    "The dynamic filters applied to the layers contained in this group will be disabled at the temprarily while conversion is in preview. They will be applied after commit the transformation. »

    Ok

    [] Do not show

    ______________________________________________

    I click OK and I resize the layer with free transform, and then press ENTER. The layer is resized, but my smart filter that cretaes affect a shower around the joint is completely distorted.

    How to resize my layer with smart filter without affecting the appearance of dynamic filter of the layer

    Right-click on the name of the layer to smart object in the layers panel to get the menu below. Choose "Convert to Smart Object" to encapsulate the er and its smart filter and Layer Styles within a new KIND that can be resized without appearance changes.

  • Newbie question - how to move a layer with the effect of deformation without changing the distortion?

    For example, to move a layer with an effect of training as well as his training center, so I don't have to make the corresponding calculations Center ripple and position.

    GSIDesign wrote:

    ... the two methods roughly the same result but are very different when you move the training center now.

    Thanks for the tip of the expression.

    If the mask is exactly the same size and shape as the shape layer, then you should get the same results.

  • How to get the background color of a layer with AE SDK

    Hello

    I try to get the background color for my current layer, but I can't seem to find how do.

    I don't want background color, background color of the application, but the color that shows through, if I set the alpha of my pixels to 0.

    For example, assume that the background of the composition is black, I put a solid top, green then put a picture on top of the solid and apply my pug-in the image.

    If I set the alpha to zero in my plug-in, green solid will be displayed.

    So I want to be able to know that my background is green.

    I tried to use PF_AppGetBgColor(), but which returns the background color of the application, which isn't green in this example.

    If you want more details on what I want to do, I plug P1 which affects some 0-alpha pixels. Above it, I apply an another plugin P2 which reveals alpha-0 pixels by mixing with little color.

    What is happening now is that the output is color of the original image, mixed with the color of P2 (because only modified P1 alpha pixels).

    What I want is to have the color through the transparent pixels of P1 display mixed with the color of P2.

    To do this, I would like to be able to set the color of pixels 0-alpha in the color of the background in P1.

    Sorry for the question long.

    Thanks for your suggestions.

    Hello nicolas.

    If I understand it, that you try to get the buffer of image layers composited under the layer with your effect.

    If that is correct, then I fear that it is almost impossible to do.

    When AE makes a composition he doesn't it down. He's trying to do the opposite in fact.

    Why? because if at some point, the buffer is completely opaque, then he has no need to make what's below.

    further more, checked the diaper changing the rendering order, and many other things affect the rendering of the layers order.

    In addition, there is no API to access buffers intermediaries comp. just the end result.

    the closest you can get than without turning of the world, is to use AEGP_GetCompBGColor().

    that would be useless to you that the image is not composite on that color, unless it is the model being saved to the file.

    so why I said 'almost impossible '?

    You can transform the world.

    You can write a type ECAP 'craftsman '. (look at the example of 'arti')

    These plug-ins make comps (instead of the "advanced3D" converter)

    a craftsman has results intermediaries comp, because he is the one doing the rendering.

    so now you can have your craftsman save the buffer, you need and deliver it to your effect.

    I must warn you that this is very very very difficult.

    Another possible solution is to create a copy of the model resides in your effect,

    erase all the layers that has the image you need and make that reproduces model using AEGP_GetReceiptWorld().

    If you use this method, you must supervise the original model and apply changes to the copy.

    Yes, it's too difficult to do.

    you could make a change in the strategy and apply your effect to an adjustment layer instead.

    the entry for the adjustment layer is the buffer underlying layers.

    Then, you could get the original sources you want to treat using checked layer params.

    the last solution I can think uses the expression of sampleImage() on a hidden parameter.

    This will give you any layer's pixel data in the model, but not the composite of the underlying layers.

    Maybe if you tried sampling adjustment layers post effects... I don't know. you need to try.

    This method is very slow and is also limited to expire, so you can't get a large number of pixels.

    the expression simply fails.

    I hope that this was not all bad news for you.

    Maybe you said more about the plug-in you develop I could come up with a better plan.

    :-)

  • Merge a layer with the background

    Is it possible to merge a layer with the background? I mean, suppose that the background does not yet exist and I have a series of layers on top of this transparent background. How can I go on the fusion of one or more of these layers with the background without flatten the whole image?

    to convert a normal layer into a background layer, you will need to select and go to the layer-> New-> layer bottom. As far as I know, this is the only place where you can do. If you want to do a bottom layer of multiple layers, you must select the layer and go first to layer-> layer blending to merge the layers into a single layer

  • Technique to animate the red squares?

    Salvation of York UK :-)

    I am very new to After Effects, so please forgive the awkward sentences. I am trying to create an effect where three red boxes appear over time. Put another way Sidebar 1 appears 2 boxes appear then all three. Here is a screenshot to illustrate:

    http://i216.Photobucket.com/albums/cc53/zymurgy_bucket/hide-reveal-square-question_zps1e7a 023c.jpg

    The boxes belong to a single layer as part of a logo, ive tried masks and kinds of things but without success. Any method to achieve very much appreciated ;-)

    Thank you

    David

    I would hide the 3 boxes, or recreate them with shape layers to animate the opacity forms individually create a layer above with some shape layers with animation opacity to act as a matte. Both techniques require masking and animating the opacity. Are you familiar with these procedures?

  • Hello, is it possible to animate the pictures?  In particular, is it possible to move a character to a photo/image?

    Hello, is it possible to animate the pictures?  In particular, is it possible to move a character to a photo/image?

    You will need to do a clean selection of figure and copy it to a new layer (and rebuild what was behind it). If you want to animate the figure, you will need several layers (one for each position) and you could change the position of the arms, legs and head with deformation of the puppet. Once you have the parts, can create an animation of image.

    Create image animations in Photoshop

  • How to animate the manuscript for the title slide in first Elements 9

    I want to simulate someone write my title on the title of the slide.  Is it possible to do this in first Elements 9?  I thought to use the Captivate (or another tool like Camtasia or Jing) to make a video screenshot as I write the text in PhotoShop, then by importing this video in my project of first 9.  What is the best way to do it?  I would like that the text writing lively to be his own later so that I can add an image to the background (wall brick, Slate, sidewalk, etc.).

    Thank you!

    Gina

    I've done several times, and some of the mechanics will dictate the best method.

    For example, I had several lines of text "handwriting" on a "Blackboard". I chose a "font" and created the title as an Image in Photoshop. I have "distressed" the text a bit, to simulate the texture of an old picture. Then I used a layer mask to 'hide' the largest part of the text and changed several times, to "reveal" the text, part of a letter at a time. I made a layer Comp (Photoshop has this option, but not sure about PSElements). We could do the same thing with Save_As surgeries. I would say that each Save_As numbering incremental, so that you know the exact order you need. Experience with the duration (I think that I settled on 3 images, defined in Edition > Preferences > still Frame Duration, prior to final importation) and then probably also defining the duration of Transitions (I think I went with 2 images). Import these layers, or files Save_As forward, slide in the order on the timeline, apply the Transition (dissolve in my case), to "animate" the writing. I added two files SFX: "chalk on a Blackboard" one and one "click", to simulate the chalk being placed against the Blackboard.

    In my case, I wanted each letter to look as if he was up fluidly written on the Blackboard, revealing the letters exactly as they would be written, was what I wanted to achieve. If there is less interest the result looking exactly like a person wrote, there are several ways to use the effects, like the harvest, or perhaps the Transitions, like wipe linear, to simulate things, although I found the rough, more I got a lot of lines of text.

    It took some planning, and then time to implement everything as I wanted, but the finished effect was large, and there was nothing I would have done it differently.

    A review, but especially real mechanical and aesthetic, is to extend the Save_As files, when a Word is finished by a frame or two, as in the real world, the writer would throw chalk momentarily, before moving on to the next word. I did not have this, but used the SFX to indicate files that chalk was moved and then placed back in contact with the Blackboard.

    Also, if the "writing surface" is smooth, then there is most likely no reason "distress" the text.

    Good luck

    Hunt

    PS - After Effects has a marked effect, and I think that it is mentioned in one of the links of John T.

  • Animate the button text on the timeline

    Hello world

    This is my first time to follow step by step from a youtube video:

    After effects CS5 - basic text Animation - YouTube

    experience animating text in aftereffects.

    My 1st question is:

    There is no button on my text on the timeline layer.

    I have to go to the animation > animate text

    Screenshot 2016-06-22 15.07.36.png

    Is there a way to animate the button on the timeline?

    My 2nd question is:

    Why there is no numeric value next to start, end, and offset?

    Screenshot 2016-06-22 15.09.57.png

    What have I done wrong?

    Here is a screenshot of what I mentioned

Maybe you are looking for