Page 1 of 1

Piano Widget Progress, Thanks!

Posted: Fri Sep 11, 2020 6:53 pm
by PaulDaMacMan
Just wanted to say a BIG thanks to @LCMark @BN @trevordevore for helping me get this Piano Widget working in under a week (of nights).

Here's a little demo video of the Widget in action:
https://www.youtube.com/watch?v=xg7rBg8 ... e=youtu.be

There's more optimizations that could be done, but I'm already pleased with it's performance :D

Re: Piano Widget Progress, Thanks!

Posted: Fri Sep 11, 2020 7:07 pm
by trevordevore
That is very cool @PaulDaMacMan. Well done!

Re: Piano Widget Progress, Thanks!

Posted: Sun Sep 13, 2020 2:15 am
by mwieder
Paul-

That's way cool.
What was the trick to getting composite widgets to play together?

Re: Piano Widget Progress, Thanks!

Posted: Sun Sep 13, 2020 7:38 pm
by Lagi Pittas
Hi Paul,

Don't know how I will use it in a Business program but I bet there are lots of useful tricks to be learned from the code. Thanks for sharing.

Lagi

Re: Piano Widget Progress, Thanks!

Posted: Mon Sep 14, 2020 8:30 pm
by PaulDaMacMan
mwieder wrote:
Sun Sep 13, 2020 2:15 am
Paul-

That's way cool.
What was the trick to getting composite widgets to play together?
No trick at all, it's not a composed widget! I couldn't work around that bug so I made it as one big widget, with a list of Octaves that contain list of Piano-key arrays, and then I had to manually tweaked the positions of all 127 SVG paths so that they're spaced properly. Bernd sent me some code that renders the graphics with the rounded-rect paths from scratch, on the fly. His spaces evenly & looks better IMO, but I haven't figured out how to integrate that into my array based system yet (which I've settled on for other reasons).

Re: Piano Widget Progress, Thanks!

Posted: Mon Sep 14, 2020 8:39 pm
by mwieder
I couldn't work around that bug so I made it as one big widget
That's depressing.
I've been playing around with the underlying C code a bit, and I've gotten it to work sometimes, just not consistently. Or reliably.

Re: Piano Widget Progress, Thanks!

Posted: Mon Sep 14, 2020 8:46 pm
by PaulDaMacMan
Unless your business is music education or something like that, then not likely. I don't know that there's any unique tricks in this widget, other than the hitTest function, that tests if point is within path. That clever bit of code came from Monte via LCMark. If it helps anyone else then great and you're welcome!
There's maybe a few more tricks now, or at least some examples that weren't too clear about how to do from official examples/presentations that are available. Almost ready for a vers. 1.0 release now.