Cabbage Logo
Back to Cabbage Site

Gentable y-axis scaling during performance

Is there any way to update the “ampRange” of a Gentable during performance?
Or can it only be set once at init?

As far as I know, it can’t be modified once you have set it. But I guess it might be nice to offer this as it would give us a vertical scroll option?

I’m working on the parametric EQ part of my plugin and don’t really have space for knobs of 5 bands of gain, freq and Q. I’m working on a small graphical GUI for a parametric EQ. GEN routines are pretty powerful for that. I got to the point where I can display multiple bell bands of different Qs and a sum of them with partial sine curves. I know, it’s not really an accurate graphical description, but I don’t need it to be super precise, just a somewhat “good” representation.
The struggle comes with the filter bands. For now I’m just working on the low cut.
The higher it cuts, the further it cuts out of the displayed dB range. For a somewhat correct looking sum of the low cut and the bell bands past the point where the low cut exceeds the lower border, I have to extend the y-axis range, which results in a scaling of the whole graph. Now I would have to zoom into the graph to keep the actual Y/dB scale intact.
Nerdy stuff, I hope you could follow.
Long speech, simple sense:
Would it be possible to make that identifier dynamic?
Or, do you know of any ways how to simply “limit” the values of a given function table in a fast GEN routine like manner? Because that would also do the job.

If it’s too much work, don’t bother! Then I’ll just scale the bounds of the Gentable.

I’m not at a PC right now, but if you used a negative gen number, Csound won’t normalize the table values. Might that be any good to you? I’ll look into the gentable issue tomorrow if I get a chance.

Good gosh. :man_facepalming: That would have been easier all along. Dealing with the scaling was such a pain. I.e. I added a small normalised bump at the end of each bell graph that’s out of sampleRange, just to have the gain of the bell not be normalised. :woozy_face:

1 Like