Randy the new RPi streamer and player on the block

Possibly expose the option as a triple toggle. Off, On, album or On, tracks :)
This would allow single album listening without any adjustments from replay gain when set to off and when set to on a smoother experience with random tracks and multiple albums.
Currently I am enjoying the randomness of Randy when working at my bench but have to stop frequently to adjust volume as tracks change.

Some claim a slight downside in audio quality but I have yet to hear any and the benefits far outweigh any possible detriment.
Replay gain tags make no changes to the quality of audio files and are saved as metadata to be used for level adjustment with a compatible player.
Album gain preserves the individual tracks relative levels within an album but adjusts album's overall levels to match.
Track gain adjusts each tracks relative level to other tracks .

Looking at the tags so far I see that my albums have both sets written so the album gain would overide the track gain unless a toggle to select either was present...

Currently tagging with rsgain which handles more file types, including .wav, than others.


https://wiki.hydrogenaud.io/index.php?title=Rsgain#Linux
 
Last edited:
….

I am wondering also how do you guys feel about:
  • volume control?
  • normalisation (keeping volume of different tracks consistent)
* both may have some effect on sound quality

Good stuff and lots of movement!
Gideon
Hi Gideon,

You inquired about volume control & normalization long time ago :)
For me normalization is not very important, but I would like to have volume control.
It could be a setting, I don’t change it often (100% volume is a bit much on headphones :) )
Do people use the slider for fast forward/reverse?
 
Member
Joined 2023
Paid Member
Hi Gideon

Hope you have been keeping well! I just loaded up your current RPi version and all is working well! (all 104k tracks!) The player still sounds amazing for every track! mpv is so awesome. :hphones:

The sound card selection is a nice touch. Reminds me to remove the unnecessary modules wasting power. 😊

I was writing as there needs to be some edits to the Wiki page on smb mounts. Needs a bit of clean-up and update to reload after fstab changes a systemctl daemon-reload is required before testing the auto-mount. I have a public git account also so perhaps can edit that way. Let me know.
Screenshot 2024-01-21 223211 - Copy.png
 
  • Like
Reactions: 1 user
Hi,
I’m using Randy purely for radio streams, not for albums.
What I’m missing is volume control via the web interface. Atm I have to do that via alsamixer in ssh.

It is possible to use mpd to control the volume.
I would like to control it via the slider in the bottom (see the arrow), or via an up/down control in the top right.

So, I need to alter the web page a bit.
For a front end developer that is probably very easy, I’m not one :)
I will try it anyway; if anyone is interested, please check my fork.
(Or, share your fork if you already modified it :) )

It’s a work in progress, so far I have moved the Power off functionality to the main page.
Other changes are removing changing the device’s host name on install and the google tracking.
Screenshot 2024-05-17 at 12.11.22.png
 
Hi @PjVervoorn @Roncauston @Sumaco !

Due to recent work (and also lack of work) obligations I just noticed how much I am missed from all your latest and earlier messages.

@PjVervoorn - Volume coming soon thanks for the nudge! after seeing your message I had some time while bringing my daughter to the swimming pool to test out some ideas and it looks like working well, I just need to wrap it up into a release.

@Roncauston
1. How can I use Bluetooth headphones?
-- There's some bluetooth libraries for RPIs I have looked into but they were a bit of a PITA at the time.
If you are installing Randy on an OS that already has bluetooth working then the connected device should appear under settings->audio devices, for example here is a screenshot from Randy running on my Macbook
1716125733465.png

2. Easier way to connect to nas.
-- As I don't have a NAS, its a bit hard for me to build something and test it out, the best right now is to follow @Sumaco excellent wiki steps here - https://github.com/PapaSimons/Randy/wiki/Setting-up-a-NAS
3. Cd player (usb) not working?
-- hmm.. it's an interesting use case and can be really cool for people who still have lots of CDs!
Some questions/thoughts:
  • are you plugging it into a RPI and does it show up under settings in any way?
  • There may be some necessary driver packages to install?
  • Maybe mpv has some different way to read tracks from a CD?

@Sumaco - thanks so much, I am not a very savvy github user but I can look into how to add you over this week, meanwhile you can share with me your github handle.

I'll aim to put up a post this week with the latest release.
At the same time the next effort will be mainly focused on making the installation more accessible so that a wider set of people can try Randy out.

Meanwhile, every day Randy is playing radio tracks and lots of great music on my system!
 
  • Like
Reactions: 1 user
Hi Gideon,

My tests for volume (with mpv’s ao-volume command) were not really successful, but with alsactl I had more success.
I now understand the relation between the various components/pages.

I’m also happy with relocating the poweroff button to the front.
 
  • Like
Reactions: 1 user

New Randy release v1.0.20 is out!​

This release is dedicated to all those situations when music is playing in the background and your spouse tries to tell you something from the other side of the apartment, or you have a zoom call coming up and you don't feel like getting up and lowering the volume on your amplifier.
Of course thanks to @PjVervoorn it also appeals better to headphone listeners which need an easy volume control.

Whats new:
  • Replay Gain which has been there for a while but was never announced - thanks to @DRONE7
  • Volume slider right smack on the top of the player - thanks to @PjVervoorn
  • Some more code optimisations and fixes for the radio browser service
** The volume uses MPVs volume rather than ALSA which give a bit more flexibility for different OSs and still sounds good.
** Power off button didn't make it to the front page this time but can still be found under settings.

Things you may not have noticed about Randy:
  • Clicking on Randy on the top left creates a new random playlist
  • You can search radio station names and also try Youtube and a few other streaming site urls and try to play them
  • When Randy can't find a suitable album cover it will load a random doodle

randy_v20.jpg


Enjoy,
Gideon
 
Hmm I have installed the latest randy (on hardware that previously ran it) but after install can't connect.


bob@randy:~$ journalctl -f -u randy-node
Jun 04 05:00:36 randy randy-node[1108]: code: 'MODULE_NOT_FOUND',
Jun 04 05:00:36 randy randy-node[1108]: requireStack: [ '/home/bob/Randy/index.js' ]
Jun 04 05:00:36 randy randy-node[1108]: }
Jun 04 05:00:36 randy systemd[1]: randy-node.service: Main process exited, code=exited, status=1/FAILURE
Jun 04 05:00:36 randy systemd[1]: randy-node.service: Failed with result 'exit-code'.
Jun 04 05:00:36 randy systemd[1]: randy-node.service: Scheduled restart job, restart counter is at 5.
Jun 04 05:00:36 randy systemd[1]: Stopped Randy nodejs application daemon.
Jun 04 05:00:36 randy systemd[1]: randy-node.service: Start request repeated too quickly.
Jun 04 05:00:36 randy systemd[1]: randy-node.service: Failed with result 'exit-code'.
Jun 04 05:00:36 randy systemd[1]: Failed to start Randy nodejs application daemon.

bob@randy:~$ sudo systemctl status randy-node
× randy-node.service - Randy nodejs application daemon
Loaded: loaded (/etc/systemd/system/randy-node.service; enabled; vendor pr>
Active: failed (Result: exit-code) since Tue 2024-06-04 05:00:36 UTC; 5min>
Process: 1108 ExecStart=/usr/bin/node /home/bob/Randy/index.js (code=exited>
Main PID: 1108 (code=exited, status=1/FAILURE)
CPU: 279ms

Jun 04 05:00:36 randy systemd[1]: randy-node.service: Scheduled restart job, re>
Jun 04 05:00:36 randy systemd[1]: Stopped Randy nodejs application daemon.
Jun 04 05:00:36 randy systemd[1]: randy-node.service: Start request repeated to>
Jun 04 05:00:36 randy systemd[1]: randy-node.service: Failed with result 'exit->
Jun 04 05:00:36 randy systemd[1]: Failed to start Randy nodejs application daem>

bob@randy:~$ sudo apt install nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nodejs is already the newest version (12.22.9~dfsg-1ubuntu3.5).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Ubuntu 22.04 server base.
 
Last edited:
bob@randy:~$ sudo ./update.sh
-------------------------------------------
######>>> stopping randy service
-------------------------------------------
-------------------------------------------
######>>> deleting randy files
-------------------------------------------
backing up DB files
removing existing files
rm: cannot remove 'node_modules': No such file or directory
rm: cannot remove 'package*': No such file or directory
-------------------------------------------
######>>> Download latest release of Randy
-------------------------------------------
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5964k 0 5964k 0 0 824k 0 --:--:-- 0:00:07 --:--:-- 1121k
Randy-v.1.0.20/.gitignore
Randy-v.1.0.20/DB/
Randy-v.1.0.20/DB/README.md
Randy-v.1.0.20/LICENSE.md
Randy-v.1.0.20/README.md
Randy-v.1.0.20/index.js
Randy-v.1.0.20/install.sh
Randy-v.1.0.20/lib/
Randy-v.1.0.20/lib/mpv-wrapper.js
Randy-v.1.0.20/lib/playlist_utils.js
Randy-v.1.0.20/lib/radio-url-finder.js
Randy-v.1.0.20/package-lock 2.json
Randy-v.1.0.20/package-lock.json
Randy-v.1.0.20/package.json
Randy-v.1.0.20/public/
Randy-v.1.0.20/public/404.html
Randy-v.1.0.20/public/CSS/
Randy-v.1.0.20/public/CSS/basecss.css
Randy-v.1.0.20/public/CSS/loading-btn.css
Randy-v.1.0.20/public/CSS/loading.css
Randy-v.1.0.20/public/IMG/
Randy-v.1.0.20/public/IMG/Arrow_Right_MD.svg
Randy-v.1.0.20/public/IMG/Bookmark.svg
Randy-v.1.0.20/public/IMG/Bookmark_onesong.svg
Randy-v.1.0.20/public/IMG/Check_16.svg
Randy-v.1.0.20/public/IMG/Close_Circle.png
Randy-v.1.0.20/public/IMG/Close_MD.svg
Randy-v.1.0.20/public/IMG/Elephant_Walking_animated.gif
Randy-v.1.0.20/public/IMG/First_Aid.svg
Randy-v.1.0.20/public/IMG/Folder.svg
Randy-v.1.0.20/public/IMG/House_01.svg
Randy-v.1.0.20/public/IMG/Menu_Alt_04.svg
Randy-v.1.0.20/public/IMG/Play.svg
Randy-v.1.0.20/public/IMG/Randy.png
Randy-v.1.0.20/public/IMG/Randy192.png
Randy-v.1.0.20/public/IMG/Randy512.png
Randy-v.1.0.20/public/IMG/Randy_screenshot1.png
Randy-v.1.0.20/public/IMG/Randy_screenshot2.png
Randy-v.1.0.20/public/IMG/Randy_screenshot3.png
Randy-v.1.0.20/public/IMG/Record.png
Randy-v.1.0.20/public/IMG/Reload.svg
Randy-v.1.0.20/public/IMG/Search_Magnifying_Glass.svg
Randy-v.1.0.20/public/IMG/Settings.svg
Randy-v.1.0.20/public/IMG/Skip_Back.svg
Randy-v.1.0.20/public/IMG/Skip_Forward.svg
Randy-v.1.0.20/public/IMG/Spin.svg
Randy-v.1.0.20/public/IMG/Trash_Full.svg
Randy-v.1.0.20/public/IMG/bookmark_onesong.png
Randy-v.1.0.20/public/IMG/favicon.png
Randy-v.1.0.20/public/IMG/icon-refresh.png
Randy-v.1.0.20/public/IMG/icon-refresh@2x.png
Randy-v.1.0.20/public/IMG/lazy-loading.gif
Randy-v.1.0.20/public/IMG/loading-dots.gif
Randy-v.1.0.20/public/IMG/mic.svg
Randy-v.1.0.20/public/IMG/placeholder_img.png
Randy-v.1.0.20/public/IMG/wheres_randy.png
Randy-v.1.0.20/public/JS/
Randy-v.1.0.20/public/JS/anime.min.js
Randy-v.1.0.20/public/JS/api.js
Randy-v.1.0.20/public/JS/jquery-3.3.1.min.js
Randy-v.1.0.20/public/JS/jquery.knob.min.js
Randy-v.1.0.20/public/JS/main.js
Randy-v.1.0.20/public/JS/socket.io.js
Randy-v.1.0.20/public/index.html
Randy-v.1.0.20/public/manifest.json
Randy-v.1.0.20/public/service.js
Randy-v.1.0.20/update.sh
Randy-v.1.0.20/update_mpv_alsa.sh
putting DB files back
-------------------------------------------
######>>> installing Randy Dependencies
-------------------------------------------
./update.sh: 39: npm: not found
-------------------------------------------
######>>> starting randy service
-------------------------------------------
bob@randy:~$ sudo systemd start randy-node.service
bob@randy:~$ journalctl -f -u randy-node
Jun 04 07:08:02 randy randy-node[863]: requireStack: [ '/home/bob/Randy/index.js' ]
Jun 04 07:08:02 randy randy-node[863]: }
Jun 04 07:08:02 randy randy-node[863]: Node.js v18.13.0
Jun 04 07:08:02 randy systemd[1]: randy-node.service: Main process exited, code=exited, status=1/FAILURE
Jun 04 07:08:02 randy systemd[1]: randy-node.service: Failed with result 'exit-code'.
Jun 04 07:08:03 randy systemd[1]: randy-node.service: Scheduled restart job, restart counter is at 5.
Jun 04 07:08:03 randy systemd[1]: Stopped randy-node.service - Randy nodejs application daemon.
Jun 04 07:08:03 randy systemd[1]: randy-node.service: Start request repeated too quickly.
Jun 04 07:08:03 randy systemd[1]: randy-node.service: Failed with result 'exit-code'.
Jun 04 07:08:03 randy systemd[1]: Failed to start randy-node.service - Randy nodejs application daemon.
^[[A^C
 
Last edited:
@DRONE7 , seems to be an issue with nodejs installation as the latest Randy needs a version higher than 21 if I am not mistaken.
They have changed their package distribution method a couple of months ago and I put the latest one in script which works on rpi debian but I may need to make that part of the script more foolproof across Ubuntu as well when I come back from overseas.

Meanwhile see if you can follow the nodejs installation instruction from nodejs.org to get the latest v22 and you can try to run the update script again thereafter.
 
Last edited:
  • Like
Reactions: 1 user
Boom!
Thanks Gideon, installed the latest node.js as per your instruction..
https://nodejs.org/en/download/package-manager/

# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

# download and install Node.js
nvm install 22

# verifies the right Node.js version is in the environment
node -v # should print v22.2.0

# verifies the right NPM version is in the environment
npm -v # should print 10.7.0

and re-ran the latest install and now randy boots to the web UI :)
 
Last edited:
Hi Gideon, I did try to install Randy on an old HP Chromebook running Ubuntu Mate but it throws a fit every time so I am at present still running via a pi. Still can't get Bluetooth to play or the usb cd drive. Will Randy work ok with the latest bookworm and will it work on diet pi installs. Sorry to put you to any extra work but I love Randy and think the mods so far especially the volume are great. Keep up the great work you are doing.
Ron
 
Hey Ron, Thanks for continuously trying it out and with an HP Chromebook which sounds like a cool set up!

I am guessing it's the same Nodejs changes bit that throws fits.

I just published a new small version v1.0.21 where I rolled back to the previous nodejs method which has been working on both RPIOS and Ubuntu. I didn't test it on Ubuntu so please let me know if this works if you have the chance to try it out.
* Also changed to a new background API

On your HP Chromebook, you should have more chance connecting to bluetooth and maybe even the CD drive on the OS level.
If you can get them working on MATE can you also let me know if they appear in Randy settings?
The CD drive may appear under music folders while if you have a bluetooth device connected to the laptop then the device can appear audio devices, if you are testing bluetooth headphones then it's worth to start from a lower volume.

I'll be continuing the effort to make installation simpler and more foolproof and minimal.

btw, I haven't tested on dietpi but I think @PjVervoorn has had some experience with Randy on it and its on my PI on bookworm which is probably not the latest but not too far from it. I will be testing on some more minimal bookworms some time soon.

Gideon
 
I now have randy running on both dietpi and Ubuntu mate but no audio. If I use MPV locally I get audio but through randy I get nothing. Also if I turn on Bluetooth I can't see it in audio options?
By the way where can I find the rolled back version of randy v1.0.2.21 ?
Thanks for all of your help, time and effort put into this project, it's really appreciated.
 
Hey Ron, v1.0.21 should be the latest release so you should get it out of the box if you run the install or update script.
Can you check what you get under Randy settings for audio devices in Mate or Dietpi on your laptop?

For example on my RPI it looks like this:
1718616450532.png

* note that it will autoselect HDMI by default so I switched it to my USB DAC to get sound out of it

On my Macbook, if I have my headphones connected via bluetooth, they will appear under audio devices as well (WH-1000...).
1718616676602.png

* note you may have to 'show all'

Gideon