Ok, I see it.  The implementation of os.lf_sawpos_phase is impulse-based:

lf_sawpos_phase(freq,phase) = phasor_imp(freq, (1-1'), phase);

This means it is only sampled at time zero.  For continuous phase control,
you want something delay based, e.g.,

lf_triangle_phase (freq, phase) = os.lf_triangle(freq) @ (phase *
ma.SR/freq);

Here is my updated test program (no scope needed - I used faust2caqt):

import("stdfaust.lib");

lf_triangle_phase(freq, phase) = os.lf_triangle(freq) @ (phase *
ma.SR/freq);
lfo_freq = hslider("[1] Freq", 0.5, 0.001, 50, 0.01);
lfo1 = lf_triangle_phase(lfo_freq, 0);
lfo_phase = hslider("[2] Phase", 180, 0, 360, 1) / 360;
lfo2 = lf_triangle_phase(lfo_freq, lfo_phase);
process =  lfo1, lfo2 : hbargraph("[3] 0",-1,1), hbargraph("[4]
Phase",-1,1);

On Sat, Feb 25, 2023 at 2:03 PM Christopher Arndt <ch...@chrisarndt.de>
wrote:

> Am 24.02.23 um 21:50 schrieb Julius Smith:
> > Hmmm, it looks to me like it should be working.
> > I adapted your test program for use with faust2plot, and it's working
> > for me:
>
> Yes, it works, if the phase is set initially. But what I want is to
> change the phase of one LFO at run-time with a parameter and that
> doesn't seem to work.
>
> Here are two images, which demonstrate this, I hope:
>
> 1) your code (lfophase.dsp) compiled with faust2jack and its output send
> into a stereo oscilloscope. the two LFOs have different phase
>
> https://0x20.eu/nc/s/kWSwRE2oHD4rStt/preview
>
> 2) The code from my original post (lfophase2.dsp) compiled with
> faust2jaqt again with its output into the scope. I have set the phase
> two 91 after staring the program, but the output as seen in the scope
> never changes and the two LFOs are still at the same phase.
>
> https://0x20.eu/nc/s/Y47eaLK8DGZZTbk/preview
>
>
> Chris
>
>
>
> _______________________________________________
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>


-- 
"Anything that can be automated should be"
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to