Closed PAEz closed 4 years ago
Woah! A ton of great stuff here, thanks for all your research. Looks like we have our work cut out for us!
I'll try to address these things in order:
In closing, these are all great things for us to consider, and I'm grateful to have them written down. To get them fixed though, let's do several small pull requests that bite off one little piece at a time. Otherwise, I fear the bite will be so big we'll never get it down, or we'll choke in the process.
...I think I took that metaphor a bit too far, but you get the idea :)
Now I know how to resync the master I should be able to muck around for a bunch like I do and then make a cleaner pull request for your master. But doing it in clean small bits is NOT something Im going to be good at. Im really not good at doing this cleanly, did I mention I code like a pig? ;)
Since this issue is so old, I'm going to close it. We can reopen if anyone is still interested in it.
So your a perfectionist aye?....well good luck with the osciloper then. ;)
In 1x (not pressing D) mode the osciloper is only 14px high. In 2x its 32px. In 1x mode all values below 71 dont get drawn, I didnt check them all, but alot of them. Try playing a full amped wav of a low tone and youll notice that top gets flattened (prolly longer than it should, prolly being amplified) and the bottom drops of the bottom (isnt drawn at all). So my guess is that its actually meant to be 16 pixels but for some reason its drawn two down and the last two get cut off. In 2x mode it will go all the way down to 0 but the lower values get dithered alot more than the top values do. Try using that wav generator I made and try 71 for instance, that shows it well. Matching the dithering if thats what it is will be dam hard, dont think I could do it. Ive done dithering before, but its not always done the same. When I did the dithering for doing gif's in JS there actually a quite a few algorithms you could use and this is a different kettle of fish.
In my fork I just did a simple pixel mode if you want to check it out... https://github.com/PAEz/winamp2-js/blob/RefactorVisualizer/visualizer.js The scale stuff is coz I wanted to see the difference between having the canvas as 75x16 and 150x32. One thing that showed me is that your prolly better off having the canvas as 2x especially now you got the D working (well done on that...I learnt something new, zoom). My amplify is NOT like winamps, but I like it. ;) Also, was there a specific reason you set the buffer to 2048?..I keep getting different answers when I look on the web, even MDN's page contradicts itself in its examples... https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode.getByteTimeDomainData ...the example and the example for the syntax are different.