Hope this feature stays. My main use of Teleport is to move clock signals around so would be great if I only ever had to establish one clock module to use that clock everywhere.
However, I can see people wanting the option of having ‘local’ teleport in some circumstances e.g. if using it to send audio signals to a mixer you may not want three instances all sending to the same mixer if one VCV instance was designed as for drums and another instance for melody they’d have to share the same FX sends. Maybe something like adding _global as a suffix to each teleport source name you want to work on a global level or spinning that, _vcvfilename to each source you want to stay local?
Also, as a dev myself, the prospect of instances sharing a global fills me with dread that if the instance that created the global is deleted and some goody-two-shoes garbage collector then decides to mop up the resources it could break things.
Out of interest, as I’m not a VCV dev so haven’t had a look at the beta, is there a new module/functionality in an existing module that can grab the current host BPM (and time signature would be great, but not sure how generic that is across DAWs) and pass it on to a module like Clocked?
Regarding getting the BPM, i don’t see any new module for that and my presumption is we use the MIDI-CV module like before. It has a new DAW midi driver and the default Clock output is 24ppqn. It seems to work well and is jitter free so Clocked shows a consistent BPM.
I think I have found a weird bug though related to how this works across different instances that use different Audio modules (Audio-8 in one instance and Audio-16 in another). I need to investigate more though and I’ll then maybe make a separate post about it.
Native C++ programs and dynamically linked C++ code do not have a garbage collector. I believe that a global defined in a dynamically loaded module will have the lifetime of the loaded code. It’s true that if a VCV plugin were to use a global that it would (probably?) “go away” after all instances of the plugin go away. But presumably no-once cares any more - the plugin shouldn’t be running any code after this, or all heck will break loose.
I don’t know how teleport works, but I don’t see any reason not to use a global due to lifetime concerns.
Ah ok. I didn’t mean a Java style garbage collection, more if the DAW gets to free things up itself on deletion, but from what you are saying it sounds like the plugins really are completely self contained so that’s reassuring,
To be honest, I didn’t expect Teleport to work across VST Instances! It’s kind of cool but also scary at the same time. The list of existing inputs is stored in a static std::map<string, TeleportIn*> that is shared by all Teleport Input and Output module instances, I guess even across threads.
It feels like it’s a bit of a coincidence or implementation detail that all VST instances are running in the same process, so I wouldn’t rely it in my patches.
I’m a bit surprised that Teleport works at all with multiple threads without crashing or glitching, because there isn’t really any sort of cross-thread synchronization. Let me know if you encounter any problems.
Yes, probably a right-click menu like this would be the right UI to do it. I suspect that actually having the “local” option would be more difficult to implement than the global one, but maybe I’ll look into it at some point.
If Teleports are sharing a global map in a way that isn’t thread-safe, people are already running into that with v1. v2 and VST aren’t bringing anything new to the table.
Also, it’s not a coincidence that all the VST are running in the same process, it’s the default way VSTs run in all programs, afaik. Yes, you can force them into their own process on Reaper, and perhaps some others… well, if users do, then they can’t use this feature.
You are right, thread safety problems that cause a segfault would have probably surfaced by now. std::map should be thread safe from what I understand.
I’m still not entirely convinced that audio glitching is not possible. Say a teleport input is in thread A and teleport output is in thread B. If now the threads happen to execute the process() functions in the order ABBA, the output would read the same value from the map twice in a row. But I haven’t come across this myself and I haven’t heard anyone complaining about it either.
Related to the VST - I guess Bitwig is a good example of implementation specific behavior (or is the sandboxing still done inside a single process?). Who knows if all DAWs start doing something similar in 5 years.
Yes, bitwig is like reaper, as far as I can determine. One can optionally sandbox plugins in a separate process.
Obviously the decision is yours to make. If it were mine (and it isn’t), I would choose to ignore the sandboxing issue. And anyway, the worst case is that some cool (undocumented) feature stops working. In five year??
Clearly you can try to find a solution that will work on all three OS’s and has a chance of working five years from now. It seems awfully difficult.
I would like my software to work in five years. It’s already almost three years old with fairly minor changes when it was ported to v1. Maybe I’m weird but I sometimes like to open up old Ableton project files from five or more years ago and they work fine. I’d hope to have the same with VCV Rack, and I try to make my plugins in such a way.
Mine is set up as per manufacturer and it works with that. Don’t really want to change that setting right now so can’t say for sure as to the other options.
If I had to guess I would say it would work for Per Plugin (as multiple instances of same plugin are sandboxed together), but not for individually hosted (as the instances would be in different sandboxes).
But hey - we’re talking Teleportation! who’s to say the walls of a mere box will stand in the way? You might need a sandbox with quantum shielding or something like that…