It is currently March 28th, 2024, 9:34 pm

simple question, how to set up "nowplaying" for foobar2000?

Share and get help with Plugins and Addons
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

simple question, how to set up "nowplaying" for foobar2000?

Post by anbr07 »

Sorry, all i found here is very confusing. Where is the .rmskin file for "nowplaying", and how to set up / configure this plugin? I don't know, what a "measure" is, or how to use it. Any help is appreciated, thanks.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by balala »

anbr07 wrote:Sorry, all i found here is very confusing. Where is the .rmskin file for "nowplaying", and how to set up / configure this plugin? I don't know, what a "measure" is, or how to use it. Any help is appreciated, thanks.
NowPlaying was an internal Rainmeter plugin and newly it is even more: it became a measure. There is no .rmskin file for it. If you've installed Rainmeter, it can be used with both syntaxes, mentioned in the above link, without having to do anything else. So, now NowPlaying being a measure (according to the old syntax it was a Plugin measure, but newly it is a NowPlaying measure), you have to create the following type of measures:

Code: Select all

[MeasurePlayer]
Measure=NowPlaying
PlayerName=SEE-BELOW
PlayerType=TITLE

[MeasureArtist]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=ARTIST
In the PlayerName option of the parent measure (the parent measure in this case is the [MeasurePlayer] measure - this is know because the other measure is related to this one, through the PlayerName=[MeasurePlayer] option) add the needed player name, according to the following list: Players.
I think for a beginner the simplest way to figure out what's happening would be to download and install a skin using such kind of measures then study the existing code. It's not so hard as it seems at a first look. There are a lot of such skins, either here on the forum in the Share Your Creations, either on DeviantArt. Just two examples: https://forum.rainmeter.net/viewtopic.php?p=138290#p138290
or
https://www.deviantart.com/art/Ensemble-NowPlaying-Display-for-Rainmeter-516972271
If you did download and install a such skin and have concrete questions, please feel free to come back with them. Also for basic thing about using Rainmeter, you can start here: https://docs.rainmeter.net/manual-beta/getting-started/. There are very good descriptions about using it.
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by anbr07 »

Thanks for the tipp, but that sucks. How do i create a measure? Do i have to open notepad, change the extension, and where to put this stuff? I think i will stick to clicking foobar to get it to the front.

Most people don't want to mess with endless FAQs, howtos, config files, and i don't understand, why Rainmeter gave up the eas way to install stuff.

Anyway, nice from you, that you offered your help. Thanks.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by balala »

anbr07 wrote:i don't understand, why Rainmeter gave up the eas way to install stuff.
If install stuff(s) means install skins, this wasn't give up. When you download a skin, usually a file with rmskin extension is downloaded. These files have a specific format and double clicking them will install the packed Rainmeter skin.
anbr07 wrote:Thanks for the tipp, but that sucks. How do i create a measure? Do i have to open notepad, change the extension, and where to put this stuff? I think i will stick to stick to clicking foobar to get it to the front.
First you have to create a config and inside of it, a skin. Identify the Skins folder. Usually its place is described here (at least if you installed Rainmeter with default settings). Create a folder in the above Skins folder. This folder will be the new config. Inside of it create a file, with .ini extension. This will be the main file of the skin. Inside of this file, you have to write some sections. A [Rainmeter] section usually is inevitable and beside it you have to create measures and AT LEAST one meter (a skin without meters, can't be loaded). What these measures / meters have to contain, depend on what you want to use the skin for. I think there are no general advices on how to start writing the needed sections. This is why I said to download an existing skin and study its code.

but as I said, starting from the link I posted above (https://docs.rainmeter.net/manual-beta/getting-started/), with a bit of patience and perseverance, you can figure out a lot of things. Just keep on working and after a while you'll be able to write very good skins.
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by anbr07 »

Ok, thanks, i will have to sleep over it. I have no idea where to create that stuff. I'll report back, if i could manage things. basically, i''d like to see, which song is currently playing, plus maybe the cover art, time elapsed, plus time left in the song.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by balala »

anbr07 wrote:Ok, thanks, i will have to sleep over it. I have no idea where to create that stuff. I'll report back, if i could manage things. basically, i''d like to see, which song is currently playing, plus maybe the cover art, time elapsed, plus time left in the song.
Let's make the first step. Beside the way I described to create a skin, there is an easier one: open Rainmeter Manage window (double click the Rainmeter icon in the notification area) and click the "Create new skin" button (near the "Active skins" button, in the Skins tab). In the Create new skin window, click Add folder, and rename the newly created folder as you'd like (let's say Player). Click Add skin. A new .ini file will be created, just have to rename this one, too. I named it also Player.ini. In this moment would be a good idea to create the @Resources folder (we'll need it later, probably). For this, click the @Resources button.
When you click Close button in the Create new skin window, Rainmeter is refreshed and the newly created skin become visible. In the left side of the Manage window, click the new Player.ini file and click Edit (upper right corner of the window). This opens the Player.ini file, in the default text editor. Here have to add the needed measures / meters.
Add the following measures, anywhere in the code:

Code: Select all

[MeasurePlayer]
Measure=NowPlaying
PlayerName=CAD
PlayerType=TITLE

[MeasureArtist]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=ARTIST
The PlayerName option of the [MeasurePlayer] measure tells that the skin will use foobar2000 as player app.
Now have to extend the [MeterString] meter to show the values returned by the above two measures. Replace the existing meter name and its only option (Meter=String) with the following ones:

Code: Select all

[MeterString]
MeasureName=MeasurePlayer
MeasureName2=MeasureArtist
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Title: %1#CRLF#Artist: %2
Save the file. Now you can load the skin. If the Player.ini file is still marked in the Manage window, click Load. This will load the skin, but for now it shows no information yet. Start playing something with foobar2000. The title and the artist should have to be shown by the skin.
Are they?
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by anbr07 »

Sorry, but i messed it all up. I have managed to craete the folder, and the skin, named "Music" and "Music.ini". But then the @resources button wasn't available. It was just greyed out. I repeted the whole thing, re-starting Rainmeter in admin mode. But the botton would also be grey. Then i couldn't find the other .ini file.

Then, i couldn't find the settings page with the greyed out button. Neither can i delete the new "Music" forder or ini.

So now i'm stuck.
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by anbr07 »

Now i have retried it, with some small success. Now i have that tiny box saying

Title:
Artist:

but that's all, so far. No actual title is showing. How does this module know to use foobar? Do i have to modify some path in those inis, to point to foobar?
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by anbr07 »

Update, it works now. I had to use "foobar2000", of course. Also i had to turn of the "controlled folder access", as it turned out. Nice. Maybe a small cover art field at the left, plus the elapsed/remaining time values, it would be perfect for my needs.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: simple question, how to set up "nowplaying" for foobar2000?

Post by balala »

anbr07 wrote:I had to use "foobar2000", of course.
Where? Because I don't use foobar2000, but according to the help, for this player you should have to set the PlayerName option of the parent NowPlaying measure to PlayerName=CAD.
anbr07 wrote:Maybe a small cover art field at the left, plus the elapsed/remaining time values, it would be perfect for my needs.
You have to add a few further measures / meters. Add the following measures to your code:

Code: Select all

[MeasureCover]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=COVER

[MeasureDuration]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=DURATION

[MeasurePosition]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=POSITION
From these measures, [MeasureCover] returns the cover, while [MeasureDuration] and [MeasurePosition] return the duration and the progress of the currently played piece (the string value of both measures have the MM:SS format).
Now add an image meter, to show the cover. Add before the [MeterString] string meter, the following image meter:

Code: Select all

[MeterCover]
Meter=Image
MeasureName=MeasureCover
X=0
Y=0
W=120
H=120
PreserveAspectRatio=1
Modify the [MeterString] meter as it follows:

Code: Select all

[MeterString]
MeasureName=MeasurePlayer
MeasureName2=MeasureArtist
MeasureName3=MeasurePosition
MeasureName4=MeasureDuration
Meter=STRING
X=0r
Y=0R
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Title: %1#CRLF#Artist: %2#CRLF#%3 (%4)
That's it. Now the skin will show up the title, the artist, the cover and the progress and duration of the playback.
Let me know if there is anything else you'd like to add.