claude · @mathr
288 followers · 2739 posts · Server post.lurk.org

Finally got the rendering mode for that I started in December working (almost) properly. It uses to estimate quite cheaply (and nastily). The bugs were:

- `haar[0][i] = haar[0][i];` (the second 0 should be 1)

- scaling by `1/sqrt(2)` (scaling by `1/2` looks much better for a sine sweep - not sure what is really "correct")

- plotting `->rms` instead of `->spectrum` (completely the wrong data, probably read out of bounds, explains some crashes)

- flipping the octaves vertically

- plot RMS for each octave, scaled by the number of octaves (plotting dB didn't work out so well)

Still to do before push:

- zoom in too much in the spectrum display and it goes blank. the fix will be to clamp zooming so you can't do that. will need to zoom out automatically when switching from waveform display to spectrum display, if it's too zoomed in

- the spectrum display judders up and down when you resize the terminal and sometimes overlaps the info text at the top

#spectrum #harry #HaarWavelets #EnergyPerOctave

Last updated 6 years ago