It's interesting that you pretty much described a physical "discrete Fourier transform". Our cochlea works this way with different length hairs attached to nerves to hear different frequency ranges and old harmonic analyzers were build with this principle.
It's not a coincidence. :) My quarantine hobby has been getting into music, audio programming, and electronics, so I very much have Fourier analysis on the mind.