Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Hands on the piano (1)

  • Hands on the piano (1)

    Posted by Cesar Siena on June 19, 2013 at 11:31 pm

    — Situation overview:
    Each finger has 3 layers (3 anatomical parts and 3 joints, as real). Each part’s rotation is controlled by a slider control in a null (basic) = “level A controller”. Each 3 controllers (each 3 of each finger) are pickwhipped to another expression controller = “level B controller” that, when slided, control the entire finger flexion or extension (also basic thing).

    — Problem description:
    When one finger flex f degrees to press a piano key, all others extend e degrees and so on to each finger. Controlling this animation (piano playing) with the level B controllers is possible, but demands an unfeasible number of keyframes. Each note = ten sliders to slide and keyframe; each score = near a thousand notes (10 000 keyframes each, only in the hands).

    The question is: is it possible to press a checkbox (for each finger) or move a slider that would change the level B controllers, so that the hand would be in the “pressed key position” for that finger?

    In other words, is it possible to have “5 level C controllers”, such that they cause a flexion of f degrees in one finger and extension of e degrees in all others?

    I know that only one “level C controller” is possible, pickwhipping finger 1 level B controller to it and also pickwhipping fingers 2, 3, 4, 5 level B controllers, but multiplying those by -1 (and adding random values). This is basic. BUT THE PROBLEM is that only one level C controller would be possible, because those same level B ones would already be parented to the first “C”. Is there a way to do that with expressions (for all others 2, 3, 4, 5 level C controllers), instead of only parenting?

    Thank you!

    Cesar Siena replied 12 years, 11 months ago 2 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    June 20, 2013 at 4:21 am

    I’m not sure I’m tracking exactly how you have this set up, but it seems like for each finger you could have finger-down and finger-up animations that you could trigger with a checkbox control. The expression would look to see whether the most recent checkbox keyframe was on or off and how long ago that happened. It would then run the appropriate animation, using valueAtTime(). The details depend on how you have things set up, but I think you can definitely avoid all those keyframes.

    Dan

  • Cesar Siena

    June 21, 2013 at 3:21 am

    Hi Dan, if you allow me a dummy description, only for the sake of didatics, I’ll try to put a very objective description of the slider controllers set up until now:

    — In each hand with 5 fingers:
    Slider 1 “level B” controls the flexion (and extension) of finger 1
    Slider 2 “level B” controls the flexion (and extension) of finger 2
    Slider 3 “level B” controls the flexion (and extension) of finger 3
    … and so on to slider 5 “level B”.
    Total: 5 sliders for a hand. Each one controls one finger.

    These “level B” sliders, when slided, cause an empirical flexion (or extension) of the respective finger, that is, the simultaneous rotation of all three layers that compose that finger (layer a, b, c, or, at real, proximal phalanx, medial phalanx and distal phalanx, where their anchor point is, naturally, their joints, as in a real hand).

    Each finger’s layer’s rotation (the rotation property of the layers a, b, c of each finger) is pickwhipped to a slider control, called slider “level A”. If you slide a “level A” controller of layer “a”, only layer “a” rotates.

    Every three sliders “level A” (three for each finger) are pickwhipped to be controlled simultaneously by a slider “level B”. If you slide a “level B”, an entire finger responds (very basic until here).

    Now, the only place I could get until now alone is ONLY ONE basic “level C” controller by doing this:
    Function wanted for a “level C” controller: when slided (or checked, if it will be a checkbox, who knows), it causes the flexion of one finger and the extension of all others, that is, one finger press the piano key, all other do not press the piano key (as in real life).

    A “level C” controller makes the musician play one key of the piano (arranging all fingers at once).

    To rig a “Level C” controller that makes finger 1 press the piano key:
    Pickwhip sliders “level B” of the fingers 2, 3, 4, 5 to the level C and multiply by -1.
    Pickwhip slider “level B” of the finger 1 to the same “level C” controller (and don’t multiply by -1).

    PROBLEM: Now that I want to build the other 4 “level C” controllers I can’t, because all of them are already parented to that first one. But I have a remote idea that it can be done with expressions, although I don’t know how. The cavemen knew more javascript than me.

    How can it be done?
    Which exact expression should I use with valueAtTime()?

    Thank you very much!

  • Dan Ebberts

    June 21, 2013 at 5:01 am

    It’s hard to be precise without seeing your project, but it seems like you need some way of telling the B level slider expressions which finger is getting flexed so that that the expression for that finger multiplies the C slider value by 1 and the expressions for the other fingers multiply by -1. One possible way would be to put that info in a marker comment. Each expression would look at the most recent previous marker and see if the comment indicates that finger is the one being flexed. It sounds interesting and do-able, but not necessarily simple.

    Dan

  • Cesar Siena

    June 22, 2013 at 11:27 pm

    Hum, that sounds a bright idea, even allowing automation of the process! Nevertheless, it would need establishing a very high number of markers (think about the number of notes in a symphony score) and writing instructions or programming code for each one of them. Considering that the aim is reducing the work load, maybe this route would consume the same or even more time than the previous one (although it is definitively creative).

    I was thinking about a master slider for each finger (a slider “level C”) that, when slided would slide all fingers (one, for the same side, all others for the opposite side). As previously said, I’ve made only one of it, but couldn’t be able to make others, because of the parenting limitation.

    A new idea occurred to me: wouldn’t it be possible to take this “level C” slider already made, put a LAYER control on it (expression control: layer control) and just manage this control to point the finger that would flex at that moment?

  • Dan Ebberts

    June 22, 2013 at 11:36 pm

    Yeah, you’d want to automate the creation of the markers. It wouldn’t necessarily have to markers–it could be keyframed note values–again, hard to say without seeing your project.

    I don’t think the layer control idea will work because the layer selection can’t be animated.

    Dan

  • Cesar Siena

    June 23, 2013 at 12:07 am

    If Adobe allowed keyframing the layer control, it would add a lot of spice to the juice.

    I’ll take some pictures of the project and copy the simple expressions so far to give you a better idea of the whole. Thank you, anyway; it has been very interesting discussing this!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy