SthephanShinkufag / bytebeat-composer

Bytebeat player with a collection of many formulas from around the internet.
https://dollchan.net/bytebeat/
MIT License
85 stars 26 forks source link

bytefunk original doesn't work #30

Closed SArpnt closed 2 years ago

SArpnt commented 2 years ago

has error "TypeError: note is undefined" (at line 2564, character 10) is this in the original code, or is this a mistake while copying?

SArpnt commented 2 years ago

i checked some more and it isn't an issue while copying, the bytebeat just has an error at t=0, and the website refuses to play it because of that. i'm not sure why the formatted version works.

SthephanShinkufag commented 2 years ago

As I said earlier, I modified and fixed some songs (that called formatted versions now) to play properly. Especially songs by raphaelgoulart. His original versions have issues. There how initializes "shy smile", "bytefunk", and "bossabeat":

window.data = (t > 10 && window.data) ? window.data : 

They all used the same global object. And when you reload page and play "bytefunk" first, then it's ok. But then you click to "shy smile" and got an error:

TypeError: window.data.channels[15] is undefined

Because window.data already exists from previous song, and not contains window.data.channels[15]. I fixed that in my versions (now called formatted).

SArpnt commented 2 years ago

i think a problem here is that it doesn't even attempt to play the bytebeat even when the majority of the song works, it only errors in runtime at the start. i've decided to allow playback even when getting runtime errors at 0 on my website, maybe consider it.

i'll close when the error handling is decided on

SthephanShinkufag commented 2 years ago

I described the problem to you. I fix raphaelgoulart's code in formatted versions, Original versions are not changed, you can go to the source links and download code on your own, and see that they have problems. Here nothing to fix anymore.

SthephanShinkufag commented 2 years ago

Also you can check them on my site, maybe your site handles errors in different way.

SArpnt commented 2 years ago

Also you can check them on my site, maybe your site handles errors in different way.

i have checked them on your site, not sure you're getting my point my point is that although the original has errors it's still playable, it just isn't playable on your website because the audioWorklet gets rid of the function when the error happens. because i changed the way my website handles the error, it can still play despite the error.

SthephanShinkufag commented 2 years ago

Hm, yes, I see. Before I placed original versions, I didn't have any problems because I have fixed versions. I remember I couldn't play bytefunk from beginning when I discovered that song. Fun fact, if you play any song before, then without restarting and stopping press to original button of bytefunk, it will play without problems...