Possible, yes; easy, no.
Had I known at the start you wanted to include that effect as well, I would have steered you toward the more complicated route of having a row of lights at the top of the keyboard, because you could use it for this effect.
I can think of two ways to accomplish a resemblance of this in AE without any extra plugins or 3D:
0A) In either case, you need a layer with just the black keys on it. A white solid with masks for each of the key would work.
0B) In either case, you need a point at the top of each key (black and white) where you sample the black and white piano roll emitter layer with a sampleImage() expression to determine if it is black or white (round it to one or the other). You could attach this expression to a row of nulls, each null sampling the point directly behind it.
1A) In option one you would also have a light source at the location of each of the keys, at the top, which would light up depending on the value of the sampleImage() at the previous step
1B) The white solid from 0A would have to be a 3D layer, and you would need another white solid layer behind it to catch the shadows from the keys. Making the solids white allows you to composite the over the keyboard in Multiply mode to get the shadows. (If that doesn’t work too well, you can try gray solids and Overlay mode or even dark gray solids with Screen or Add.)
2) It might be possible to do this with a series of CC light rays effects, the centers of each placed in the same fashion at the top of each key and triggered by the sampleImage() results and using the black-keys solid to generate shadows. The layers would be 2D in this case. It would be a more complex matter to get an output that you can overlay on the keys. My guess is it would have to be in the Add transfer mode.
I’d personally go with the lights solution, knowing with greater certainty that it would work.
It is not going to be a simple operation either way.
Kalleheikki Kannisto
Senior Graphic Designer