So I was operating a Laue machine recently which generates x-rays and fires them at a sample, and I noticed that there was a high-pitched whine coming from the instrument (nothing abnormal, just something I noticed). Both the current and the voltage could be set separately; typically values are 10 mA and 20 kV. I noticed that if you change the current, the frequency increases or decreases with it. A frequency spectrum app on my phone showed that the frequency was roughly proportional to the current being applied, so, for example, at 5 mA there'd be a 2000 Hz sound and at 10 mA it'd be 4000 Hz. (I don't remember the exact frequencies. I do remember there were lots of harmonics excited.) The voltage, on the other hand, only caused a small change of the frequency even if doubled.
My question is how would such a sound be generated?
My best guess is that the vacuum tube where the electrons are accelerated has its current adjusted by moving either the anode or cathode, and that forms a variable capacitor which happens to modulate the resonance frequency of the circuit such that the frequency and current increase together. Is this reasonable?