logo

bytemedia

Home to byte-level sounds, images, videos, …
commit: 4c761d9477a6572d8cdfa3f6dffc1741e49b103e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue,  6 Oct 2020 22:51:07 +0200

Initial Commit

Diffstat:

ABYTEMEDIA.733+++++++++++++++++++++++++++++++++
AC/AU 8-bit 8kHz.c39+++++++++++++++++++++++++++++++++++++++
Aibniz/rythm.ib27+++++++++++++++++++++++++++
Aibniz/time-dependent.ib2++
Aibniz/visual.ib5+++++
5 files changed, 106 insertions(+), 0 deletions(-)

diff --git a/BYTEMEDIA.7 b/BYTEMEDIA.7 @@ -0,0 +1,33 @@ +./" All document formats sucks, I find that roff(1)-derived sucks less. Enjoy. +./" Web view: <https://hacktivis.me/git/bytemedia.mdoc/> +.Dd 2020-10-05 +.Dt BYTEMEDIA 7 +.Sh NAME +.Nm bytemedia +.Nd Home to byte-level sounds, images, videos, … +.Sh DESCRIPTION +bytebeat is something that inspired me (thanks geb, viznut, …). Because music is often repetitive by design and that I really love the idea of byte-level precision over your music yet still playing with the algorithms (just because you know how each string on a harp sounds like doesn't means you know how they sound together but you usually care about each and every string). +.Pp +I also quite like exploring this field for video, be it for visualization or other link to music or just generation of a standalove video feed. It could still mostly be called bytebeat as most of music are accompagniated by some video art these days and pretty much always has an image for their release (album, EP, compilation, …). +.Sh FILES +.Bl -tag -width Ds -compact +.It Pa C +C files of course, all of that is POSIX/C99 and mostly designed to be used with +.Xr tcc 1 . +You should be able to pipe their output into any music player supporting the AU file format. +.Pp +I use the following oneliner for music livecoding: +.Dl % echo /dev/shm/live.c | entr sh -c 'pkill -9 -f -x play\ - ; tcc -run - < /dev/shm/live.c | play - &' +.It Pa ibniz +Files to be played via +.Xr ibniz 1 , +a bytebeat esoteric language VM with integrated visualisation. +.Lk http://pelulamu.net/ibniz/ +.El +.Sh AUTHORS +.An Haelwenn (lanodan) Monnier Aq Mt contact+badwolf@hacktivis.me +.Sh SEE ALSO +.Lk http://viznut.fi/texts-en/ +.Lk http://debu.gs/entries/making-music-with-computers-two-unconventional-approaches +.Lk http://canonical.org/~kragen/bytebeat/ + diff --git a/C/AU 8-bit 8kHz.c b/C/AU 8-bit 8kHz.c @@ -0,0 +1,39 @@ +#define _POSIX_C_SOURCE 200809L +// 16k Because 8kHz × 8-bit +#include <stdio.h> +#include <unistd.h> +#include <inttypes.h> // uint32_t +int main(void){ +write(1, "\x2e\x73\x6e\x64", 4); // AU magic header (big-endian ".snd") +write(1, "\x00\x00\x00\x18", 4); // 24 = byte offset, no annotation +write(1, "\xFF\xFF\xFF\xFF", 4); // 0xffffffff = unknown data size +write(1, "\x00\x00\x00\x02", 4); // 10 = (unsigned) 8-bit fixed-point +write(1, "\x00\x00\x1F\x40", 4); // 8000 = Hz +write(1, "\x00\x00\x00\x01", 4); // mono +for(int t = 0;;t++)putchar( + // 8kHz + //t*(((t>>12)|(t>>8))&(63&(t>>4))) + //(t/3&(t/64)%32)*6 // rythm-bass + //(t/3&(t/64)%32)&t/2 // alien-alert + //(t/4&(t/256)%32)&t*2 // alien-alert (too loud) + //t*(42&t>>10) // 42-melody + t*((42&t>>10)%14) // 42-melody-western + //t*(t>>9|t>>13)&16 // twit-twit + + //t*5&(t>>7)|t*3&(t*4>>10) + //(t*5&t>>7)|(t*3&t>>10) + //t*9&t>>4|t*5&t>>7|t*3&t/1024 // robot march + + // Sierpinski Harmony + //(t*3)&t>>8 + //t&t>>8 + //t*(0xCA98>>(t>>9&14)&15)|t>>8 + //(t>>8^t>>10|t>>14|t*3)&63 + //(t*9&t>>4|t*5&t>>7|t*3&t/1024)-1 + //t>>7&1?t>>5:-t>>4 + //t>>4|t&((t>>5)/(t>>7-(t>>15)&-t>>7-(t>>15))) + //(int)(t/1e7*t*t+t)%127|t>>4|t>>5|t%127+(t>>16)|t + + // 44.1kHz + //((t*("36364689"[t>>13&7]&15))/12&128)+(((((t>>12)^(t>>12)-2)%11*t)/4|t>>13)&127) +);} diff --git a/ibniz/rythm.ib b/ibniz/rythm.ib @@ -0,0 +1,26 @@ + +\ nice-twrt +d4r&4^ + +\ watom +\d4r^ +\ wawawa +\N>4.C* + +\ scanner beam +\d1.0rC7^* + +\ TTTRWW +\d1rCC^* + +\ .hack// Death SFX +\d7r666^* + +\ glitch-TONC +\dr42^* +\N>D0.CCEE98 +\N>+8 + +\ Self explainatory +\69^x +\r4p3+ \ No newline at end of file diff --git a/ibniz/time-dependent.ib b/ibniz/time-dependent.ib @@ -0,0 +1,2 @@ +\ accelero +d*xd*+qE0x6r+0 diff --git a/ibniz/visual.ib b/ibniz/visual.ib @@ -0,0 +1,5 @@ +\ munching squares +\^x6r- + +\ fried-PCB noise +\ d*xd*+q1x/6r+