<div dir="ltr"><div class="m_-6205969221429992403inbox-inbox-inbox-inbox-uyb8Gf" style="color:rgb(33,33,33)"><div><div class="m_-6205969221429992403inbox-inbox-inbox-inbox-pv" style="border-left:1px solid rgb(224,224,224);color:rgb(117,117,117);padding:10px"><div class="m_-6205969221429992403inbox-inbox-inbox-inbox-inbox-inbox-uyb8Gf" style="color:rgb(33,33,33)"><div><div class="m_-6205969221429992403inbox-inbox-inbox-inbox-inbox-inbox-pv" style="border-left:1px solid rgb(224,224,224);color:rgb(117,117,117);padding:10px"><br class="m_-6205969221429992403inbox-inbox-inbox-inbox-inbox-inbox-Apple-interchange-newline">> for that it works to draw first the black, then the white keys, then vis 0,vis 1.<br>> It's not logical, but it seems to work.<br><br></div></div></div><div class="m_-6205969221429992403inbox-inbox-inbox-inbox-inbox-inbox-uyb8Gf" style="color:rgb(0,0,0)"><div><div class="m_-6205969221429992403inbox-inbox-inbox-inbox-inbox-inbox-F3hlO"><font color="#666666">also works for me. and it helps for filtering the right key events (see my solution).</font></div></div></div></div></div></div><br><div dir="ltr"><div>Seems like a magic for me... Anyway I adopt Christof mixed with João solutions at this patch.</div><div><br></div><div>But arises some questions...</div><div><br></div><div>Once I need:</div><div>  1. change color of key while mouse click is on at these key</div><div>  2. once mouse click is on, and mouse cursor move around the gop area, the keyboard will respond. Like a finger pressing and moving around a real keyboard.</div><div>  3. the key are velocity sensitive around y axis at first click.</div><div><br></div><div>I'm thinking to map the gop are, create a system of coordinates to draw keyboard and using [cyclone/mousestate] and/or only [iemguts/receivecanvas].</div><div><br></div><div>In this way maybe is better implement the João suggestion of parameterize the template and implement the keys with more points and implement the control with a gop coordinate system.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Em qui, 18 de mai de 2017 às 09:13, Christof Ressi <<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> for that it works to draw first the black, then the white keys, then vis 0,vis 1.<br>
> It's not logical, but it seems to work.<br>
<br>
also works for me. and it helps for filtering the right key events (see my solution).<br>
<br>
Gesendet: Donnerstag, 18. Mai 2017 um 08:48 Uhr<br>
Von: "João Pais" <<a href="mailto:jmmmpais@gmail.com" target="_blank">jmmmpais@gmail.com</a>><br>
An: oliver <<a href="mailto:oliver@klingt.org" target="_blank">oliver@klingt.org</a>><br>
Cc: <a href="mailto:pd-list@mail.iem.at" target="_blank">pd-list@mail.iem.at</a><br>
Betreff: Re: [PD] patch with Loadbang loses data structure<br>
<br>
Hi,<br>
 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.<br>
 Btw, if you declare the dimensions of the filledpolygon as variables, you can make this using only one struct template.<br>
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.<br>
 Best,<br>
 Joao<br>
<br>
 <br>
2017-05-18 8:19 GMT+02:00 oliver <<a href="mailto:oliver@klingt.org" target="_blank">oliver@klingt.org</a>[mailto:<a href="mailto:oliver@klingt.org" target="_blank">oliver@klingt.org</a>]>:Esteban Viveros wrote:Hello,<br>
hi, nice patch !<br>
beautifully structured as well !<br>
<br>
 <br>
 I'm drawing a keyboard with data structures.<br>
 The problem is when I use loadbang to draw the keyboard, black keys are<br>
losed. If I bang the routine manually it works like a charm..<br>
<br>
What I'm losing?<br>
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.<br>
<br>
([del 10] was to small ...)<br>
<br>
best<br>
<br>
oliver<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>[mailto:<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a>] mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list%5Bhttps://lists.puredata.info/listinfo/pd-list%5D_______________________________________________" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list[https://lists.puredata.info/listinfo/pd-list]_______________________________________________</a> <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list%5Bhttps://lists.puredata.info/listinfo/pd-list%5D" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list[https://lists.puredata.info/listinfo/pd-list]</a></blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr"><a href="http://www.estebanviveros.com" target="_blank">www.estebanviveros.com</a> </p>
</div></div></div>