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 :
MAX_PHASER_STAGES - I took the liberty of fixing the setstages() function to set the max stages
to 12 vs 11. The original used MAX_PHASER_STAGES (12) minus 1 = 11. This seems wrong since the original rakarrack gui was for 1 to 12 (and rkrlv2). Looks like a start from 0 vs a start from 1 error. Carryover from rakarrack.
The following code was added to rkrlv2.C to fix an intermitant bug that effects several other plugins as well:
rkrlv2.C -- new variable in: typedef struct _RKRLV2{}
uint8_t init_params; //flag to indicate to force parameter (LFO) update & sample update on first run
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.
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.