Compile DSP networks as dll - issue with recent commits
-
Just updated to the latest commit and I'm having issues compiling DSP networks I created with an older version of HISE.
Seeing this warning:C:\Test\DspNetworks\Binaries\Source\Main.cpp(86,1): warning C4190: 'getError' has C-linkage specified, but returns UDT 'scriptnode::Error' which is incompatible with C [C:\Test\DspNetworks\Binaries\Builds\VisualStudio2022\Test_DynamicLibrary.vcxproj]
The compilation completes and generates a dll, but when I reload HISE, SNEX nodes still show as uncompiled.
-
@Dan-Korneff What does Tools -> Show Network DLL info show?
-
{"File": "Test11.dll", "Loaded": true, "Valid": false, "InitError": "Can't find DLL file C:\\Test\\DspNetowrks\\Binaries\\dll\\Dynamin Library\\Test11.dll", "Nodes": []}
I can confirm that the dll file actually exists in the folder.
-
@Dan-Korneff what‘s Dynamin Library?
-
@Christoph-Hart Type-o. I'm not able to copy/paste from the DllInfo popup. Should Say Dynamic Library
-
Ah, OK, this error message appears if the file can't be found or if it isn't a valid DLL file that can't be opened. What happens if you compile another project DLL?
-
@Christoph-Hart When compiling a wrapped SNEX node in a totally new project, I get the same warning, plus a new error:
C:\Users\Dan\Documents\GitHub\HISE\hi_dsp_library\node_api\nodes\processors.h(1188,14): error C2039: 'handleModulation' : is not a member of 'snex_node_impl::snex_node<1>' (compiling source file ..\..\Source\Main.cpp) [C:\Users\Dan\Desktop \test\DspNetworks\Binaries\Builds\VisualStudio2022\test_DynamicLibrary.vcxproj]
-
@Christoph-Hart Anything else I can do ?
-
Can you send me the SNEX node code? This error shouldn't occur because it checks if you define that method in order to show a modulation source dragger.
-
@Christoph-Hart
I'm testing with simple "input * gain" code
Here's my project
https://www.filedump.us/s/WA99ns63mSeJKggtemplate <int NV> struct gaintest { SNEX_NODE(gaintest); double gain = 0.0; float getSample(float input) { return input * gain; } // Initialise the processing specs here void prepare(PrepareSpecs ps) { } // Reset the processing pipeline here void reset() { } // Process the signal here template <typename ProcessDataType> void process(ProcessDataType& data) { for(auto ch: data) { for(auto& s: data.toChannelData(ch)) { s = getSample(s); } } } // Process the signal as frame here template <int C> void processFrame(span<float, C>& data) { for(auto& s: data) s = getSample(s); } // Process the MIDI events here void handleHiseEvent(HiseEvent& e) { } // Use this function to setup the external data void setExternalData(const ExternalData& d, int index) { } // Set the parameters here template <int P> void setParameter(double v) { gain = (double)v; } };
-
@Christoph-Hart It seem that when you wrap a node, HISE adds a _pm. This is what's causing my newest crash. If I remove the phantom node, I can compile DSP. I slightly remember this happening in the past.
Not sure what's causing the error with previous projects yet.
-
@Christoph-Hart Are we not able to compile networks that contain compiled nodes? I thought we could before.
I'm getting these errors when I try to compile this test:
C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Source\FullChain.h(36,42): error C3203: 'Generation_Loss_Node': unspecia lized alias template can't be used as a template argument for template parameter 'T', expected a real type [C:\Users\Da n\Desktop\test\DspNetworks\Binaries\Builds\VisualStudio2022\test_DynamicLibrary.vcxproj] C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Source\FullChain.h(38,40): error C3203: 'Test_Node': unspecialized alias template can't be used as a template argument for template parameter 'T', expected a real type [C:\Users\Dan\Desktop\t est\DspNetworks\Binaries\Builds\VisualStudio2022\test_DynamicLibrary.vcxproj] C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Source\FullChain.h(46,48): error C3203: 'Generation_Loss_Node': unspecia lized alias template can't be used as a template argument for template parameter 'Processors', expected a real type [C: \Users\Dan\Desktop\test\DspNetworks\Binaries\Builds\VisualStudio2022\test_DynamicLibrary.vcxproj] C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Source\FullChain.h(47,48): error C3203: 'Test_Node': unspecialized alias template can't be used as a template argument for template parameter 'Processors', expected a real type [C:\Users\Dan\ Desktop\test\DspNetworks\Binaries\Builds\VisualStudio2022\test_DynamicLibrary.vcxproj] C:\Users\Dan\Documents\GitHub\HISE\hi_dsp_library\node_api\nodes\Containers.h(93,1): error C7683: you cannot create a r eference to 'void' [C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Builds\VisualStudio2022\test_DynamicLibrary.vcxproj]
C:\Users\Dan\Documents\GitHub\HISE\hi_dsp_library\node_api\nodes\Containers.h(93,1): error C3313: 'return expression': variable cannot have the type 'auto &' [C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Builds\VisualStudio2022\test_Dyn amicLibrary.vcxproj] C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Source\FullChain.h(80,30): error C2440: 'initializing': cannot convert f rom 'int' to 'int &' [C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Builds\VisualStudio2022\test_DynamicLibrary.vcxpro j] C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Source\FullChain.h(81,19): error C2440: 'initializing': cannot convert f rom 'int' to 'int &' [C:\Users\Dan\Desktop\test\DspNetworks\Binaries\Builds\VisualStudio2022\test_DynamicLibrary.vcxpro j]
-
@Dan-Korneff said in Compile DSP networks as dll - issue with recent commits:
@Christoph-Hart It seem that when you wrap a node, HISE adds a _pm. This is what's causing my newest crash. If I remove the phantom node, I can compile DSP. I slightly remember this happening in the past.
Yes wrapping/compiling a SNEX node directly causes adding the modulator.
But when SNEX and other nodes are combined into a chain node, then when that chain node is wrapped/compiled, it works.
By the way, as I see the bug in the
snex_shaper
node is fixed and it works. -
@orange said in Compile DSP networks as dll - issue with recent commits:
By the way, as I see the bug in the
snex_shaper
node is fixed and it works.yay!!
-
@Christoph-Hart I've narrowed it down to projects on my Network share.
Are the double \ \ something that could be causing this issue? Or do I need to look elsewhere
-
@Dan-Korneff Yes that looks a bit weird, but then the dll loader doesn't use anything else than the standard JUCE file classes so if you can load your project from that drive it should load the dll too. If you move it to a different drive, does it work?
-
@Christoph-Hart ok! Looks to be a bug with smb on my NAS. Files on my local disk work just fine.
After stripping/re-assigning permissions I'm back in action. So strange cause I could work on the network drive in HISE normally. Just couldn't export anything.
3 days down the drain...Scratch that... still circling the drain
But at least I have an idea of what's up