FORUMS: list search recent posts

Code that controls when the beat kicks in (Many apologies, this is in the wrong forum)

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stephen Moore
Code that controls when the beat kicks in (Many apologies, this is in the wrong forum)
on Jan 24, 2018 at 1:32:14 am
Last Edited By Stephen Moore on Jan 24, 2018 at 2:02:38 am

I have a grid of dots that I would like to ‘dance’ to some music. I’ve linked their X and Y positions to Trapcode’s Sound Keys’ outputs 1 and 2, which shifts the position of the dots creating the appropriate beat.

That’s okayish but I do think the whole thing would be much improved if I could make individual dots move between specific keyframes and then stop and then another group picks up the beat.

What I’ve done so far kind of works but it’s too uniform. This is the expression for the X position that is linked to output 1…

transform.xPosition-thisComp.layer("Sound Keys").effect("Sound Keys")("Output 1”)

but it runs all the time, does anyone know the code that would enable me to stop and start the movement and then stop and start it and so on..?


Return to posts index

Cassius Marques
Re: Code that controls when the beat kicks in (Many apologies, this is in the wrong forum)
on Jan 24, 2018 at 11:16:50 am

You have many possibilities to do that.

One way would be to use an IF/ELSE statement before that.

such as
t=effect("Slider Control")("Slider");
x=transform.xPosition-thisComp.layer("Sound Keys").effect("Sound Keys")("Output 1”);
(t<1?value:x);


All you have to do is create a slider control in which when its 1 you've got the bounce/expression active and when its 0 you've got whatever you keyframe.

Cassius Marques
http://www.zapfilmes.com


Return to posts index

Stephen Moore
Re: Code that controls when the beat kicks in (Many apologies, this is in the wrong forum)
on Jan 24, 2018 at 12:27:52 pm

Hi Cassius,

Many thanks for that, it works perfectly and, as I'd hoped, it gives the whole animation a more spontaneous feel.

When I work out exactly what it is, I'll have another question about Sound Keys driving colours and I promise I'll put it in the right forum.

Kind regards

Stephen


Return to posts index


Walter Soyka
Re: Code that controls when the beat kicks in (Many apologies, this is in the wrong forum)
on Jan 24, 2018 at 12:38:03 pm

Or you could use something like this:

t=effect("Slider Control")("Slider");
x=transform.xPosition-thisComp.layer("Sound Keys").effect("Sound Keys")("Output 1”)*t;


By multiplying by t (your slider value) instead of using an if/else statement, you can control the degree to which the effect ramps in. Keyframing t from 0 to 1 with linear or Bezier interpolation will ease in the influence from Sound Keys; hold keyframes will cause it to cut/jump.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Stephen Moore
Re: Code that controls when the beat kicks in (Many apologies, this is in the wrong forum)
on Jan 24, 2018 at 1:25:13 pm

Cheers Walter,

I've managed to get that to work as well. I've got a few variations of these dancing dots to do so I could well end up using both bits of code.


Regards

Stephen


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]