Explorar el Código

add music files to duality article

Thomas B hace 1 semana
padre
commit
95aafb9cfa

+ 21
- 0
input/projects/duality.md Ver fichero

@@ -4,6 +4,7 @@ parent: projects
4 4
 git: https://codeberg.org/xythobuz/Duality
5 5
 github: https://github.com/xythobuz/Duality
6 6
 date: 2025-08-19
7
+update: 2025-09-01
7 8
 comments: true
8 9
 favicon: https://xythobuz.github.io/Duality/favicon.png
9 10
 auto_toc: true
@@ -541,11 +542,31 @@ The Duality in-game theme song was more difficult.
541 542
 It consists more of noises and some LFOs instead of clearly defined notes, so transcribing was pretty hard.
542 543
 In the end I used a trial version of [AnthemScore](https://www.lunaverus.com/) in Wine to get an approximate idea of the notes, but the result is not great.
543 544
 
545
+Here are some direct comparisons.
546
+First the San Andreas Theme, used as menu music.
547
+
544 548
 <!--%
545 549
 lightgallery([
546 550
     [ "https://www.youtube.com/watch?v=7qfbi3HACV8", "San Andreas Theme" ],
551
+    [ "img/duality_music_menu.opus", "audio/ogg", "", "Duality Menu Music" ],
552
+])
553
+%-->
554
+
555
+Next the score screen music, which comes from the FF7 victory fanfare.
556
+
557
+<!--%
558
+lightgallery([
547 559
     [ "https://www.youtube.com/watch?v=rgUksX6eM0Y", "Final Fantasy VII Victory Fanfare" ],
560
+    [ "img/duality_music_score.opus", "audio/ogg", "", "Duality Score Music" ],
561
+])
562
+%-->
563
+
564
+And the in-game music, from the original Duality.
565
+
566
+<!--%
567
+lightgallery([
548 568
     [ "https://www.youtube.com/watch?v=duiUhk5ZkaA", "Duality Theme" ],
569
+    [ "img/duality_music_game.opus", "audio/ogg", "", "Duality Gameplay Music" ],
549 570
 ])
550 571
 %-->
551 572
 

+ 11
- 5
macros.py Ver fichero

@@ -404,11 +404,12 @@ def printSteamMenuDeutsch():
404 404
 # call this macro like this:
405 405
 
406 406
 # lightgallery([
407
-#     [ "image-link", "description" ],
408
-#     [ "image-link", "thumbnail-link", "description" ],
409
-#     [ "youtube-link", "thumbnail-link", "description" ],
410
-#     [ "video-link", "mime", "thumbnail-link", "image-link", "description" ],
411
-#     [ "video-link", "mime", "", "", "description" ],
407
+#     [ "image-link", "description" ], # 2 elements
408
+#     [ "image-link", "thumbnail-link", "description" ], # 3 elements
409
+#     [ "youtube-link", "thumbnail-link", "description" ], # 3 elements
410
+#     [ "audio-link", "mime", "", "description" ], # 4 elements
411
+#     [ "video-link", "mime", "thumbnail-link", "image-link", "description" ], # 5 elements
412
+#     [ "video-link", "mime", "", "", "description" ], # 5 elements
412 413
 # ])
413 414
 
414 415
 # it will also auto-generate thumbnails and resize and strip EXIF from images
@@ -511,6 +512,11 @@ def lightgallery(links):
511 512
                     style = ' style="max-width:300px;max-height:300px;"'
512 513
             lightgallery_check_thumbnail(link, img)
513 514
             print('<div class="border" style="position:relative;" data-src="' + link + '"><a href="' + link + '"><img class="pic" src="' + img + '" alt="' + alt + '"' + style + '>' + img2 + '</a></div>')
515
+        elif len(l) == 4:
516
+            link, mime, none, alt = l
517
+            print('<div class="border">')
518
+            print('<audio controls style="display:block;"><source src="' + link + '" type="' + mime + '" /></audio>')
519
+            print('<p class="audio_text"><a href="' + link + '">Download audio</a></p></div>')
514 520
         elif len(l) == 5:
515 521
             v_i += 1
516 522
             link, mime, thumb, poster, alt = videos[v_i]

+ 6
- 0
static/css/style.css Ver fichero

@@ -399,6 +399,12 @@ span.font-small {
399 399
     border-radius: 10px;
400 400
 }
401 401
 
402
+.audio_text {
403
+    text-align: center;
404
+    margin: 0.2em;
405
+    font-size: smaller;
406
+}
407
+
402 408
 blockquote {
403 409
     position: relative;
404 410
     padding: 1em 0.5em;

BIN
static/img/duality_music_game.opus Ver fichero


BIN
static/img/duality_music_menu.opus Ver fichero


BIN
static/img/duality_music_score.opus Ver fichero


Loading…
Cancelar
Guardar