• 0 Votes
    13 Posts
    91 Views
    David HealeyD

    @ustk Nice!

  • New version removes show text box

    Bug Reports
    2
    0 Votes
    2 Posts
    4 Views
    David HealeyD

    @svkpowa said in New version removes show text box:

    all „show text box” propeties disappear

    What do you mean?

  • how can i create a sin lfo in scriptnode

    General Questions
    2
    0 Votes
    2 Posts
    5 Views
    ustkU

    @NISHI_MUSIC like this

    edit the Frequency MinValue and MaxValue to taste sig2mod translates the -1 to 1 signal to a 0 to 1 modulation range

    Screenshot 2026-03-07 at 21.38.28.png

  • 2 Votes
    1 Posts
    11 Views
    No one has replied
  • Pro Tools is not recognizing my AAX plugin.

    General Questions
    6
    0 Votes
    6 Posts
    28 Views
    David HealeyD

    @lijas90 Unless they've changed something recently, signing AAX plugins is free - except for the cost of the iLok

    If you're making plugins for MacOS then you need an Apple developer account which costs $99/year and you need this for AU and VST3.

    On Windows there are some free options for certificates for signing AAX.

    It's not really something somebody else can do for you.

  • Asset Manager

    General Questions
    4
    0 Votes
    4 Posts
    30 Views
    Christoph HartC

    @David-Healey I did some polishing a few days ago but it‘s not pushed yet. When it is it should be ready for local use. I‘ll let the robot write an explanation how to use it then.

  • Trying to give back in my own small way - KnobForge!

    General Questions
    1
    3 Votes
    1 Posts
    29 Views
    No one has replied
  • It´s possible to change Popup Data in execution time?

    Scripting
    10
    0 Votes
    10 Posts
    65 Views
    ustkU

    @jadg Using a broadcaster to show a label instead of the stock value popup. This way you can customise it dynamically with your theme

    customValuePopup.gif

    HiseSnippet 1366.3ocsW0raaaDDdosoakZSaSQd.VvSTEpJxR1NMMnHNV1N0H1IBUtooHHHXI4JwElbWAtKUrPP.5iRe.5SPQOzGfbnO.8PeD5kdNc1kThjwJ1wBH5fslc96alclcF0OQ3SkRQBxp9ISGSQVep8fobUXuPBiiNbOj0WZ2KUpDwOlDkR6KFmNFs6zwDojFfrrV89Z4rpsFx74eu6tjHB2mVbDB8XAymdDKloJNs+NOfEEc.IfdBKtjzatyg9BdOQjHEvzp1sQiI9mRF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JOUIFCY64OZAl9RC2yJB0g6LcNwuFtit36DnlcWwY5IwuP20hrrs5.rCorQgpYTnqfG6Txi+yjxdL9CjG6Vxi6HJ4weYxR5wZYd7Z4d7H8qrFG941U5eKGpdFGu9ukuz4bOETwS2.n7FMa+xZqy4u4MZw0uc.MN1sa0YKzjY8KVqhN+9UvlchfzHhp55d5EgyY.MsU1wRuGEGdkcZ4EkuB6.19B2A78EhW2tOS4GtXLtxBvHzV7g.i4aNeM68GNj5qJ.3Z1G7jkcM4Kw8+fHUuh0wDX7NTyX+vz3APEfOE7NmSij5ZiUzEgYzs0z5Lv.JOvP7F3SNyMzzV4L2XFSTLwOQ7b+rmiz6l+wlS.LwM+1kZ1Gqowm6EPDJF9oBO22upoNmhcVVE6trJt4xp3VKqhaurJdqkUwu4xUT+K4tWJrnaVaCBcb+8MyMrr1mSfJPS0J5+AfJhWTB
  • Matrix Modulator Smoothing Control

    General Questions
    7
    0 Votes
    7 Posts
    61 Views
    ustkU

    @DanH just set it to zero then you’ll eat as many kinder as you want (pretty sure this sounds weird in German… 😬)

  • Toggle Oversample container in Scriptnode

    General Questions
    3
    0 Votes
    3 Posts
    32 Views
    DanHD

    @ustk Sexy, thanks!!!

  • Handling Latency for Delay-Based Modulation Effects

    General Questions
    2
    0 Votes
    2 Posts
    59 Views
    HISEnbergH

    @Yinxi Good question.

    Just to start, latency refers to a short period of delay (usually measured in Samples in DSP) when an input signal enters the plugin and when it exits the plugin. In many cases that is not desirable so HISE (using the JUCE backend) has a function called Engine.setLatnecySamples. This works by telling the host/DAW: "Hey, this plugin introduces X samples of latency, so adjust the signal so it is X samples further ahead in time".

    An example of this happening in Scriptnode is if you use oversampling, which will generally introduce a few samples of latency. So you need to calculate the amount of latency introduced (Use Tools>Check latency of signal chain) and use Engine.setLatencySamples to adjust it. This function is dynamic, meaning you can adjust the number of samples depending on the latency you are introducing. Example: if you have a knob that adjusts the oversample size from 2x to 4x, this might cause your latency to jump from 1 samples to 2 samples. You can write an if statement to change this and the host will be updated:

    // pseudo-code if (OversampleKnob = 2x) Engine.setLatencySamples(1); else if (OversampleKnob = 4x) Engine.setLatencySamples(2);

    Small note: Each host has a different way of handling the information it receives from a plugin so results may vary here. You need to make sure to update the latency report once when initializing the plugin, and any time after if changes(this is probably updated once per block).

    But returning to your earlier question about vibrato, if you consider that latency is just a delayed signal, that is not necessarily a bad thing. Vibrato is basically just a time-varying delay (delay line modulated by an LFO). The pitch shifting comes from the rate of change of the delay. In other words, the delay(or latency) introduced by the Vibrato is precisely what you want, so there is no reason to adjust for the latency.

    This is all an oversimplification but hopefully clarifies things a bit. You can test this out in a DAW to confirm as well. Run an impulse through your plugin and record the output and see how they line up.

  • 0 Votes
    4 Posts
    66 Views
    HISEnbergH

    @Allen Ah thanks for clarifying. I believe this should work the same for RNBO node as any other C++ node. You need to add these flags to your projects Extra Definitions:

    NUM_HARDCODED_FX_MODS=4 //or however many slots you need NUM_HARDCODED_POLY_FX_MODS=4

    It is possibly you may need to first add that to HISE's extra pre processor definitions in projucer first and recompile HISE, then also add those to your project (so it works in the compiled plugin).

    The documentation about this is a bit hard to find. There's also a forum post about it here.

    Here is a spreadsheet of the different HISE flags you can use (it needs to merge this into the documentation somewhere).

    Just for some extra context this is straight from the docs:

    // number of modulation slots for Script FX HISE_NUM_SCRIPTNODE_FX_MODS=0 // number of modulation slots for Polyphonic Script FX HISE_NUM_POLYPHONIC_SCRIPTNODE_FX_MODS=0 // number of modulation slots for Scriptnode Synthesisers HISE_NUM_SCRIPTNODE_SYNTH_MODS=2 // If you plan to compile the DSP network to a C++ node // (which is possible with this node since HISE 5.0), you will // also need to set the corresponding preprocessor variables // for the hardcoded modules: // number of modulation slots for Hardcoded FX modules NUM_HARDCODED_FX_MODS=0 // number of modulation slots for Hardcoded Polyphonic FX NUM_HARDCODED_POLY_FX_MODS=0 // number of modulation slots for Hardcoded Synthesiser NUM_HARDCODED_SYNTH_MODS=2
  • 0 Votes
    4 Posts
    209 Views
    V

    Hi all,

    I’ve been playing around with this in my free time and making some progress.

    So far I’ve populated a couple of samplers with instruments, just to test different mic counts: a kick with 7 mics and a tom with 5. I was able to get the multimic merge working, and so far that part behaves well. I also added simple per-mic gain controls in the sampler FX, which is also working fine.

    For routing, I’m currently using a container. Based on what I read in the forum and the docs, I added Routing Matrix FX modules in the container, one for each mic.

    Here’s a snippet:

    HiseSnippet 3290.3oc6c0sTaijEVFP.1AHYxlsp8loJsY2KLa.hk7evvxDiARBUvXVLI6jJ0TTxRsgdQVxkjLCraMUMuFyc6ivd6dWdjl2fc6V+X2pssvVXL1P6aBce59zmyQm9q++jiLMT.VVFlbwRbx0M.bwVfux051muy4xPct82Emgkl9oW.sOMkDWwqaHaYAT4hEa52gKQr3yv4762dSQYMYcEP6r339jATAb.rNztctGU3CPMs2JqBNAVmnzYJruhg9NFZFMQRyz7o3ZHqbg7YfCkwEaJdt2KacNWr+Be5p0xkQQLeU47RaTcib41HqZ5ZpxRoAJUqJKAPjyjsVNtXytmJz1vrhsrMvhK1LEMTutx4F+jtaC7InErpF.mPjqBpkcy9sFZpXUDmK2NmC0TOx2LYwgX5QsMZS6ZzdAeInJrU9sMdOygfP6ZPZ.iMUPwa5.hmHo3khP75hHEiPjlwUj9F9JJlvF1sofkmmvuutMvrlL56Don3VVtoVHA+NFnRnauVc4K.u0DknUMRtdpTqHjIUpk2LQBGuj0TA0.l6HqoUE8sxJosYS.l3qe8G1emOHTZ+cp7cBhas6mObEAos1oL5eRu0Ie7vC26.Di1p76WQH6VGWtboUDxs0m163hBUde4iOYEg7toNn7guKAxqvxV3vOV5TLSOEyTgsDxuo.pYNdaTybR4RzMElyo83bl.bNaW4LlO9bNKRA7HcF563a+ATde4G2zKqKzqhc7CjWUa8RMsAd44q8qNz9knlgoPRHh+o1T.J7WCZLPY8pWs7+JQ7W+5+gfsgvE.PCAcTmFKAz2WCEHx6RESnNTQHYIwUDJIsh.vVYs0Va4DwuT1DS4vl0qBLQMA7UhHSah3t59ZMZZcdR2O1mAr2qVM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bLFN1iHbrw+fhPTvwxxvwX3XLbLFN1XTfIf8nrlr1q1GxuIDxGFE+n8gQMG9gQE4WmT5ayqSJys60Ik8185jX2MoGX2WyQ7aTi4ELV5ETWVwz3TECcaSCG7z4cxAAqnK6buw3KgSKHxcorVy.KonNTEdphRPV0QEkhZESG0JlIpULaTqXtnVw7QshqeyUDe2q1tosQc2YcywU5n8bGwH1dsFwXZt+OHGS6jI

    I’ve run into a couple of questions / obstacles with the Routing Matrix approach:

    At first I thought I could access it through Synth.getEffect(), but that didn’t work. After searching the forum, I found that Synth.getRoutingMatrix() seems to be the correct method. Is that expected, or am I misunderstanding how Routing Matrix modules should be accessed?

    When I use removeConnection() or removeSendConnection(), the signal seems to get routed back to channels 0/1 automatically, and .clear() doesn’t seem to do anything. Is that expected behaviour?

    In this example, I added two buttons just for the first kick mic:

    one connects / disconnects that mic to the main bus the other connects / disconnects it to its own aux bus

    I’m not fully sure this is actually the best feature design. It might make more sense to have a single "THRU" button for the whole kit that mutes / unmutes the main output using send fxs, instead of handling everything with Routing Matrix instances. But I’m also using this project as a learning exercise, so I’m experimenting a bit to understand the options better.

    Overall, does this structure and routing approach make sense?

    PS:

    The code is still pretty rough, I’m just testing ideas quickly for now. In this example, the rack tom is not routed properly. I still haven’t compiled HISE for multi-output or exported a VST3 to test in the DAW, so before going further I’d like to understand what the best routing approach would be.

    Thanks again!

  • 1 Votes
    5 Posts
    124 Views
    LindonL

    @Lindon Ok well more investigations..... and a "work around" solution....

    So you need to put your Hardcoded Polyphonic FX in an Effects chain in the same container as your Gain AHDSR envelope, and add a small (around 100-150) ms of release and this clicking goes away....

    So for example lets say you have this structure:
    2201b459-a17a-4291-a850-4dcd9d00ca65-image.png

    You must put your AHDSR envelope (here AHDSR Envelope1) in the Syntesiser Group1 where you must also place your Hardcoded Polyphonic FX

    Put the FX down in the Waveform Generator and leave the AHDSR where it is? - nope no worky...
    Put the Poly Hardcoded FX down in the Waveform Generator and leave the AHDR where it is? - again - not gonna work reliably....

  • Channel Amount Mismatch when converting to monolith

    General Questions
    18
    0 Votes
    18 Posts
    397 Views
    J

    @elemen8t
    i can only get it to work using the method david mentioned:

    Select all the samples, right click in the mapping window, Tools > Merge into multi mic samples

    the samples do have to be ...exactly the same length for each mic position.

    also, doesnt work in juce 8 last time i checked. if you are using juce 8.

  • Correct setup for scriptnode synth?

    ScriptNode
    6
    0 Votes
    6 Posts
    131 Views
    D

    @Christoph-Hart That was totally my fault again. It turned out to be the default envelope with a 5 ms attack 🤦♂ . I literally spent a few days searching the forum and trying different solutions.

  • Check Latency broken on latest develop build?

    Bug Reports
    6
    0 Votes
    6 Posts
    232 Views
    HISEnbergH

    Just a little bump to this topic. I believe test begins to run, but the impulse doesn't pass through and the Alert Window fails to show up reporting the latency samples.

  • 0 Votes
    16 Posts
    595 Views
    B

    @OstinTheKr0t

    a no - you need to create a third party c++ node template

    --> 1.) Go to Tools -> create C++ third party node template
    --> 2.) name it EXACTLY: chipTuner
    --> 3.) this will create the chipTuner.h file. Open it with Visual Studio or even Notepad and clear everything
    --> 4.) Copy the code below into the file, save and close it
    --> 5.) back in HISE go to Export-> Compile DSP Networks as DLL
    --> 6.) You can now go into the FX Section and load a Hardcoded Master Effect -> there you can choose the chiptuner effect

    My advise, play with settings like Bit depth = 4 and SR Reduction = 8

    #pragma once #include <JuceHeader.h> namespace project { using namespace juce; using namespace hise; using namespace scriptnode; template <int NV> struct chipTuner : public data::base { SNEX_NODE(chipTuner); struct MetadataClass { SN_NODE_ID("chipTuner"); }; static constexpr bool isModNode() { return false; } static constexpr bool isPolyphonic() { return NV > 1; } static constexpr bool hasTail() { return false; } static constexpr bool isSuspendedOnSilence() { return true; } static constexpr int getFixChannelAmount() { return 2; } static constexpr int NumTables = 0; static constexpr int NumSliderPacks = 0; static constexpr int NumAudioFiles = 0; static constexpr int NumFilters = 0; static constexpr int NumDisplayBuffers = 0; // ------------------------------------------------------------------------- // Parameter State // ------------------------------------------------------------------------- float bitDepth = 8.0f; // 1 – 16 Bit float srDivider = 1.0f; // 1 – 32 (sample rate reduction factor) // Sample-Hold state float holdLeft = 0.0f; float holdRight = 0.0f; int holdCounter = 0; // ------------------------------------------------------------------------- // Callbacks // ------------------------------------------------------------------------- void prepare(PrepareSpecs ) { reset(); } void reset() { holdLeft = 0.0f; holdRight = 0.0f; holdCounter = 0; } void handleHiseEvent(HiseEvent& ) {} template <typename T> void process(T& data) { static constexpr int NumChannels = getFixChannelAmount(); auto& fixData = data.template as<ProcessData<NumChannels>>(); auto fd = fixData.toFrameData(); while (fd.next()) processFrame(fd.toSpan()); } template <typename T> void processFrame(T& data) { // --- Sample Rate Reduction (Sample & Hold) --- int divider = jmax(1, (int)srDivider); if (holdCounter <= 0) { holdLeft = data[0]; holdRight = data[1]; holdCounter = divider; } holdCounter--; float outL = holdLeft; float outR = holdRight; // --- Bit Crusher --- float steps = std::pow(2.0f, bitDepth) - 1.0f; // eg 8 Bit → 255 steps steps = jmax(1.0f, steps); outL = std::round(outL * steps) / steps; outR = std::round(outR * steps) / steps; data[0] = outL; data[1] = outR; } int handleModulation(double& /*value*/) { return 0; } void setExternalData(const ExternalData& /*data*/, int /*index*/) {} template <int P> void setParameter(double v) { if constexpr (P == 0) // Bit Depth (1 – 16) bitDepth = (float)jlimit(1.0, 16.0, v); if constexpr (P == 1) // SR Divider (1 – 32) srDivider = (float)jlimit(1.0, 32.0, v); } void createParameters(ParameterDataList& data) { // Bit Depth { parameter::data p("Bit Depth", { 1.0, 16.0, 1.0 }); registerCallback<0>(p); p.setDefaultValue(8.0); p.setParameterValueNames({}); data.add(std::move(p)); } // Sample Rate Reduction { parameter::data p("SR Reduction", { 1.0, 32.0, 1.0 }); registerCallback<1>(p); p.setDefaultValue(4.0); data.add(std::move(p)); } } }; }
  • 0 Votes
    8 Posts
    118 Views
    OrvillainO

    @dannytaurus said in Loading wavetables by drag-and-drop takes a long time??:

    @Orvillain Weird. I'll try it out here again and see if I get the same result.

    Is yours a standard mono, 'power of 2' file?

    Yeppers.

  • My First Impression of Microsoft Setup Was Unexpected

    General Questions
    1
    0 Votes
    1 Posts
    30 Views
    No one has replied