[PD] patch with Loadbang loses data structure

Christof Ressi christof.ressi at gmx.at
Thu May 18 14:13:33 CEST 2017


> for that it works to draw first the black, then the white keys, then vis 0,vis 1. 
> It's not logical, but it seems to work.

also works for me. and it helps for filtering the right key events (see my solution).

Gesendet: Donnerstag, 18. Mai 2017 um 08:48 Uhr
Von: "João Pais" <jmmmpais at gmail.com>
An: oliver <oliver at klingt.org>
Cc: pd-list at mail.iem.at
Betreff: Re: [PD] patch with Loadbang loses data structure

Hi,
 for me a [del 1] was enough to make sure the black keys appear. But it doesn't solve the problem that when the window is minimized and then maximized, white keys are again on top (at least on Pd-Ext), for that it works to draw first the black, then the white keys, then vis 0,vis 1. It's not logical, but it seems to work.
 Btw, if you declare the dimensions of the filledpolygon as variables, you can make this using only one struct template.
Don't know if you plan on use the keyboard to click on it, but it won't work to click on black keys, as it will also trigger a white key - except you do some hacking of the message, or you don't overlap keys by using a more complex shape for the white keys that goes around the black key. This would also solve the problem that when redrawing, the white keys overlap the black ones.
 Best,
 Joao

 
2017-05-18 8:19 GMT+02:00 oliver <oliver at klingt.org[mailto:oliver at klingt.org]>:Esteban Viveros wrote:Hello,
hi, nice patch !
beautifully structured as well !

 
 I'm drawing a keyboard with data structures.
 The problem is when I use loadbang to draw the keyboard, black keys are
losed. If I bang the routine manually it works like a charm..

What I'm losing?
seems like data structures need a little time to "load" (if that's the right term in that context). putting a [del 100] after loadbang did the trick for me.

([del 10] was to small ...)

best

oliver


_______________________________________________
Pd-list at lists.iem.at[mailto:Pd-list at lists.iem.at] mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list[https://lists.puredata.info/listinfo/pd-list]_______________________________________________ Pd-list at lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list[https://lists.puredata.info/listinfo/pd-list]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kslider-draw2.pd
Type: application/octet-stream
Size: 6901 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170518/b8ec5a9b/attachment.obj>


More information about the Pd-list mailing list