@ustk are all nodes generally on? I've read about a hasTail parameter that stops processing when the note is done etc. probably in my case it needs to work only a few ms after a note was fired
Posts
-
RE: template or tutorial for custom c++ scriptnode?
-
RE: template or tutorial for custom c++ scriptnode?
@Christoph-Hart is there a way to get the custom c++ scriptnode to only process data if there is any sound? as this is intended for one-shots but constantly does the encoding/decoding and a couple of those nodes produce quite a fair amount of cpu
-
RE: template or tutorial for custom c++ scriptnode?
@ustk aye! I did this in C++ not SNEX though. But I agree it looks more correct this way, although it didn't throw a tantrum without. C++ seems to be a bit forgiving there, which is not at all what I heard about it lol
float val = samples[i]; int max = 255; float valmu = sgn(val) * log( 1.0f + max * abs(val) ) / log( 1.0f + max); float valmu8 = valmu - fmodf(valmu, 1.0f / max); float valex = sgn(valmu8) * (1.0f / max) * ( pow(max + 1.0f, abs(valmu8)) - 1.0f );
-
RE: template or tutorial for custom c++ scriptnode?
@Christoph-Hart that would have been to easy ;))
In all honesty, I seriously need to learn C++, the things one can do... -
RE: template or tutorial for custom c++ scriptnode?
@d-healey thanks to your encouraging words it just came to me that actually I just needed to implement the sgn (sign) function as C++ doesn't seem to have one by default
template <typename T> int sgn(T val) { return (T(0) < val) - (val < T(0)); }
(yeah that one I copied off the internet lol)
and then it suddenly worked. I can't believe it! I have just made a μ-law bitcrusher without even so much as knowing what I do lol. God this thing sounds fly. Massively less artifacts on quieter sounds and sizzle on loud ones!
-
RE: template or tutorial for custom c++ scriptnode?
@HISEnberg @d-healey actually tried implementing the μ-law compression thing from what I could learn around the web, but it's failing to compile and I cant get a debug version setup on mac as @griffinboy's tutorial only covers PC so far ;) So now I'm stuck lol. But yeah, the problem should be minor and some day I'll find out ;)
float val = samples[i]; // mu-law compress signal float max = 255; float valmu = sgn(val) * log(1+max*abs(val)) / log(1+max); // Quantize to 8 bits float valmu8 = valmu - fmodf(valmu,1/max); // mu-law expand signal float valex = sgn(valmu8) * (1/max) * (pow(max+1,abs(valmu8))-1); // Apply Demo Gain samples[i] = valex * smoothGain.advance();
I basically know too litte about c++ to know if the syntax in these formulas is even valid but I tried ;)
-
RE: template or tutorial for custom c++ scriptnode?
@HISEnberg not fast enough. 90% is trial and error and me not understanding a thing I do lol
-
RE: template or tutorial for custom c++ scriptnode?
@HISEnberg I did it, based on @griffinboy's template, yeeha!
This has a simple 8-bit bitcrusher and the right left gain from the demo like so:
void process(float* samples, int numSamples) { for (int i = 0; i < numSamples; ++i) { // Reduce bit depth float max = 255; float val = samples[i]; float rem = fmodf(val,1/max); // Quantize samples[i] = val - rem; // Apply Demo Gain samples[i] *= smoothGain.advance(); } }
now I have to figure out how to make it μ-law instead of linear 8 bit.
I'm afraid the code won't be that simple. If anyone has tried this before I'd appreciate any input. -
RE: template or tutorial for custom c++ scriptnode?
@HISEnberg ah yes, that's the one we've been talking about in the hangout, I couldn#t find it anymore for some reason. thanks
-
RE: template or tutorial for custom c++ scriptnode?
@Christoph-Hart i can't even get round() to work in SNEX ;)
-
RE: template or tutorial for custom c++ scriptnode?
@Christoph-Hart never gotten the hang of snex but this might be worth looking into for that kind of thing. C++ might be overkill.
-
template or tutorial for custom c++ scriptnode?
Ahoi!
is there a template or tutorial out there for making custom scriptnodes in C++?i'm aiming to make a simple 8 bit bitcrusher, however not linear but similar to μ-law
i cant see another way to do it than to dive into c++ scriptnodes. The function is fairly simple and openly available but how to wrap it into a scriptnode I don't know.Also open for other solutions
-
RE: trigger something with audio in a dsp network
@ccbl aye thanks! any advice on the first issue?
-
RE: trigger something with audio in a dsp network
Also how do I make something louder with a gain node just going to 1 and not above?
-
trigger something with audio in a dsp network
is there a way to trigger something, e.g. an envelope, with audio in a dsp network?
i'm trying to add a short sound (bleep, noise) when a certain threshold is passed (like at the opening of a gate) and again when it closes after a short release time.the point being automatically adding a short mic noise at the start and end of a spoken line, like in a walkie talkie simulation. what nodes would I use to achieve that?
-
RE: Invert a dspNetwork knob value
@d-healey alright, I can do that in faust, no need for scriptnode then
-
Invert a dspNetwork knob value
I have a pre-gain and want to invert it's value to also apply it to a gain (so the overall level stays the same)
how do I douplicate and invert a knobs value in a dsp network?
cable_expr doesnt seem to work for simply negating it's input value -
Proper way to add Multichannel to a drum plugin?!
AhoI! I've read a lot of older posts about multichannel output and am wondering what the current proper and easiest way is to add multichannel to my plugin.
I have 16 samplers with a one shot on 16 drum pads, and I want the user to be able to say select one of 8 possible outputs for each of them...
Problem 1: I have a non-linear reverb option in the plugin which makes the output stereo, so I'd have to have 8 stereo convolution reverbs in there or send the wet reverb to a extra stereo summing channel and the drums to a mono chanel each, which makes more sense...
Problem 2: I've seen people having multiple simple gains on each sampler, each with another output channel ativated and switching the simple gains on and off according to the user's selection to give them some sort of routing option. is this the proper way to go?
Problem 3: If I recall correctly, cubase always offers stereo 1/2 out and multichannels are additional channels. So the user basically would be able to detach a voice/drum sound from the regular stereo out to a dedicated mono one, correct?
Problem 4: On each sampler I have a hardcoded faust effect to emulate an old 8-bit dac. this has two inputs and outputs only. can it still be used in multichannel setup?
How does multichannel capability impact overall performance? Is it a significant additional load on the cpu? Is the entire thing worth the hassle or should the user just use multiple instances of the instrument if they need to have seperate channels?
Usually I group percussions, hats, toms seperately and have a snare an kick channel, so a maximum of 5-6 instances isn't that much of a problem from the end-user's point of view, or is it?