Re: Questions re Additional Java Files
Posted: Sat May 09, 2020 5:04 pm
Hi Andrew,
yes, file system access does indeed block audio processing. If you really have to access the file system you would have to do it in a dedicated thread that runs independently of the audio processing. That is what I have done in my VM Recorder module.
What I have also done is, I have created my own library of functions that I need more or less regularly. I have written a VoltageModuleAdapter class that takes the original VoltageModule as a parameter in the constructor so I can access it whenever I need to. In VMD I do the layout and design of the module and pass every VoltageComponent to my adapter class. The adapter class also implements all methods of the VoltageModule and those methods get called in the VoltageModule in VMD with all parameters passed to the adapter class accordingly. I have basically written a template module in VMD that I load first thing VMD opens, then I save it as new module and start my development. The adapter class' Java file gets added to VMD as external Java file, my library as external Jar file. The main development of the module is then done in Eclipse, where I have proper syntax highlighting, auto-indent, auto-completion and all the nice stuff that Eclipse has to offer. The only drawback is that I have to re-load the Java file in VMD every time I want to compile and test it, but I can totally live with that.
Hope this helps.
Best regards and stay safe,
Martin
yes, file system access does indeed block audio processing. If you really have to access the file system you would have to do it in a dedicated thread that runs independently of the audio processing. That is what I have done in my VM Recorder module.
What I have also done is, I have created my own library of functions that I need more or less regularly. I have written a VoltageModuleAdapter class that takes the original VoltageModule as a parameter in the constructor so I can access it whenever I need to. In VMD I do the layout and design of the module and pass every VoltageComponent to my adapter class. The adapter class also implements all methods of the VoltageModule and those methods get called in the VoltageModule in VMD with all parameters passed to the adapter class accordingly. I have basically written a template module in VMD that I load first thing VMD opens, then I save it as new module and start my development. The adapter class' Java file gets added to VMD as external Java file, my library as external Jar file. The main development of the module is then done in Eclipse, where I have proper syntax highlighting, auto-indent, auto-completion and all the nice stuff that Eclipse has to offer. The only drawback is that I have to re-load the Java file in VMD every time I want to compile and test it, but I can totally live with that.
Hope this helps.
Best regards and stay safe,
Martin