Webradio player

You can also run the script from Zynthian directly. Install the files into your Zynthian and SSH to the puredata directory where you installed iNetRadio an run the script from there.

In my case, it is as follows:

# cd /zynthian/zynthian-my-data/presets/puredata/generative/iNetRadio/
# ./setup.py
2 Likes

I followed your first suggestion in this way:

after editing the ‘radiostations.txt’ file

  1. in Windows open Terminal (Admin)
  2. type python to install Python
  3. change folder till you arrive in the folder where there is setup.py
  4. type python setup.py to generate the main.pd and the zynconfig.yml files
  5. copy the iNetRadio folder in /home/pi/zynthian-my-data/presets/puredata/generative
  6. enjoy

Hope it helps the dummies like me.

A question @ lexonic: the max number of stations is 22? is it possible to extend rhis limit?

1 Like

@piattica: the number of stations can be easily exteded:

  1. rename “main.pd.template” to “main.pd.template.pd” and open it with Pure Data.
  2. add more stations and adjust the divisor of ctlin114: (127 / (number_of_stations - 1))
  3. rename “main.pd.template.pd” back to “main.pd.template”
  4. open “zynconfig.yml.template” with a text editor and add more “labels” placeholders under “Stations:”
  5. open “setup.py” with a text editor and adjust variable ‘max_stations = 22’

REMARK: Don’t forget to increment the numbers of the placeholders “STREAM#” and “NAME#” :wink:

2 Likes

too difficult for me

An update to allow customizing the Webradio. Now up to 32 radio-stations can be deployed.

The following config options can be set by setup.py command line arguments:

  • define number of stations to be deployed (default = 32)
  • define radio-station to load on startup
  • speed control by the Zynthian knob can be disabled (removes knob control)

The updated file:
iNetRadio.zip (124.9 KB)

Edit: File re-uploaded. Some timing issues solved, and active play/stop state is now persistent when changing stations.

this is the help-screen for setup.py:

usage: setup.py [-h] [-n N] [-d N] [-a] [-s] [-p] [-v] [stationsfile]

Deploy Radiostations for Zynthian's iNetRadio PD-patch.

positional arguments:
  stationsfile          text-file containing the station names and stream
                        URL's to be deployed. (default=radiostations.txt)

optional arguments:
  -h, --help            show this help message and exit
  -n N, --stations N    number of station slots to deploy
  -d N, --defaultstation N
                        station-number to load on startup
  -a, --altprefix       alternative station prefix (default="[NUM]",
                        alternative="NUM:")
  -s, --speed           enable speed control
  -p, --preview         stations preview only. Does not write out any files
  -v, --verbose         print internals
2 Likes

I have added my internet radio player to chain manager branch so it should be available in the next release. I will look at what has been done here to see what can be integrated, particularly methods to configure stations.

7 Likes