• Equivalent to Reaper UI button?

    3
    0 Votes
    3 Posts
    380 Views
    A

    David is right.

    If you're creating controls using a helper function, simply create another one. You can then be increasing a counter which you can use to automatically set up the sliders in order for every control created.

    Callbacks could be tricky, because if you simply put the function into the callback for another control, depending on the exact situation, you could end up with the same stuff executing twice, which may or may not be problem, but is something you should be aware of.

    So you'll have to decide whether you'll be assigning a function as a callback for both controls, or do something else. You could use a broadcaster to automatically update the values of the simplified slider whenever the main control changes (attaching controls could be automatized with the helper function). The helper function should also let you automatize the assignment of a control callback for the simplified sliders: this would be an inline function defined outside of the helper function, which would be calling .changed() of the main slider. You could also automate the targeting of the correct pair component via ID by deciding on a naming scheme (e.g. Slider1_main and Slider1_simplified) and using the component argument of the callback function to get the target.

    This not only simplifies your code by letting you only worry about the true functionality of a single callback function per control, but calling changed() for the main slider makes sure that that particular component gets set as "last touched" for the DAW, letting you maintain the mirage of it all being a "single control".

    Another way would be to actually be using only a single set of controls, storing dimensioning and positioning data into JSON, creating a switch in your every LAF and changing all these properties when the simplified GUI button gets clicked. Depending on your GUI setup, you might also have to reparent controls (can you even do this beyond on init?), so this approach doesn't scale super well and would need a bit of tailoring for each individual GUI.

  • Issues with for loop?

    29
    0 Votes
    29 Posts
    1k Views
    Christoph HartC

    Ideally you use reserve(128) and a for loop where you push default values in the onInit callback.

    Javascript usually doesn‘t complain about passing around undefined values but I found it to be the most frustrating source of issues while debugging (a little typo in the variable name goes through multiple function calls undetected and finding where it breaks is super annoying).

  • How do I return the number of instances of a value in an array?

    2
    0 Votes
    2 Posts
    116 Views
    David HealeyD

    @VirtualVirgin You'd need to loop through the array and keep count in a variable

  • Direct access to Arpeggiator Slider Packs

    7
    0 Votes
    7 Posts
    584 Views
    DanHD

    @eliasbor In the Property Editor on the right side, click on your SliderPack and change the SliderPackIndex (near the bottom) to either 1 or 2.

  • masterbypass snippet declaration in inline function error

    3
    0 Votes
    3 Posts
    406 Views
    M

    @d-healey aaaah ok now it works thank you!

  • turn all effect moduls of and keep the effect states

    5
    0 Votes
    5 Posts
    570 Views
    M

    @d-healey I've been watching the post for a few days, did you manage to do it? I don't quite understand how to do it

  • Hoping this is an easy one! Version number with 2 decimal places

    19
    0 Votes
    19 Posts
    560 Views
    DanHD

    @d-healey Righto, thanks!

  • Stumped by displaying webpage in WebView

    12
    0 Votes
    12 Posts
    1k Views
    L

    Bump - anyone with web view experience able to weigh in? I've done some more playing around and can't get any further with it.

  • 0 Votes
    7 Posts
    600 Views
    VirtualVirginV

    @d-healey said in Adding an LAF knob ("rotary slider") did not work properly and changed appearance of other items as well:

    .setLocalLookAndFeel()

    Thanks! All is looking as expected now and I can move on in your tutorial :)

  • Panel

    4
    0 Votes
    4 Posts
    334 Views
    DWD

    @udalilprofile you can paint on panels so it should possible

    https://m.youtube.com/watch?v=nmB_Ml-XWGg

    This video covers it somewhat but you would need tweak it for what you’re looking for

  • Daydreams of Scope

    Solved
    3
    0 Votes
    3 Posts
    277 Views
    C

    @d-healey Thank you as always.

  • Not Embedding SampeMaps

    Solved
    3
    0 Votes
    3 Posts
    138 Views
    C

    @d-healey Thank you - can you explain that a bit more? I'm not sure what you mean. Got ya- will try!

  • Setting a value of a volume knob...

    7
    0 Votes
    7 Posts
    717 Views
    Oli UllmannO

    @Xenox-AFL
    If you want to set the value of a button/slider/component in an array you have to do something like this:

    array[0].setValue();
  • 0 Votes
    3 Posts
    180 Views
    MorphoiceM

    @d-healey pity. but I'm diggint the solution you posted a while ago, so that's probably the way I'll be going. It's a brilliant idea you had there.

  • Detect drag direction

    9
    0 Votes
    9 Posts
    331 Views
    mmprodM

    @mmprod This is awesome- exactly what I needed (thank you!)

  • Look & Feel modifies the HISE IDE, not only my plugin GUI

    5
    0 Votes
    5 Posts
    294 Views
    MorphoiceM

    @bendurso d'uh. :) thanks

  • Tap Tempo function

    7
    0 Votes
    7 Posts
    1k Views
    J

    @orange wow...just should've scrolled back a few days in the forum lol...question...this is connected to a delay...how would I connect it to just the global BPM?

  • Standalone app having focus

    Solved
    3
    0 Votes
    3 Posts
    275 Views
    ulrikU

    @d-healey No, only if the app active, I tried this without the timer now, and it works nicely
    As soon as I make the app active it's possible to use the setKeypressCallback
    So in. the snippet, I removed the timer function and it worked
    😀

  • C++ Buffers, and using the Hise interpolator?

    Solved
    5
    0 Votes
    5 Posts
    377 Views
    Christoph HartC

    @griffinboy the SNEX API has three main container types and if you want to use the index template for interpolating / safe access you need to use them. They differ in their ability to change their size dynamically and whether or not they "own" the data:

    span: owns the data, compile time size (allocated on creation) dyn: doesn't own the data, only refers to it heap: owns the data, but allocates it dynamically

    The easiest entry into this would be creating a dyn<T> container with a simple T* pointer and a size. Almost any container in the world will give you access to the raw data. Here's a std::vector<float> example:

    std::vector<float> x; x.push_back(1.0f); x.push_back(1.0f); x.push_back(1.0f); dyn<float> snexContainer(x.data(), x.size());
  • Note Off from Note On?

    3
    0 Votes
    3 Posts
    188 Views
    VirtualVirginV

    @d-healey said in Note Off from Note On?:

    @VirtualVirgin Change the velocity to 0, most hosts count this as note off

    Thanks!
    Yes I forgot to try this.
    My only concern is situations where it may be needed that the messages are distinctly categorized as "note off" as opposed to "note on". I can't think of exactly where it would be crucial, but I may find out down the road a bit.

    In HISE it seems that the note on of velocity 0 remains in the note on category, so when I do subsequent processing with MIDI script modules, the notes will still be going to the "onNoteOn" callback, instead of getting forwarded to the "onNoteOff".
    No so terrible as I can treat those by using filter for == 0 velocity in the "onNoteOn" callback, but maybe a bit messy to have note offs appear in two different places.

27

Online

2.2k

Users

13.5k

Topics

117.3k

Posts