[PD] Vradio issues.

padawan12 padawan12 at obiwannabe.co.uk
Mon Aug 7 17:00:51 CEST 2006


Hi Tas,

I spotted a bunch of little errors in your
loopcut abstraction. Hopefuly this will help you.

1) Dollar arguments aren't necessary in things
like float boxes, the float takes the value given
at its rightmost inlet if a float type is there.
No need to "dereference" it, it's not in a list, 
and even if it were a list with one float becomes
a float.

2) You didn't need those two floats to store intermediate 
values, only one variable is needed in the computation
to hold the value of the sample length. If you store
intermediate values unneccesarily you must make sure
they get banged through. It gets messy and can lead to
"races", so only use [f] to store things when you
absolutely must.

3) You need to study how bangs propagate a bit more.
I know it's not obvious, takes a bit of experience.
Basically nothing happens until a leftmost inlet
gets a bang. Using [t b f] units to split the bangs
from the floats I've arranged it so the start and end
list (pair) gets [pack]ed afresh when *either* input
is updated.

4) Because you probably didn't want the sample to
fire every time you changed a start or length value
I've put in an extra temporary list variable just
before the output. The [pack] places the list into
that via its right inlet each time it recalculates it.
It gets sent to the output only when the left inlet
gets a bang.


* Note: Your algorithm for getting the start and end
by division has a fault, but I'll leave you to
discover that one :) Hint: If you were writing in C you
would be seeing a lot of floating point errors 
(divide by zeros)

On Mon, 7 Aug 2006 00:33:47 +0100 (BST)
Tas Pas <tprotopgr at yahoo.gr> wrote:

>   Hi list, 
> 
> I've made a patch that loads a sample and, when you press the "b" key, it launches it. Till here all ok. When I tried to customise the message that arrives in [tabplay~]'s inlet, using 2 vradios (one for the sample start and the other for the playback duration), I faced a problem that seems to be quite odd.
> 
> Whenever I set the value of the start of the sample and trigger a bang, I can see that the value is set.
> 
> Whenever I set the value of the playback duration, I have to trigger twise in order to see the value changed.
> 
> I attached you the patch (sampler_test.pd) and the abstractions I used to make it to take a look for yourselfs.
> 
> Thank you
> 
> Tasos
>  		
> ---------------------------------
>  ______________ Yahoo!
>  __________ __ __________ ____ ____ (spam); __ Yahoo! Mail ________ ___ ________ ______ _________ ____ ___ ___________ _________ 
>  http://login.yahoo.com/config/mail?.intl=gr 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loopcut.pd
Type: application/octet-stream
Size: 665 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060807/b6ed12ac/attachment.obj>


More information about the Pd-list mailing list