A hidden gem in sound symmetry
51–54 of 54 posts
Re: A hidden gem in sound symmetry
#52Earlier quoted context omitted.
Why the slowdown? (given that slowdown typically introduces artifacting, making the result as much a pattern of those artifacts as it is of the original signal) (also note that your site does not currently work in Firefox, which would be nice to fix)
It's just a random sound sample I found on freesound. The demo works on Firefox 78, Ubuntu. However you'd have to set correct sample rate with ?sr=44.1 to match the mp3's sample rate: Firefox won't do resampling.
What you can do though is look at the first few bytes of an .mp3 file (since it's a file drop/file load) to just directly read the sample rate from the MP3 block header[1], where you directly check the value encoded by [data[19], data[20]]: if it's [0,0] that means it's 44100, [0,1] means it's 48000, [1,0] means it's 32000 and that's it. There are no other sample rates allowed for MP3.
[1] http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html for the full block format)
Re: A hidden gem in sound symmetry
#53Earlier quoted context omitted.
It's just a random sound sample I found on freesound. The demo works on Firefox 78, Ubuntu. However you'd have to set correct sample rate with ?sr=44.1 to match the mp3's sample rate: Firefox won't do resampling.
Fun fact, I ran into the esampling problem myself back in April when I posted https://github.com/WebAudio/web-audio-api/issues/30 , V2 of the spec will allow this natively, but it also not seemingly making any headway towards initial release so who knows when it'll land... What you can do though is look at the first few bytes of an .mp3 file (since it's a file drop/file load) to just directly read the sample rate fro…
Re: A hidden gem in sound symmetry
#54Earlier quoted context omitted.
Interesting. Figuring out the phase problem is one of my biggest TODO items. How did you compute FFT of the phase? The thing is, phase is discontinuous or multivalued function if we represent phase as a real number. We could also represent phase as a complex number of unit magnitude: exp(i phi). It would be continuous, but complex-valued. And phase is indeed important for hearing: https://auditoryneuroscience.com/voc…
You're in luck -- I managed to dig up my WIP notes from a year ago. https://imgur.com/xLcvLIm As you can see, the raw phase waveform is very "wavy", as might be expected. It oscillates rapidly, making it hard to see the patterns. But if you go to the tweets I linked above, you'll see the phase is much smoother in those images. How did I do it? The key is to focus on every other line. Notice that if you simply pay att…