Hello,
Thank you all for the excellent work done here !
I would definitely like to be able to play my favorite webradios from my zynth when i’m not playing it, it costs few energy and is already plugged to the speakers.
I made a puredata patch that switches between a few favorites radio using ffplay (ffmpeg) but I found that ffplay won’t output to jack so I now search another way.
Any clue how I could manage to do that ?
Otherwise, is there a “simple” way to create a zynthian interface over a bash or python script ?
Don’t know how to integrate PyRadio UI within Zynthian UI and if even it will be possible.
But it looks like it can be scripted:
From what I understand so far, PyRadio use an external player (vlc, mplayer). So if PyRadio has to be run simultaneously with Zynthian, be sure your player is configured to use the jack audio subsystem (and not alsa directly).
Ha, thanks le51, ffplay~ in puredata probably can’t output to jack, just as ffplay in OSes.
I tried the vlc route, with puredata “vlc remote”, but vlc don’t seem to connect to online file/stream since the remote make it listen to localhost for control.
mpv could play a webradio, but from the CLI, and I don’t know how to control it from puredata.
I don’t know how to create a zynthian interface over a python or bash script so I’m forced to DIY.
I guess what I’m missing is an API, that is WIP if I understand correctly
I have the pd patch working. I revised your file to include a control to select any of the four radio stations and a volume control. I had to add a PD_LINUX file called ffplay~.pd and a yaml file to get things working.
Thanks @ronsum for fixing this up. It would be advantageous to see the station name but I guess the Zynthian interface to PD doesn’t support strings, only MIDI CC?
It may be advantageous to be able to stop streaming, e.g. to have the chain loaded ready to use but not consuming too many resources.
Thanks @ronsum ,
I added play/stop control in the patch, uploaded in my 1st comment @riban, not sure if sending a stop message to ffplay will actually stop consuming data…
Very pleasant. Occasional drop out and a little slow in responsiveness to station changes, but I’m sure that’s to be expected. Had it running for over an hour and a half of peaceful piano and only one splat in that period . DAB has done far worse on a thundery day.
Might be an idea to track the implementation of the audioplayer as many of the functions are similar in the two, and a common implementation would unify and simplify audio stream presentation.