42
8
As we all know, the Zelda series are one of the best game series ever made. In honor of that, let us play some songs on the ocarina.
Challenge:
Write a program which, given a song, outputs the score to stdout for that particular song.
Input:
The song which you will have to output the score of will be given by a unique three character combination as seen below:
zel - Zelda's Lullaby
sas - Saria's Song
eps - Epona's Song
sos - Sun's Song
sot - Song of Time
sst - Song of Storms
Bonus songs, -7 % each:
mof - Minuet of Forest
bof - Bolero of Fire
sow - Serenade of Water
nos - Nocturne of Shadow
ros - Requiem of Spirit
pol - Prelude of Light
Bonus song 2, -8 %:
scs - Scarecrow's song
As we all know, the Scarecrow's song is a song you compose yourself. This song needs to have eight notes. Output a score you compose yourself which is different from all the other scores.
If you decide to include all songs, it will total to a -50 % bonus to your byte score.
Output:
The notes in the output are symbolized by the following characters:
^
<
>
V
A
Output a score on the following format:
-^-^-^-^-^-^-^-^-
-<-<-<-<-<-<-<-<-
->->->->->->->->-
-V-V-V-V-V-V-V-V-
-A-A-A-A-A-A-A-A-
Only one note per column is allowed. For simplicity's sake I've added another row to the original four rows.
Each note correspond to a different row:
^: ----------------
<: ----------------
>: ----------------
V: ----------------
A: ----------------
Output shall be written to stdout. Trailing newlines are allowed.
Examples:
Input (Zelda's Lullaby):
zel
Output:
---^-----^-------
-<-----<---------
----->----->-----
-----------------
-----------------
Input (Bolero of Fire):
bof
Output:
-----------------
-----------------
--------->--->---
-V---V-----V---V-
---A---A---------
Note cheat sheet:
zel
<^><^>
sas
V><V><
eps
^<>^<>
sos
>V^>V^
sot
>AV>AV
sst
AV^AV^
mof
A^<><>
bof
VAVA>V>V
sow
AV>><
nos
<>>A<>V
ros
AVA>VA
pol
^>^><^
Since we play the ocarina code golf, the shortest program in bytes wins!
Song references:
http://www.thonky.com/ocarina-of-time/ocarina-songs
http://www.zeldadungeon.net/Zelda05-ocarina-of-time-ocarina-songs.php
4Perhaps you should use a % bonus rather than a byte bonus. It's practically impossible to encode any of these songs in <7 bytes, so none of the bonuses would currently be worth it. You should also mention that the Scarecrow song should be composed of 8 actual notes; otherwise someone could just print an empty score. But other than that, nice challenge! – ETHproductions – 2015-09-23T19:30:43.957
9The fact that I can hear these songs in my head reading this question makes me wonder what I'm doing with my life. I mean, I'm at work when I could be playing OoT... – MikeTheLiar – 2015-09-23T21:45:25.007
11I hope this doesn't invalidate any existing answers, but note that in the original Zelda *the scarecrow's song must be composed of two different notes*, so e.g. AAAAAAAA would not be a valid scarecrow's song. – Jan – 2015-09-23T22:19:31.617
4I think lowercase
v
would look better. – mbomb007 – 2015-09-23T22:30:04.4701Suggesting tag kolmogorov-complexity. Some people do encode this! – Leif Willerts – 2015-09-24T08:21:33.563
3I'm really waiting to see is anyone solve this problem in vellato or fugue and play it on ocarina – user902383 – 2015-09-24T10:13:27.847
2Does anyone here even have an ocarina and can play it? – Timwi – 2015-09-24T14:58:46.907