Format/typo check + update bugs of 2013/endoh3
This commit is contained in:
1 parent
7dd7fd786d
commit
f904825e14
2 files changed
+42
-4
No files matched your search
+21
-4
@@ -4,6 +4,16 @@
|
|||||||
make
|
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:
|
## 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
|
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.
|
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.
|
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:
|
### 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
|
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).
|
tree](https://en.wikipedia.org/wiki/Stern-Brocot_tree).
|
||||||
- How does it generate a wave? Hint: it generates a saw wave.
|
- How does it generate a wave? Hint: it generates a saw wave.
|
||||||
|
|
||||||
|
|
||||||
### Limitation
|
### Limitation
|
||||||
|
|
||||||
The following features are supported:
|
The following features are supported:
|
||||||
@@ -125,6 +139,7 @@ The following features are *NOT* supported:
|
|||||||
- Any meta fields: `T:title` `L:1/4`
|
- Any meta fields: `T:title` `L:1/4`
|
||||||
- Bar line, repeat, ties and slurs, and everything else.
|
- Bar line, repeat, ties and slurs, and everything else.
|
||||||
|
|
||||||
|
|
||||||
### Known Bugs
|
### Known Bugs
|
||||||
|
|
||||||
You can *NOT* write a note length immediately followed by a note `E`,
|
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`.
|
A workaround is inserting a whitespace: `C2 E2`.
|
||||||
|
|
||||||
|
|
||||||
### Portability
|
### Portability
|
||||||
|
|
||||||
I tested it on:
|
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`.
|
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).
|
You know, it is ["the famous song"](http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3).
|
||||||
|
|
||||||
|
|
||||||
### Spoiler
|
### Spoiler
|
||||||
|
|
||||||
Here is a magical expression which I found by brute-force:
|
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);
|
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
|
where `D` is a frequency and `a` is a variable whose type is `char`. By
|
||||||
float to char variable, the implicit type conversion is performed from float to
|
assigning `float` to `char` variable, the implicit type conversion is performed
|
||||||
char (modulo 256).
|
from `float` to `char` (modulo 256).
|
||||||
|
|
||||||
(Strictly speaking, this behavior is undefined according to 6.3.1.4 in C99; you
|
(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.)
|
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
|
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:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|||||||
@@ -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
|
## 2013 hou
|
||||||
|
|
||||||
### STATUS: INABIAF - please **DO NOT** fix
|
### STATUS: INABIAF - please **DO NOT** fix
|
||||||
|
|||||||
Reference in new issue
Block a user