Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: VDJ Scrip and the Tag Editor; how to prepare your tracks fast

This topic is old and might contain outdated or incorrect information.

Hi there :) it's been a while since my last question but here I am again ;)

My questions are:
1) Is it possible to use scripting to append some text to a existing tag field?
Like: comment before: "tansition track"; comment after pressing a custom button: "tansition track; birthday song"

2) Is it possible to put the context for two or more fields together into another tag (assemble) using a script?
Like: Label: "x"; Remixer: "y"; User1: "z" to comment "x; y; z"

If that's not possible I thought of the following:
putting each information in a different tag, save all tags into mp3, use mp3tag "actions" to assemble all together into the comment field/tag..
After that I have to clear all fields that I used (also the comment field) and force VDJ to reload tags.
This will limit me to the tags i don't use for now (and are able to be exported to tags): Remixer, Composer, Label, Track, Grouping (and maybe comment itself).


background info which lead me to this:
a friend of mine pointed me to a video showing a very fast preparation of new tracks:
https://www.youtube.com/watch?v=h3dYAMNywOI

I immediately thought: How can I do this in VDJ?
My attempt was to use a bunch of custom buttons to set the rating, genre and some tags i frequently use in the comment tag.
and here is the problem when I want to put multiple common tags into the comment field: I overwrite the existing text.
this lead me to the questions above.

many thanks for any hint :) If there are questions left what I try to do: please tell me...
Thanks in advance
Marcus
(I would like to note that I'm not a native english speaking person. Sorry for any trouble trying to understand my problems :D)

Edit: if this should be in "general discussion" please tell me :) sorry for any inconvenience :-|
 

Posted Sat 28 Jul 18 @ 8:29 pm
locoDogPRO InfinityModeratorMember since 2013
Not that I can see with straight script,
but 1 & 2 can be done with the builder addon (pc only)

I used a custom button to set fields 1 & 2
browsed_song 'Field1' 'erm' & browsed_song 'Field2' 'yes'

I then used another custom to get builder to read/parse field1 insert a comma and read/parse field 2, then I added a bit more script to read builders string and cast it to field 1 & also cleared field2
get_text "`get_browsed_song 'Field1'`,`get_browsed_song 'Field2'`" & param_cast "text" & effect_string 'builder' 1 & get_effect_string 'builder' 1 & browsed_song 'Field1' & browsed_song "Field2" ""

And a couple of padpages 1 for field1 for energy , 2nd for field2 mood you could be quicker than the video.
 

Posted Sat 28 Jul 18 @ 9:28 pm
Hi locodog and thanks for replying :)

I would like to go through your answer step by step:

> Not that I can see with straight script,
> but 1 & 2 can be done with the builder addon (pc only)

so I have to get the mentioned addon from here, I guess(?):
https://www.virtualdj.com/plugins/index.html?addonid=80488

> I used a custom button to set fields 1 & 2
> browsed_song 'Field1' 'erm' & browsed_song 'Field2' 'yes'

I did someting similar with 'genre', 'comment' and rating so far...so this can be done without the plugin already :)

The next step is the one that confuses me "a bit" ;) so lets reduce the size of steps, please ;)

> I then used another custom to get builder to read/parse field1 insert a comma and read/parse field 2, then I added a bit more script to read builders string and cast it to field 1 & also cleared field2

> get_text "`get_browsed_song 'Field1'`,`get_browsed_song 'Field2'`"

okay this part is okay for me...I guess we are reading the content of Field1 and 2...

> & param_cast "text"

here we add the next command and I found "param_cast" in the list of verbs :D so we are casting "text to text"
seems like a workaround to assemble two texts into one

> & effect_string 'builder' 1

this command is neither in the list of verbs nor in the button editor
I'm confused how to get a new verb by installing a skin (skin builder) :-|

> & get_effect_string 'builder' 1

okay this one is a known one again...but "builder" (the skin) also acts as an effect?...I'm even more confused :-O

> & browsed_song 'Field1' & browsed_song "Field2" ""

now we fill Field1 with...I guess the assembled content of Field1 and 2...but I miss the part after 'Field1' where the text is insert :-/

> & browsed_song "Field2" ""

this looks like my button named "clear" but I'm confused again. Is it possible to put Field2 in "" OR '' ?
maybe it's misstyped and should be like: browsed_song 'Field2' ""

>And a couple of padpages 1 for field1 for energy , 2nd for field2 mood you could be quicker than the video.

absolutely :) But I'm not at the point needing more fields for even more custom buttons. But later...yeah maybe :D

Can you/somebody point me where to find more info for the questions that pop up after your first answer or answer them directly?
Big thanks so far :)

I'm willing to learn more as I want VDJ to be !at least! as fast for preparation as shown in the video (and not to need mp3tag for that) if this is possible ;)
I'm also willing to sum up the results (and all I've done so far) to present them to a larger group of people here
...so anyone can save time if she/he likes to follow the steps :)
 

Posted Sun 29 Jul 18 @ 2:21 pm
locoDogPRO InfinityModeratorMember since 2013
Builder is not a skin.... I see.... let me link to the correct

http://www.virtualdj.com/plugins/index.html?addonid=80800

, it is an effect with several blank strings, a special feature of get_text is that anything inside ` ` (backticks) is evaluated as script, so field1 is evaluated a comma is inserted into the text string and field2 is evaluated, the following inverted double comma " closes get_text, this is then cast to after the end of the next script

so what it is really saying is
& effect_string 'builder' 1 "field1 evaluated,field2 evaluated"

effect_string and get_effect_string are the same verb the first is used to set, the second is to get the string
we have got hold of the string so it will be added on to the end of the next bit of script
so what vdj sees is

& browsed_song 'Field1' 'field1 evaluated,field2 evaluated'

then the next bit erases field 2 by filling it in with nothing, it doesn't matter if you use ' ' or " " as long as you use the same to close as you do to open.
(for example get_text earlier opens with " therefore anything else that needs to be opened in side get text must use ' single)
(actually inside backticks you maybe able to use " again as this will be evaluated)

I think that is everything, one more thing, if you have done many tracks in the same way field1 for energy , field2 for mood etc etc then you could make another script to do the combining and clearing of the other fields automatically one track after another 50ms speed, but I'll let you try builder (the fx not the skin builder) first

I'm happy to help anyone understand script & especially builder (my release) I honestly didn't know I could use if for this until you asked and I tested. So you taught me or at least made me think, with builder and the fact that the param_add & param_multiply can take 2 vars is a massive leap forward, we can do maths and we can put the results into almost any script
I've been occasionally trying the idea over a year but have just made a small step in c++ but it makes a big change in vdjscript
 

Posted Sun 29 Jul 18 @ 3:04 pm
okay, so here I am...back again... (time can sometimes rush so fast...unbelievable)

Ahhh, big thanks for pointing me to the correct one:) I was searching the addon-section for "builder" and the only result I got was the skin builder :-O But as I said earlier: That's why I was confused...coundn't believe it to be the right one...but back2topic

thanks for further explanation of what this script does in detail :) I think I went a bit further understanding what I have to do...but expect more questions to raise from my side ;)

I get you in case of the mass editting of files :) this seems to be an excellent idea - not to have to click, move down a track, click again... :D

to be honest: I don't came to the conclusion that this script is yours - thanks for mentioning this. That's great for further questions ;)
The first would be: is there any kind of documentation on what this script is able to do? Maybe I see other options to use this while reading about the abilities.

I copy and pasted your code to combine those two fields and clear one of them. This worked as expected :D *yeah*

Next I appended the script to use all (earlier mentioned) fields and past the output to comment:
get_text "`get_browsed_song 'remixer'`; `get_browsed_song 'composer'`; `get_browsed_song 'label'`; `get_browsed_song 'track'`; `get_browsed_song 'grouping'`; `get_browsed_song 'Field1'`; `get_browsed_song 'Field2'`" & param_cast "text" & effect_string 'builder' 1 & get_effect_string 'builder' 1 & browsed_song 'comment'
this again works like a charm *yeah,yeah* :D

Next I want to append a specific word to existing tag without the need to write it to a field in the first place:
get_text "`get_browsed_song 'comment'`; bla" & param_cast "text" & effect_string 'builder' 1 & get_effect_string 'builder' 1 & browsed_song 'comment'
and guess what...it simply works.

So it's time for me to give a short summary in the next post to (hopefully) get others to use this, too :)
 

Posted Sun 05 Aug 18 @ 12:27 pm
Little sum up fo this topic (so far):

Let's assume you use some kind of well known words in a specific tag field (like comment, Field1 aka User1 or others).
This could be like "Transition", "known melody", "known vocals"...you get it
Let's assume you are in a hurry or even to lazy to type this "tags" over and over again...

Here is one possible solution for this: use custom buttons like this:
browsed_song 'comment' "known melody"

This will put the note "known melody" into the comment field with just a single click (and YES you can also add a shortcut in the mapper section to do so).

If you use more buttons and want to put more notes into the same tag field you'll notice that this will overwirte the existing notes...but I guess you want to use a single tag field for more than one information, right? So there is a script that will enable you to do this. Scroll to the posting of locodog pointing to the addon that's needed, install it and move on :)

Next there are two options for you:
1.1) first put in your single notes to fields you are NOT using right now in you everyday DJ-life (like Field1)
1.2) combine all tags into the final field where you want to have your notes for djing
in this case you are limited to the number of tag fields you don't use for now
the advantag is that you can set the order of your notes in the final tag field (maybe always "Transition" before "know melody" and so on)

2.1) add notes on the fly by appending the notes to existing ones in the tag field you are using for djing
if you want to use a specific order you'll have to be careful what button to use first, second and so on...much disciplin and concentration needed
if you don't care about the order (maybe because you are searching for tags instead of looking at your library) you are done

3) combine both: use most common notes and store them in a specific order; add less important tags on the fly later

if you are interested in using the described solutions you'll find all relevant information - how to do this - above.
You may ask questions if there are some left :)

Big thanks once again to locodog for helping me to get to this point :)
 

Posted Sun 05 Aug 18 @ 12:54 pm
locoDogPRO InfinityModeratorMember since 2013
No worries, there are no really documented rules, other than
get_text "what every script you want, anything that needs parsing goes inside back ticks `get_var 'var1' `etc, close get_text with " cast to one of builder's empty strings, which will have parsed anything in ` ` and then cast to something else.

I actually made builder for a padpage called AutoVFX, the maths button works out how many ms per beat and creates time variables for 1/8-1/4-1/2 1 beat all the way to 32 beats (1/8th being the fastest to stay above the 33ms time limit imposed by repeat_start scripts, good for 113-226bpm) , it then injects these variables into repeat_start scripts as the time value., for AutoVXF and AutoFilters you have to include a variable so builder knows which of the 7 strings it should run.
(I could have avoided this by using send_command script, but my aim for builder was just use plain script)
Honestly Builder is still in it's infancy, there's probably lots it can do that I haven't thought of yet, but what I know it can do is insert parsed variables into current scripts that won't allow it.
(v1 worked on just decks(1-4), v1.1 works on master and decks)

You should check out AutoVXF padpage not just because it's cool but the scripts should show you more on what can be done.
 

Posted Mon 06 Aug 18 @ 2:32 am
meinereinerseiner wrote :
Hi there :) it's been a while since my last question but here I am again ;)

My questions are:
1) Is it possible to use scripting to append some text to a existing tag field?
Like: comment before: "tansition track"; comment after pressing a custom button: "tansition track; birthday song"

2) Is it possible to put the context for two or more fields together into another tag (assemble) using a script?
Like: Label: "x"; Remixer: "y"; User1: "z" to comment "x; y; z"

If that's not possible I thought of the following:
putting each information in a different tag, save all tags into mp3, use mp3tag "actions" to assemble all together into the comment field/tag..
After that I have to clear all fields that I used (also the comment field) and force VDJ to reload tags.
This will limit me to the tags i don't use for now (and are able to be exported to tags): Remixer, Composer, Label, Track, Grouping (and maybe comment itself).


background info which lead me to this:
a friend of mine pointed me to a video showing a very fast preparation of new tracks:
https://www.youtube.com/watch?v=h3dYAMNywOI

I immediately thought: How can I do this in VDJ?
My attempt was to use a bunch of custom buttons to set the rating, genre and some tags i frequently use in the comment tag.
and here is the problem when I want to put multiple common tags into the comment field: I overwrite the existing text.
this lead me to the questions above.

many thanks for any hint :) If there are questions left what I try to do: please tell me...
Thanks in advance
Marcus
(I would like to note that I'm not a native english speaking person. Sorry for any trouble trying to understand my problems :D)

Edit: if this should be in "general discussion" please tell me :) sorry for any inconvenience :-|


I think there is an easy solution for your problem. I asked the same kind of questions here:
http://de.virtualdj.com/forums/221695/General_Discussion/Concatenate_Strings_with_VDJ_Script_to_set_User1_field_in_tag_editor.html
and found an answer later by my own. Here is the summary for field User1, where Released is appended to the value already part of the field:

get_browsed_song 'User1' & param_equal '' ? browsed_song 'User1' 'Relaxed' : get_browsed_song 'User1' & param_add ',Relaxed' & browsed_song 'User1'

This should resolve your second problem, too, since you can modify this expression get_browsed_song 'User1' & param_add ',Relaxed' & browsed_song 'User1' to append texts from other fields.

Hope that helped.
Cheers
 

Posted Thu 25 Oct 18 @ 2:29 pm


(Old topics and forums are automatically closed)