Quick Sign In:  

Forum: General Discussion

Topic: Concatenate Strings with VDJ Script to set User1 field in tag editor
Hi everybody,

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
Hi everybody,

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
Wow, what a great idea ive detected 2 years after you have posted it. I like it.
Do you have found a way to remove a word from the chain of multiple tags?
As axample, if user1 contains "Relaxed,Famous,LongBreak" -> remove "Famous"

Posted Fri 03 Jul 20 @ 6:33 am
locodogPRO InfinityModeratorMember since 2013
I don't believe that is possible.

Posted Fri 03 Jul 20 @ 7:33 am
Maybe not with param_*
But maybe with a variable...?!?

Posted Fri 03 Jul 20 @ 10:13 am
locodogPRO InfinityModeratorMember since 2013
I have a very hazy way that it could be done but it's stupidly impractical and not worth thinking about.

Posted Fri 03 Jul 20 @ 10:25 am
NicotuxHome userMember since 2014
maybe you can add the "strings manipulation" engine (or similar) used in my test version "ArtnetDMX" to your "builder" adddon ?

Posted Fri 03 Jul 20 @ 10:49 am
locodogPRO InfinityModeratorMember since 2013
to be fair, I didn't think of builder, yes with tweaks it could do it BUT the typing on the user end would be way longer than doing it manually

Posted Fri 03 Jul 20 @ 12:47 pm
NicotuxHome userMember since 2014
The other hand, string/chars extraction, tailing cut (leading cut being already possible), insert, index [retro]finding, search... may be usefull

Posted Fri 03 Jul 20 @ 12:57 pm
Or just replace "something" with "nothing"...

Posted Fri 03 Jul 20 @ 7:31 pm
NicotuxHome userMember since 2014
In old testing ArtNetDMX plugin was implementing for tests:
strstr, strrchr, strchr, index, strleft, strright, strlen, substr, folder and for WINDOWS fileselect

Posted Fri 03 Jul 20 @ 11:12 pm
I do it the most straight forward way. I have a delete button to clear the whole field and press the buttons to set the remaining tags again. Since I do not use more than 3 tags, this is done in like 2 secs. And you do not have to open the tag-editor. For me this process to remove the unwanted tag is sufficient. 😉

Posted Tue 14 Jul 20 @ 3:45 pm
Guys -- a BIG BIG thank you for your work, explanations ... whoohoo, happy camper here!

started with the scripting couple of days ago, first thing I wanted to be able to quickly rate, be able to apply multiple tags to a song ... couldn't figure it out by myself, but you saved the day! big time.

Note .. for me "user1" didn't work and had to use "Field1" .. so my script looks like this.

get_browsed_song 'Field1' & param_equal '' ? browsed_song 'Field1' 'Funky' : get_browsed_song 'Field1' & param_add ', Funky' & browsed_song 'Field1'

Posted Tue 12 Oct 21 @ 2:22 am
NicotuxHome userMember since 2014
These are 'Field1' and 'Field2" or 'User 1' and 'User 2' (space is important in names)

your script is working, however it can add ',Funky' multiple times

This one does the same taking care about 'Funky' already set :

get_text `get_browsed_song Field1 & param_equal "" ? get_text 'Funky' : param_contains 'Funky' !? param_add ',Funky'` & param_cast & browsed_song Field1

(more advanced script, with interesting concepts good to figure out
- param conservation over tests
- grouping alternatives in get_text
- not match testing
- text value automatic casting )

Posted Tue 12 Oct 21 @ 12:37 pm
Hey Folks,

yes, the field User1 and 'User 1' was handled the same in old versions of VDJ. Now it makes a difference and you should use 'User 1'.
Btw: In my newest version of the script, I prefix the tag with a hash: `#Funky #Groovy #Relaxed`.
Like this you can take advantage of the new native tag-system of VDJ: You set the Tags very fast using the pads and can use features like dynamic filters as a feature out of the box of VDJ:

Maybe VDJ could add verbs in script to add or remove a tag 😎
Here's the snippet of my current script:
get_browsed_song 'User 1' & param_contains '#GG' ? nothing : get_browsed_song 'User 1' & param_equal '' ? browsed_song 'User 1' '#GG' : get_browsed_song 'User 1' & param_add ' #GG' & browsed_song 'User 1'

Cheers Jochen

Posted Sat 20 Nov 21 @ 12:01 pm