Problems with Panel Data Request as Restricted Instance

Home Forums Development Problems with Panel Data Request as Restricted Instance

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #117345
    lecletolecleto
    Participant
    • Topics: 1
    • Replies: 13
    • Total: 14

    Hello Ctrlrs!

    I´m trying to get the Data from synth JV-880 when my panel is opening. For this I created a LUA function to request the parameters with method “called when a panel has finishing loading” This are working in edit mode but when I export as a “restricted instance” don´t work. What can be wrong? It´s a bug? Thanks in advance!

    I wrote this function:

    callBackInit = function(mod, value)

    –Request Common Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 1 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x28, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 2 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x29, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 3 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 4 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    end

    #117347
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    Hi!
    In which version are you? 5.3.201?
    The method to put in “Called when the panel finished loading” should be like

    --
    -- Called when the panel has finished loading
    --
    PanelLoaded = function()
    

    or like

    --
    -- Called when the panel has finished loading
    --
    -- @type the type of instance beeing started, types available in the CtrlrPanel
    -- class as enum
    --
    -- InstanceSingle
    -- InstanceMulti
    -- InstanceSingleRestriced
    -- InstanceSingleEngine
    -- InstanceMultiEngine
    -- InstanceSingleRestrictedEngine
    --
    myNewMethod = function(--[[ CtrlrInstance --]] type)
    end

    and thus not have any argument or just have one. I didn’t try the second possibility yet.
    This is at least one thing to notice.

    To create a method: right click in the left column of the Lua editor, give a name but also select the method type (what you probably didn’t do). in this case it should be luaPanelLoaded

    Your method seems to be an “on value change” method (missing the source variable at the end) and is probably attached to a modulator. It works in Edit mode because unless restricted by some isPanelReady method, all OnChange methods are automatically scanned and executed when you open your panel.

    #117348
    lecletolecleto
    Participant
    • Topics: 1
    • Replies: 13
    • Total: 14

    Hello GoodWeather!

    Thank you for replly!

    I´m tryed all the things that you told me but stils not working. I´m on version 6.026 of Ctrlr. The 5.3.201 don´t work well on my PC. The menus are “black” but I tryed export with the version 5.3.201 and not worked as well.

    After your explains and more research on Google, I found this old thread and now I thinking that it´s a old problem with no solution for while… maybe a trick!

    2 problems not solved

    2 problems not solved

    Atom, what about the first zeoka’s question?

    zeoka wrote:
    – “luaPanelLoaded” and “luaPanelBeforeLoad” are not working in
    restricted exported versions ? they work only in the full version for me

    I have similar problems with all exported instances.

    Dasfaker:

    Found the issue. If I save the panel with “Override panel MIDI channel” off for all mods and reopen the panel I get this behaviour, no matter if I now active “Override..” for all mods. Only if this option is active on startup it works fine.

    So I will try change all modulators…

    #117391
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    Well, I can only repeat what is stated everywhere, stable and working well: use only 5.3.201 on Windows PC.
    I’m doing restricted exports standalone, VST/AU, PC and Mac and have no issue.

    Your problem must be somewhere else thus.

    I have Override OFF. It should be like that I think as otherwise users cannot use a different Midi channel.

    #117400
    lecletolecleto
    Participant
    • Topics: 1
    • Replies: 13
    • Total: 14

    Hello Goodwhether! Thank for reply!

    I´m now on version 5.3.201. The problem about “black menus” was in my panel configuration.
    About my main problem in a version 5.3.201 the comportament is the same of 6.026.
    WIth Ctrlr editor the fucntion callBackInit work and the synth gives back data for refresh a panel.
    With a restricted instance the panel is not refreshed.
    I wrote the function “callBackInit” as you teache me but still not working when I render as restricted instance. I also tryed other function to set modulator values at initialization but it seems that noone function is called after panel is load.

    Here is the code. There are something wrong?

    callBackInit = function(luaPanelLoaded)

    –Request Common Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 1 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x28, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 2 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x29, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 3 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 4 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    end

    Thanks a lot!

    #117401
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 236
    • Total: 237
    • ★★

    Hi lecleto, I think your checksums are all wrong. That could be one problem.

    I have Roland checksum code in lua if you want.

    #117407
    lecletolecleto
    Participant
    • Topics: 1
    • Replies: 13
    • Total: 14

    Hello dnaldoog! Thank you for reply!

    The problem is the fucntion in Lua are working when I open in Ctrlr.

    The problem comes just when I render as restricted instance. The sysex messages on the function are the same of button panel and work at panel and I don´t get any message about checksum error. I tryed other function that only set the values of modulators and don´t send any sysex. The problem is the same. Just not work. It seems that any lua script not run after loading panel.

    #117408
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    Can you please share your panel so I can have a more detailed look?
    The problem must lie somewhere else.
    Which DAW are you using?

    #117417
    lecletolecleto
    Participant
    • Topics: 1
    • Replies: 13
    • Total: 14

    Hello Ctrlrs!

    Firstly I woluld like to thank you for all inputs!

    Hello dnaldoog you solved my problem and you don´t know!!!

    I found in one past post of dnaldoog the solution to my problem. It seemns that panel needs a delay on init to process a function after load. Lets go to solution:

    The fisrt thing was create a function that will be called when panel finished to load. In this case “init”

    In this fucntion, after panel load, the variable allowtoRun will seted to 0 and will start a timer:

    init = function(–[[ CtrlrInstance –]] type)

    allowToRun=falseong>
    timer:setCallback (1,timerCallback)
    — allowToRun = 1
    timer:startTimer(1,400)

    end

    After this counting time the funtion “timer” will be called and here you will put what you what to do when the panel is load. In my panel I want set initial modulators value and send a sysex messages to requesting a data from synth.

    function timerCallback(timerId)

    — Load program timer
    if timerId == 1 then
    allowToRun=true

    — Init Panel Options

    panel:getModulatorByName(“SR-JV-SELECT”):setModulatorValue(0,false,true,false)
    panel:getModulatorByName(“COPY-SELECT”):setModulatorValue(0,false,true,false)
    panel:getModulatorByName(“CHORUS-SW”):setModulatorValue(1,false,true,false)
    panel:getModulatorByName(“REVERB-SW”):setModulatorValue(1,false,true,false)

    –Request Common Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, 0x22, 0x5E, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 1 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x28, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 2 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x29, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 3 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    –Request Tone 4 Data

    mySysex = CtrlrMidiMessage({0xF0, 0x41, 0x10, 0x46, 0x11, 0x00, 0x08, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0xF7})

    panel:sendMidiMessageNow(mySysex)

    timer:stopTimer(timerId)

    end

    end

    Now everything are working as I want!

    The original post from dnaldoog:

    Reply To: Standalone Lua Not Loading

    #117418
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 443
    • Total: 484
    • ★★

    I have this as well in my panels since long… Difficult to help without getting the full picture 😉

    --
    -- Called when the panel has finished loading
    --
    PanelLoaded = function()
    
    	bPanelLoaded = false
    	bLoadingProgram = false
    
    	AssignModulators()
    	Tables_Init()
    	BasicProgramData_Init()
    	About_Init()
    
    	timer:setCallback (2, timerCallback)
    	timer:startTimer(2, 200)
    
    end

    Glad you found this!

    #117428
    lecletolecleto
    Participant
    • Topics: 1
    • Replies: 13
    • Total: 14

    Thank you GoodWeather!

    Very clear your code! I will try here!

    One doubt: Why you set timer:startTimer(2, 200)? What is 2? 200 is a miliseconds?

    and

    bPanelLoaded = false
    bLoadingProgram = false

    Just to understand better.

    Thanks!

    #117431
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 236
    • Total: 237
    • ★★

    Great to hear you got it working lecleto!

    Of course I knew about that post, but I didn’t think it applied to you, because I thought those functions you were running didn’t need to be blocked, but it turns out they did. I still don’t understand it fully I guess!

    Well I wanted to update the example panel in that post and made a few edits and then the post disappeared. It’s a big problem with this forum right now. I’ll see if I can repost it soon – if you post the same message soon after it detects a multiple post, but luckily I Ctrl-C`ed the message before updating!

    Also when posting code if you put it between two backticks `myFunction()` it will look like:

    myFunction()

    #117436
    lecletolecleto
    Participant
    • Topics: 1
    • Replies: 13
    • Total: 14

    Yeah dnaldoog!

    Thanks for tip about backticks! ‘I realy desired know how to do this…’

    About code your panel example was perfect to what I needing!

    After that I tryed in my panel a function that don´t send any sysex and still not working I said: this can be a temporization problem. I need d delay to execute the function… And what I need is a timer! Here your panel and example enter in the history!! As you said is not the same case of your example in a post but was what I needing to know about timers in Ctrlr!
    The Ctrlr is fantastic interface but the documentation about is very limitaded. All that I learn to built a JV PatchEd. was in posts and examples of community.
    Thank you for reply and will wait for new example!

    #117439
    dnaldoogdnaldoog
    Participant
    • Topics: 1
    • Replies: 236
    • Total: 237
    • ★★

    Here’s the new link with a new panel, but your old link that was deleted from the thread still exists!! What’s going on?

    Anyway here is is:

    Standalone Lua Not Loading

    :)

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.
There is currently 0 users and 21 guests online
No users are currently active
Forum Statistics
Threads: 2,308, Posts: 16,186, Members: 59,522
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!