Skip to content

Commit

Permalink
- scriptnode: deactivate hidden DSP networks when loading compiled no…
Browse files Browse the repository at this point in the history
…des into network by default
  • Loading branch information
christoph-hart committed Dec 28, 2023
1 parent 33b8400 commit 79a0523
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions hi_scripting/hi_scripting.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ compile / debug cycle and don't need all nodes in scriptnode you might want to t
#define HISE_WARN_UNDEFINED_PARAMETER_CALLS 1
#endif

/** If this is set to 1, then a compiled node will also create a DSP network that you can freeze / unfreeze.
* This was the default behaviour pre HISE 3.7.0, but it introduced a lot of subtle glitches and bugs just for the ability to toggle between
* frozen and unfrozen network.
*/
#ifndef HISE_CREATE_DSP_NETWORKS_FOR_HARDCODED_NODES
#define HISE_CREATE_DSP_NETWORKS_FOR_HARDCODED_NODES 0
#endif

#define MAX_SCRIPT_HEIGHT 700

#include "AppConfig.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1659,9 +1659,16 @@ BackendHostFactory::BackendHostFactory(DspNetwork* n, ProjectDll::Ptr dll) :

for (int i = 0; i < numNodesToCreate; i++)
{
auto isThirdPartyNode = dllFactory.isThirdPartyNode(i);

if (isThirdPartyNode)
#if HISE_CREATE_DSP_NETWORKS_FOR_HARDCODED_NODES
// Create a network and toggle between frozen and interpreted state...
auto createHardcodedNodeOnly = dllFactory.isThirdPartyNode(i);
#else
// Don't create a DSP network but treat it like a compiled third party node
auto createHardcodedNodeOnly = i < numNodesInDll;
#endif

if (createHardcodedNodeOnly)
{
NodeFactory::Item item;
item.id = dllFactory.getId(i);
Expand Down

0 comments on commit 79a0523

Please sign in to comment.