switch~ing voices [was: Re: [PD] nqpoly4 simple instructions?]

Roman Haefeli reduzierer at yahoo.de
Mon Dec 11 14:00:35 CET 2006


hi frank

On Mon, 2006-12-11 at 13:10 +0100, Frank Barknecht wrote:
> Hallo,
> Frank Barknecht hat gesagt: // Frank Barknecht wrote:
> 
> > I don't think switching can be done in a generic way from the outside
> > without knowing some details of the abstraction to switch on or off. 
> > 
> > Take for example midi voice allocation: Basically noteon and noteoff
> > are kind of switch on and switch off messages already. However
> > generally you have a release envelope fading out the sound over a
> > certain time span after the noteoff message arrived. You cannot switch
> > off dsp for a voice unless you know its release length, and this
> > length might only be known inside the voice abstraction. 
> 
> However another thing to consider came to my mind. Switch~ing
> abstractions or subpatches on and off has the nasty side effect of
> being quantized to one block. Attached example illustrates the
> nastiness of this. 

the attached patch shows that the subpatch is [switch~]ed off too early,
but not [switch~]ed on too late.

> So for tight timing switching on has to be done at least one block *in
> advance*. 

if i interprete correctly, what your patch is telling me, then one would
have to switch *off* one block *later*. it wouldn't be necessary to know
in advance, when to switch on, though. it seems like it is enough to add
1.5ms to each [delay] that schedules the switch-off-messages. 

> For this a [polywhatever] could be interesting that would
> keep a pool of voices switched on all the time. 
> 
> Here's an idea for an algorithm to achieve this: [poly] does voice
> allocation in a regular fashion using a modulo-counter: Assuming
> voices are counted from 0, then first voice 0 is used, after that
> voice 1 and so on until voice maxvoices-1, after that it starts at 0
> again. Typical modulo. 
> 
> Now assuming all voices in [polywhatever] are connected to each other,
> a voice that started to play could send along a message like "switch
> (myself+1)%maxvoices 1" to switch on the next voice in the circle.

if i am right, that wouldn't be necessary anymore, right?

cheers
roman





	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de





More information about the Pd-list mailing list