HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. prehm
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 11
    • Groups 0

    prehm

    @prehm

    0
    Reputation
    1
    Profile views
    11
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    prehm Unfollow Follow

    Latest posts made by prehm

    • combining paths

      hello there,
      maybe a noob question, but i am stuck here..

      i am creating a custom keyboard and I have all the key areas saved in an array.
      I want to be able to add a drop shadow that highlights a scale on the keyboard. my intention is to combine the areas of all rectangles that fit the scale to a single path object (or multiple if there is a gap), so that the shadow will enclose adjacent keys.

      I created a path with Content.createPath and tried iterating over the array that contains the areas using a loop and path.addRectangle, but the path data always only shows a single rectangle ( four values).

      any hints?

      cheers :)

      Edit:
      okay so i managed to draw that path (using g.drawpath) and it works fine, but when I add the same data to g.drawDropShadowFromPath i get an error: Point is not an array

      posted in Scripting
      P
      prehm
    • RE: noob question: UI component.set()

      @HISEnberg
      oh very cool thanks!
      so if i understand correctly, using obj.data allows me to define control data that couldn't be set using the UI json object? or is the data object also limited to specific properties?

      posted in Scripting
      P
      prehm
    • RE: noob question: UI component.set()

      ah I see, thats unfortunate.
      my buttons have four different states, and should go to the next one on each click.
      as far as i understood the stock buttons only support states for on/off/hover states, that why i went for look and feel, and because i might want to experiment with blend modes later on, which (i think) are not available outside look and feel (?)

      i now used the text property and parseInt to set my value, which doesnt feel clean but works.
      is there maybe a list somewhere of the properties that can be used in a UI json object? i looked in hise.docs but didn't find anything.

      cheers!

      posted in Scripting
      P
      prehm
    • noob question: UI component.set()

      hey there,
      i have created a couple of buttons with a custom image using LAF and added these to an array.
      i edited the JSON objects in the component list to have an extra property called "group", which i intend to change on a control callback and then use inside the LAF of each button to change the Y offset of the image (to display a different state).
      Inside my control callback, I can Console.print the value of "group" via component.get("group") and it will display correctly.
      but when I try to use component.set("group", 2(or whatever)), i get an error that the property was not found.
      can somebody help me out?
      cheers!

      posted in Scripting
      P
      prehm
    • RE: which data container would you recommend for this use case?

      @d-healey
      Thanks a lot, some fresh ideas is really all I need 🙃

      posted in Scripting
      P
      prehm
    • RE: which data container would you recommend for this use case?

      @VirtualVirgin
      Yes I think that’s an error on my side, but still it would save the action of clearing and concatenating if I could just „view“ part of the big array through one of the small arrays.

      @d-healey
      That idea is interesting, if I understand you correctly, I would set it up like this:?

      Const SmallArray = [1, 2]
      Const BigArray = [SmallArray[0], SmallArray[1]]
      And so on

      Is that what you meant? Would this keep track of value changes? Can’t test it right now but I will later, thanks!

      posted in Scripting
      P
      prehm
    • RE: which data container would you recommend for this use case?

      @VirtualVirgin
      Yes that’s the way I’ve been doing it, but because that operation has to be done a lot of times in my script at a single note on event, I was wondering if instead there was a way to work with the exact same piece of memory in order to to save computation time, instead of clearing and concatenating over and over again.

      posted in Scripting
      P
      prehm
    • RE: which data container would you recommend for this use case?

      Okay cool thank you, that’s good to know!
      I wonder, is there any way for an array to always keep track of the concatenated state of three other arrays? Or the other way around, a smaller array that always represents a certain section of a bigger array?

      posted in Scripting
      P
      prehm
    • RE: which data container would you recommend for this use case?

      how do you mean?
      each main array holds an amount of possible note choices. all seven main arrays get summed up in the end, and there is another script in place which determines the note to choose for a note On event.
      i dont really know how to specify any further without breaking down the whole concept..

      posted in Scripting
      P
      prehm
    • RE: which data container would you recommend for this use case?

      @d-healey
      they hold midi note numbers, which are used to generate additional note ons

      posted in Scripting
      P
      prehm