Piano Widget Progress, Thanks!

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
PaulDaMacMan
Posts: 301
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Piano Widget Progress, Thanks!

Post by PaulDaMacMan » Fri Sep 11, 2020 6:53 pm

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
Last edited by PaulDaMacMan on Fri Sep 11, 2020 11:14 pm, edited 1 time in total.
My LCB Repos: https://github.com/PaulMcClernan/

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 991
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Piano Widget Progress, Thanks!

Post by trevordevore » Fri Sep 11, 2020 7:07 pm

That is very cool @PaulDaMacMan. Well done!
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3122
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Piano Widget Progress, Thanks!

Post by mwieder » Sun Sep 13, 2020 2:15 am

Paul-

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

Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 345
Joined: Mon Jun 10, 2013 1:32 pm

Re: Piano Widget Progress, Thanks!

Post by Lagi Pittas » Sun Sep 13, 2020 7:38 pm

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

PaulDaMacMan
Posts: 301
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Piano Widget Progress, Thanks!

Post by PaulDaMacMan » Mon Sep 14, 2020 8:30 pm

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).
My LCB Repos: https://github.com/PaulMcClernan/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3122
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Piano Widget Progress, Thanks!

Post by mwieder » Mon Sep 14, 2020 8:39 pm

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.

PaulDaMacMan
Posts: 301
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Piano Widget Progress, Thanks!

Post by PaulDaMacMan » Mon Sep 14, 2020 8:46 pm

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.
My LCB Repos: https://github.com/PaulMcClernan/

Post Reply

Return to “LiveCode Builder”