Sunday, May 31, 2020

Keyboard Modding: Stabilizer changes frequency analysis

As if modding stabilizers wasn't geeky enough, I went and took the recordings from that work and did a bunch more frequency analysis.  The images in the previous post were just spectrogram plots from Audacity.

I used Audacity to plot out both the spectrum (FFT) of the clips of hitting the spacebar, and plotted how the frequency content of the clips changed with each modification.


But of course, FFT results in a linear spacing of frequency bins, so the upper octaves are pretty hard to read, so I replotted in a linear scale to make that more clear:




Right away I noticed a couple things that the spectrograms alluded to, but didn't make quite so apparent:

  • The modded stabilizers (as the first change, of just using the Cherry stabs was with them unmodified), really reduced the low-frequency content.  A 10dB reduction is very noticeable.  I'm chalking that up to the bandaid mod, where the impact of the stabilizer against the PCB is softened, reducing the flexing of the PCB and the noise of the desktop acting like a drum.
  • Look at all that 4kHz to 10kHz noise that went away (even just moving to the cherry stabilizers).  Reduced wire/slider rattles?
  • Modding all the stabilizers (not just the spacebar) maybe didn't have the large effect that I thought it did (or the actual effect is more subtle than these graphs show, since they imply it's a bit of a toss-up.
Also, I left the "filled space bar" dataset off the above because it was hard to see it's impact in that graph:


A bunch of peaks went away.  Which is interesting (and backs up what my ear was hearing), so I think this is worth pursuing further, if it can be done without interfering with the movement of the key.

After that, I decided to look at the differences between the downstrokes and upstrokes of the key (spacebar, still).  This was since, well, there are two events that happen for each keystroke, and the FFT combines them (but they can be seen separately in the spectrograms.

With the original stabilizers:
 
and after the stabilizer mods:

What I find interesting is that with the original stabilizers, the up stroke was far, far quieter above 2kHz than the downstroke.  After the modifications, they track fairly closely.

Anyway, the more fun comparison is the downstrokes vs. downstrokes, and upstrokes vs. upstrokes, to get the before and after on the same graph:



So on the downstroke, there's a big reduction in sounds above 2kHz, except around 10kHz, which didn't come down much at all.

But there's also a new peak (with it's harmonics) a bit over 400Hz (and harmonics at 800-1000Hz, 1200Hz, 1600hz, and 2kHz).

So, less "noisy", and more "musical"?

On the upstrokes, there's much less of a difference, which isn't too surprising, given that the upstroke really didn't see any modifications (the switch still tops out against it's case, relatively undamped).  But that same series of harmonics is present here (the 400Hz series), in both the before and after plots.

But the other surprise is the new set of (maybe?) harmonics showing up above 10kHz.





To try and make sense of the harmonics, I used Audacity's "enhanced autocorrelation" tool.  I'm not sure it's telling me what I think (or answering the question of what I'm looking for).  Especially because of the very high values for the 12kHz frequency bin, and the general observation that peaks seem to be a function of frequency.  This is definitely a tool that I don't understand the right way to use.

Makes interesting graphs, though:



One issue is that it's frequency bins are sized based on the number of samples that the signal has been shifted, so the upper frequency bins are very wide (every other sample is 24kHz, every 3rd sample is 16kHz, every 4th is 12kHz, etc. as I'm using a 48kHz sample rate for this).

Resampling to 192kHz, and then performing the autocorrelation (just the downstrokes), was interesting to see how it changed:

No values below 200Hz, but more detail in the upper frequencies.  I still feel like this isn't properly normalized, or something else is going on.

No comments:

Post a Comment