SetModulatorValue and other commands

Home Forums General Programming SetModulatorValue and other commands

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #116751
    sparkytupp
    Participant
    • Topics: 3
    • Replies: 4
    • Total: 7

    Hi

    I’ve been wanting to start programming ctrlr to make my own panels, and would like to know if there is a reference source that tells me how to use the ctrlr specific commands/methods e.g

    setModulatorValue
    getModulatorByName

    specificially the boolean options that can occur later

    Thanks

    Mark

    #116755
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 188
    • Total: 189
    • ★★

    https://github.com/RomanKubiak/ctrlr/blob/de28dc3ad3591a5832f1e38ce8adabc9369b1011/Source/Lua/CtrlrLuaModulator.cpp

    but it’s a difficult read!

    There is a manual written by Goodweather.

    • panel:getModulatorByName(“my_vco”):getModulatorValue() will get the value of a modulator
    • panel:getModulatorByName(“my_vco”):setModulatorValue(value,false,true,false) (I think) will set the value of a modulator and run any callback function attached.
    • panel:getModulatorByName(“my_vco”):setModulatorValue(value,false,false,false) shouldn’t fire the callback function attached.
      *But I found setModulatorValue() to be less reliable than:
    • panel:getModulatorByName(“my_vco”):getComponent():setValue(value,false) shouldn’t fire the callback function.
    • panel:getModulatorByName(“my_vco”):getComponent():setValue(value,false) should fire the callback function.
    • There is also panel:getModulatorByName(“my_vco”):getValueMapped()
      which will return non sequential values in say a combo box or uiFixedSlider, so if you had in a comboBox:
      LFO=0
      VCO=5
      VCF=17
      if user selected VCF, getValueMapped would return 17 – getValue will return 2

    Also read the excellent post here https://ctrlr.org/forums/topic/setvalue-or-setmodulatorvalue/ by Possemo.

    Regards.

    #116758
    sparkytupp
    Participant
    • Topics: 3
    • Replies: 4
    • Total: 7

    That’s fantastic, thanks a lot. I’m an electronic engineer by trade, so I have read through many specifications and have had many difficult reads so should be OK 🙂

    Thanks

    Mark

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
There is currently 0 users and 27 guests online
No users are currently active
Forum Statistics
Threads: 2,278, Posts: 15,932, Members: 58,262
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!