Forum: General Discussion

About VirtualDJ and DJing in general

If you need extended support, contact our Support Team.
Forum Guidelines  (*) The moderators hold the rights to remove, move or modify posts.
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'.

Cheers

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
@locodog
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