Audio Spike when loading a Neural Network node.
- 
 @tomekslesicki Alright, thanks I missed that, now I can reproduce it. The easiest solution is to just warmup the network whenever the reset call was made - it then just processes a bunch of silent samples and throws away the result. I'm not sure why it creates the spike in the first place and usually the convention of calling reset()just before processing the audio signal should work here too, but this will definitely remove the necessity for high pass filtering the values.I can imagine that the amount of samples necessary depends on the network so I made it a dynamic preprocessor constant. Just add HISE_NEURAL_NETWORK_WARMUP_TIME=2048to your ExtraDefinitions field and click save (no need to recompile, HISE will reload that value and use it dynamically. In the compiled plugin it will be a compile time constant). Note that there are a few situations where the reset()call can be made in the audio thread - eg. when using it polyphonically and starting a new voice, so if you try to outsmart the system by addingHISE_NEURAL_NETWORK_WARMUP_TIME=10000000000you'll blow up your audio callback. 
- 
 @Christoph-Hart you might want to consider adding a HPF as well. Many models contain a DC offset and filters are built into the NAM player for this reason. 
- 
 @Christoph-Hart thanks, I'll test this later today! If I'll hard enable it when building HISE, I should be able to test the results while working on the network, right? I also agree with @Dan-Korneff , a high switchable high pass to remove the DC offset would be a fantastic addition 
- 
 @tomekslesicki It's a dynamic preprocessor which will fetch the value from the extra definition field while working in HISE so you don't have to recompile HISE anymore - just change the definition, hit save in the settings dialog and toggle the script fx bypass to hear the change. 
- 
 @Christoph-Hart yes, I understand, I thought it would be easier to test in scriptnode if I compiled it with this defined, but I see it's more flexible the other way around, I should stop posting at 4AM! Could you please add a switchable 5hz HPF to filter out the DC offset, too? 
- 
 @Dan-Korneff can you upload the changes (or make a pull request) with the 5Hz cutoff stuff, then I‘ll merge it. 
- 
 @Christoph-Hart  I make a PR today.  Also have a fix for the bypass being ignored. I make a PR today.  Also have a fix for the bypass being ignored.
- 
 
- 
 GOAT activity.  
- 
 Alright it's merged now, thanks @Dan-Korneff for the contribution! I had to modify the code a little bit to allow the usage of neural networks in compiled effects - the HPF filter setting will be baked into as a compile time constant when you generate the C++ code for the network. I also added a check that throws an error if you try to use a hardcoded network with a neural network (or global cable, same concept) without creating it first in the scripting initialisation - before it just failed silently but now you get an error message in the hardcoded module's interface. 
- 
 @Christoph-Hart said in Audio Spike when loading a Neural Network node.: thanks @Dan-Korneff for the contribution! It's nice to feel useful for once  
 Got a few more enhancements coming soon...


