ssj71 / rkrlv2

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

Newplugs - Add Regular Phaser #28

Closed Stazed closed 7 years ago

Stazed commented 7 years ago

Greetings!! Hope this project is still going!

I really like the regular phaser for some effects and could not duplicate the sound to my liking with the analog phaser. So I went ahead and made the conversion myself instead of annoying you :-).

The following may be issues of interest :

The following code was added to rkrlv2.C to fix an intermitant bug that effects several other plugins as well:

LV2_Handle init_phaselv2() plug->init_params = 1; // LFO init

void run_phaselv2() //LFO effects require period be set before setting other params if(plug->init_params) { plug->phase->PERIOD = nframes; plug->phase->lfo->updateparams(nframes); plug->init_params = 0; // so we only do this once }

The bug is the result of the best guess init below which is used for any plugin which uses the EffectLFO() class. PERIOD = 256; //make best guess for init;

The problems occurs when the initial default ttl parameter settings, or the setpreset() gets set before the plugin is actually run, using the guess value of 256. Then when the plug is run, the PERIOD gets updated, but the lfo->updateparams does not since there is no parameter adjustment to trigger it.

Only occurs when the host, or jack Frames/Period is different than the guess of 256, and the user preset is the same for all default parameters set by setpreset() that trigger lfo->updateparams.

The easiest way to experience the bug is with Alienwah. Set jack Frames/Period to 1024 and run Alienwah with the default settings in jalv. Connect a clean guitar sound to the plug and listen. Then change one of the parameter's sliders that trigger the lfo->updateparams, such as Tempo and reset it back to the default value. Then listen again and you will notice a significant difference in the effect.

If my proposed solution to the bug is acceptable, I can push to you the fixes for the other plugins that may be affected by the bug. Or if prefer a different solution, I can do that as well.

ssj71 commented 7 years ago

You are a hero!

Thanks for the very thorough description. It makes this easy to merge. I haven't had much time on this project so your help is very welcome.