-
if blah 100 else fade out instead of 100 else 0
Hi!
I recently read a post about working with Midi files that reminded me an old question I had; which probably is easier than I think; maybe you can help.
Using this expression,
k = "__";
n =effect("ch_0_pitch")("Slider");
k = ["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"][n % 12];
escala=Math.round(n/12);
toto = k + escala;
myIndex=thisProperty.propertyGroup(2).propertyIndex;
este=thisProperty.propertyGroup(1).propertyGroup(myIndex).name;
if (toto==este)100 else 0I built a system for my 2 kids to make small video tutorials for piano and guitar. I had the guitar neck (and a piano keyboard) done in after effects, and I had a shape layer with a shape group per string and more important, a shape group for each note (with a cricle on each), and each shape group is called with the name of a note.
Thanks to the Omino Midi, you can import a midi file, and its mapped to several sliders. With this expression, you can translate the pitch value coming from the Midi to the notes.
Then, if the note in the slider is a C, the shapegroup named C will be visible, else, not—
So the question would be; is there a way to make the opacity of the note fade away instead of going to 0 from 100? If I use a linear, I don’t know how to guess the valueAtTime where the shapegroup is visible(the time of the slider?), to add some fading frames…
thanks!