It show two methods which are doing the same frequency extraction job, the lower one is Web Audio analyzer node (quite common and fast, FFT based) and upper is analysis using Web audio biquad bandpass filter bank (slower but more flexible)
I recommend Musical Signal Processing by Curtis Roads (latest edition), it mostly cover every type of sound synthesis in details, it also cover MIDI, spatialization, mixing, filtering and base concepts without much technical / mathematical overhead. Most sound synthesis algorithms can be implemented from the given block diagrams when you get used to read them.
i don't know the tech you are using but you can prevent that by running the code in a sandboxed worker, at least it won't crash, like https://github.com/asvd/jailed (i don't know how secure is that though)
https://github.com/grz0zrg/WABSP2