How to get the buttons to work with a method?

Home Forums General Programming How to get the buttons to work with a method?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #117339
    EnzoF04
    Participant
    • Topics: 17
    • Replies: 102
    • Total: 119
    • ★★

    I’m a bit confused about the buttons to be added to the panel. How do they work?

    I guess my assumption is wrong. I assume that one can add a button and link a method to it on the “Called when a mouse is down on this component.” I’ve had a hard time with the buttons. :#

    thanks for all help!

    #117340
    Tedjuh
    Participant
    • Topics: 9
    • Replies: 97
    • Total: 106
    • ★★

    Take the modulatorvalue 0 or 1. Might be you have to take 1 for off and the 0 for on because you use a mouse event. Noticed in my own panel I had to do it in reverse..

    Or put it directly with sysex.. where in the sysex 0x00 = off or 0x01 is on, usually. There are cases when 0x00 is off and then there is a value 1-127. But it’s hard to tell without an example.

    #117346
    goodweather
    Participant
    • Topics: 45
    • Replies: 550
    • Total: 595
    • ★★★

    FYI…
    “Called when the modulator value changes” property is triggered when the value change (impressive 😉 ). So for example when you turn a modulator or when you press a button.
    “Called when the mouse is down on this component” is triggered when the user clicks on a component.
    Notice that value change is working on a modulator while on click is working on a component which is under a modulator.

    Look at my Pro2 panel. I’m making extensive use of that for showing help text and current value (OnClick) or when changing the value (OnChange)

    #117367
    EnzoF04
    Participant
    • Topics: 17
    • Replies: 102
    • Total: 119
    • ★★

    I have it, problem is the difference between the method. Thanks for the replies.

    What is the difference between:

    midiOn = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
    

    and
    function doSomething()
    and
    Thanks for clearing out!

    #117380
    Tedjuh
    Participant
    • Topics: 9
    • Replies: 97
    • Total: 106
    • ★★
    #117381
    EnzoF04
    Participant
    • Topics: 17
    • Replies: 102
    • Total: 119
    • ★★

    https://www.tutorialspoint.com/lua/lua_functions.htm

    Interesting, thanks for pointing me in the right direction, Tedjuh! (Y)

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Programming’ is closed to new topics and replies.
There is currently 0 users and 62 guests online
No users are currently active
Forum Statistics
Threads: 2,495, Posts: 17,374, Members: 77,605
Most users ever online was 12 on January 22, 2019 3:47 pm
Ctrlr