video "scratching" effect

Moderators: Disciple, zlovatt

Post Reply
trioptic
Posts: 6
Joined: May 21st, 2005, 10:17 am
Contact:

August 6th, 2005, 5:31 am

I realize this is so incredibly simple, but it works well, with many diff techniques:

Code: Select all

maxAmp = 30;
minAmp = 1;
spanAmp = maxAmp - minAmp;
incAmp = sqrt(spanAmp);

if(varAmp < spanAmp/2){
  (varAmp / incAmp) - incAmp;
} else {
  (varAmp / incAmp) + incAmp;
}
basically maxAmp is the highest amplitude you want the code to react to. anything higher than maxAmp will be treated the same as maxAmp. varAmp (which is not assigned by the code) is your INPUT. so that would be audio1.level or whatever.

inAmp divides everything up evenly, so in case your amp is higher than 30, the code will adjust accordingly.

put this code in your time-remap layer. (some playing with would probably be required for a special look).

.. more comin soon
Image
afaj
Posts: 5
Joined: February 2nd, 2007, 9:30 pm

February 3rd, 2007, 11:41 am

When trying to use this expression text I get the message:

"Function sqrt is undefined. Expression disabled."

Any ideas? Thanks.
Colin Braley
Posts: 13
Joined: July 14th, 2005, 7:33 pm
Location: VA
Contact:

February 3rd, 2007, 1:56 pm

Try this instead:

Code: Select all

maxAmp = 30;
minAmp = 1;
spanAmp = maxAmp - minAmp;
incAmp = Math.sqrt(spanAmp);

if(varAmp < spanAmp/2){
  (varAmp / incAmp) - incAmp;
} else {
  (varAmp / incAmp) + incAmp;
}
afaj
Posts: 5
Joined: February 2nd, 2007, 9:30 pm

February 3rd, 2007, 2:15 pm

Colin,

This time I get the error message: "Class 'Layer has no property or method named 'varAmp'. (error occured at line six).
Post Reply