• How does a custom c++ interface with one of its display buffers?

    13
    0 Votes
    13 Posts
    727 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)); } } }; }
  • Filter Display in External C++ Node

    1
    3 Votes
    1 Posts
    35 Views
    No one has replied
  • ExternalData SliderPack seems to be limited to 128

    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...

  • c++ function optimization using vectorization or SIMD???

    6
    0 Votes
    6 Posts
    98 Views
    OrvillainO

    Thank you guys! Lot of stuff to look into here! Appreciate the help. Will report back!

  • Turning C++ dsp into fx plugin in hise

    3
    0 Votes
    3 Posts
    80 Views
    HISEnbergH

    @njAudio03 There also exists a convolution “reverb” module in HISE already. This probably doesnt address the your design/project objectives directly but studying it’s integration in the HISE source code (along with the FFT it relies on), along with @griffinboy External C++ primer should get you started.

  • custom node compile log on Mac vs Windows

    4
    0 Votes
    4 Posts
    116 Views
    OrvillainO

    @Lurch Cheers dude! I'll check it out!

  • C Major another Audio language

    10
    2 Votes
    10 Posts
    1k Views
    whoopsydoodleW

    So until we have native Cmajor support in HISE, how much of a pain would it be to compile a Cmajor patch as C++ and then use it in HISE as a 3rd party C++ node? Is there a web of dependent libraries you'll have to worry about including?

  • C++ Third Party node SliderPack, Span & sfloat

    10
    0 Votes
    10 Posts
    726 Views
    ustkU

    @Christoph-Hart What about the slider pack limitation of 128?

    Could it be extended?
    Or perhaps it would be better to use a cable with complex data to send a more precise curve?

  • Getting debug output to the compiler console..

    18
    0 Votes
    18 Posts
    2k Views
    OrvillainO

    Hey apologies for the bump. But I got this to work by putting:
    JUCE_LOG_ASSERTIONS=1

    into the preprocessor definitions and then rebuilding. I get data from my custom c++ node printing to the visual studio log:
    947b7f47-31e0-48be-ad66-7de6be45afe0-image.png

    It wasn't working until I did that.

  • Getting the sample rate for an externalData object?

    6
    0 Votes
    6 Posts
    623 Views
    OrvillainO

    @Christoph-Hart

    🤣

    Cool thanks! I'm still figuring out how all of this interfaces, but getting there and making good progress!

  • What is the process for writing my own module (not scriptnode)

    52
    0 Votes
    52 Posts
    12k Views
    griffinboyG

    @Orvillain

    Oh yeah yeah, I found faults with the provided script too. I had to do some casting. I think that's correct.

  • What's the deal with this assert? isMonophonicOrInsideVoiceRendering()

    3
    0 Votes
    3 Posts
    305 Views
    griffinboyG

    @Christoph-Hart

    Good to know that it wasn't anything bad. It didn't seem to be breaking anything.

    Is it okay for me to use this function then? It says that I shouldn't here unless I'm rendering. But I couldn't really see why, so I've been using it

  • c++ callback for voice stop?

    5
    0 Votes
    5 Posts
    497 Views
    griffinboyG

    @griffinboy

    edit* Rephrased into a more answerable question hopefully!

  • 1 Votes
    20 Posts
    2k Views
    d.healeyD

    @bendurso Not that I'm aware of

  • 0 Votes
    34 Posts
    7k Views
    Christoph HartC

    @Morphoice hmm, weird, anyways, I've added a safe check as well as the option to edit the flags set by the node_properties.json file in the DLL exporter. This should fix most issues related to this subject.

  • C++ API: SliderBase cannot find Constant Modulator (SIGSEV)

    3
    0 Votes
    3 Posts
    412 Views
    F

    @fellhouseaudio said in C++ API: SliderBase cannot find Constant Modulator (SIGSEV):

    reach a SIGSEV in RootObject.h:61

    I opened a github issue

  • UI Thread vs Audio Thread (c++ nodes)

    Solved
    3
    0 Votes
    3 Posts
    358 Views
    griffinboyG

    @Christoph-Hart

    Thanks I'll look into it!

  • [Free Dsp] Unfinished Self Oscillating Filter

    1
    7 Votes
    1 Posts
    153 Views
    No one has replied
  • [Free Dsp] Lookahead Limiter (true peak)

    15
    10 Votes
    15 Posts
    1k Views
    ustkU

    @griffinboy For what I understand, it's not Hise to support latency, be it variable or not. Hise just reports what you want, so if you want it to be variable, technically, you should be able to do it.
    But the DAW might not like it... It doesn't seem to be something "normal" to report a continuously changing value, but I can't refer to anything else than my own perfectible thoughts...

  • [Free Dsp] Oberheim-8 Analog Filter

    6
    12 Votes
    6 Posts
    681 Views
    T

    Thank you!!!

20

Online

1.8k

Users

12.1k

Topics

105.0k

Posts