@HISEnberg said in Transient detection within a loaded sampler - SNEX ????:
@Orvillain Nice thanks for the tips! I'll have to look into spectral flux envelope it's a new concept for me. I'm about 40% of the way through this process myself.
Just curious how are you extracting the FFT information then broadcasting it to HISE, are you using Global Cables for this? I am trying to theorize how to make the jump from detecting the transients to updating the HISE side (transient markers, snap grid, etc.). I'm guessing just wrap all that info into some JSON and use GlobalCable.sendData to update my HISE interface and scripts!
Also agreed I'm almost exclusively doing the bulk of DSP and advanced analysis in C++ then using the HISE API and Interface builder to handle the rest, really efficient and powerful combination.
Thanks for the tips!
Yes exactly. I'm doing all the clever math stuff in c++. That gives me a bunch of transient time positions in samples. I then feed this list over to HISE across a data cable using the cable_manager in the c++ node.
Christophe had a good template for this somewhere. But in essence when you setup your node struct, you inherit:
using cable_manager_t = routing::global_cable_cpp_manager<SN_GLOBAL_CABLE(-389806413)>;
template <int NV>
struct data_node : public data::base, public cable_manager_t
{
The numbers there have to be the hashed ID of what the cable should be named. I don't really like this part of it tbh, but it is possible to setup.
Then in the constructor:
data_node()
: fft(//put whatever inputs you want to setup into the constructor here)
{
// this bit registers a datacallback function. As I understand it, any time data is sent, this function is triggered.
this->registerDataCallback<GlobalCables::dataCable>([](const var&) {
jassertfalse;
});
}
Later on you'd do something kinda like this:
// Create the JSON object
hise::JSONOBject nameOfTheObject;
// Fill it with data
nameOfTheObject[String("whatever you want the key to be called")] = sourceDataHere;
// Send the JSON down the cable
this->sendDataToGlobalCable<GlobalCables::dataCable>(nameOfTheObject;);