Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] vlc-radio: save volume and last station across shutdown/start cycle #17

Open
Wikinaut opened this issue Nov 26, 2018 · 8 comments

Comments

@Wikinaut
Copy link

Wikinaut commented Nov 26, 2018

I want to propose a tiny improvement of your vlc-radio software:

  • save last volume
  • save last stream (station)

permanently, so that the next start starts with these values.

Perhaps you know a quick way to achieve this.

@pirateradiohack
Copy link

@Wikinaut I have created a variant of the vlc-radio and one of the features is just that. You may want to give it a try: https://github.com/pirateradiohack/PiRadio

@Wikinaut
Copy link
Author

Wikinaut commented Oct 21, 2021

@Wikinaut I have created a variant of the vlc-radio and one of the features is just that. You may want to give it a try: https://github.com/pirateradiohack/PiRadio

@pirateradiohack Hi, just coming back after a long time to this. I still have the original pirateradio plus phatbeat. Can this (phatbeat) used with your "Transistor" system. You mentioned "deprecated" there.

One remark:
I just implemented a clever idea for users without a display on their pirateradio. I am going to file a separate issue here with the details of my patch.

Basically, the station names (in EXTINF fields in the playlist) are once spoken-out (wav file previously or on demand produced by pico2wave), when you change the channel. The last station number is tracked in phatbeatd and preserved. vlcd can be forced to "goto X", Xth item in the playlist. So everytime when I change the station via prev/next, the station name is spoken out on my pirate radio.

This tiny patch will be published, when it becomes fully tested. At the moment I cope with a difficult-to-find problem that vlcd (on start) does not obey the first "goto " command. I now noticed, that there appears to be an offset (4):

The first item in the playlist has the id 4 (I do not know, why):

http://pirateradio:8080/requests/status.xml?command=pl_play&id=4

@pirateradiohack
Copy link

Hi @Wikinaut , yes, you can use Transistor with phatbeat. I mentioned "deprecated" because I believe this device is not sold anymore. I will update the README to make it clearer. Thanks for pointing this.
I use Transistor on a phatbeat myself, I maintain compatibility with it.

Regarding your idea to speak the name of the currently selected radio stream, I like it. Knowing which radio you are switching to when using the physical buttons without screen can get pretty confusing. I have been trying to find a solution to that.
I use a Python controller in Transistor and could very easily integrate that solution. I'm a bit concerned about the quality of the synth voice though, mostly when it comes to different languages. I will give it a try myself to gauge the user experience.

@Wikinaut
Copy link
Author

Wikinaut commented Oct 21, 2021

@pirateradiohack I now have my code fixed, not yet published (modification of phatbeatd).

A bash script, manually started once after a new playlist is supplied, parses that playlist, extracts the commented stations names (later, this could be fetched using mplayer automatically from streams), "speaks" into wav-files 00.wav, 01.wav and so on. Instead of "next" and "prev" I now use "goto N" and play (using sox' play -q -v 0.4 the stationname-file N.wav (basically).

The "laststation" is always saved in a small file on the sd card and always used when the pirate radio is started.

It's a nice extension, and improvement.

@Wikinaut
Copy link
Author

Wikinaut commented Oct 21, 2021

@pirateradiohack Do you have any idea why:

 I now noticed, that there appears to be an offset (4):

The first item in the playlist has the id 4 (I do not know, why):

http://pirateradio:8080/requests/status.xml?command=pl_play&id=4

Question: Why is there an offset of 4 when accessing an item in the playlist?

Question relates to pirate radio and internet radio using vlcd and phatbeatd.

@pirateradiohack
Copy link

@Wikinaut I do not use this implementation (vlcd) so I can't help you.
This is one of the reasons I use a Python controller, so it is easier to implement this kind of functionality.

@wisemoth
Copy link

wisemoth commented Mar 6, 2022

@Wikinaut Is your vlc-radio patch available? I just set up an old Pirate radio with the stock Pimoroni software. All working OK - but I was thinking of the exact same improvement as you :)

@Wikinaut
Copy link
Author

Wikinaut commented Mar 6, 2022

@Wikinaut Is your vlc-radio patch available? I just set up an old Pirate radio with the stock Pimoroni software. All working OK - but I was thinking of the exact same improvement as you :)

Uh, I have to look for that. Will come back later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants