I was just thinking, as NowPlaying can not write the Track's name other than the one already playing, that I could do something like this:
I) For Next Track:
If Track is not changed, then it will be empty.
If Track is changed:
1. When the Track is changed - It is changed as 2 Tracks Ahead and Back 1 time.
2. Writing 2nd Track's name to some variable.
3. Referencing it to some meter as String.
If Shuffle is On, and is not jumbled always (Single Shuffle - till the end of the playlist), we can or can not repeat the same steps as above.
If Repeat is On, then it will be empty.
II) For Previous Track:
1. Writing the Current Track to some variable.
2. Referencing it to some meter when the track changes to next.
Would this work? If yes, then how can I implement this? I have not seen anyone do this so far and I'm not tech savvy.
Edit: Just noticed I posted this in Tips & Tricks Section - where defined ones go.. How can I change/shift this topic to General Discussion? Done ✓
It is currently October 6th, 2024, 10:28 am
Next and Previous Track's Names
-
- Posts: 41
- Joined: December 20th, 2023, 9:18 am
Next and Previous Track's Names
Last edited by SilverAzide on December 21st, 2023, 4:46 pm, edited 1 time in total.
Reason: Moved at OP's request.
Reason: Moved at OP's request.
-
- Rainmeter Sage
- Posts: 8358
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Next and Previous Track's Names
I believe both things can be achieved:Aryx wrote: ↑December 21st, 2023, 9:46 am I was just thinking, as NowPlaying can not write the Track's name other than the one already playing, that I could do something like this:
I) For Next Track:
If Track is not changed, then it will be empty.
If Track is changed:
1. When the Track is changed - It is changed as 2 Tracks Ahead and Back 1 time.
2. Writing 2nd Track's name to some variable.
3. Referencing it to some meter as String.
If Shuffle is On, and is not jumbled always (Single Shuffle - till the end of the playlist), we can or can not repeat the same steps as above.
If Repeat is On, then it will be empty.
II) For Previous Track:
1. Writing the Current Track to some variable.
2. Referencing it to some meter when the track changes to next.
Would this work? If yes, then how can I implement this? I have not seen anyone do this so far and I'm not tech savvy.
Edit: Just noticed I posted this in Tips & Tricks Section - where defined ones go.. How can I change/shift this topic to General Discussion?
I. Just use [!CommandMeasure YourNowPlayingMeasure "Next"] two times one after another, and the "Previous" equivalent once (possibly with a [!Delay NumberOfMilliseconds] between them), and do your thing at the desired moment
II. Use an OnChangeAction or and OnUpdateAction on the track measure and add a [!SetVariable LastTrack "#CurrentTrack#"][!SetVariable CurrentTrack "[YourTrackMeasure]"] to it (in that order), then use the variable as desired
The above might need some DynamicVariables=1 lines in the sections where those volatile variables (or [section variables]) are used, potentially the nested syntax for [#variables] or [&measures] if the value of the just changed variable/ measure is needed on the same line, but other than that, it shouldn't be hard to achieve what you want.
-
- Posts: 41
- Joined: December 20th, 2023, 9:18 am
Re: Next and Previous Track's Names
I can't understand after Dynamic Variables part - Section/Volatile Variables and Nested Syntax part. Can you please explain it like explaining it to a child?
It might sound funny, but, I am not a programming guy too and this piece of software is new to me.. It's just that Rainmeter Codes/Coding (?) are simple and the help is abundant here.
It might sound funny, but, I am not a programming guy too and this piece of software is new to me.. It's just that Rainmeter Codes/Coding (?) are simple and the help is abundant here.
-
- Rainmeter Sage
- Posts: 8358
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Next and Previous Track's Names
I think I have something even better: the manual. It does exactly that. You don't have to read everything, just the few paragraphs of concern. For example, see the relevant info at dynamic variables, section variables or nested syntax. If you still don't understand after reading those explanations about them, come back here and I'll fill in the blank spots.Aryx wrote: ↑December 21st, 2023, 6:07 pm I can't understand after Dynamic Variables part - Section/Volatile Variables and Nested Syntax part. Can you please explain it like explaining it to a child?
It might sound funny, but, I am not a programming guy too and this piece of software is new to me.. It's just that Rainmeter Codes/Coding (?) are simple and the help is abundant here.
P.S. "Volatile" was just a synonym I used for variables that are dynamic (i.e. ever changing) in nature, no hidden mystery there.
Last edited by Yincognito on December 21st, 2023, 6:47 pm, edited 1 time in total.
-
- Posts: 41
- Joined: December 20th, 2023, 9:18 am
Re: Next and Previous Track's Names
Will probably have a look at it after the holidays! Cheers till then!
-
- Rainmeter Sage
- Posts: 8358
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Next and Previous Track's Names
Alrighty then. Have a great time during the holidays, and see you when the time will come.
-
- Rainmeter Sage
- Posts: 16632
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Next and Previous Track's Names
In addition to the links posted by Yincognito above and your discussion, here are a few details.
You have to add the DynamicVariables=1 option to any meter or measure where:
- You are using a variable, whose value is set by a !SetVariable bang, wherever in the code. No need for it if the value of the variable used into the meter or measure is not altered by the !SetVariable bang. So if you have a variable declared into the [Variables] section as MyVar=25 and you want to use this declared value of the variable into a [MyVarMeasure] measure, you don't have to add the DynamicVariables=1 option to this measure. But if you have on any meter of your code for instance a LeftMouseUpAction=[!setVariable MyVar "10"] option, when you click this meter, the value of the variable is set to 10, but the [MyVarMeasure] can't follow this dynamic alteration of the variable, unless you're adding the DynamicVariables=1 option to it.
- You are using section variables, like [MyMeasure], [MyMeter:X] or [MyTimeMeasure:TimeStamp] (obviously just three examples, there might be used plenty of such section variables).
- You can't use dynamic variables into a few sections like [Rainmeter], [Variables], [Metadata], iTunes plugin measures, MediaKey measures and Power plugin measures. Adding a DynamicVariables=1 option to any of these sections is useless, they can't work with such dynamic variables. Take care that this also means that you can use this option only on measures and meters.
- No need for DynamicVariables=1 option on measures and meters which are altered by !SetOption bang (interesting thing!). Unlike !SetVariable, this bang sets the section to which it is applied dynamic, for one update cycle.
-
- Rainmeter Sage
- Posts: 8358
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Next and Previous Track's Names
There you go, balala just summarized what the manual said about these. You escaped reading from it... this time.
-
- Rainmeter Sage
- Posts: 16632
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Next and Previous Track's Names
Yincognito wrote: ↑December 21st, 2023, 7:19 pm There you go, balala just summarized what the manual said about these. You escaped reading from it... this time.
-
- Posts: 41
- Joined: December 20th, 2023, 9:18 am
Re: Next and Previous Track's Names
Welp! Thanks for summarizing it!
It would be a little better if I had some foundation-code or something to go on - even if the fragments are understood, I yet have nothing to glue the puzzle pieces - if you get what I mean.. I have yet to learn the basics to Rainmeter.
Don't mean to bother, if I get it all working, then I'll post it here if no one would..
It would be a little better if I had some foundation-code or something to go on - even if the fragments are understood, I yet have nothing to glue the puzzle pieces - if you get what I mean.. I have yet to learn the basics to Rainmeter.
Don't mean to bother, if I get it all working, then I'll post it here if no one would..