OOPS!
Please read this rather than my earlier post - should have been drive
side spokes that were making the noise:
Different frequency relative to pedaling rpm depending on gear <> noise
is in crank/bb. I am assuming that is what you meant when you wrote 'It
seems to happen at different frequency depending on the gear I'm in'.
If not, ignore the rest of this.
I will suggest a rear spoke issue (drive side to be specific).
You have a number of loose spokes surrounding one tighter
one that gets sharply loaded when the forces are properly aligned.
This is the scenario I envision: on your right down stroke you load
the wheel laterally (at the bottom, I believe the whole wheel is
actually in torsion around the hub), stressing the non-drive side
bottom spokes and slackening the driveside spokes. Upon
reaching the bottom of your stroke, there is a rapid unloading of the
non-drive side and a corresponding loading of the drive side. This
one spoke, because it is tighter than thesurrounding spokes, takes
the majority of this load and this "instantaneous" loading is causing
the knock.
The frequency changes because of the phase-relationship between the
position of the spokes and the pedals. When they frequency of the
pedal stroke is the same or close to a factor of the frequency of that
single spoke being at the bottom of it's cycle, the noise will occur
more frequently. If they are out of phase (different gear than
before), then you will have just a few instances.
Check it out - give the drive side spokes a squeeze and if one is
significantly tighter than all the rest, that's your culprit (maybe).
If you can't find any there, check your front wheel (again, drive
side) and finally, if still no luck, drip some lube into each spoke
hole and stress relieve the spokes.
HTH