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 28, 2015

I've recreated the monstercat spectrum, and yes they all use custom ranges. The problem is how those 5 bars are reacting, that 1 bar, no matter what I do, reacts weirdly, and I think an expression that can make it only go as high as the other bar, will fix my problem


It possibly could, but typically it comes down to artifacts in your source audio file. Cleaning it up in an audio editing program like Audition would probably be simpler plus also allow you to control the overall distribution of your frequency bands. You know, producing a duplicate audio file just for the purpose of getting a nice audio animation...

Mylenium