SOP deformation

I would like to deform a cube on the z axis and keep the rectangle shape of the rest of the geometry. I first try to do it with twist (bend) and even though the result was working, I m not satisfied as I still cannot figure how to control well the position of the bend to have multiple one while keeping a fix camera inside.

In the end I would like to animate the bending of the cube with the music, so is there a way to dynamically deform the cube? using a sop to chop and going back to sop again (I tried but I probably miss something as the shape is not correct in the end and just look like a line going through all the points…)

Thank in advance for any advice