Cardiovascular disease continues to be the leading cause of death worldwide, and current efforts to develop better therapeutics for heart failure have been held back by limited understanding of the normal control of contraction on the timescale of the heartbeat. Here we will use time-resolved ultra-small and small-angle X-ray diffraction at ID02 on whole beating hearts isolated from the rat to determine the relationship between the mechanical function, changes in the structural unit of striated muscle, the sarcomere, and the associated dynamic structural changes in the constituent myosin and actin filaments in situ.