Tworzenie muzyki w C jedną linią kodu
Co prawda zawijanie tekstu powoduje, ze linii jest więcej, ale po wyłączeniu zawijania program mieści się w jednej linii poniżej 256 znaków. Opis działania programu w komentarzy
Felonious_Gru z- #
- #
- #
- #
- 14
Co prawda zawijanie tekstu powoduje, ze linii jest więcej, ale po wyłączeniu zawijania program mieści się w jednej linii poniżej 256 znaków. Opis działania programu w komentarzy
Felonious_Gru z
Komentarze (14)
najlepsze
coś ode mnie: http://wurstcaptures.untergrund.net/music/?oneliner=2%20%20t%20%20((t%3E%3E16%7Ct%3E%3E2)%2669%26t%3E%3E13)&oneliner2=0.5%20%20t%20%20((t%3E%3E25%7Ct%3E%3E11)%2650%26t%3E%3E130)&t0=30&tmod=0&duration=120&separation=50&rate=22050
A to ZDECYDOWANIE lepsze: http://bit.ly/chaosconspiracy
Tyle na szybko. ;p
The song is 64 frames long. The for-loop C counts frames from 0..63, wrapping back to 0 after 63. On each frame, a note may be triggered or not triggered.
o will be assigned the frequency value for channel 1 by taking the song character corresponding to C/8, and calculating 99pow(89/84, n) where n = 99 minus the character. 89/84 happens to be a very good approximation of 2^(1/12), the ratio between the frequencies of two successive half-steps in equal temperament tuning. The actual exponentiation is performed by multiplying o with 89/84 for each loop iteration where the decreasing k still is larger than the value of the character.
f