Forum: General Discussion
If you need extended support, contact our Support Team.
(*) The moderators hold the rights to move or modify posts in order to keep the discussions clear or to facilitate the search.
Topic: Concatenate Strings with VDJ Script to set User1 field in tag editor
I have a question on setting fields in a text editor, which are bound to keys or buttons on the controller via Virtual DJ script.
I know that setting a fixed string like "Relaxed" to Field User1 to tag the song is possible doing this:
browsed_song "User1" Relaxed
This is working great! Binding this to a key like R makes it easy to tag your songs with your custom tags. But when it comes to multiple custom tags this is not working out any more.
I was wondering if it is possible to do something like
browsed_song "User1" get browsed_song "User1" + ", Intro"
to set value "Relaxed, Intro" in field User1 afterwards?
But this does not seam to work. Only "get" is set to User1.
Is there a possibility to reach what I want with some modification of the given script?
Posted Mon 08 Jan 18 @ 11:57 am
I found a solution to my issue. Here is a script snippet, that does what I want:
get_browsed_song 'User1' & param_equal '' ? browsed_song 'User1' 'Relaxed' : get_browsed_song 'User1' & param_add ',Relaxed' & browsed_song 'User1'
If User1 tag is empty, it just sets value 'Relaxed' to the field. If field User1 wasn't empty, it appends the string ',Relaxed' to the old value.
Now it is easy to use the pads to tag your songs in more detail. Lets assume you assign pad buttons with the script above with values 'Famous', 'Relaxed', and 'LongBreak'.
By pressing those three buttons in a row you tag your song with value 'Famous,Relaxed,LongBreak' in field User1. Displaying the column User1 in the song table, you see all tags of the song at a glance.
When using the pads for the task you can enable the LED of the pads by giving a query like this to the pad-button for 'Relaxed':
get_browsed_song 'User1' & param_contains 'Relaxed' ? color 'cyan' : off
The pad button will be on, if the User1 field contains the word 'Relaxed'.
Posted Thu 22 Feb 18 @ 7:30 pm