Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- threshold = 20;
- footageComp = comp("FOOTAGES");
- audioLev = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
- above = null;
- for(var t=0;
- t<=time;
- t+=thisComp.frameDuration)
- if(audioLev.valueAtTime(t)>threshold)
- {
- above = t;
- t+= 4;
- }
- seedRandom(timeToFrames(above),true);
- n = random(1,footageComp.numLayers+1);
- playStartTime = footageComp.layer(n).inPoint;
- playEndTime = footageComp.layer(n).outPoint-thisComp.frameDuration;
- playDuration = playEndTime - playStartTime;
- if(above)
- linear(time, above, above+playDuration, playStartTime, playEndTime);
- else
- 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement