Re: [ecasound] changing filter cutoff on the fly

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] changing filter cutoff on the fly
From: Kali Griffin (kgriffin@cs.oberlin.edu)
Date: Tue Oct 05 1999 - 18:27:39 EEST


I cannot wait until the next version is due out. I need to do this now.
I understand the part about threads, I want to start w/o blocking like in
scenerio 2. My question is how do I change the parameters? does this
sound right to you:

1) remove the oldchain operator (EFFECT_LOWPASS)
2) create a new EFFECT_LOWPASS with the new cutoff
3) add that chain operator
4) and reconnect the chain

does this sound like it? or do I need some more detailed thread magic?
thanks man.
-kali

>
> If you want to change effect paremeters without interruptions to
> processing, you'll have to use controllers (=oscillators).
> 1.6.x will offer routines for changing parameters in realtime and
> through ECA_PROCESSOR interface. This is high on my priority list,
> as ecasound and qtecasound desperately need this feature, too.
>
> > filter cutoff on the fly without respawing the eca program? or do I have
> > to crash it?
>
> If you need to control the processing from outside, you should use
> ECA_CONTROLLER. So instead of...:
>
> -- scenario 1 --
> ECA_SESSION esession;
> ECA_CONTROLLER ctrl (&esession);
> ctrl.new_chainsetup("default");
> [... other setup functions ]
> ECA_PROCESSOR p (&esession);
> p.exec(); // blocks until processing is finished
> --
>
> ...you start the processing with:
>
> -- scenario 2 --
> [... normal setup as in scen1]
> ctrl.start(); // doesn't block
> --
>
> The third way to use libecasound.so is to use ECA_PROCESSOR
> directly...:
>
> -- scenario 3 --
> ECA_SESSION esession (COMMAND_LINE& obj);
> ECA_PROCESSOR p (&esession);
> p.exec();
> --
>
> There might be better ways to organize these classes. Hmm, I don't
> know, does this seem confusing to you? And of course, you can
> bypass the ecasound base-classes altogether and use individual
> classes directly. So...:
>
> -- scenario 4 --
> - create a SAMPLE_BUFFER object for storing the samples
> - read samples with (for example) using WAVEFILE
> - process them with EFFECT_LOWPASS
> - maybe change filter-freq with EFFECT_LOWPASS::set_parameter(1,
> new_value) ...
> - write samples to OSSDEVICE
> --
>
> --
> Kai Vehmanen <kaiv@wakkanet.fi> -------- CS, University of Turku, Finland
> . http://www.wakkanet.fi/ecasound/ - linux audio processing
> . http://www.wakkanet.fi/sculpscape/ - ambient-idm-rock-... mp3/ra/wav
>
>


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2a24 : Thu Oct 07 1999 - 10:25:25 EEST