Skip to main content
4 of 9
added 244 characters in body
LeFauve
  • 402
  • 2
  • 6

##AWK BASH: 66 86 63 bytes##

Why didn't I think to this first... :o)

That's 26 less bytes than with AWK, for the same result

a=C3z;echo "X:1
K:A
CzCz$a$a$a3$a$a$a$a$a3Cz$a$a$a$a3CzCzCzCzC"

Like the previous version in AWK, it write on stdout a valid "ABC" notation file (thanks Tobia for finding out that the "L" statement was optional)

It looks like this: last version of "2015" partition

And it sounds exactly like the previous version.

Previous version in AWK (86 Bytes)

Here is a new version; a little longer, but with a more accurate timing. I let the first version bellow for comparison/reference:

BEGIN{a="C3z";print"X:1\nK:A\nL:1/8\nCzCz"a a a"3"a a a a a"3Cz"a a a a"3CzCzCzCzCz";}

This is still a valid "abc" file, which looks like this: score of 2015

Here is the new midi file (I accelerated the tempo to stay under the 30 seconds limit).

First version in AWK (66 Bytes):##

This is a lot less interesting than my previous answer, but it is a lot shorter, so:

BEGIN{print"X:1\nK:A\nL:1/4\nCCC2C2C2zC2C2C2C2C2zCC2C2C2C2zCCCCC"}

This outputs a valid "abc" file, which can be read into (among others) EasyABC. It will look like this: Score of "2015" in morse

and it will sound like this (midi file). +

LeFauve
  • 402
  • 2
  • 6