Skip to content

Instantly share code, notes, and snippets.

@monsieuroeuf
monsieuroeuf / Count up to a number.js
Last active November 15, 2016 16:23
After Effects expression that increments a number, with Ease and Wizz easing. It takes the start value from the name of the text layer, and the end value from a marker comment on that same layer. #easeandwizz
// Count up to a specified value in a given amount of time.
// With commas! If you're into that kind of thing.
// how to set up …
// start : this layer's name (i.e. call it an integer like "0")
// duration: add an expression slider called "duration"
// total: add a marker with a comment, that's the number to count up to
// delay: edit the value below
var DELAY = 0; // time to begin counting
@monsieuroeuf
monsieuroeuf / markerbeat.rb
Last active November 24, 2024 05:56
Makes evenly spaced markers for Adobe Premiere Pro, useful for cutting to music. Give it a BPM & duration and it'll give you some marker data for pasting into an XML document.
#!/usr/bin/env ruby -wU
# markerbeat.rb by Ian Haigh 2015
# distributed under the MIT license, more info here
# http://opensource.org/licenses/MIT
require 'optparse'
class FrameMarker
attr_accessor :bpm, :duration, :framesPerSecond
@monsieuroeuf
monsieuroeuf / List marker times in active sequence.jsx
Created September 8, 2014 02:32
Premiere Pro: lists all the markers' times in seconds, for the active sequence.
#target premierepro-8.0
// 2014-09-08 Ian Haigh (ianhaigh.com)
// Simply lists all the markers' times in seconds, for the active sequence.
m = app.project.activeSequence.markers;
var first = m.getFirstMarker();
var current = first;
@monsieuroeuf
monsieuroeuf / Create markers in active sequence.jsx
Last active August 4, 2016 01:50
Premiere Pro: Give it a list of times in seconds, and it'll bosh a whole lot of markers into the active sequence. #premiere
#target premierepro-8.0
// 2014-09-08 Ian Haigh (ianhaigh.com)
// Give it a list of times in seconds, and it'll bosh a whole lot of markers into the active sequence. Useful in combination with "List marker times in active sequence.jsx"
m = app.project.activeSequence.markers;
var times = [55.68,87.88,165.16,205.32,258.12,337.76,379.56,442.04,509,600,705.72,828.32,940.32,984.32,1023.04,1084.32,1170.08,1225.76,1313.28,1454.64,1563.32,1664.76,1951.48,2353.68];
for (var c=0; c < times.length; c++) {
@monsieuroeuf
monsieuroeuf / outExpoGentler.js
Last active August 4, 2016 01:50
Quick experiment for @SamSweetmilk #easeandwizz
// Ease and Wizz 2.0.7 : outExpo : All keyframes
// Ian Haigh (http://ianhaigh.com/easeandwizz/)
// Last built: 2015-07-09T10:37:52+10:00
// some defaults
var p = 0.81; // period for elastic
var a = 50; // amplitude for elastic
var s = 1.70158; // overshoot amount for "back"
function easeandwizz_outExpo(t, b, c, d) {
var CORRECTION = 1.037204526;
@monsieuroeuf
monsieuroeuf / Front Finder window to Launchbar.applescript
Created July 22, 2015 00:25
Send the front Finder window to Launchbar.
tell application "Finder"
set x to (folder of (front window)) as alias
set y to get POSIX path of (x as text)
end tell
tell application "LaunchBar"
set selection to y
end tell
@monsieuroeuf
monsieuroeuf / Pause till layer marker.js
Created July 24, 2015 05:05
After Effects: stop a nested comp playing till you want it to.
try {
m = thisLayer.marker.nearestKey(time);
linear(time, m.time, outPoint, 0, outPoint - m.time);
} catch(e) {
value
}
@monsieuroeuf
monsieuroeuf / auto expoIn and expoOut.js
Created March 16, 2016 03:12
After Effects expression: automatic motion with expo easing
// Ian Haigh : http://ianhaigh.com/
// automatic motion for After Effects with expo easing
// set up sliders to easily change the values
function easeandwizz_inExpo(t, b, c, d) {
var IN_EXPO_CORRECTION = 0.000976;
return t==0 ? b : c * (Math.pow(2, 10 * (t/d - 1)) - IN_EXPO_CORRECTION) + b;
}
function easeandwizz_outExpo(t, b, c, d) {
@monsieuroeuf
monsieuroeuf / auto-fade-in.js
Created June 20, 2017 07:29
Auto fade text expression for After Effects
// auto fade text, IN
// http://ianhaigh.com/
try {
var fadeDuration = effect("fade duration")("Slider");
} catch(e) {
var fadeDuration = 1;
}
ease(time, inPoint, inPoint + fadeDuration, 100, -100);

quiver:///notes/85DE3C89-A451-4736-B3B4-82EB872067DE

make a bunch of MP4s out of pngs and mp3s

typeset -Z2 c=0; for f in png/*png; do ((c++)) ffmpeg -y -loop 1 -f image2 -r 25 -i $f -i audio/${f:t:r}.mp3 -c:v libx264 -c:a copy -shortest $c.mp4 done