• 0 Votes
    2 Posts
    80 Views
    David HealeyD

    @VirtualVirgin Good old fashioned loop.

    inline function objectContains(key) { local result = false; for (x in obj) { if (isDefined(x[key])) return true; } return result; }

    If you're just looking at the top level of the object then simply isDefined(obj[key])

  • LorisManager synthesise returns stereo buffer for mono file

    4
    0 Votes
    4 Posts
    118 Views
    David HealeyD

    Well I didn't answer the title question but using the original audio file rather than the synthesised buffer to get the number of channels solves the problem I was having.

  • allNotesOff doesn't affect queued events?

    2
    0 Votes
    2 Posts
    174 Views
    David HealeyD

    @Simon said in allNotesOff doesn't affect queued events?:

    Is that intentional, maybe there's a more powerful version?

    I think all notes off just turns off currently playing notes - the same as sending CC123.

    To turn off notes that don't yet exist you'd need to keep an list of such notes and cancel them before they are triggered as you are doing. You could combine this into a function with Engine.allNotesOff()

  • A newbie question, how to write a loop?

    3
    0 Votes
    3 Posts
    105 Views
    Felix WF

    @Lindon
    Awesome, that's exactly what I wanted, thank you very much!🥂

  • Load Data to Preset Browser

    3
    0 Votes
    3 Posts
    162 Views
    J

    @d-healey The HISE gods have answered! Thankyou very very much :)

  • Using concatenation for key in object?

    2
    0 Votes
    2 Posts
    77 Views
    David HealeyD

    @VirtualVirgin

    local matrixTableReturnObject = {}; matrixTableReturnObject[name + "inputNameArray"] = inputLabels; matrixTableReturnObject[name + "outputNameArray"] = outputLabels.outputNameArray; // etc.
  • Is it possible to add parameters to a Control Callback?

    4
    0 Votes
    4 Posts
    126 Views
    David HealeyD

    @VirtualVirgin a broadcaster might be more suitable, check out the latest video on Patreon if you haven't already

  • Inline functions and const

    4
    0 Votes
    4 Posts
    292 Views
    David HealeyD

    @VirtualVirgin As the error message says, testReturn is not a function, you don't need to put () at the end.

  • How to prevent a note from being stopped before envelope is over?

    3
    0 Votes
    3 Posts
    99 Views
    MorphoiceM

    @aaronventure superb thank you

  • How can I make a panel with diagonal "click zones"?

    7
    0 Votes
    7 Posts
    207 Views
    ulrikU

    @ustk Nice done!

  • How to (Host Transport Callbacks)

    12
    0 Votes
    12 Posts
    1k Views
    JayJ

    @ulrik Thank you, that did it

  • why doesnt every note sound the same?

    4
    0 Votes
    4 Posts
    152 Views
    MorphoiceM

    @aaronventure that did it, thanks. super weird with the tap for click. it freaked me out not finding the problem ;)

  • To register local look and feel for panels, do I use "drawPanel"?

    5
    0 Votes
    5 Posts
    127 Views
    A

    @VirtualVirgin define an inline function with a g argument, write it and then just pass the function into the setPaintRoutine method call for any panel you want to use it for.

  • 0 Votes
    17 Posts
    375 Views
    VirtualVirginV

    @ulrik said in I am trying to get the position of the component that is being hovered over by the mouse to no avail:

    @VirtualVirgin it's Content.getComponent("ScriptLabel1"), you forgot the "Content"

    Sorry, I was trying to use the function you provided:

    // get the component object inline function getComponent(componentId) { for (c in AllComponents) if (c.get("id") == componentId) { return c; break; } }
  • Error Message I Don't Understand

    Unsolved
    6
    0 Votes
    6 Posts
    193 Views
    Dan KorneffD

    @clevername27 Unfortunately, I endure the same amount of suffering as everyone else. 😂

  • Trying to make a factory method but getting an error

    29
    0 Votes
    29 Posts
    837 Views
    David HealeyD

    @VirtualVirgin said in Trying to make a factory method but getting an error:

    Looks so obvious when you point it out!

    Yep, but it still took me at least 30 minutes to figure out what was going on.

  • Change "mode" on a knob

    3
    0 Votes
    3 Posts
    138 Views
    S

    @d-healey Thanks!

  • 1 Votes
    2 Posts
    362 Views
    David HealeyD

    I just went to the source to look into making an addNoiseToArea function and what do I find but sneaky undocumented HISE goodness.

    You can pass an object to g.addNoise!

    g.addNoise({alpha: 1.0, scaleFactor: 1.0, area: obj.area, monochromatic: true});

    alpha = noiseAmount

  • How to pass a string between scripts?

    11
    0 Votes
    11 Posts
    645 Views
    David HealeyD

    Oh actually, since you're not using a button to generate the random sequence, as in my snippet, but the note number which both scripts can already see, you can just use a connected sliderpack on the UI and keep it simple.

    Press middle C

    HiseSnippet 1198.3oc6Ws0baSDEdkSDTanCTFdkYDY3AYbFWqXG43ojgj3jzZvI1sNMjAdnyZoUVahztBo0owkg+X7.+B3G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5Hstfc0CINjvy3wddQDkg7iSmahdItljjDMhrbllhgYoLMvreQchxnV1GXJsI2nS2T6DrvsdRbzkDMkA1oh1X4hYSH15+a4fJ7T9eFn2DCTE0r7eF8ipxm7eDpm25W1MxWUE3UMS9OnaQejta.rUB2dpGVr3pJxE5Ru.J2KvhH2AfEQEyJtv26r8Wdag38TGREVtKGikVBFkqF8d.ioa8cW0ibbHVhb.tt5wW79YEOzS3SET1DfYIjJKxRdIXSYKBDcFi3ESsWRNXjH2Hq9OhvriE9K3S5kFy+d.3RirKQ9XqP9yrRFmj6Udm3S.Lwh2Aur5IRYsk7829vZtOyxZQW8RFt0pZXyU0vVqpgaupFZtpF1dUMbm2rgxeEx9SEb+jwFD5jgGESIonbDCCcfwcqn+FuRgCaB

    Peek 2024-12-17 00-39.gif

  • A Couple Preset Questions

    4
    0 Votes
    4 Posts
    139 Views
    David HealeyD

    @clevername27 I'm not sure but I think you use the UserPresetHandler.setPreCallback()

51

Online

2.1k

Users

13.0k

Topics

112.8k

Posts