Skip to main content
Anivyaeeen
Inspiring
April 27, 2015
Question

Need Help w/ Expression (Sound Keys Plugin is Used)

  • April 27, 2015
  • 1 reply
  • 1377 views

I have a question, it is with java code in after effects.

so my code for my bars right now is

X = 90

Y = thisComp.layer("Sound Keys 33").effect("Sound Keys")("Output 1") + 1;

[X, Y]


This is bar 37

I want Y to only go up to a maximum of 105% of bar 38, which for that bar my expression is

X = 90

Y = thisComp.layer("Sound Keys 19").effect("Sound Keys")("Output 2") + 1;

[X, Y]

I could easily do this, but the problem is, the bars are not static, they are reacting to a song using keyframes making Y go higher and lower.

A screenshot of the bars I'm working with

The arrow is pointing at bar 37, the one right to that one is bar 38.

I would greatly appreciate any help at all, but would also like a quick response, since I want to get this done ASAP! Thanks!

This topic has been closed for replies.

1 reply

Szalam
Community Expert
Community Expert
April 27, 2015

The linear() expression should do what you want. You can map any value range to a new value range. More info in the AE help

Anivyaeeen
Inspiring
April 27, 2015

Thank you

EDIT: with a quick look in the help, I can't seem to find what I'm looking for as I have no idea at all what I am doing when it comes to expressions. If someone could give me a more straight forward reply (basically instructions or the line of code itself) that would be amazing!

Mylenium
Legend
April 27, 2015

‌have you actually tried using a custom range in Soundkeys? No need for expressions at all. You just need a second instance of the effect and exclusively link it....

Mylenium