Jump to content


Photo

Use several layers to move buttons with sliders...

dynamic gui move buttons

  • Please log in to reply
3 replies to this topic

#1 Raul (ulneiz)

Raul (ulneiz)

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1028 posts
  • Gender:Male
  • Location:Spain

Posted 04 November 2017 - 11:37

Now I'm at a sweet spot finishing a tool module to create curves for automation. I'm looking for a simple way with the API available to move a button of 10 x 10 pixels off that represents a point.

 

This point must move within a specific area. For the moment, I have managed to move the coordinates of the X, Y button with two sliders. But if I add another button (another point) with its own sliders, I can not separate it in another layer to avoid displacement problems with the other point. I'm trying to do this just by using the viewbuiler, without any weird trick, just with the height and the space, using rows and columns.

 

The problem is a little bit worse because the horizontal X coordinate is variable, corresponding to the number of lines in a pattern.

 

Has anyone just gotten using the viewbuilder, without external tricks, create layers to be able to move objects (like a button) inside a rectangular area with simple X Y coordinates?

 

vpdpro-move-point.gif

 

The objective is to be able to move two buttons separately and do not get stuck. Any ideas? I do not intend to join points with lines, just show the movement.


Edited by Raul (ulneiz), 05 November 2017 - 17:23.

:excl: Development of my tool: GT16-Colors

 

:excl: My API wishlist R3.1 (updated 24 July 2017):

Spoiler

 

:excl: My Renoise 3.1 wishlist (updated 26 September 2017):

Spoiler

#2 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1502 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 04 November 2017 - 12:52

Yes. I used racks for this. Using the correct property values, you should be able to overlay as many as you want. It's not difficult. I would guess that you're going wrong by using add_child on the same object now? You have to lay it out more cleverly with layers, like you say. the vb:space class can then be used to position the main object of the layer.


Edited by joule, 04 November 2017 - 12:53.


#3 Raul (ulneiz)

Raul (ulneiz)

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1028 posts
  • Gender:Male
  • Location:Spain

Posted 04 November 2017 - 15:47

Yes. I used racks for this. Using the correct property values, you should be able to overlay as many as you want. It's not difficult. I would guess that you're going wrong by using add_child on the same object now? You have to lay it out more cleverly with layers, like you say. the vb:space class can then be used to position the main object of the layer.

 

Ok, I have already solved this problem, I do not even use add_child. In the end the "trick" is to superimpose the layers well using the spacio in the VB tree.

 

I currently use the accumulation of points in this way, and I use the property visible = true / false to show the points (and other things). It works exactly as expected.


:excl: Development of my tool: GT16-Colors

 

:excl: My API wishlist R3.1 (updated 24 July 2017):

Spoiler

 

:excl: My Renoise 3.1 wishlist (updated 26 September 2017):

Spoiler

#4 Raul (ulneiz)

Raul (ulneiz)

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1028 posts
  • Gender:Male
  • Location:Spain

Posted 05 November 2017 - 13:25

I already have a little advanced tool to automate points to Renoise v3.1.1 (the Automa32). This tool only includes the use of the viewbuilder, without including any LUA trick or strange code, basically playing with the property "spacing" in vb:row (horizontal desplacement) and vb:column (vertical desplacement), using positive and negative values. The colored dots are simply buttons. To add or remove points, I do not use add_child, but .visible = true / false.

 

Here is a demo of the functioning in diapers of the tool:

vpdpro-automaa32_4.gif

 

The main problem is always the same, get build a GUI that is understandable and manageable. To create the points I used the following code scheme:

 

To define the rectangular panel and the layers of the points (only using the available viewbuilder):

Spoiler

 

To define an individual point (VPD_AUT_POINT_1):

Spoiler

Of course, just like to build a virtual piano with only buttons, it is necessary to use "negative values"...

 

I am pleasantly surprised with this tool. The best thing is that it allows you to move points vertically. The only limitation is that Renoise can not modify the values of the tool, only in reverse, the tool edits Renoise values in the automation editor. The main obstacle is always the "easily understandable GUI".

 

For now, I have added a 3x8 button pad for specific curves, or predetermined. However, with a little time, it is possible to add hundreds of different curves to the tool. You press a button and it adds the curve. Then move it to your whim, all the points. The only limitation is that they are a total of 32 manageable points.

 

What was born as a crude idea, is becoming very powerful to create curves...

 


  • Circe likes this

:excl: Development of my tool: GT16-Colors

 

:excl: My API wishlist R3.1 (updated 24 July 2017):

Spoiler

 

:excl: My Renoise 3.1 wishlist (updated 26 September 2017):

Spoiler