Skip to content

LUA for Beginners: How to send controller values to midi device? #578

Answered by dnaldoog
nemesis2049 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @nemesis2049

  • Edit: Or as Goodweather said, not sure if you need this or just need to send CC? Anyway - you can see how to do that in this panel.

Here is one suggestion for how to do this.

Substitute your modulator names for the ones I have in snapshotTable and it should work for you.

--
-- Called when a mouse is down on this component
--

myMethod = function(comp,event)
    local delay = panel:getModulatorByName("sendRate"):getValueMapped() -- milliseconds (adjust to suit)
    ch = panel:getProperty("panelMidiOutputChannelDevice") - 1 -- global
    counter = 0 -- global
    timer:setCallback(1, TimerCallback) -- TimerId 1
    timer:startTimer(1, delay) -- Timer delay in milliseconds
…

Replies: 6 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@nemesis2049
Comment options

@nemesis2049
Comment options

@dnaldoog
Comment options

@nemesis2049
Comment options

@dobo365
Comment options

Answer selected by nemesis2049
Comment options

You must be logged in to vote
1 reply
@nemesis2049
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dobo365
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants