Hi Tas,
I spotted a bunch of little errors in your loopcut abstraction. Hopefuly this will help you.
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.
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.
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.
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.
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@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