Bill Allombert on Sun, 13 Jul 2025 17:07:26 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: playing music with GP


On Sat, Jul 12, 2025 at 04:52:32PM +0200, Bill Allombert wrote:
> On Sat, Jul 12, 2025 at 07:03:06AM -0700, John Duncan wrote:
> > On a similar note, I'd be happy to hear about it if anyone has a quick
> > solution for getting this to work on mac os.
>
> I assume ffplay should do it with the right options, but so far I did not find
> them.
> Basically the script generates raw 8bit PCM at 8000Hz, single channel (mono).

I foud the correct options.
So please install ffplay (part of ffmpeg) and then change start to

start(fifo="/tmp/parififo")=
{
  system(Str("test -p ",fifo" || mkfifo ",fifo,"; ffplay -i pipe: -f u8 -ar ",FREQ," -hide_banner -autoexit < ",fifo," &"));
  fileopen(fifo,"w");
}

Since GP produce raw sound, ffmpeg is an overkill, but at least one get a nice histogram.

Cheers,
Bill.