Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_nowplaying2 (Read 7128 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

foo_nowplaying2

I'm happy to announce my first foobar2000 plugin, foo_nowplaying2.

What it does is output a title-formatted string with the playback state to a user-configured file. That file can be consumed by software such as OBS Studio - Text (GDI+) source.


Get it from github - https://github.com/foxx1337/foo_nowplaying2

Re: foo_nowplaying2

Reply #1
Thank you! I've been looking for a replacement for NP. I use it to overlay text of what's playing when I stream.

**EDIT**
When I click on Releases, it goes to a 404. I am logged into GitHub.
Think millionaire, but with cannons.



Re: foo_nowplaying2

Reply #4
Thank you!
Think millionaire, but with cannons.

Re: foo_nowplaying2

Reply #5
@foxX :  please add an option to limit the size of a log text file by specifying the maximum number of entries, after which new entries will make older ones "spool off."  Thanks for the 64-bit version!


Re: foo_nowplaying2

Reply #7
Now Playing 2 0.1 (foo_nowplaying2) (2023-09-09)
vearsion remains 0.1.

It was also v0.1 when I was in "Now Playing 2 0.1 (foo_nowplaying2) (2023-07-09)".
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

Re: foo_nowplaying2

Reply #8
Oops.

Re: foo_nowplaying2

Reply #9
Hi! I was so happy to find your add-in! It works like a charm. I am using it to project info about the current playing track. One question or idea...

Would it also be possible to export in such a way data about THE NEXT track in a queue? I would need this to announce what is playing next while the current track is still playing.

tlesk

Re: foo_nowplaying2

Reply #10
Would it also be possible to export in such a way data about THE NEXT track in a queue? I would need this to announce what is playing next while the current track is still playing.
I think I know how to do it.

  • same file, or different file?
  • first n entries from the playback queue, OR, if queue is empty, first n entries after the current one in the playlist, if the playback order is "Default"?

Re: foo_nowplaying2

Reply #11
Hello, I used to use an old plugin called "AMIP Wrapper" to rename my songs, (last updated 2010, stopped working with Foobar 2.0)

So now Im here testing your plugin out, its recent made plugin and that's awesome that you took apon to do this.

Atm Im missing 1-2 huge feature and that is, what kind of change should happen to the text file when no song is being played.

So lets say I played a song, on stream I Stop the music to talk to viewers about something, then I would prefer not to have the song info still visible on my screen.

** 1 **
So basically "Stop = Change text" and if so to what... my preference would be " " (just space) but that could just be an empty field that can be customized by each person.
( I just realized that it does this by default, but still an option field to write whatever a person prefers on their own would be nice, maybe I want it to say "No Song playing atm" )
I also to my surprise found out that the text file gets re-written if I pause the song. To the exact same text as when song was playing, feels not necessary.


** 2 **
When song is playing sometimes people forget to read what the song was, and they ask at the end of the song, or even worse they ask in the next song, and with random shuffle, streaming I don't freaking remember...
So.... then it would be nice if the previous song possible to be saved in another txt file of my choice.


** 3 ** Is not needed but would be fancy...
Lets say when a song is changed, instead of instantly changing the text file, if it could to every 0.5 sec it would remove the last letter in the text file and save it.
Untill all letters are removed, then do the same but in oposit order when writing the new song. So type one letter each 0.5 sec, it would look like someone was typing the name.
Needed? Absolutely not, but it would be cool.

Re: foo_nowplaying2

Reply #12
Would it also be possible to export in such a way data about THE NEXT track in a queue? I would need this to announce what is playing next while the current track is still playing.
I think I know how to do it.

  • same file, or different file?
  • first n entries from the playback queue, OR, if queue is empty, first n entries after the current one in the playlist, if the playback order is "Default"?


For what I need it would be enough to get next playing track with the same format as for the now playing track in a separate file. If there is no next playing track, then the file is empty. But if it is easier for you, you can just add Include next playing track checkmark to the interface and put the next playing track as the last line in the file. Or you can auto create a file with a prefix next_<filename> and just write the next playing track with the same format to it. It would be really nice to have this. Thanks.

Re: foo_nowplaying2

Reply #13
The only thing I can't seem to replicate from foo_np_WhateverTheOriginalWasCalled is having it spit out something if Foobar is closed (it would set the output file before exiting) and/or when I click on stop.  I'm trying this as the Format but it's not outputting anything when I click on stop:

Code: [Select]
$if(
%isplaying%,
$if(%ispaused%,|| Paused ||,▶ Playing ▶)
$if2($trim(%title%),$trim(%filename%)) by
$if2(%artist%,Unknown Artist) on
$if2(%album%,Unknown Album),
ThisIsNotShowingIfIClickOnStop)

Re: foo_nowplaying2

Reply #14
** 2 **
When song is playing sometimes people forget to read what the song was, and they ask at the end of the song, or even worse they ask in the next song, and with random shuffle, streaming I don't freaking remember...
So.... then it would be nice if the previous song possible to be saved in another txt file of my choice.

The component does have a 'log mode' option that you can use to keep the last X number of songs in the file, though it will of course make the output file a multi-line file and you may need to adjust your stream layout in OBS to accomodate.  OBS text sources do a have a 'log' option as well but I'd have to play around with it a bit to know how to use it.

As far as getting the "previous song" information to your chatters, your chatbot should be able to open the text file and display more than one song as a response to a command, it might just need a little elbow grease to format it nicely (instead of outputting "Current Song - CurrentTitleLastSong - Last Title"). It would depend on your bot, though, but if you let me know your setup I might be able to walk you through it if you need a hand.

Re: foo_nowplaying2

Reply #15
v3.0 is out https://github.com/foxx1337/foo_nowplaying2/releases/tag/v3.0

Added 2 new tabs, one for "next up", similar to the "now playing" functionality, working for queue and for the "Default" playback order.
The second tab is just for an infinite log of entries prefixed by timestamp, sort of like an offline last.fm database.



Also using Consolas for the code editors if possible.

What's the deal with writing something to the "Now Playing" file on stop?

Re: foo_nowplaying2

Reply #16
Thanks for Update.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

Re: foo_nowplaying2

Reply #17
Hi.

Now Playing 2 3.0 (foo_nowplaying2) (2023-11-05):

\foobar2000\profile\configuration\foo_nowplaying2.dll.cfg

I don't have the configuration file that existed in previous versions, where is it saved?

foobar2000 v2.1 preview 2023-10-30  64-bit Portable installation
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

Re: foo_nowplaying2

Reply #18
I don't have the configuration file that existed in previous versions, where is it saved?

foobar2000 v2.1 preview 2023-10-30  64-bit Portable installation
In foobar2000 v2+ there aren't any cfg files anymore. All settings are stored in the config.sqlite database.

Re: foo_nowplaying2

Reply #19
Thank you for your reply.

It was in "Now Playing 2 2.1 (2023-09-09)"
Other Components (.cfg) have also been updated.

For example, if you delete foo_run.dll.cfg (foo_run) and start foobar, foo_run will be in its initial state.
If you return it, it will return to normal.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

Re: foo_nowplaying2

Reply #20
Actually, my answer was not completely correct. There isn't only any cfg file anymore, if the component is upgraded to use the new config system. This seems to be the case for the latest "Now Playing 2" version.

Re: foo_nowplaying2

Reply #21
Thanks.
What if I want to use a specific configuration file for another foobar (Portable installation)?
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)


Re: foo_nowplaying2

Reply #23
@marc2k3
Thanks.
So, it seems impossible to extract only specific component settings?

If you need to edit config.sqlite, I can't do it.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)