@HISEnberg I'm afraid not! I gave up after I figured out how to pipe what I needed through a global cable, and then HISEscript takes over and plots it to a script panel. So I never really went back.
Posts
-
RE: How does a custom c++ interface with one of its display buffers?
-
RE: custom node compile log on Mac vs Windows
@Lurch Cheers dude! I'll check it out!
-
RE: Trying to compile C++ DSP info in HISE/load into Scriptnode
stmlib is a library for Mutable DSP operations. I don't believe it is intended for desktop use.
Your error seems to be "Bad CPU type in executable" - which would back that up. You'd need to port the code over, not just import the library.
(I think!)
-
RE: C Major another Audio language
@oskarsh Small world - I knew them when we all worked at ROLI!
-
RE: custom node compile log on Mac vs Windows
Ahhhhh... idiot. Open XCode. Compile it from there. Logging info is usable.
Even so... would be good if HISE could show the log directly.
-
custom node compile log on Mac vs Windows
Heya, sorry if this is a n00b question, but I couldn't find a thread on it.
When I compile a custom c++ node on Windows, when it fails, I get the line where it failed showing up in the compile console, and I can easily debug it.
But on MacOS I get no useful information at all. Is this intended, or is my environment setup incorrectly?
Ironically, where I'm at right now is my node compiles on Windows perfectly. It doesn't compile on MacOS, and I'm struggling to get to the bottom of it without a good log.
-
RE: C Major another Audio language
@Christoph-Hart What do you think of Cmajor these days?? I went to an Audio Programmer API event last year where Jules and Cesare presented their Pro 52 revival project, and it was very interesting. Do you see any applicability for HISE in the future?
-
RE: Oversampling Softclipper
@xander You need to band limit the soft clipping circuit somehow. Not sure if this needs adding to your faust code, or if you can put a filter after it in the network, but essentially.... non-linear clipping/saturation/distortion can create harmonics that far exceed your sampling rate and nyquist; and they end up folding back into lower frequencies. You'll need to handle it by filtering.
Look into FIR filtering within faust, maybe it is something you can add inside the algorithm.
-
RE: Getting debug output to the compiler console..
Hey apologies for the bump. But I got this to work by putting:
JUCE_LOG_ASSERTIONS=1into the preprocessor definitions and then rebuilding. I get data from my custom c++ node printing to the visual studio log:
It wasn't working until I did that.
-
RE: Pitch shifting when smoothing a delay
@Christoph-Hart Right, gotcha!
That was the one I tried to use initially, but it still glitched. I guess this is because it only has two buffers and can't keep up with the requested delay time shifts fast enough???
I'm okay with the pitch shift. I was just curious if there was another container type that would handle that, but I guess not!
-
Pitch shifting when smoothing a delay
When I have the smoothed_parameter and delay nodes outside of the frame2_block, I get lots of glitching in the audio. When it is inside the frame2_block, it is nice and smooth, but it also creates a pitch shift in the delay.
Is there a solution to this that doesn't involve a custom SNEX or c++ delay?
@griffinboy any ideas dude?
-
RE: Simple ML neural network
There is this call in the docs - does it work? How do you use it? Can you feed in the raw .NAM file as JSON and use it directly?
-
RE: Spectral Gating
Custom c++ node.
You can get by quite easily by using the built in Juce fft:
// FFT object static constexpr int fftSize = 128; static constexpr int hopSize = 16; juce::dsp::FFT fft { (int)std::log2(fftSize) };
That would create the required object. Then you'd need to write a loop process in order to call something like:
fft.performRealOnlyForwardTransform(fftBuffer.get());
I just wrote a node recently to process an audio buffer with FFT's. It works really well.
-
RE: Multiple Global Data Cables - only the first one gets a runtime target
@griffinboy Hmmmm, that might be what I ran into. Can't remember now. But basically my c++ as an effect works well... and I'm able to update the UI any time I turn a parameter.
But when I tried to convert it to a synth... it wasn't working.
This actually makes sense, because my sendData function gets triggered from within processFrame, which gets triggered from within process()
-
RE: Multiple Global Data Cables - only the first one gets a runtime target
Do you know if DataCables work in Scriptnode Synthesizers? Because I've just taken my node and put it into one, and now I no longer get the runtime target showing up, and the data callback no longer fires.
Nothing has changed, and I only have a single instance of the node in the entire project.
If I delete the scriptnode synthesizer and re-add the script FX, then it immediately begins to work.
-
RE: Multiple Global Data Cables - only the first one gets a runtime target
@griffinboy Yep - I can't even plead ignorance either. I knew about the hashing and just totally forgot! So I'm an idiot!
-
RE: Multiple Global Data Cables - only the first one gets a runtime target
@Christoph-Hart Dannngg!!! I knew I cocked something up!!!! baaaahhh!!
Thanks Chris. No bug here. You're 100% right.
-
Multiple Global Data Cables - only the first one gets a runtime target
Custom c++ node:
#pragma once #include <JuceHeader.h> namespace project { using namespace juce; using namespace hise; using namespace scriptnode; enum class GlobalCables { dataCable = 0, otherDataCable = 1 }; using cable_manager_t = routing::global_cable_cpp_manager< SN_GLOBAL_CABLE(-389806413), SN_GLOBAL_CABLE(-389806400) >; template <int NV> struct custom_node: public data::base, public cable_manager_t { SNEX_NODE(custom_node); struct MetadataClass { SN_NODE_ID("custom_node"); }; static constexpr bool isModNode() { return false; }; static constexpr bool isPolyphonic() { return NV > 1; }; static constexpr bool hasTail() { return false; }; static constexpr bool isSuspendedOnSilence() { return false; }; static constexpr int getFixChannelAmount() { return 2; }; static constexpr int NumTables = 0; static constexpr int NumSliderPacks = 0; static constexpr int NumAudioFiles = 1; static constexpr int NumFilters = 0; static constexpr int NumDisplayBuffers = 0; custom_node() { // this doesn't do anything, but if you want the communication the other way around // (from HISE to your C++ node, this is the way to register callbacks). this->registerDataCallback<GlobalCables::dataCable>([](const var& funky) { jassertfalse; }); this->registerDataCallback<GlobalCables::otherDataCable>([](const var& funky) { jassertfalse; }); } // We don't need any of the DSP callbacks for this example so we can use these macros to // define empty methods SN_EMPTY_PREPARE; SN_EMPTY_HANDLE_EVENT; SN_EMPTY_PROCESS; SN_EMPTY_PROCESS_FRAME; SN_EMPTY_MOD; SN_EMPTY_RESET; void setExternalData(const ExternalData& data, int index) { if(data.isNotEmpty()) { // convert the data to the juce::AudioSampleBuffer class auto buffer = data.toAudioSampleBuffer(); // fetch a few properties from the buffer // (this is the place where you could do your custom processing auto magnitude = buffer.getMagnitude(0, 0, buffer.getNumSamples()); auto rms = buffer.getRMSLevel(0, 0, buffer.getNumSamples()); auto length = buffer.getNumSamples(); auto channels = buffer.getNumChannels(); hise::JSONObject obj; // write the values into the JSON object obj[String("magnitude")] = magnitude; obj[String("RMS")] = rms; obj[String("length")] = length; obj[String("numChannels")] = channels; // just attach the current knob position so you know it's working. obj[String("knobValue")] = value; // send the JSON object back to HISE this->sendDataToGlobalCable<GlobalCables::dataCable>(obj); this->sendDataToGlobalCable<GlobalCables::otherDataCable>(obj); } } template <int P> void setParameter(double v) { // just save the parameter to be send in the JSON object later. value = v; } double value = 0.0; void createParameters(ParameterDataList& data) { { parameter::data p("MyParameter", { 0.0, 1.0 }); registerCallback<0>(p); p.setDefaultValue(0.5); data.add(std::move(p)); } } }; }
Then the interface script:
Content.makeFrontInterface(600, 600); reg rm = Engine.getGlobalRoutingManager(); reg dataCable = rm.getCable("dataCable"); reg otherDataCable = rm.getCable("otherDataCable"); dataCable.registerDataCallback(function(data) { Console.print(trace(data)); }); otherDataCable.registerDataCallback(function(data) { Console.print("We could have other data here from the same node"); });
Here's the project snippet:
HiseSnippet 1238.3ocuWs0SibCE1SfY2R5tRck19Z0HdJTQiRfvsspp.IDZTKPDgR2GPB43wCwEO1i73AHsZk5i8ma+GzdNyLIYlRX2UQsKHglyU+4i+NGa5azLdbr1Pbpdw3HNw4EtCFqriZOhJTjdcHNegaXhzJhjbFcnjGSNbbDMNl6SbbV5XzKmUVlj9ye88GRkTEiOSEgboVv3+jHTXmos+9+nPJ6R84WHBK3cq86wzp1ZoNAPzRtMHQT1sza3mRQ2p3R9AZ7HhyW6t0FaxZ4ui+Far0daynay2KfFDzbS+Vs1d28Zt4dzV6tMuwVDmmcjuvpMCrTK.dmkOT6OdvH88prE3RQr.1VnPSx.XkyT2UK8wsHpkzdjP52eRoJl.Yo+rB2RYEtW6dhvWLUewBHZvaVDEKfNUJCukJAulEgWiBvaNPxo.jVNCRuxc.yHhryrf34yc6orbS.ENmJBkLeIU9pJts0fGJa8P5s7tFPXZD01tQi08f+r12VspgeimIz667NRciPwqeC2drTOjJOWmXEpaNgpfyNSsI95Ssz1HIBBwDhtmJUa0oFVEbE8TaGwMcdJ2KaEio5zLTGBWDamXWJGBLnZAIJlUnU0P+Vq5uWcEXKFqA2iLBksl0f6sTiP1dGlwxKxhk1U+EtGSmH88FQuimsqRqBdvGbu.iNzCz4ECzaOk1Ocujt5UmjZOs5TskelpVZ9q9tpd+aSAAy0FdHZzRId.LGyXmm48EXMUR3PtYcu6nxD9TGA1UYJq6SSYK1Qwx3TEbTq5oD1yh3pmpOijSDgu94dXkG4445.+h3Fq.gfSG9cvTlLV+Jtc3w2Z0QvblG0R.MiZ+DI0VtCEmika.pAkZKPpuJVXGWbN2+YsserP7Ut8EV1n4iwJyAiPk5+CLlOr6ktGEDvY1Y.bY2tu8S2jsp4S1f0DW7WjK508sMm2LMm+zcFAOxvinF9E59R53ZPqGb014.FW2anTytcf323OtqHJCBGhdTiMhpTbY7hz77rO5pRy2+gxzYrVi3AnK7zjvAv0lLd6bzA5bpf8PYxMPYjWLfq7SE9a3mbiMQYmbiMmXrP62ob68ZysoGG4eSbddVsuSbzDUWxMwH4z44tMpC+RNPJ022VGFIxosvgRpt9Z43nQZkfgpx7XBzOHTm.qZN9gq7ufJjHOePRLLsv+L0.v4z2Yf7rSgAmPgsKkAE1w8o1QX+BNuAHmbSc1TRZIrNimfU3rWXTxALuSdKRVoCfYHVOvWh3rDZOqfjA.bEdoKKI1pCuFmlSJAouzEHQ+JzzTunKyCEkSxGBFXsSxeXx3wCR7E5tBYFzlJAsN8T97GvN0uoI4Hfc5CuvIMJm8cO9MW0AFnNT+vUGmHrTy4hff1ZSTR7U.rsPWmuHdmFWEl.71q5zyC+nVilqU+d5cjSDpKQh9DDdB8gox+waVAFgPMvVCt+LqgdhDXuPnHmoXntMA4rp5IimESA22hzgGPg2mVRGovcCkW5RVRGrfRvXyJYzidwWhVYT4jUAnfGp02FRSI+K10PeJZUCoLi9ZV1zGby8YoZ.9gJkSsh6InrWSxcYarYWTDBOO8ZFqbpdTfarnAt4hFXqEMvsVz.2dQCbmEMvc+vAh+2CGj.iCxFfBMW8OJqs04HE91zza5H+C7L.wuK
You'll need to compile the custom node as "custom_node".
So what I am seeing here, and I have no idea why .... the "otherDataCable" does not get a "Runtime Target" entry in the list of targets, so its callback never seems to run.
This is using two cables with a single node.
Is this not supported?