Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Is there some way to refresh the mapping file, without restarting VDJ?
Hey team

I've been working through a large mapping file and I found the standard mapping interface to be a bit clunky.

Just things like not having an 'undo' button, not being able to look up a verb name without it replacing the verb my cursor is over, not being able to easily compare one mapped action with another...

So I went the nerd route and have built my own web interface for updating the raw XML file, which appears to be working fine. The only problem now is, when I update the XML file, the changes aren't loaded into VDJ unless i do a full restart of the application.

It seems that when VDJ starts it pulls the mapping xml files into a local cache and references it from there. Not helpful for what I'm trying to do.

Has anyone tried mapping directly into the XML file, and if so, have they come up with a method to see your changes in VDJ as they happen? A simple refresh button would be nice, or better yet, VDJ could watch the mapping folder for changes and refresh when it happens?
 

geposted Sat 04 Feb 23 @ 9:57 am
locoDogPRO InfinityModeratorMember since 2013
You'd need to reload the mapping, so use network control plugin for your "thing" to send a message to vdj

https://www.virtualdj.com/wiki/NetworkControlPlugin.html

And you'd commandline something like this

http://127.0.0.1:80/execute?script=controller_mapping+'keyboard'+'MAPPINGNAME'
 

geposted Sat 04 Feb 23 @ 10:04 am
locoDogPRO InfinityModeratorMember since 2013
or you could have a hw button that does a similar script without needing nc plugin.
I'd love to see what you made, one nerd to another,
 

geposted Sat 04 Feb 23 @ 10:11 am
Ah that was a good idea! It didn't seem to work, though. I'm 'reloading' the script by running:

controller_mapping "Novation Launchpad" "MyCustomMap"

I mapped that to an otherwise unused button just to test it out - I edit the XML file, press the button, but nothing changes - all I'm really doing is loading up the VDJ cached version of the mapping file, not the one I've just updated using my code...

I've popped the app up on github, it's bare bones since I'm just trying to get the whole 'change code and have it work without restarting VDJ' function working first.

https://github.com/camnealie/VDJscriptTranslatorBackend
https://github.com/camnealie/VDJscriptTranslatorFrontend

Familiarity with npm and nodejs might be required.

Is there any other workaround here? How do people normally map like, a brand new controller to add to the default mapping list that VDJ offers?
 

geposted Sat 04 Feb 23 @ 11:31 pm
Also looks as though the network control plugin isn't available anymore - I can't find it following the instructions in your link ( https://www.virtualdj.com/wiki/NetworkControlPlugin.html )

I also tried mapping the 'reload' script to another controller, just in case that would help. No difference.
 

geposted Sat 04 Feb 23 @ 11:55 pm
locoDogPRO InfinityModeratorMember since 2013
have you actually closed the file in your thing before trying the refresh?
 

geposted Sat 04 Feb 23 @ 11:58 pm
I think it's probably easiest if we ignore my custom app and just try to produce the following

1. open VDJ
2. open a mapping xml file in a texteditor
3. edit the mapping xml file, save and close
4. see the changes you just made in VDJ somehow, without restarting

I'm testing this with a button that runs

debug "changethisstring"

Which I then change in the raw xml file. (Something I've noticed is that you have to have vdj as the active window or debug fails to work until you restart the app. Bit weird)

Unfortunately swapping away from the map and back using the script you suggested

controller_mapping "Novation Launchpad" "SomethingElse" &
controller_mapping "Novation Launchpad" "MyCustomMap"

Doesn't appear to help either.

I didn't know about "crash", that does the trick, though it means I lose my session of course! So I wouldn't consider that a workaround as I want to be tweaking changes to loops and fx quickly...

-- have you actually closed the file in your thing before trying the refresh?

yep tried that too, thanks!



 

geposted Sun 05 Feb 23 @ 4:09 am
AdionPRO InfinityCTOMember since 2006
A mapping file is indeed only loaded once on first use, and then stays in memory and is not reloaded.
 

geposted Sun 05 Feb 23 @ 9:32 am
 

geposted Sun 05 Feb 23 @ 11:33 pm