SthephanShinkufag / bytebeat-composer

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

Add "original song code" button on remixes #69

Closed Chasyxx closed 3 days ago

Chasyxx commented 1 year ago

In "A (Remix of B by C)", Could you also add an "(original song code)" button after "by C?"

It doesn't have to be the actual code, it could just be "A (Remix of B by C, [original song code])"

Here is a proof of concept: image

SthephanShinkufag commented 1 year ago

Now all songs are stored in json. I need to assign a certain hash to each song, and in the "remix" property specify the hash of the original song, and load the necessary code using the hash. Otherwise, I will have to duplicate the code in the json for every remix entry.

Chasyxx commented 1 year ago

I need to assign a certain hash to each song, and in the "remix" property specify the hash of the original code, and load the necessary code using the hash. Otherwise, I will have to duplicate the code in the JSON for every remix entry.

I see your point; A hash/ID would be needed for every code as a lookup so that when the button is clicked it could find what song has that hash and put the detected song in the code area.

SthephanShinkufag commented 4 days ago

Done!

  1. All songs are transferred from .json files to a SQL database. Now I can manage songs any way I want, assign them a hash and make selections for remixes for example. I made a sending form (so far only available to me), so that it would be convenient to add songs to the database. The player still uses static .json files, but now they are automatically generated from the database.
  2. The main thing, for which all this was started - now you can recursively browse remixes of songs by clicking on the ">" buttons, the full information about the song will be loaded and you can play it.
  3. Added a new section "All", where all songs are collected and sorted by authors. Also, because the "Compact JS" section has become very bloated, I split it into two - up to 256 Bytes and from 256 to 1 KB. "Floatbeat" is divided into two categories - floatbeat up to 1 KB, and Big Floatbeat code.
  4. Song entries on the page now have a more organized look (like posts on discussion board) to separate them from each other, and the author sections are also more prominent and can be hidden or unhided.
  5. Songs are now measured in bytes, not characters. Since sections are generated automatically, which category a song will fall into, #256, #1k or #big, is determined by the length of the original code. If there is none, the formatted one is taken, then the minimum.
  6. Yellow previews with code text that you can click on to play are only generated for songs that are no larger than 1 KB, and no more than 4 line breaks, so as not to stretch the page. Anyway, it can be played using the code play button.
  7. Now for each song there are buttons to play the minified, original and formatted code. Each button shows the size of the corresponding code in bytes.
  8. The #c tag is displayed for C-compatible songs in the "All" section. Also, #stereo for the stereo mode and #drawing for the songs that draw graphics now also displayed as tags.
  9. Covers with YouTube links are designed in a style similar to remixes.
  10. Removed "SthephanShi" section, now I am displayed together with other authors. Well, maybe, I am highlighted in yellow a little :3

Screenshot 2024-11-12 at 01-22-10 Bytebeat composer