From James MacKay’s paper “Another Look at Chromatic Third-Related Key Relationships in Late Haydn: Parallel Keys and Remote Modulation in Selected String Quartet Minuets” in the journal HAYDN: Online Journal of the Haydn Society of North America 8.2 (Fall 2018): ” … third-related shifts in Haydn’s instrumental music occur earlier than 1790, especially in his string quartet Minuet-Trio movements, often built around a parallel major-parallel minor pairing of keys and their relatives. For instance, in Haydn’s String Quartet in F major, Op.50 no. 5 (Der Traum), third movement, Haydn effects a chromatic third modulation in two stages: touching briefly upon the parallel key (f minor) in the trio, then moving immediately to its relative major, A-flat (i.e. flat III of F major).”
Haydn, who lived from 1732-1809, wrote this string quartet (one of his six “Prussian” quartets dedicated to King Frederick William II of Prussia) in 1787. A nephew of Frederick the Great, Frederick William was one of the most notable patrons of music in eighteenth-century Germany and also an avid amateur cellist, according to the classical record label Hyperion.
This performance is by the Festetics Quartet, known for performing on period instruments. The third movement of this complete four-movement video begins at the 11:43 mark. At 13:20, the shift to Ab major is complete (note: the tuning in this performance is a far cry from A440!)