Re: Observer pattern limitations
- From: "David Barrett-Lennard" <davidbl@xxxxxxxxxxxx>
- Date: 12 Jul 2006 09:56:58 -0700
Leslie Sanford wrote:
"David Barrett-Lennard" wrote:
Leslie Sanford wrote:
<snip>
Let's say that operator 1 and 2 have been marked dirty. We call "get"
on the output of 2 to get the results of the algorithm. Operator 2
enters a "getting" state in which it is refreshing itself. During
this phase, it calls "get" on operator 1. Operator 1 begins
refreshing itself.
Operator 1 calls "get" on operator 2 to get input for its feedback.
But! Operator 2 is already in the process of "getting." So what does
it do? Does this second call create infinite recursion? It shouldn't.
What should happen is that the previous value of Operator 2 should be
returned to Operator 1. In other words, during its "getting" state,
any calls to "get" should return the previous value of the operator.
What this implies is that each operator has to preserve its state
until the "getting" phase completes. At the very end of this phase,
it trades its old value with the new one.
This makes sense to me, but unless it is allowed to repeat the loop a
few times and converge to a fixed point solution (if it converges at
all), I'm not sure about the utility of the idea because the output
depends on the initial state, or is that what you want?
It's as if the diagram represents an algorithm for applying a
mutative operation to its existing state to yield a new state.
One thing I didn't mention, and this clarify things, each
operator represents a sine waveform. You can think of each operator as
an iterator that iterates through a circular buffer holding a sine
waveform. The speed with which the operator iterates through the
waveform is determined by its initial settings and the modulation it is
receiving via its input. The algorithm is run repeatedly, once for each
sample, to synthesize a waveform in real time. Each time the algorithm
is run, the operators move forward through the sine wavetable. The
resulting waveform is sent to the keyboard's output from which you can
plug in a mixer or amplifier or whatever that lets you listen to the
sound.
It certainly does clarify things.
Cheers,
David Barrett-Lennard
.
- References:
- Observer pattern limitations
- From: David Barrett-Lennard
- Re: Observer pattern limitations
- From: Gabriel Claramunt
- Re: Observer pattern limitations
- From: David Barrett-Lennard
- Re: Observer pattern limitations
- From: Leslie Sanford
- Re: Observer pattern limitations
- From: David Barrett-Lennard
- Re: Observer pattern limitations
- From: Leslie Sanford
- Re: Observer pattern limitations
- From: David Barrett-Lennard
- Re: Observer pattern limitations
- From: Leslie Sanford
- Re: Observer pattern limitations
- From: David Barrett-Lennard
- Re: Observer pattern limitations
- From: Leslie Sanford
- Re: Observer pattern limitations
- From: David Barrett-Lennard
- Re: Observer pattern limitations
- From: Leslie Sanford
- Re: Observer pattern limitations
- From: David Barrett-Lennard
- Re: Observer pattern limitations
- From: Leslie Sanford
- Observer pattern limitations
- Prev by Date: Re: Observer pattern limitations
- Next by Date: Re: Observer pattern limitations
- Previous by thread: Re: Observer pattern limitations
- Next by thread: Re: Observer pattern limitations
- Index(es):
Relevant Pages
|