Xhip Synthesizer v8.1 (alpha & RC)

VST, AU, AAX, etc. plug-in Virtual Instruments discussion
User avatar
KVRAF

Topic Starter

12450 posts since 7 Dec, 2004

Post Tue Nov 23, 2021 5:03 am

I've completed quite a few improvements and parameterized the simple "spline" knob renderer. Most of my effort has gone into various bank-end/framework improvements and the actual changes in Xhip itself to support the new features are very basic.

Image
Image
Image
Image

The parameterization shows up in the config file like so:

Code: Select all

color {
	default = grey(1,1/10);
	mod[0] = hsl(0/8,1,1/5);
	mod[1] = hsl(1/8,1,1/5);
	mod[2] = hsl(4/8,1,1/5);
	mod[3] = hsl(5/8,1,1/5);
}
knob {
	// c++ style comments are now supported fully!
	type = spline {
		segments = 3; // even like this
		depth = 1/10;
		gap = 1/10;
	}//=;blahblahlols or this here if you're a joker
	color = var(color.default);
	size = (33,33);
}
This framework change allows any parameters to be passed from the configuration via a hierarchical structure. It should in the future be possible to override with modifications in sub-regions of the skin, such as the filter having its own knob type/style. Unfortunately I still haven't implemented the skinning, but I have begun to replace the widget code in Xhip with my widget factory from Xhip Effects. I'll likely implement the skinning in the effects first as it's far more simple and I'll later expand it to support the functionality Xhip Synthesizer requires.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

User avatar
KVRAF
3089 posts since 19 Apr, 2002 from Utah

Post Tue Nov 23, 2021 11:09 am

Cool! Thanks again for supporting Linux!! :-)
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

KVRAF
3474 posts since 9 Oct, 2004 from Poland

Post Wed Nov 24, 2021 5:10 am

As always: Thank you very much. :)
[====[\\\\\\\\]>------,

Ay caramba !

User avatar
KVRAF

Topic Starter

12450 posts since 7 Dec, 2004

Post Wed Nov 24, 2021 7:57 pm

I haven't uploaded a new alpha yet, the previous one was 1235 but I probably should update the one on the site. I still want to add a "clear bitmap cache" function to delete the old cache so you don't need to do it manually. The new system is also very prototype; I decided on using a crc32 of the configuration database so you get a filename like:
C:\ProgramData\xhip\synth\8\bitmap cache\knob_strip\gen\5spline_85c24400,191919,16,5,x33,m16,o26.tga

I've been working on trying to complete the compressor sidechain mix functionality. Currently I compute the gain reduction coefficients for the compressor feedback so that given 0 dB input, the output should equal the threshold with min attack and max release.

I previously worked that function out like so:

Code: Select all

const T target_db = (1.0 - get_parameter(THRESHOLD)) * -48.0;
// subtract 1e-3 to ensure target rounds below
const T target = futil::ndb(target_db - 1e-3);
// infinitesimal delta (prevent divide by zero)
const T d = 1e-20;
const T w = T(1.0) - target;   // 1 - 1 / (1 + 1 / target)
const T x = T(1.0) / (w + d);  // 1 / (1 + 1 / target)
const T y = T(1.0) - x;        // 1 + 1 / target)
const T z = T(-1.0) / (y + d); // 1 / target
The sidechain mix provides a sidechain with a mix between feedback and feedforward from the input. So this is relatively simple grade-school algebra (I hope!) but I'm not exactly a math person so not sure how long it may take. The other prototype function added to the effects was the filter modes for the follower. I need to look over the follower to make sure it's working in a reasonable way. There are plenty of minor tweaks and fixes that need to be made to the effects as well which has been put off way too long. This has been the major holdup in getting a new version out. (It's always something else that needs to be finished first!)

Here's the math I worked out for the spline knobs (right click play video new tab/etc):
https://i.imgur.com/2jMg5bF.mp4

Code: Select all

// o1 = orthographic distance for circles of radius r & sub-radius s
// orthographic where
// r^2 + s^2 == o1^2
//direct solution: sqrt(r^2 + (s*c1)^2) == s
// o1 = r / sqrt(1.0 - c1*c1);
// s = o1 * c1;
const T c0 = std::min((1.0 - conf.gap) / conf.segments, 0.5);
const T c1 = std::sin(c0 * pi);
const T c2 = std::sqrt(1.0 - c1*c1);
T o1 = (r / c2);
T s = (r / c2 * c1);
// distance from origin to intersection of circles
T x = (o1*o1 - s*s + r*r) / (2.0 * o1);
// edge of orthographic sub-circle s = r - e1
T e1 = r - (s + r - o1);
// scale radius blending between cosine and linear according to gap
// (i still have no idea how this works.)
const T cc = cos((1.0 - conf.depth) * pi/2.0);
const T r3 = s / (0.001 + interpolation::lerp(cc, T(conf.depth), c1));
// determine subcircle from edge position
const T o2 = r3 + interpolation::lerp(x, e1, T(conf.depth));
This took me a painful length of time to finish considering how basic it is.
Last edited by aciddose on Fri Dec 03, 2021 8:15 am, edited 1 time in total.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

KVRist
47 posts since 8 Sep, 2015

Post Thu Nov 25, 2021 8:33 am

audiojunkie wrote:
Tue Nov 23, 2021 11:09 am
Cool! Thanks again for supporting Linux!! :-)
i second this

User avatar
KVRAF

Topic Starter

12450 posts since 7 Dec, 2004

Post Fri Dec 03, 2021 8:12 am

I've made a little more progress with my compressor/dynamics research. I've managed to succeed at defining the coefficients to get the effect I want. The feed-forward performance depends upon the frequency and RMS/peak level of the input signal combined with the attack/release time ratio. I remember doing this same work quite some time ago and giving up. I should have taken more notes last time like those I've now recorded.

A simple solution to the sidechain mix blend was to give up on handling them as one. Although I did succeed at getting as far as a 2nd order error of as little as -2.5 dB which I'm sure could be eliminated entirely. It turns out to be much easier to mix feed-forward and feed-back discretely which gives a perfect result with no complicated compensation math.

Image
(I've also improved the meters and their ranges.)

So since the input is a sine here the RMS is -3.01 dB, peak is 0.0 dB and the gain reduction depends upon the attack/release time ratio. We're observing 3.01 dB with the input frequency (333 Hz) vs. max (1.5 s) release time. At 1 kHz it's 1.8 dB error, 10 kHz 1.0 dB, 23 kHz 1.7 dB. At nyquist the signal approximates a pulse (they're equal for exactly nyquist) and gives exactly 0.0 dB error.

Having a small amount of feed-back sidechain linearizes and makes the result independent of the input gain (that's what feedback is of course) and reduces the error by a lot. At 80 ms release the error is 11.4 dB, with 6% feed-back that's reduced to 2.5 dB.

The primary useful purpose of having a feed-forward mode is like in the LA-2A which feeds a tiny bit of feed-forward with a "limit" switch. That causes the compressor to over-shoot on gain reduction and dramatically "dynamically" reduces attack time without requiring look-ahead. In order for this to work it requires the feed-back and feed-forward paths are scaled together by the same coefficient. That gives the feed-forward gain reduction path infinite gain reduction (scales below zero and it's clipped when going negative.)

So to make the compressor support these functions it sadly requires two additional controls! A "limit" switch would force the feed-forward side-chain to be mixed directly with feed-back to cause it to over-shoot. The side-chain mix parameter in this case is only really useful between around 70% and 100% where it dramatically reduces the output gain with any greater feed-forward signal allowed. A "input RMS" knob would allow the compressor to attempt to compensate the feed-forward coefficient according to peak input RMS level.

Without knowing both the exact input RMS and input frequency content, exact feed-forward gain reduction is impossible in a compressor like this. I hate the idea of adding more controls but to get the sort of performance I'd like they're required. I think that practically speaking I'm forced to add them. I'll experiment more with that and hopefully I can call this finished this time and not waste my time repeating the same work again :)
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Return to “Instruments”