Preliminary: Base position of German verbs
One key difference between English and German is the position and order of verbs. Looking at simple sentences obscures the fundamental differences; the following pair is, after all, almost identical.
Solutions can1 be2 found3.
Lösungen können1 gefunden3 werden2.
However, the structural differences can easily be made visible.
(because) solutions can1 be2 found3 quickly by this simple algorithm
Lösungen können1 von diesem einfachen Algorithmus schnell gefunden3 werden2
weil Lösungen von diesem einfachen Algorithmus schnell gefunden3 werden2 können1
It is the subordinate clause of the last example that reveals the base position of German verbs: at the right edge of the clause, their order reversed (321) compared to the English equivalent (123).
Objects "close to the verb"
Klavier in Klavier spielen isn't a completely normal object; the phrase as a whole refers to the habit of playing the instrument, not to playing on a specific instance of it or a specific act of playing. The easiest way to think of such combinations is that they behave almost like a new verb, and verbs (and their parts and objects "close to the verb") are positioned at the right edge of the clause. That's the reason why other stuff (such as manchmal in your example) has to go in front of it.
weil die beiden früher jeden Abend zusammen im Keller Klavier gespielt haben
because the two of them used to play the piano in the basement together every evening
As soon as you replace Klavier by a normal object, other orders become available. (As has been pointed out, German word order "in the middle" isn't fixed.)
weil die beiden dieses Spiel früher jeden Abend zusammen im Keller gespielt haben