From f904825e140b156034834677327b8c9b28bf81b6 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 4 Dec 2023 08:28:13 -0800 Subject: [PATCH] Format/typo check + update bugs of 2013/endoh3 --- 2013/endoh3/README.md | 25 +++++++++++++++++++++---- bugs.md | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/2013/endoh3/README.md b/2013/endoh3/README.md index bae62ff17..fc98f7099 100644 --- a/2013/endoh3/README.md +++ b/2013/endoh3/README.md @@ -4,6 +4,16 @@ make ``` +### Bugs and (Mis)features: + +The current status of this entry is: + +``` +STATUS: INABIAF - please **DO NOT** fix +``` + +For more detailed information see [2013 endoh3 in bugs.md](/bugs.md#2013-endoh3). + ## To use: @@ -23,6 +33,8 @@ The simplest way is to create a .wav file and have your system play that. echo 'CDEFGABc' | ./endoh3 | ruby wavify.rb > cde.wav ``` +Observe how you will need ruby installed. + There are also some other musical samples, twinkle.abc and menuet.abc. @@ -33,6 +45,7 @@ media platforms that have small message length limits. This endoh3ram can toot out a tune that is small enough. + ### A modern day (2023) note about the award 'Most tweetable 1-liner' and twitter: The IOCCC no longer endorses the use of what was once twitter, or whatever it @@ -101,6 +114,7 @@ program: tree](https://en.wikipedia.org/wiki/Stern-Brocot_tree). - How does it generate a wave? Hint: it generates a saw wave. + ### Limitation The following features are supported: @@ -125,6 +139,7 @@ The following features are *NOT* supported: - Any meta fields: `T:title` `L:1/4` - Bar line, repeat, ties and slurs, and everything else. + ### Known Bugs You can *NOT* write a note length immediately followed by a note `E`, @@ -134,6 +149,7 @@ Can you figure out why? A workaround is inserting a whitespace: `C2 E2`. + ### Portability I tested it on: @@ -152,6 +168,7 @@ But I do not attach it to protect you from W\*\*\*\*r. For the same reason, do not post a score that contains only `z1092`. You know, it is ["the famous song"](http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3). + ### Spoiler Here is a magical expression which I found by brute-force: @@ -203,15 +220,15 @@ Finally, the following code generates a saw wave: for(c = 0; c < len; c++) putchar(a = n * D); ``` -where `D` is a frequency and `a` is a variable whose type is char. By assigning -float to char variable, the implicit type conversion is performed from float to -char (modulo 256). +where `D` is a frequency and `a` is a variable whose type is `char`. By +assigning `float` to `char` variable, the implicit type conversion is performed +from `float` to `char` (modulo 256). (Strictly speaking, this behavior is undefined according to 6.3.1.4 in C99; you can replace it with `(long)(n*D)` if you are pedantic.) All that was left was to combine and condense the components. The key is -squashing them into just one for-loop. +squashing them into just one `for`-loop. ## Copyright and CC BY-SA 4.0 License: diff --git a/bugs.md b/bugs.md index c34d09897..49805ac20 100644 --- a/bugs.md +++ b/bugs.md @@ -2907,6 +2907,27 @@ section](2013/endoh1/README.md#spoiler). -- +## 2013 endoh3 + +### STATUS: INABIAF - please **DO NOT** fix +### Source code: [2013/endoh3/endoh3.c](2013/endoh3/endoh3.c) +### Information: [2013/endoh3/README.md](2013/endoh3/README.md) + +From the author: + +-- + +You can *NOT* write a note length immediately followed by a note `E`, +such as `C2E2`. + +Can you figure out why? + +A workaround is inserting a whitespace: `C2 E2`. + +-- + + + ## 2013 hou ### STATUS: INABIAF - please **DO NOT** fix