• 0 Votes
    13 Posts
    769 Views
    OrvillainO

    @Orvillain
    3d59f862-0879-4207-8770-9f6729fd3a8b-image.png

    huh... well I got SOMETHING in there...

    This is just chatGPT chod, but it has given me the above. The issue is... it doesn't update immediately, I have to switch the selected display buffer in the node using the external icon button.

    // ==================================| Third Party Node Template |================================== #pragma once #include <JuceHeader.h> namespace project { using namespace juce; using namespace hise; using namespace scriptnode; // ==========================| The node class with all required callbacks |========================== template <int NV> struct LoadAudio: public data::base, public data::display_buffer_base<true> { // Metadata Definitions ------------------------------------------------------------------------ SNEX_NODE(LoadAudio); struct MetadataClass { SN_NODE_ID("LoadAudio"); }; // set to true if you want this node to have a modulation dragger static constexpr bool isModNode() { return false; }; static constexpr bool isPolyphonic() { return NV > 1; }; // set to true if your node produces a tail static constexpr bool hasTail() { return false; }; // set to true if your doesn't generate sound from silence and can be suspended when the input signal is silent static constexpr bool isSuspendedOnSilence() { return false; }; // Undefine this method if you want a dynamic channel count static constexpr int getFixChannelAmount() { return 2; }; // Define the amount and types of external data slots you want to use static constexpr int NumTables = 0; static constexpr int NumSliderPacks = 0; static constexpr int NumAudioFiles = 1; static constexpr int NumFilters = 0; static constexpr int NumDisplayBuffers = 1; AudioBuffer<float> originalBuffer; int originalSampleRate; int originalNumSamples; bool bufferNeedsUpdate = false; // Scriptnode Callbacks ------------------------------------------------------------------------ void prepare(PrepareSpecs specs) override { display_buffer_base<true>::prepare(specs); if (rb != nullptr) { rb->setActive(true); if (bufferNeedsUpdate && originalBuffer.getNumChannels() > 0) { updateBuffer(originalBuffer.getReadPointer(0), originalNumSamples); bufferNeedsUpdate = false; } } } void reset() { } void handleHiseEvent(HiseEvent& e) { } template <typename T> void process(T& data) { static constexpr int NumChannels = getFixChannelAmount(); // Cast the dynamic channel data to a fixed channel amount auto& fixData = data.template as<ProcessData<NumChannels>>(); // Create a FrameProcessor object auto fd = fixData.toFrameData(); while(fd.next()) { // Forward to frame processing processFrame(fd.toSpan()); } } template <typename T> void processFrame(T& data) { } int handleModulation(double& value) { return 0; } void setExternalData(const ExternalData& data, int index) override { display_buffer_base<true>::setExternalData(data, index); if (data.isNotEmpty()) { originalBuffer = data.toAudioSampleBuffer(); originalSampleRate = data.sampleRate; originalNumSamples = originalBuffer.getNumSamples(); bufferNeedsUpdate = true; // ✅ delay actual update } } // Parameter Functions ------------------------------------------------------------------------- template <int P> void setParameter(double v) { if (P == 0) { // This will be executed for MyParameter (see below) jassertfalse; } } void createParameters(ParameterDataList& data) { { // Create a parameter like this parameter::data p("MyParameter", { 0.0, 1.0 }); // The template parameter (<0>) will be forwarded to setParameter<P>() registerCallback<0>(p); p.setDefaultValue(0.5); data.add(std::move(p)); } } }; }
  • Is there a way to search all included .js files?

    General Questions
    3
    0 Votes
    3 Posts
    57 Views
    VirtualVirginV

    @aaronventure Thanks!
    This is great! What a useful feature.

  • Global Midi Learn(not saved in preset) Possible?

    Unsolved General Questions
    16
    0 Votes
    16 Posts
    527 Views
    LindonL

    @Sawatakashi said in Global Midi Learn(not saved in preset) Possible?:

    @Lindon Hi, pardon me! how could i save and load the midi cc value individually like a preset using this script, and i can replace the default values by right clicking midi assignment on the knob UIs. Thanks, seriously I'm willing to pay for a good solution if you don't mind.

    the solution is right there in the snippet and the follow up post from me....

  • 0 Votes
    7 Posts
    162 Views
    A

    @marcrex Ship ollama or a similar layer with your plugin, and a model of your choice. For this you probably want a good tool calling model, like Devstral. You will need the super light version. Unsloth has a super small quant https://huggingface.co/unsloth/Devstral-Small-2505-GGUF/blob/main/Devstral-Small-2505-UD-IQ1_S.gguf but I have no idea how well it runs. Check Gemma 1b as well.

    Your system prompt needs to contain the functions that it has available for use and what each of them does.

    Define these functions in HISE.

    You'll run it by mounting the model, if not mounted, on plugin start, using BackgroundTask. These small models should be fast to mount anyway, so best to have it unload itself automatically after an hour of not using it.

    The user can then write an instruction and the model is fed system prompt + instruction via BackgroundTask. The system prompt details what it can do, the instruction tells it what to do. You want to explicitly tell it to return a "function call" in a clearly specified format (for example doThis(arg1, arg2)) and for that to be the only return, no other text.

    You should then validate the return of the BackgroundTask call, by checking that it contains a function by using string operations, and if it validates, you would call eval(return). eval() will attempt to execute the string within the code. In this case it's a function that you already defined, so it will run.

    In the end, the brunt of the work is you designing the tools (functions) that the model can call.

    This is a very simple example, if you want to chain tool calls, you'll need to feed the output of the function back into the model along with the previous prompt so that it can continue doing the work if needed.

    If you want an example of how to use eval(), I did a cool experiment here https://forum.hise.audio/topic/9086/hise-s-best-kept-secret-dynamic-plugins

    These are the limits of my current knowledge on the subject, some of these workflows may already be outdated, but hopefully I gave you a good starting point to go and explore.

    Before you download ollama and start fiddling with local inference, you can try it out instantly via OpenRouter. https://openrouter.ai/mistralai/devstral-small:free

    This free endpoint will of course use any data you send for training, but you're not gonna be sending any sensitive info, just your system prompt any whatever the user types in. For a simpler implementation (though obviously not as rock-solid) you can offer the user to enter their OpenRouter API and use the free endpoint that way, or provide your own via cloud functions, at which point it becomes a service. However, this way everyone can run the proper 24B model; on macBooks with 32+ GB of RAM it runs fine, but on Windows, VRAM isn't super easy to come by.

  • Filter Display in External C++ Node

    C++ Development
    1
    3 Votes
    1 Posts
    51 Views
    No one has replied
  • Plugin processing no sound...

    General Questions
    11
    0 Votes
    11 Posts
    343 Views
    Christoph HartC

    @Dan-Korneff That fix is included in the latest commits now BTW.

  • [Free Dsp] Analog Filter (24dB/oct)

    ScriptNode
    19
    16 Votes
    19 Posts
    1k Views
    HISEnbergH

    @Orvillain Ah yes I meant to revisit that. I did figure it out but the solution was admittedly more AI-influenced than I care to admit, so I was waiting until I have a more proper understanding of it to share.

  • Play held notes on Modwheel/CC like Omnichord

    Scripting
    11
    0 Votes
    11 Posts
    272 Views
    LindonL

    @StephanS said in Play held notes on Modwheel/CC like Omnichord:

    @Lindon

    Hi lindon,

    Sorry for this late reply, i had a lot of work the last days.
    I can only say wow you are really great. Also what you have done with the idea :)
    What do you think, would it be possible to generate new notes values based on the note values that are recognized? Predefine the new note values using an array and then push them into the list when, for example, note 60 is recognized and then play them?
    What do you think?

    oh hang on like key switching for chords? Yeah that would be pretty simple I think - I'm sure you can work that out.

  • Limiter reduction parameters

    General Questions
    5
    0 Votes
    5 Posts
    118 Views
    ChazroxC

    @pcs800 also…Sometimes Console.print();-ing helps me find what something is doing. You can pretty much .print anything. Console. Print(); then just start moving stuff and playing stuff and see what happens.

  • Hot Key

    General Questions
    2
    0 Votes
    2 Posts
    42 Views
    d.healeyD

    @imnotskibidi

    ctrl+d

    Or set a custom shortcut

    f29582dd-225c-4443-bb9d-e8a5dcfe975f-image.png

  • SuspendOnSilence Missing

    Solved ScriptNode
    9
    0 Votes
    9 Posts
    277 Views
    A

    @DanH if you need context

    Link Preview Image HasTail

    no, as you're not using polyphonic FX, which can only be used inside a processor anyway Not so fast, the effect you describe is how this flag is working wit...

    favicon

    Forum (forum.hise.audio)

  • Custom Keyboard

    General Questions
    4
    0 Votes
    4 Posts
    63 Views
    O

    @Christoph-Hart thank ou will give it a shot

  • HI_ENABLE_CUSTOM_NODES

    General Questions
    1
    0 Votes
    1 Posts
    43 Views
    No one has replied
  • Faust tutorial videos

    Faust Development
    4
    0 Votes
    4 Posts
    95 Views
    A

    @pcs800 the best faust tutorials are unfortunately reading the source code of the library effects. Find it on github. Feed the main syntax docs into a good LLM like o3 or Gemini Pro, then ask it questions about the specific library effect that you're reading.

    Of course, read the whole syntax reference yourself first.

  • ExternalData SliderPack seems to be limited to 128

    C++ Development
    16
    0 Votes
    16 Posts
    1k Views
    ustkU

    @Christoph-Hart I wondered about using an audiofile as well, seems a nice solution especially if I am creating the curve in the script interface.

    But a global cable seems promising too, I need to wrap my head around the data type it can send. Just sending the control points and creating the curve in C++ node is surely a more efficient solution...

  • Suspend On Silence as a scriptnode container

    Feature Requests
    4
    1 Votes
    4 Posts
    158 Views
    A

    I use this with a simple 4-node setup. It's pretty good and useful if you also link it up with other compare nodes so you can have dynamic logic that doesn't need explicit parameter setting but can react to various states in the network. Honestly no idea how ScriptNode went as long as it did without the compare node.

    Hise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3+zCEd3y9f5g+y1K9DDTWtpkxUZc23K+XLK4OFmgO1Ijeb5WHIS5umhBbuYoSoptbsUEiy5siVe3Iiicbz2p9Tr53p3BiqhKNtJtz3p3xiqhOebU7E2rhxWzS+bMYtAzlSisRFMhYRGNpzDi+B.BVVDB

    Precisely because you can plug more compare nodes into the logic and chain them up, this is more flexible than what Chris could do.

    bddee853-f3eb-44ee-b4f3-51d158e90e08-image.png

    When expanded:
    d8f359a1-ac66-440d-9540-75f1bbaaa880-image.png

  • Building my own sample content installer

    General Questions
    10
    0 Votes
    10 Posts
    278 Views
    OrvillainO

    @Christoph-Hart The more things change, the more things stay the same! 😂

  • 0 Votes
    20 Posts
    375 Views
    OrvillainO

    @d-healey Probably a bug of some kind then. All I can say is, commenting out TreeBuilder.buildModuleLayout() cured my crash. Chased my own tail for a bit over that is all!

  • Can we draw Path in CSS ?

    General Questions
    4
    0 Votes
    4 Posts
    232 Views
    Christoph HartC

    Let us know more about what you’re trying to achieve and we can give better advice.

    Damn, bots are getting better but this gave it away.

  • 7 Votes
    2 Posts
    130 Views
    ChazroxC

    @Lindon crrrrazy. 🔥