How polyphonic cables will work in Rack v1

Yes, one day I’ll turn all classes and functions in dsp:: into template <typename T = float>. The difficulty is handling things like logic and branching.

1 Like

Went ahead and made RCFilter and a few others SIMD-ified, since I’ll need them for Fundamental modules. More SIMD coming soon.

5 Likes

Logic is handled with float_4 masks (e.g. x > y returns either 0x00000000 or 0xffffffff for each of the 4 f32’s), which you can use with the float_4 ifelse(float_4 mask, float_4 a, float_4 b) function. You can do stuff like

template <typename T>
T sinc(T x) {
	x *= M_PI;
	T y = simd::sin(x) / x;
	return simd::ifelse(x == 0.f, 1.f, x);
}

and it’ll automatically work for both float and float_4.

Use TRCFilter<float_4> filter; for creating a filter that processes a float_4.

1 Like

Awesome, thanks, I’ll give it a try! Do you know offhand if there is much of an overhead associated with loading into SIMD space, so to speak, and then storing back to normal float array space? Just trying to see if there are instances, perhaps short calculations, that would be better to just do normally instead of SIMD, or is it always a gain in performance? Profiling would give a definite answer, but just wondering in your experience what you have noticed regarding this.

_mm_storeu_ps/_mm_loadu_ps take about 1 CPU cycle, plus overhead of copying the scalars and SIMD vectors between cache and registers, which depends on where your scalars are.

1 Like

@Vortico
What is the status of polyphony for Fundamental VCO.
I tried it in the Linux dev version, that is linked in the other thread.
But seems it is not polyphonic yet?
I could be wrong?

I’ve updated Fundamental’s manifest with Polyphonic tags for the current poly-supporting modules. https://github.com/VCVRack/Fundamental/blob/v1/plugin.json

Ah ok! :+1:t4:

Unrelated, but I was wondering if Octave is deprected or it will be ported to v1 at a later time?

Thanks, added.

2 Likes

i have like a basic polyphony question, cause i think i’m not approaching it correctly yet.
does it work like this: “send 4 CV pitch signals to the MUX module, then patch the poly out of the MUX module into a polyphonic VCO v/oct input” ?

Here’s polyphony working with Blamsoft XFX Wave

I guess there are some different ways of approaching it, since at first try I was expecting the XFX to mix all the channels into a single output wire on its output, but it actually outputs all the channels separately in a poly cable, and we have to split them to mix them. I guess it offers more control this way.

4 Likes

owwww ok, I also need to use a split afterwards!
thanks Marc!
I will try that out tonight after work. :wink::+1:t4:

Could someone post how poly works with a filter? Preferable F-35

Never mind figured it out not enough audio outputs!

why split and not sums?

Would be great to see 8 channel mixer get a poly input at the top, and then distribute the channels automatically in numerical order. :thinking:

1 Like

Yes. That module is called Fundamental Merge now. Some modules like MIDI-CV can generate poly cables as a source.

Typically you don’t need to adjust channel levels independently. You can just use Fundamental Sum to add all poly channels of an input into a mono output.

1 Like

Ok this is cool!
I can use sum instead of split. And continue with a summed mono signal.
I just tried it and it works fine! :+1:t4:
Thanks guys

1 Like

I’ve added a Polyphony section to https://vcvrack.com/manual/VoltageStandards.html#polyphony describing the exact behavior of polyphonic modules.

8 Likes