get_loaded_song does not seem to work with a track's property: 'rating'
results with Int: 0 no matter what the rating of the loaded track is.
--------------
PS
get_loaded_song does work for all other (those tested) properties.
win 10
build 7349
get_loaded_song 'rating' & param_cast & debug
results with Int: 0 no matter what the rating of the loaded track is.
--------------
PS
get_loaded_song does work for all other (those tested) properties.
win 10
build 7349
Inviato Mon 21 Nov 22 @ 8:43 am
get_loaded_song rating does work fine here.
However it does not return a number and therefore it cannot be used with param_cast
If you use the code on a query named cutom button, you'll see that it returns the stars (UTF Star Character) of the song.
However it does not return a number and therefore it cannot be used with param_cast
If you use the code on a query named cutom button, you'll see that it returns the stars (UTF Star Character) of the song.
Inviato Mon 21 Nov 22 @ 8:59 am
Thank you so much Phantom,
Yes it does work as you mention, to display stars. I did not realize that, it worked in that way.
Is there a way for it to be compatible with say the: deck 2 loaded_song 'rating' 5, which would set the rating of the track loaded on deck 2 to 5 stars ?
How does one get the 'rating' of an existing loaded track?
How can on convert stars into an integer, or something that loaded_song 'rating' and browsed_song 'rating' , can accept for a parameter?
and yes, param_cast 'integer' does indeed NOT work.
and an example of, NOT using param_cast, this (maybe not useful) example does NOT work to set deck 2's rating to deck 1's:
ie loaded_song 'rating' will not accept stars as a parameter.
I have much to learn !
And so awesome to have and amazing VDJ team and forum, who can help.
win 10
build 7349
Yes it does work as you mention, to display stars. I did not realize that, it worked in that way.
Is there a way for it to be compatible with say the: deck 2 loaded_song 'rating' 5, which would set the rating of the track loaded on deck 2 to 5 stars ?
How does one get the 'rating' of an existing loaded track?
How can on convert stars into an integer, or something that loaded_song 'rating' and browsed_song 'rating' , can accept for a parameter?
and yes, param_cast 'integer' does indeed NOT work.
and an example of, NOT using param_cast, this (maybe not useful) example does NOT work to set deck 2's rating to deck 1's:
deck 2 loaded_song 'rating' `deck 1 get_loaded_song 'rating'`
ie loaded_song 'rating' will not accept stars as a parameter.
I have much to learn !
And so awesome to have and amazing VDJ team and forum, who can help.
win 10
build 7349
Inviato Mon 21 Nov 22 @ 11:38 am
so work with what you can query
param_equal `get_loaded_song rating` "★★★" ? true : false
param_equal `get_loaded_song rating` "★★★" ? true : false
Inviato Wed 23 Nov 22 @ 2:25 pm
Thank you so much Locodog, for the clever solution.
so the script from above (that does NOT work):
becomes:
to set deck 2 track rating to deck 1's rating.
A bit longer, but it works. :)
so the script from above (that does NOT work):
deck 2 loaded_song 'rating' `deck 1 get_loaded_song 'rating'`
becomes:
deck 1 param_equal `get_loaded_song rating` "★★★★★" ? deck 2 loaded_song 'rating' 5 : deck 1 param_equal `get_loaded_song rating` "★★★★" ? deck 2 loaded_song 'rating' 4 : deck 1 param_equal `get_loaded_song rating` "★★★" ? deck 2 loaded_song 'rating' 3 : deck 1 param_equal `get_loaded_song rating` "★★" ? deck 2 loaded_song 'rating' 2 : deck 1 param_equal `get_loaded_song rating` "★" ? deck 2 loaded_song 'rating' 1 : nothing
to set deck 2 track rating to deck 1's rating.
A bit longer, but it works. :)
Inviato Wed 23 Nov 22 @ 3:26 pm
or even just this [I didn't think of it first time]
loaded_song rating 3 ? true : false
loaded_song rating 3 ? true : false
Inviato Wed 23 Nov 22 @ 3:42 pm
Wow that is even a much cleaner solution
Thank you
I am still maybe missing something.
Why does loaded_song 'rating' 3 ? true : false work and
deck 2 loaded_song 'rating' `deck 1 loaded_song 'rating'`
does NOT work?
(when replacing the verb, get_loaded_song with loaded_song) in, the original example.
Is it because, loaded_song can only set and query a property, but not return/get its value ? (even though load_song can indeed work with integers)
Thank you
I am still maybe missing something.
Why does loaded_song 'rating' 3 ? true : false work and
deck 2 loaded_song 'rating' `deck 1 loaded_song 'rating'`
does NOT work?
(when replacing the verb, get_loaded_song with loaded_song) in, the original example.
Is it because, loaded_song can only set and query a property, but not return/get its value ? (even though load_song can indeed work with integers)
Inviato Wed 23 Nov 22 @ 5:00 pm
There's indeed only a limited number of script verbs for which you can have another script as parameter. It's not automatically working for any verb
Inviato Wed 23 Nov 22 @ 5:32 pm
Thanks everyone.. as I learn, again thank you.
Again cannot say enough how much I love VDJ and all that it can do..
Again cannot say enough how much I love VDJ and all that it can do..
Inviato Wed 23 Nov 22 @ 5:37 pm