ah after bumping up the 80000 I find it to be more-less the same as with sox! thank you I think the problem was -c has to be 0:0 :) and also -o came useful I forgot how to read manual (I was looking for it in manual but I didn't know what I was looking for)
I can delete sox now and have less program thanks! On Mon, February 5, 2024 1:21 pm, Alexandre Ratchov wrote: > On Fri, Feb 02, 2024 at 06:41:46PM -0000, [email protected] wrote: > >> hello >> >> I've tried for hours to play bytebeat as everyone else >> >> >> I cannot find anything on the entire internet >> >> >> all I got is `cat a.out >> /dev/speaker)` as root.. a.out is compiled code >> , a >> loop and `putchar(t*((t>>12|t>>8)&63&t>>4));`.. this doesn't sound nearly >> the same as it does to other people it's also slow, not fast >> > > You've to compile the bytebeat program, run it and send the result to a > program that will play can play usinged 8-bit mono at 8kHz. aucat(1) can do > this. > > Example, create a bytebeat.c file with your one-liner and the proper C > boilerplate: > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > > #include <stdio.h> > > > int main(void) { > int t; > > for (t = 0; t < 80000; t++) { putchar(t*((t>>12|t>>8)&63&t>>4)); } > > > return 0; } > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > > Build it: > > > cc -Wall bytebeat.c > > Play the result: > > > ./a.out | aucat -e u8 -c 0:1 -r 8000 -i - > > > Or save it a as music.wav so you can futher process it and/or send it to > someone: > > > ./a.out | aucat -e u8 -c 0:0 -r 8000 -i - -n -o music.wav > > > HTH > > >

