[PD] integer values

João Pais jmmmpais at googlemail.com
Tue Mar 2 11:03:09 CET 2010


Hi,

in pd-0.43.0-devel-20100219 I get the following result from the [struct  
$0-data-s float x float y array $0-array-s $0-element] on the before named  
[sliders] abstraction, when I click on the data array:

print: click

(pointer)

0

Which comes out only at the first click, so it isn't perfect (maybe  
coupled with a [del 150] or something). true, using scalars you get a  
"change" flag each time a value changes, that's more elaborate.
another option would be to use one struct per slider - not really that  
hard to program anyway, they can even be created dynamically if you need  
multisliders with different sliders inside. (Volker, if you're not in a  
hurry and this interests you, I could make an example around the end of  
the week)

The good thing about data structures is that you can make a nice gui with  
it (in case that matters).

João

On Tue, 02 Mar 2010 02:04:49 +0100, Jonathan Wilkes <jancsika at yahoo.com>  
wrote:

>
>
> --- On Tue, 3/2/10, João Pais <jmmmpais at googlemail.com> wrote:
>
>> From: João Pais <jmmmpais at googlemail.com>
>> Subject: Re: [PD] integer values
>> To: "volker böhm" <vboehm at gmx.ch>, pd-list at iem.at
>> Date: Tuesday, March 2, 2010, 1:06 AM
>> since what you need most is a
>> click/activity detector to trigger your quantizer, it might
>> be possible to do this with data structures - to avoid
>> adding a [metro]. unfortunately data structures are complex
>> to work with and I have no time now do try something. but
>> you could look at my jmmmp/sliders abstraction and go from
>> there. recent versions of pd have a click on/off detector in
>> data structures, I think.
>>
>> next week I could say something more about it, if this
>> isn't something urgent.
>>
>> João
>
> You can detect clicks for a scalar, but not for each individual element
> of an array.  Unless there's a cool trick someone knows, I think you're
> still forced to use the [metro] workaround if you use data structures.
>
>
>
>


-- 
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmpais at googlemail.com | skype: jmmmpjmmmp




More information about the Pd-list mailing list