ssj71 / rkrlv2

Rakarrack Effects Ported to LV2 Plugins
GNU General Public License v2.0
54 stars 10 forks source link

Distband Crashes Ardour4 when Plugin Analysis is opened. #3

Closed rcspam closed 9 years ago

rcspam commented 9 years ago

Hi, It doesn't load in carla2 (Ubuntu 14.04 + KxStufio repo)

brummer10 commented 9 years ago

That's it, yea. I guess you know, when @ssj71 fixed it in the repository, you need to do a git checkout master or a git stash to switch back to the master source, before you are able to checkout the repository again.

rcspam commented 9 years ago

Some rkrlv2 are an invert panning. efxoutl[i] and efxoutr[i] are inverted in this files:

[rkrlv2/src] $ grep -e  "efxoutl\[i\].*panning;" *.C
Chorus.C:            efxoutl[i] *= panning;
Distorsion.C:        efxoutl[i] = lout * 2.0f * level * panning;
DynamicFilter.C:        efxoutl[i] *= panning;
Harmonizer.C:        efxoutl[i] = templ[i] * gain * panning;
MBDist.C:        efxoutl[i] = l * 2.0f * level * panning;
NewDist.C:        efxoutl[i] = lout * level * panning;
RBEcho.C:        efxoutl[i] = (ipingpong*ldl + pingpong *ldelay->delay_simple(0.0f, ltime, 2, 0, 0)) * lpanning;
Ring.C:        efxoutl[i] = lout * level * panning;
Valve.C:        efxoutl[i] = lout * 2.0f * level * panning;
rcspam commented 9 years ago

@brummer10 yes, thanks

rcspam commented 9 years ago

I have propose a pull request https://github.com/ssj71/rkrlv2/pull/6 ...

ssj71 commented 9 years ago

The LRCross is supposed to be handled before the pitch shifting (StereoHarmonizer.C:128 and ln 134). The code is there. I'll have to look into why its not working.

brummer10 commented 9 years ago

But, that makes no sense, there is nothing to LRCross before the shift, as, only the applied effect is to Cross here, not the original (input) signal. The effect get applied to a dry input signal and mixed in then by the wet/dry controller. By the way, nearly all of the effects suffer from this logic error.

ssj71 commented 9 years ago

@brummer10 its a design decision made by the original developers. LR cross is just mixing the left and right channels. With a stereo in and stereo out you could mix it in either place (pre or post effect). This happened because it is a guitar effects program which really should be mono in (you got this right in guitarix). So if you only have audio on 1 of the stereo in channels, you use pre-effect LR cross to get a strong stereo image in the effect out. In a linear operation it makes absolutely no difference if pre or post.

In this case, its a question of whether you want the L and R detuning to stay hard L&R or mix together. I agree that its probably more useful to mix the post-processed channels. There are cases for both methods. I'll talk to the original devs about it.

brummer10 commented 9 years ago

its a design decision made by the original developers. LR cross is just mixing the left and right channels.
So if you only have audio on 1 of the stereo in channels, you use pre-effect LR cross to get a strong stereo image in the effect out.

If so, then it is bad by design. Why the hell you would implement such a algorithm in any effect, instead write a single plug to do this once for all? I know crossover as a pan to move the applied effect over the channels, and, in the LV2 plugs, that is the only expected behave for it. Special in respect to the wet/dry control.

Especial in the stereo-harmoniser it's nice to mix (LRCross) both sides with different intervals.

ssj71 commented 9 years ago

not a bad design. Just different. With the traditional implementation you could just connect a guitar input to one channel, turn up LR cross, and you'd hear both the L&R intervals. With the new implementation, you would have sound in both channels, but it would only be the L interval.

Why would you implement such a algorithm in any effect, instead write a single plug to do this once for all?

I agree. The whole project just grew organically from the zynaddsubfx code. Everything else was copy/pasted and changed. Its got a lot of issues, but I'm trying to get everything functioning then merge back to the original codebase, then refactor.

I think you are right though, that it makes most sense to do post effect mixing. I am waiting to hear back from the original authors before changing everything though.

brummer10 commented 9 years ago

With the new implementation, you would have sound in both channels, but it would only be the L interval.

When you feed a mono signal in a stereo effect, in just one channel. ? I'm not aware of any host which will do that. And even Rakarrack users are used to connect there Guitar's to both input channels. The question is, is it supposed to mix the dry signal (bad, because you lose volume by mixing it this way, therefore you need a other algorithm to do it right), or the wet signal (expected), or both (questionable). I would go for only the wet.

ssj71 commented 9 years ago

I think you are right. I will make this change.

I'd like to close this issue (since the 1st reported issue is now resolved) and continue discussion in the other issues I've opened.

Thanks guys.