Humans are capable of learning a variety of motor skills such as playing the piano. Performance of these skills is subject to multiple constraints, such as musical phrasing or speed requirements, and these constraints vary from one context to another. In order to understand how the brain controls highly skilled movements, we investigated pianists playing musical scales with their left or right hand at various speeds. Pianists showed systematic temporal deviations away from regularity. At slow tempi, pianists slowed down at the beginning and end of the movement (which we call phrasal template). At fast tempi, temporal deviation traces consisted of three peak delays caused by a thumb-under manoeuvre (which we call neuromuscular template). Intermediate tempi were a linear combination trade-off between these two. We introduce and cross-validate a simple four-parameter model that predicted the timing deviation of each individual note across tempi (R 2 = 0.70). The model can be fitted on the data of individual pianists, providing a novel quantification of expert performance. The present study shows that the motor system can generate complex movements through a dynamic combination of simple movement templates. This provides insight into how the motor system flexibly adapts to varying contextual constraints.