Midi Settings dialog from lua

Home Forums General Programming Midi Settings dialog from lua

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #73089
    infrasonic
    Participant
    • Topics: 1
    • Replies: 0
    • Total: 1

    I’m trying to open the midi settings dialog from the panel. How do I have to use the code “doShowMidiSettingsDialog()” to open a separate window with the midi settings.
    I want to have a panel without the menubar.

    Does someone have some example Lua code.

    Thanks in advance.

    Volker

    #73249
    Mr.ToR
    Participant
    • Topics: 7
    • Replies: 51
    • Total: 58

    Hi infrasonic,

    Add a button, name it ‘MidiSettings’
    Set it’s ‘componentInternalFucntion’ property to ‘MIDI Device Selection’
    Make it invisible or hide it in an unused layer etc.

    assign it’s component to a variable:
    MidiSettings = panel:getModulatorByName(“MidiSettings”):getComponent()

    then on lua, maybe from a popup menu do
    MidiSettings:click()

    enjoy 🙂

    • This reply was modified 4 years, 8 months ago by Mr.ToR.
    #73255
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    Haaa.. excellent, thanks. that’s useful.
    but i’ve just put the button, assigned it as you said,
    no Lua. still works fine.

    what’s the method for? seems to look ok as a simple button.
    – if, as you suggest, it’s hidden somewhere ie: on a tab.

    what OSC server settings? is the ‘Open Sound Control’?
    as opposed to plain MIDI? is OSC being used much?

    (have to have a think about those Thru settings … )

    #73257
    Mr.ToR
    Participant
    • Topics: 7
    • Replies: 51
    • Total: 58

    yes, you can use it just as a button of course but the question was how to launch it from Lua. You need Lua to assign it to a popup menu for instance. Otherwise, you can just use the button if it fits your need.

    #73259
    human fly
    Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    ok. what do you use for popups?
    this is what i’m using for a single-option popup at the moment:

    sendBank = function(mod, value)
    --using a popup menu to perform an action
    
    -- This variable stops index issues during panel bootup
    if panel:getRestoreState() == true or panel:getProgramState() == true then
    return
    end
    
    --	////////////////// send preset menu ///////////////
    send_Bank = PopupMenu()    -- Main Menu
    
    send_Bank:addSectionHeader ("copy bank to ext")
    send_Bank:addSeparator()
    send_Bank:addItem(1, "lcd_bankDataA", true, false, Image())
    
    ret = send_Bank:show(0,0,0,0)
    
    --	/////////////////// MENU ACTIONS //////////////////
    if ret == 0 then
    return
    end
    
    if ret == 1 then
    local s=L(panel:getComponent("lcd_bankDataA"):getProperty("uiLabelText"))
    panel:getComponent("lcd_bankDataB"):setPropertyString("uiLabelText",""..s)
    end
    end
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Programming’ is closed to new topics and replies.
There is currently 0 users and 57 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