Mercurial > web
annotate music.html @ 71:597f956b8d3a
projects: host patch file for utagoe30en locally
| author | Paper <mrpapersonic@gmail.com> | 
|---|---|
| date | Sun, 01 Oct 2023 04:06:23 -0400 | 
| parents | 629553bdc8aa | 
| children | 
| rev | line source | 
|---|---|
| 20 | 1 <!DOCTYPE html> | 
| 2 <head> | |
| 56 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 3 <title>Music - Paper's website</title> | 
| 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 
| 57 
ac1900c0e376
html: Remove CSP and use local files
 Paper <mrpapersonic@gmail.com> parents: 
56diff
changeset | 5 <link href="./css/bootstrap.min.css" rel="stylesheet" media="screen"> | 
| 69 | 6 <link href="./css/style.css" rel="stylesheet" media="screen"> | 
| 42 | 7 <link rel="shortcut icon" type="image/x-icon" href="favicon.ico?"> | 
| 56 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 8 <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | 
| 69 | 9 <style> | 
| 56 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 10 body { | 
| 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 11 background-size: cover; | 
| 69 | 12 background-image: url("musicbg.jpg"); | 
| 67 
6019514100d4
html: fix random scaling shit on >1080p monitors
 Paper <mrpapersonic@gmail.com> parents: 
64diff
changeset | 13 background-position: center top; | 
| 69 | 14 background-size: cover; | 
| 15 background-color: #1F255A; | |
| 56 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 16 } | 
| 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 17 </style> | 
| 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 18 <script nonce="paper-web-inline"> | 
| 32 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 19 window['libopenmpt'] = {}; | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 20 | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 21 libopenmpt.locateFile = function(filename) { | 
| 39 
35c68429641d
[music.html] Use updated libopenmpt
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
37diff
changeset | 22 return "./js/" + filename; | 
| 32 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 23 }; | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 24 | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 25 libopenmpt.onRuntimeInitialized = function() { | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 26 var player; | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 27 | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 28 function init() { | 
| 53 
1a6df6d6b7ea
music: use The Mod Archive for direct links
 Paper <mrpapersonic@gmail.com> parents: 
50diff
changeset | 29 if (player == undefined) | 
| 41 
f71c5c19940f
Specify our interpolation filter in music.html
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
40diff
changeset | 30 player = new ChiptuneJsPlayer(new ChiptuneJsConfig(-1, 100, 1)); | 
| 53 
1a6df6d6b7ea
music: use The Mod Archive for direct links
 Paper <mrpapersonic@gmail.com> parents: 
50diff
changeset | 31 else | 
| 32 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 32 player.stop(); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 33 } | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 34 | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 35 function afterLoad(path, buffer) { | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 36 player.play(buffer); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 37 setMetadata(path); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 38 } | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 39 | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 40 function loadURL(path) { | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 41 init(); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 42 player.load(path, afterLoad.bind(this, path)); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 43 } | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 44 | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 45 function setMetadata(filename) { | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 46 var metadata = player.metadata(); | 
| 53 
1a6df6d6b7ea
music: use The Mod Archive for direct links
 Paper <mrpapersonic@gmail.com> parents: 
50diff
changeset | 47 if (metadata['title'] != '') | 
| 32 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 48 document.getElementById('title').innerHTML = metadata['title']; | 
| 53 
1a6df6d6b7ea
music: use The Mod Archive for direct links
 Paper <mrpapersonic@gmail.com> parents: 
50diff
changeset | 49 else | 
| 70 
629553bdc8aa
music: fix metadata fetching in chiptune2.js
 Paper <mrpapersonic@gmail.com> parents: 
69diff
changeset | 50 document.getElementById('title').innerHTML = filename.split(/[\\/]/).pop(); | 
| 32 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 51 } | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 52 | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 53 function pauseButton() { | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 54 player.togglePause(); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 55 } | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 56 | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 57 document.querySelector('#playpause').addEventListener('click', pauseButton, false); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 58 document.querySelectorAll('.song').forEach(function(e) { | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 59 e.addEventListener('click', function(evt) { | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 60 loadURL(evt.target.getAttribute("data-modurl")); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 61 }, false); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 62 }); | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 63 }; | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 64 </script> | 
| 59 
d1e77bf4b37f
music: move inline script to before libopenmpt is loaded
 Paper <mrpapersonic@gmail.com> parents: 
58diff
changeset | 65 <script type="application/javascript" src="./js/chiptune2.js"></script> | 
| 
d1e77bf4b37f
music: move inline script to before libopenmpt is loaded
 Paper <mrpapersonic@gmail.com> parents: 
58diff
changeset | 66 <script type="application/javascript" src="./js/libopenmpt.js"></script> | 
| 20 | 67 </head> | 
| 68 <body> | |
| 45 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 69 <div class="navbar-wrapper"> | 
| 56 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 70 <div class="container"> | 
| 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 71 <div class="navbar navbar-inverse"> | 
| 45 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 72 <div class="navbar-inner"> | 
| 50 
65a2123aaf04
Make the brand text on navbar link to main page
 Paper <mrpapersonic@gmail.com> parents: 
47diff
changeset | 73 <a class="brand" href="./">Paper's website</a> | 
| 45 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 74 <ul class="nav"> | 
| 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 75 <li><a href="./">Home</a></li> | 
| 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 76 <li class="active"><a href="#">Music</a></li> | 
| 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 77 <li><a href="projects.html">Projects</a></li> | 
| 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 78 </ul> | 
| 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 79 </div> | 
| 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 80 </div> | 
| 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 81 </div> | 
| 
e44fb9a05998
why does this work?
 Paper <37962225+mrpapersonic@users.noreply.github.com> parents: 
44diff
changeset | 82 </div> | 
| 20 | 83 <h1>Music</h1> | 
| 84 <div class="box"> | |
| 32 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 85 <p>Now playing:</p> | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 86 <p id="title">nothing loaded</p> | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 87 <button type="button" class="btn btn-primary" id="playpause">Play/Pause</button> | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 88 </div> | 
| 
fc37e1f8b89e
Add chiptune2.js functionality
 Paper <mrpapersonic@gmail.com> parents: 
31diff
changeset | 89 <div class="box"> | 
| 20 | 90 <h2>Originals</h2> | 
| 64 | 91 <p><a href="#" class="song" data-modurl="./music/paper_-_old_desk_tribute.xm">Old Desk Tribute [.XM]</a> <a href="./music/paper_-_old_desk_tribute.xm" download>(Download)</a></p> | 
| 92 <p><a href="#" class="song" data-modurl="./music/paper_-_chippygolucky.xm">Chippy-Go-Lucky [.XM]</a> <a href="./music/paper_-_chippygolucky.xm" download>(Download)</a></p> | |
| 93 <p><a href="#" class="song" data-modurl="./music/paper_-_whistling_meadows.it">Whistling Meadows [.IT]</a> <a href="./music/paper_-_whistling_meadows.it" download>(Download)</a></p> | |
| 94 <p><a href="#" class="song" data-modurl="./music/paper_-_shartlover.s3m">xX ShartLover1337 Xx [.S3M]</a> <a href="./music/paper_-_shartlover.s3m" download>(Download)</a></p> | |
| 95 <p><a href="#" class="song" data-modurl="./music/paper_-_reaching_the_world_border.it">Reaching the World Border [.IT]</a> <a href="./music/paper_-_reaching_the_world_border.it" download>(Download)</a></p> | |
| 96 <p><a href="#" class="song" data-modurl="./music/paper_-_sarta.mptm">THIS IS SARTA [.MPTM]</a> <a href="./music/paper_-_sarta.mptm" download>(Download)</a></p> | |
| 53 
1a6df6d6b7ea
music: use The Mod Archive for direct links
 Paper <mrpapersonic@gmail.com> parents: 
50diff
changeset | 97 </div> | 
| 56 
c95a96b61d9a
html: Add Content Security Policy headers
 Paper <mrpapersonic@gmail.com> parents: 
53diff
changeset | 98 <div class="box"> | 
| 53 
1a6df6d6b7ea
music: use The Mod Archive for direct links
 Paper <mrpapersonic@gmail.com> parents: 
50diff
changeset | 99 <h2>Collabs</h2> | 
| 64 | 100 <p><a href="#" class="song" data-modurl="./music/usa_keyboard_final.it">USA Keyboard (co-op with ishineee, rainbow, and quyu) [.IT]</a> <a href="./music/usa_keyboard_final.it" download>(Download)</a></p> | 
| 20 | 101 </div> | 
| 102 <div class="box"> | |
| 103 <h2>Covers</h2> | |
| 64 | 104 <p><a href="#" class="song" data-modurl="./music/paper_-_huxchx.it">Razerek - huxchx [.IT]</a> <a href="./music/paper_-_huxchx.it" download>(Download)</a></p> | 
| 105 <p><a href="#" class="song" data-modurl="./music/gerudo_valley.s3m">Gerudo Valley (OPL2) [.S3M]</a> <a href="./music/gerudo_valley.s3m" download>(Download)</a></p> | |
| 106 <p><a href="#" class="song" data-modurl="./music/paper_-_tintin_on_the_moon.mod">TinTin on the Moon [.MOD]</a> <a href="./music/paper_-_tintin_on_the_moon.mod" download>(Download)</a></p> | |
| 107 <p><a href="#" class="song" data-modurl="./music/paper_-_dance_in_the_universe_cover.mod">Dance in the universe cover [.MOD]</a> <a href="music/paper_-_dance_in_the_universe_cover.mod" download>(Download)</a></p> | |
| 108 <p><a href="#" class="song" data-modurl="./music/paper_-_bob-omb_battlefield_remix.it">Super Mario 64 - Bob-omb Battlefield Remix [.IT]</a> <a href="./music/paper_-_bob-omb_battlefield_remix.it" download>(Download)</a></p> | |
| 109 <p><a href="#" class="song" data-modurl="./music/paper_-_point_of_no_hi-score.it">(mashup) Drax - Tiger Mission Hi-score + ESCHATOS OST - Point of No Return [.IT]</a> <a href="./music/paper_-_point_of_no_hi-score.it" download>(Download)</a></p> | |
| 110 <p><a href="#" class="song" data-modurl="./music/paper_-_vrc6n001_remake.it">(remake) Naruto - VRC6N001 [.IT]</a> <a href="./music/paper_-_vrc6n001_remake.it" download>(Download)</a></p> | |
| 111 <p><a href="#" class="song" data-modurl="./music/paper_-_hip_shop.it">Deltarune - Hip Shop [.IT]</a> <a href="./music/paper_-_hip_shop.it" download>(Download)</a></p> | |
| 112 <p><a href="#" class="song" data-modurl="./music/paper_-_nerou.it">ziner - Flatwoods Monster [.IT]</a> <a href="./music/paper_-_nerou.it" download>(Download)</a></p> | |
| 113 <p><a href="#" class="song" data-modurl="./music/paper_-_drip.xm">Leonz - Among Us Drip Theme [.XM]</a> <a href="./music/paper_-_drip.xm" download>(Download)</a></p> | |
| 114 <p><a href="#" class="song" data-modurl="./music/paper_-_3005.it">Childish Gambino - 3005 [.IT]</a> <a href="./music/paper_-_3005.it" download>(Download)</a></p> | |
| 115 <p><a href="#" class="song" data-modurl="./music/paper_-_infinity.it">Cho Ren Sha 68k - Infinity [.IT]</a> <a href="./music/paper_-_infinity.it" download>(Download)</a></p> | |
| 116 <p><a href="#" class="song" data-modurl="./music/paper_-_bestending.it">Aphex Twin - Avril 14th [.IT]</a> <a href="./music/paper_-_bestending.it" download>(Download)</a></p> | |
| 117 <p><a href="#" class="song" data-modurl="./music/paper_-_visitors.xm">KOTO - Visitors [.XM]</a> <a href="./music/paper_-_visitors.xm" download>(Download)</a></p> | |
| 118 <p><a href="#" class="song" data-modurl="./music/paper_-_vrc6n001.it">Naruto - VRC6N001 [.IT]</a> <a href="./music/paper_-_vrc6n001.it" download download>(Download)</a></p> | |
| 20 | 119 </div> | 
| 120 </body> | 
