Home › Forums › General › Programming › DISABLE_MIDI_DEVICE_LUA?
- This topic has 14 replies, 3 voices, and was last updated 9 years ago by
zeoka.
-
AuthorPosts
-
November 8, 2014 at 3:46 pm #31869
hello ATOM and others
is there a way for disabling and enabling midi_output_device with lua
the deal :on panel load : midi_device disabled (setting to none )
after a timer method the midi output is enabled (setting to my device )or is there a way to disable sending MIDI on start for a moment
because in my daw (ableton live ) when my project is loaded , the host send automatically (snapshot) all modulators data via MIDI and I DO NOT WANT THIS
because I WANT TO CONTROL WHEN MY PANEL SEND ALL MIDI DATA TO MY DEVICEnote : the setting “panelMidiSnapshotAfterLoad” is disabled
THANK A LOT !!!!!
November 8, 2014 at 7:56 pm #31881Hi
even if “excludeFromSnaphot” is enabled for modulators
they are sent anyway.i have similar issue with few combos :
they send a midi message when they are updated
they are basic they are not different from others
they don’t have a lua script that could create problem
ctrlr 5.2.172November 8, 2014 at 10:37 pm #31896thank you zeoka ,i have also “excludeFromSnaphot” all my modulators
but the data is sent anyway , i work in the source code , if i could find some solution….. , because on loading projects i do not want this bad stuff
i want to 100% control my midi data with ctrlr
this is a beautifull project and i want to give it the good way!!!November 10, 2014 at 5:32 pm #31967hello the only solution i have found is to link all modulators to a method sending midi data (one method in each modulators ) (with all modulators set to midi message none , no formula )
conclusion : the modulators send midi via lua methods
and after this i have created one modulator called “loaded_flag” and set this modulator to 1 after a determinate time (with timer)
the method to set this modulator is executed “after panel loaded”:and before all my modulators methods:
LOADFLAG = panel:getModulatorByName(“LOADED_FLAG”):getModulatorValue()
if LOADFLAG == 1 then
“my modulator send midi data” and other stuff
end
it work in this way , no unwanted midi data to my interface on starting DAW projects
BUT IF YOU HAVE 3000 modulators GOOD LUCK LOL
KAMDER.
November 10, 2014 at 5:54 pm #31970hi
you can in various waya loop in “called after the panel is loaded” that :
before set the midiMessage to none for all mod (by a lua loop for exemple if 3000 mods) and when the panel is loaded a loop set all mods to syx or cc . this requires a inv script when the panel is closed !
other method build the sysex formula when the panel is loaded using loops tables and vstIndexes. that’s working for now
or “if panel:getBootstrapState() then” for all mods i don’t know yet how to do globally
November 10, 2014 at 8:59 pm #31981thanks for your infos ! but i can’t set the midiMessage to none when the panel is closed (i quit the daw ) i have find only a call when panel is loaded in panel properties
because to this i can not write an inv script to reset all modulators to none
i prefer my method … but with my panel i have 3758 modulators
and i have to create a separate method for each modulators and report the sysex command for each mod°VERY LONG AND FASTIDIOUS BUT I HAVE BEGIN THE STUFF YESTERDAY …….
with this method “IN ANY DAW’S” (win , mac ,linux) i have a total control off the midi messages in output
I HOPE ATOM ADD A “ENABLE/DISABLE MIDI MESSAGES OUT” in the panel properties in the future
IT CAN BE GOOD ……….thanks.
November 10, 2014 at 9:49 pm #31987I can add a property that “mutes” all MIDI DATA in and/or out i guess. I’ll have a look how hard will that be.
November 11, 2014 at 1:14 am #32004Thank you Atom
As Atom responds in other post , there is callbacks when the daw project file is
saved this is posible may be here to set midimessages to none with loops for many mods
it’s done now
An option could be idealEdit : Note Kamder that if you send messages via lua and you don’t use customcomps
when you’ll update patch you risk to send non wanted midimessages…-
This reply was modified 9 years ago by
zeoka.
November 11, 2014 at 11:20 am #32018THANKS TO ATOM ! ,
@ZEOKA : “when you’ll update patch” wath this ? note that my panel do not receive midi data , and the panel do not use the “preset system” off the daw’s , the panel only send midi data with a button “send data” , this is “simple” but no problems …“As Atom responds in other post , there is callbacks when the daw project file is
saved this is posible may be here to set midimessages to none with loops for many mods
it’s done now
An option could be ideal”THE PROBLEM is on some daw’s the project is saved automatically when the daw is running ‘every X seconds or when values change’ the callbacks can create some unwanted “midimessages to none”
CONCLUSION : AN OPTION FOR MUTING MIDI MESSAGES IS THE BEST DEAL !kamder.
-
This reply was modified 9 years ago by
kamder.
November 14, 2014 at 3:14 am #32126Solved
-- -- Called when the panel is created, no modulators will exist at this point -- consider this the panels constructor -- Panel_Dtb = function() -- other stuffs panel:setPropertyInt("panelMidiPauseOut",1) -- the property is there so repeat/until x~=nil unuseful end
-- -- Called when the panel has finished loading -- Starting = function() --panel:setPropertyInt("panelMidiPauseOut",0) -- unuseful the messages are sent after function RestMidCallback(timerId) if timer:isTimerRunning(1) then timer:stopTimer(1) end panel:setPropertyInt("panelMidiPauseOut",0) --other stuffs end timer:setCallback (1,RestMidCallback) timer:startTimer(1,1000) end
November 14, 2014 at 11:47 pm #32156really thanks to add THIS FUNCTIONALITY !! i have updated the source code ! , i can now control (mute/demute) the midi messages on projects load !
thanks to atom programming !!!!!
thanks to zeoka methods !!!!!KAMDER.
November 29, 2014 at 12:22 pm #32979The method is not working with instances
December 1, 2014 at 11:49 am #33087I’ll check it out.
December 1, 2014 at 1:05 pm #33093It works for me in the instance itself when i created just a button that sets/clears the property and a slider that sends a CC messages, it works. Maybe the initialization process of the instance is causing some issues ?
The property itself should not have any dependency on the intance type.
December 1, 2014 at 4:31 pm #33117Hi Atom
I confirm in a panel with less than 200 mods
the messages are sent anyway with instances and not with ctrlr and the method applied
Tried exe and dll 32 and 64 bitUsed loopbe and midi-ox when i started them
It is an process initialization issue
-
This reply was modified 9 years ago by
zeoka.
-
This reply was modified 9 years ago by
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.