Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Script Question.
J J ZrnPRO InfinityMember since 2019

Setting up a POI action to change the key of the song at the marker...tried several ways ...this appears to be what i am looking for ? (either match key or set key) however no change occurs.

Match Key ......

change the key of the song to match the given key. you can use standard notation ('match_key "A#m"') or numeric ('match_key "03A"'). if no given key, it will use the other deck. the change will be the smallest change to make it compatible with the given key.

Set_Key

change the key of the song to match the given key. you can use standard notation ('set_key "A#m"') or numeric ('set key "03A"'). if no given key, it will use the other deck. the change will match the exact key.

Thanks for your help in advance.
 

geposted Sun 06 Aug 23 @ 4:30 pm
locoDogPRO InfinityModeratorMember since 2013
both work here,
match changes to nearest key match [might be absolute 3rd, 5th, whatever nearest]
set is a like for like key copy.
 

geposted Sun 06 Aug 23 @ 5:05 pm
I also can confirm that both work when setting an action in the POI editor. (also key_move may be of interest)


I did notice that, for example:
set_key '01B' will set the tracks key to 01A, NOT the expected 01B
(could not set a key to XXB, using set_key)
Even if the other deck is say 03B and using set_key to set current decks key to the other deck .. it will be set to 03A, in this case.
Appears that A or B is not used when setting keys.. just learned this.

IE from the key compatibility list drop-down.. if a track is say 03B one can only select keys such as 08B, 01B.. .. and not a key such as xxA.
 

geposted Sun 06 Aug 23 @ 5:48 pm
AdionPRO InfinityCTOMember since 2006
key 0
 

geposted Sun 06 Aug 23 @ 5:51 pm
locoDogPRO InfinityModeratorMember since 2013
@IIDEEJAYII
your stab at it would be
get_loaded_song 'key' & param_cast & set_key
 

geposted Sun 06 Aug 23 @ 5:57 pm
locoDogPRO InfinityModeratorMember since 2013
@@IIDEEJAYII easy with the edits once you ask a question it gets confusing if you don't

set_key '01B'
will set the key as expected if the track is a major key, if not it will set to 01A
 

geposted Sun 06 Aug 23 @ 6:19 pm
thanks all for the help :)

@Adion that is an awesome solution .. thanks

@locodog , yes, just as I was reviewing the post.. realized I needed the get_loaded_song instead of, loaded_song, and next realized that needed to use param_cast to get the key.. and came up with the same script .. and since it worked, did not re-post the question.

and happy it did get noticed.. because leaned key 0 is a much cleaner script.

and thank you, JJ ZRN for the question, allowing me to learn something interesting :)


 

geposted Sun 06 Aug 23 @ 6:38 pm
J J ZrnPRO InfinityMember since 2019
IIDEEJAYII wrote :
thanks all for the help :)

@Adion that is an awesome solution .. thanks

@locodog , yes, just as I was reviewing the post.. realized I needed the get_loaded_song instead of, loaded_song, and next realized that needed to use param_cast to get the key.. and came up with the same script .. and since it worked, did not re-post the question.

and happy it did get noticed.. because leaned key 0 is a much cleaner script.

and thank you, JJ ZRN for the question, allowing me to learn something interesting :)




:) My song is a 1B and would like the song to change at a certain point to another key. I used a POI action with set_ key '02B' and match_key '02B' and neither worked so thats why I asked the question..lol
 

geposted Sun 06 Aug 23 @ 7:48 pm