[PD] data-s with math inside (feature request?)

Hans-Christoph Steiner hans at eds.org
Sun Jul 9 23:44:27 CEST 2006


On Jul 6, 2006, at 5:54 AM, Frank Barknecht wrote:

> Hallo,
> João Miguel Pais hat gesagt: // João Miguel Pais wrote:
>
>> I'm working on a struct where I use the variable aa to calculate
>> something, and the variable bb [bb == aa - 1] to display it (due  
>> to screen
>> display). If I edit one of them with mouse-dragging is there a way to
>> update the other one directly, besides building a get aa -> set bb  
>> circuit
>> on the side (which has to be constantly triggered with a metro)?
>>
>> I can't remember anything. I think it would be good to have also  
>> these
>> internal math applications on data-s, and / or a way to make some
>> variables dynamically (and directly) linked with each other, so  
>> that they
>> can be updated with no delays or other kind of external triggering  
>> (this
>> is actually connected with my request a few days ago about a mouse- 
>> click
>> detector for data-s. I think it would be a great improvement in  
>> terms of
>> usability).
>
> I don't think, blowing up the data structures with many more functions
> (one could think of more than just math) is a practical approach, as
> in the end it would mean to build a kind of second Pd inside Pd's data
> structures.
>
> As I see it, this is another case where some way to detect changes of
> data in a ds-instance would help a great deal. There already is the
> starting for this available with the [struct] object's outlet, that
> sends a pointer, if an instance is selected in Edit mode. One could do
> all math or list or symbol processing that Pd is capable of with this
> pointer using normal Pd objects.
>
> However there still is no way to detect a change outside of edit mode
> and no way to detect changes through other means (though these
> originate somewhere in Pd anyways and thus they can be intercepted
> from there.)

I think a generic [cursor] object would be very useful here.  It  
would give you the screen coordinates, button press info, and cursor  
icon (pointer, delete X, connect O, etc.).  Krzysztof's [MouseState]  
does the coords and button info already, but I haven't been able to  
decipher the Pd GUI object API and the cyclone API enough to get  
[cursor] working.  I have taken tried the code from Günter's  
[gcanvas] also, but it doesn't output anything.  Could anyone give me  
some pointers?  My attempt is here:

externals/hcs/cursor.c

Also, any ideas on getting the cursor icon state?

.hc



More information about the Pd-list mailing list