Furthermore, the music Spock actually plays (albeit the simple theme that later might grow more engaging and challenging) should be trivial to do prima vista for somebody with a basic command of the keyboard. And if Spock can play an Earth instrument, piano would be his first choice, being the fundamental introduction to the harmonics and tuning system that dominates all Earth music from the 19th century on.
That Spock would recognize it for a Brahms waltz is a non-issue, too. Spock need recognize neither the music nor the notation style - he is holding the manuscript that says "Johannes Brahms" on the first page, in Brahms' hand that Spock supposedly recognizes. Spock simply doesn't have a reason to think that the music itself would be a fake.
Or, more exactly, the music is yet another example of those things that Spock finds so puzzling about Flint's castle - a piece of art that should not be a forgery (for the wealthy connoisseur would have no truck with those) but logically must be (as the real things would not be available), despite having all the telltales of a real deal (that is, no counterindications Spock can spot, beyond "this cannot exist").
Timo Saloniemi