Drag and drop in new device

This forum is for developers of Rack Extensions to discuss the RE SDK, share code, and offer tips to other developers.
Post Reply
User avatar
pongasoft
RE Developer
Posts: 478
Joined: 21 Apr 2016
Location: Las Vegas
Contact:

29 Jun 2022

How is this possible exactly with the current SDK?

Am I missing something here? It looks like drag and drop across custom displays even?

Screen Shot 2022-06-29 at 06.00.55.png
Screen Shot 2022-06-29 at 06.00.55.png (227.06 KiB) Viewed 2824 times

User avatar
deeplink
Competition Winner
Posts: 1073
Joined: 08 Jul 2020
Location: Dubai / Cape Town
Contact:

29 Jun 2022

I think it's just one custom display? Made to look like two
Get more Combinators at the deeplink website

User avatar
buddard
RE Developer
Posts: 1245
Joined: 17 Jan 2015
Location: Stockholm
Contact:

29 Jun 2022

I did not implement this, but there are two adjacent custom displays: One for the grid and piano roll, and one for the sequencer. They both track the same drag-related properties and make sure to add the correct coordinate offsets so they both draw the "chord clip" in the same place for a seamless handover effect.

Looks pretty cool!

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

29 Jun 2022

buddard wrote:
29 Jun 2022
I did not implement this, but there are two adjacent custom displays: One for the grid and piano roll, and one for the sequencer. They both track the same drag-related properties and make sure to add the correct coordinate offsets so they both draw the "chord clip" in the same place for a seamless handover effect.

Looks pretty cool!
Definitely looks pretty cool - one of if not the best designs for player devices and the sequencer lengths are spot on. If only they would sort out Pattern Mutator ;)

User avatar
orthodox
RE Developer
Posts: 2286
Joined: 22 Jan 2015
Location: 55°09'24.5"N 37°27'41.4"E

30 Jun 2022

Simple stuff, just keep track of the dragged object position as properties in all custom displays.

User avatar
pongasoft
RE Developer
Posts: 478
Joined: 21 Apr 2016
Location: Las Vegas
Contact:

30 Jun 2022

orthodox wrote:
30 Jun 2022
Simple stuff, just keep track of the dragged object position as properties in all custom displays.
I don't believe it is "simple". It is a trick. A very clever trick mind you, but a trick nonetheless. It means that every developer who wants to do the same, needs to do something similar (which is not documented, so reinvent the wheel) and manage it manually. It also highly constrain the design as the custom displays must be touching each other otherwise the dragged object will just vanish.

This leads to inconsistencies (looks ugly/broken) as can be seen in this screenshot which clearly shows the boundaries of the custom displays...


Screen Shot 2022-06-30 at 05.40.43.png
Screen Shot 2022-06-30 at 05.40.43.png (264.46 KiB) Viewed 2715 times

User avatar
orthodox
RE Developer
Posts: 2286
Joined: 22 Jan 2015
Location: 55°09'24.5"N 37°27'41.4"E

30 Jun 2022

pongasoft wrote:
30 Jun 2022
orthodox wrote:
30 Jun 2022
Simple stuff, just keep track of the dragged object position as properties in all custom displays.
I don't believe it is "simple". It is a trick. A very clever trick mind you, but a trick nonetheless. It means that every developer who wants to do the same, needs to do something similar (which is not documented, so reinvent the wheel) and manage it manually. It also highly constrain the design as the custom displays must be touching each other otherwise the dragged object will just vanish.
Ok, it may be a trick, but it is very very easy to implement. Takes almost nothing in terms of the lines of lua code. Both displays use the same function to draw the object being dragged. I was more impressed with the trick where you can drag the arrow from the modulation matrix to any destination control on the device. That requires having a map of all the controls in display.lua. While this new trick needs only the relative position of one display to the other one.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests