Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.46 KB

README.md

File metadata and controls

40 lines (29 loc) · 1.46 KB

status: running

📖 Under the hood

To calculate which song should be used, I used this implementation:

function seed(raw) {
  let res = 0;
  raw.toUpperCase().trim().split("").forEach(char => {
    res += Math.round(char.charCodeAt(0) / 5);
    if(res > 30) res -= 31;
  });
  if(res > 30) res -= 31;
  return res;
}

This function iterates the given name by character and increment the variable res by the rounded value of its character code divided by 5.

Whenever the variable res exceeds the total tracks, it decreases by 31.

🧪 Bulk name testing

For instant name testing, go to /bulk-test.

This includes the name informations, process, and the output.

⚖️ Disclaimer

my-ttpd-song only host the image files and not the audio. It relies on PyTube to play music.

For any DMCA requests of audio removal, please contact me.