Well, I think you are absolutely right. Bar 22 is F#dim, what Walter Piston calls a secondary dominant, leading (your right again) to G7. The chord on Ab is indeed Ab diminished, or, more technically correct an inversion of B dim, which would normally resolve to C.halfstep wrote:Hi forum,
...
Bar 22 is F#dim, bar 24 is G7.
But what is bar 23?
Is that Abdim? Dhalfdim/Ab? And what is its function?
I would've had no problem if it went straight from F#dim to G7.
...
As I hear it Bach is taking a diversion here, instead of going from F# dim to G7, like you'd expect him to do, he moves his secondary dominant up a whole tone, which gives us another dominant chord, this time for C (minor). The Ab in the bass suggests the bass will be falling to G so what I'd expect to hear in the next measure is a fourth-sixth chord (C with G in the bass), wich would normally resolve to G7.
But here he tricks us again, he does not go to C/G, he goes straight to G7! Bach was a master of this kind of prolonged resolution, constantly playing with the listeners expectations.