Mathematica 2576
Code
Sound[{{d, {0., 1.2}}, {a, {0., 1.2}}, {e, {0., 1.2}}, {f, {1.2, 2.2}}, {e, {1.2, 2.2}}, {e, {2.2, 2.4}}, {f, {2.2, 2.4}}, {a, {2.4, 3.}}, {c, {2.4, 3.}}, {b, {3., 3.6}}, {e, {3., 3.6}}, {d, {3.6, 4.2}}, {a, {3.6, 4.2}}, {e, {3.6, 4.2}}, {a, {4.2, 4.8}}, {c, {4.2, 4.8}}, {b, {4.8, 5.4}}, {e, {4.8, 5.4}}, {b, {5.4, 5.8}}, {e, {5.4, 5.8}}, {b, {5.8, 6.}}, {e, {5.8, 6.}}, {b, {6., 6.6}}, {e, {6., 6.6}}, {d, {6.6, 6.9}}, {a, {6.6, 6.9}}, {b, {6.9, 7.2}}, {e, {6.9, 7.2}}, {c, {7.2, 7.5}}, {a, {7.2, 7.5}}, {a, {7.5, 7.6}}, {c, {7.5, 7.6}}, {b, {7.6, 7.8}}, {e, {7.6, 7.8}}, {d, {7.8, 8.1}}, {a, {7.8, 8.1}}, {a, {8.1, 8.4}}, {c, {8.1, 8.4}}, {b, {8.4, 9.6}}, {e, {8.4, 9.6}}, {d, {9.6, 10.8}}, {a, {9.6, 10.8}}, {e, {9.6, 10.8}}, {f, {10.8, 11.8}}, {e, {10.8, 11.8}}, {e, {11.8, 12.}}, {f, {11.8, 12.}}, {a, {12., 12.6}}, {c, {12., 12.6}}, {b, {12.6, 13.2}}, {e, {12.6, 13.2}}, {d, {13.2, 13.8}}, {a, {13.2, 13.8}}, {e, {13.2, 13.8}}, {a, {13.8, 14.4}}, {c, {13.8, 14.4}}, {b, {14.4, 15.}}, {e, {14.4, 15.}}, {b, {15., 15.4}}, {e, {15., 15.4}}, {b, {15.4, 15.6}}, {e, {15.4, 15.6}}, {b, {15.6, 16.2}}, {e, {15.6, 16.2}}, {d, {16.2, 16.5}}, {a, {16.2, 16.5}}, {b, {16.5, 16.8}}, {e, {16.5, 16.8}}, {c, {16.8, 17.1}}, {a, {16.8, 17.1}}, {a, {17.1, 17.2}}, {c, {17.1, 17.2}}, {b, {17.2, 17.4}}, {e, {17.2, 17.4}}, {d, {17.4, 17.7}}, {a, {17.4, 17.7}}, {a, {17.7, 18.}}, {c, {17.7, 18.}}, {e, {18., 19.2}}, {a, {18., 19.2}}, {c, {18., 19.2}}, {d, {19.2, 20.4}}, {a, {19.2, 20.4}}, {e, {19.2, 20.4}}, {f, {20.4, 21.4}}, {e, {20.4, 21.4}}, {e, {21.4, 21.6}}, {f, {21.4, 21.6}}, {a, {21.6, 22.2}}, {c, {21.6, 22.2}}, {b, {22.2, 22.8}}, {e, {22.2, 22.8}}, {d, {22.8, 23.4}}, {a, {22.8, 23.4}}, {e, {22.8, 23.4}}, {a, {23.4, 24.}}, {c, {23.4, 24.}}, {b, {24., 24.6}}, {e, {24., 24.6}}, {b, {24.6, 25.1}}, {e, {24.6, 25.1}}, {b, {25.1, 25.2}}, {e, {25.1, 25.2}}, {b, {25.2, 25.8}}, {e, {25.2, 25.8}}, {d, {25.8, 26.1}}, {a, {25.8, 26.1}}, {b, {26.1, 26.4}}, {e, {26.1, 26.4}}, {c, {26.4, 26.7}}, {a, {26.4, 26.7}}, {a, {26.7, 26.9}}, {c, {26.7, 26.9}}, {b, {26.9, 27.}}, {e, {26.9, 27.}}, {d, {27., 27.3}}, {a, {27., 27.3}}, {a, {27.3, 27.6}}, {c, {27.3, 27.6}}, {b, {27.6, 28.8}}, {e, {27.6, 28.8}}, {d, {28.8, 30.}}, {a, {28.8, 30.}}, {e, {28.8, 30.}}, {f, {30., 31.}}, {e, {30., 31.}}, {e, {31., 31.2}}, {f, {31., 31.2}}, {a, {31.2, 31.8}}, {c, {31.2, 31.8}}, {b, {31.8, 32.4}}, {e, {31.8, 32.4}}, {d, {32.4, 33.}}, {a, {32.4, 33.}}, {e, {32.4, 33.}}, {a, {33., 33.6}}, {c, {33., 33.6}}, {b, {33.6, 34.2}}, {e, {33.6, 34.2}}, {b, {34.2, 34.7}}, {e, {34.2, 34.7}}, {b, {34.7, 34.8}}, {e, {34.7, 34.8}}, {b, {34.8, 35.4}}, {e, {34.8, 35.4}}, {d, {35.4, 35.7}}, {a, {35.4, 35.7}}, {b, {35.7, 36.}}, {e, {35.7, 36.}}, {c, {36., 36.3}}, {a, {36., 36.3}}, {a, {36.3, 36.4}}, {c, {36.3, 36.4}},{b, {36.4, 36.6}}, {e, {36.4, 36.6}}, {d, {36.6, 36.9}}, {a, {36.6, 36.9}}, {a, {36.9, 37.2}}, {c, {36.9, 37.2}}, {e, {37.2, 38.4}}, {a, {37.2, 38.4}}, {c, {37.2, 38.4}}}
/. {n_, t_} :> SoundNote[n, Round[t, .1], "Trumpet", SoundVolume -> 0.7]]
/. {a -> "C#5", b -> "D#5", c -> "F4", d -> "F5", e -> "G#4", f -> "G#5"}
Output
Bugler's Dream, Trumpet track.
![buglers dream](../../I/static/images/0332399fb18120c57ad8fe3e6e2a937796c6ab618a528724328785292abe8c70.png)
Saving to file
Export["bugler.mid", bugler]
bugler.mid
Try? C: "" 0 characters, I win. Do, or do not, but don't bother otherwise. – Nick T – 2014-02-08T07:38:54.033
1@NickT you better use perl/python/bash/something else. "" does not compile in C. – mniip – 2014-02-08T10:07:29.977
Twinkle Twinkle Little Star was a simple song, and the question gave the exact notes you had to produce, making it objective. This does not, and any attempt to simplify the (rather complex) music is going to sound horrible. To make it objective, I think either the exact notes should be defined in the question, or it should be changed to popularity contest. But if it is a popularity contest, I guess answerers will have to post a link to their output (as far as I know you can only attach picture files here, correct me If I`m wrong.) So complex, it could be more about data compression than music! – Level River St – 2014-02-08T11:12:49.263
I would be fine changing this to a popularity contest, I just thought with the olympics, it would be cool if there was a code-golf that played the olympic song. Maybe even cooler if the code was arranged creatively, such as to create the olympic rings in ASCII or something like that. Can popularity contest still be graded on how short the source code is? – PressingOnAlways – 2014-02-08T16:47:35.227
@mniip it does compile (with warnings); an empty file won the IOCCC one year for shortest quine. – Nick T – 2014-02-08T18:47:00.663
@NickT
In function `_start': (.text+0x20): undefined reference to `main'
– mniip – 2014-02-08T18:48:51.220@mniip http://www.ioccc.org/years-spoiler.html#1994_smr
– Nick T – 2014-02-10T05:22:37.160@NickT Now if you actually take a look at the Makefile rule for smr, it does not use the C compiler
– mniip – 2014-02-10T10:22:11.380