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

    18
    0 Votes
    18 Posts
    2k 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]; }
  • need some help with artificial note on events

    7
    0 Votes
    7 Posts
    770 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!

  • Arpeggiator SliderPack || Slider Amount

    Solved
    1
    0 Votes
    1 Posts
    132 Views
    No one has replied
  • Show something when shift is down

    2
  • Save/Load JSON

    2
    1 Votes
    2 Posts
    321 Views
    rglidesR

    @rglides Solved!

    const var SAVE = Content.getComponent("SAVE"); const var LOAD = Content.getComponent("LOAD"); inline function onSAVEControl(component, value) { if (value) { local reverbData = { "OSC1_Reverb_Width": knb_OSC1_Reverb_Width.getValue() }; Engine.dumpAsJSON(reverbData, "reverb_settings.json"); } }; Content.getComponent("SAVE").setControlCallback(onSAVEControl); inline function onLOADControl(component, value) { if (value) { local loadReverb = Engine.loadFromJSON("reverb_settings.json"); if (loadedData != undefined) { if (loadReverb.OSC1_Reverb_Width != undefined) { knb_OSC1_Reverb_Width.setValue(loadReverb.OSC1_Reverb_Width); knb_OSC1_Reverb_Width.changed(); } } } }; Content.getComponent("LOAD").setControlCallback(onLOADControl);
  • Can't reference inline function parameters in nested function body

    15
    0 Votes
    15 Posts
    2k Views
    JulesVJ

    @d-healey Clever! Thank you!

  • Is there a guide for the SVG to path converter?

    7
    0 Votes
    7 Posts
    1k Views
  • Floating Tile Keyboard - Possible to Rotate?

    Unsolved
    9
    0 Votes
    9 Posts
    857 Views
    David HealeyD

    @HISEnberg Sure

    https://youtu.be/pmwC9Jmmwuo

    Ah you found it first :)

  • How I tell an instance of a ScriptSynth to load a particular DSP network?

    25
    0 Votes
    25 Posts
    3k Views
    Dan KorneffD

    @Christoph-Hart yup. But I really just wanna compile my C++ node with 60 parameters and toss it in a hardcoded FX πŸ˜€

  • Sliders not responding to "Consumed" MIDI CCs

    Solved
    21
    0 Votes
    21 Posts
    5k Views
    CyberGenC

    @d-healey @d-healey said in Sliders not responding to "Consumed" MIDI CCs:

    setCustomAutomation

    Now that I've had a bit more time, there are a number of hurdles with using this method.

    Issues Encountered

    MIDI Learn disappears
    The "MIDI Learn" option no longer appears in the right-click context menu of knobs β€” unless an automationId has been manually assigned in the Properties panel.

    automationId overrides control callbacks
    Assigning an automationId disables the knob's regular controlCallback, which is where most of my knob logic lives (e.g., updating processors, linked components, states, etc.).

    Workaround via automation callback
    You can attach a callback to a specific automation and call the original controlCallback logic from there β€” but this adds boilerplate and breaks modularity.

    Avoiding feedback loops crashes HISE
    Trying to assign a knob as the target of its own automation (to bypass issue #2) results in an infinite loop that crashes HISE.

    Controller numbers don’t carry over
    If you switch the automationId to a new target, the MIDI CC assignment doesn't carry over. It must be learned again manually β€” making it difficult to share CC control across multiple processors or targets.

    πŸ€•

  • Global Variable stuck?

    Solved
    7
    0 Votes
    7 Posts
    553 Views
    ChazroxC

    @d-healey Good to know! I have a bunch of 'consts' in my 'onNoteOn's. Im going to change them now and hope nothing breaks. Thank You! πŸ™

  • How can I efficiently remove a key from an object?

    7
    0 Votes
    7 Posts
    957 Views
    Christoph HartC

    @d-healey yeah something like JSON.delete(obj, key) is the easiest way, the delete syntax would require a real brain-twister with the current parser.

  • This topic is deleted!

    Solved
    12
    0 Votes
    12 Posts
    540 Views
  • PNG Slider LAF || See Example

    2
    4 Votes
    2 Posts
    282 Views
    ChazroxC

    @pcs800 πŸ‘

  • Change Variables within function

    5
    0 Votes
    5 Posts
    626 Views
    ChazroxC

    @Ben-Catman

    I think you could just

    reg x = yourKnob.getValue(); // declare x // then just use 'x'...

    I think you can also

    local x = yourKnob.getValue(); // from within your inline function... // then use 'x'...
  • Adding JSON properties to a component via script?

    4
    0 Votes
    4 Posts
    596 Views
    Christoph HartC

    @VirtualVirgin Little unrelated tip of the day:

    mySliders.map(function(element){return element.getId();});

    can also be written as

    mySliders.map(element => element.getId());

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

  • How do I send 'noteOff' messages from UI Button?

    Solved
    7
    0 Votes
    7 Posts
    710 Views
    ChazroxC

    @VirtualVirgin This worked best for me! Thank You! I got it working with my chord script perfectly. πŸ™

    Bingo:
    Screenshot 2025-06-20 at 11.38.07β€―PM.png

    The script:

    for (i = 0; i < chord1.length; i++) { Engine.setKeyColour(i, NoKeyColour); Synth.addNoteOff(1, chord1[i] + 60 + Octave1 + Chord1Choice - 1, 0); } //THANK YOU!
  • Just wondering about how this logic condition evaluates

    6
    0 Votes
    6 Posts
    738 Views
    VirtualVirginV

    @d-healey said in Just wondering about how this logic condition evaluates:

    @VirtualVirgin said in Just wondering about how this logic condition evaluates:

    Yes! That is the solution :)

    You can probably also get rid of the ternary operator at the end - ? true : false because the statement itself should return true or false.

    Yes, that makes sense. It is just evaluating to that anyway, so no need to make it redundant.

  • Articulation Switches Alternative Routing??

    Solved
    5
    0 Votes
    5 Posts
    459 Views
    ChazroxC

    @d-healey makes sense! πŸ™

    @d-healey said in Articulation Switches Alternative Routing??:

    Of course not

    Its much appreciated!

  • Preset browser LAF - hover?

    7
    0 Votes
    7 Posts
    735 Views
    Christoph HartC

    @tomekslesicki I'm quoting your deleted post her because these are still valid questions:

    thanks! How do I know which css classes correspond to which elements? Also - I remember seeing a commit when you allowed LAF and CSS to co-exist. How do I approach this?

    This is documented in the Preset browser docs with a cheat sheet that shows all CSS identifiers for each component. However I've noticed that I haven't ported all the nice debugging tools that are available in the multipage dialog editor to the HISE CSS workflow, so I'll be doing that over time. For now I've added a simple overlay that shows some (but not all nested component IDs):

    I remember seeing a commit when you allowed LAF and CSS to co-exist

    Yes, this is now possible, you can give a single LAF object a style sheet as well as a script paint routine and it will use whatever is best (with the script functions always having the precedence over the style sheet definition with the exception of the popup menu styling which is CSS first).

    On some objects, obj.over works, on some it's obj.hover. Wouldn't it make sense to make both of these descriptions perform the same function in LAF?

    Yes that also annoyed me whenever I'm writing LAF functions. I obviously can't just correct the typo as this would break existing projects, but I can duplicate the property so that every LAF object that has over will get a hover property with the same value, then we can phase out over in 20+ years lol.

10

Online

2.6k

Users

14.0k

Topics

121.5k

Posts