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

    Topics

    • P

      how to get the areas of a floating tile keyboard into an array

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      18
      0 Votes
      18 Posts
      129 Views
      P

      okay so if anybody ever runs into this problem, i am sure there is a better way but here is how i did it:

      the keyOffsets array was created by setting the key with to a size where one octave spans 100 pixels and then using the midi list approach from above to get percentage values for each left edge.

      since the keyWidth of the fltKeyboard is stored in a separate string that contains all the other properties that can be set from the property editor, i had to do some string juggeling to separate the first number that comes up (which is the key width, luckily) that parse that as a float. multiply that by 7 and there is one octave width in pixels, regardless of that key size is set. then i used a loop to add the consecutive percentage values up and here we go.

      probably convoluted, but it works :)

      const keyOffsets = [0.08, 0.06, 0.11, 0.04, 0.14, 0.07, 0.07, 0.09, 0.05, 0.12, 0.03, 0.14]; var v = 0; var kbd = keyboard.get("Data"); kbd = kbd.substring(kbd.indexOf(":")+2, kbd.indexOf(",")); var octaveWidth = parseFloat(kbd) * 7; for (i=24; i<120; i++) { keysLeft.setValue(i, v); v += octaveWidth * keyOffsets[i%12]; }
    • P

      need some help with artificial note on events

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      7
      0 Votes
      7 Posts
      97 Views
      P

      @d-healey
      Thanks, your advice is much appreciated.
      So far everything works just fine and I was surprised to find that all the calculations that my script does for every note on take less than half a millisecond at a buffer size of 128, which is great. My first attempt in pure data was unusable in terms of latency..
      I’ve started using namespaces and external script files to keep everything nice and tidy, thanks to your video on the topic.
      There is a lot more stuff for me to learn but it’s very exciting to know that I have all the tools I need to make it real.
      Cheers!

    • P

      changing properties of lottie json object

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      1
      0 Votes
      1 Posts
      87 Views
      No one has replied
    • P

      combining paths

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      1
      0 Votes
      1 Posts
      105 Views
      No one has replied
    • P

      noob question: UI component.set()

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      7
      0 Votes
      7 Posts
      541 Views
      HISEnbergH

      @prehm there's been a few posts floating around on the topic of panels lately. Hypothetically the panel can store both UI and control data. In practice, for control data, it is best to use another component and reflect UI changes in the panel. So in your case, maybe try using a hidden knob for your four-button state, and using mousecallbacks and a paint routine on the panel to interact with and change the state of the knob.

      You could bypass the knob altogether, I sometimes find issues with it when trying load presets or initialize the project. Really depends on what you are trying to do though.

      Link Preview Image saveInPreset not working for panel data?

      @VirtualVirgin You could do it like this which might make it seem like it makes more sense const panelObj = Panel1.getValue(); Console.print(panelObj.test1);

      favicon

      Forum (forum.hise.audio)

      Link Preview Image Is panel.data persistent?

      I thought it was, but this snippet seems to show otherwise. HiseSnippet 984.3ocsVstaaaCElxwpq1asXEnO.B5WJaFAVdtNdscXcwIY0aKIF0YA6eELTGGSDIRAR5rYTzm08Jr2fsC0k...

      favicon

      Forum (forum.hise.audio)

    • P

      which data container would you recommend for this use case?

      Watching Ignoring Scheduled Pinned Locked Moved Scripting
      16
      0 Votes
      16 Posts
      828 Views
      P

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