Globals variables that are not sysex’s

Home Forums General Programming Globals variables that are not sysex’s

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #577
    LilCthulhu
    Participant
      • Topics: 9
      • Replies: 67
      • Total: 76

      Sorry, another question, how can I make global variables that are available to all lua methods for example ? Let’s say I want to have a status or a list of items that I don’t want to generate everytime (maybe after reading a file, etc)… How can I use global variables inbetween lua snippets of code ? I know I can use a hidden modulator to do that, but I would prefer not to <img decoding=” title=”Wink” />

      Maybe it’s obvious, but i could not figure it out yet <img decoding=” title=”Wink” />

      #4011
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        From what i remember by default all variables are global in LUA, you need to explicitly use the [code:2t6o72ju]local[/code:2t6o72ju] keyword to make variables local. Anyway have a look at the LUA manual http://www.lua.org/pil/1.2.html. Also if you want some variable initialized use the panels methods "Called before any modulators are created" or "called when the panel has finished loading".

        #4012
        LilCthulhu
        Participant
          • Topics: 9
          • Replies: 67
          • Total: 76

          Thanks for the quick answer, I assumed that each method was living through it’s own sandbox… so far the ide has been great, I’ve got all my GUI done (at least 384 modulators + some more with as much labels) Part of the MIDI/SYSEX is done or underway, It’s going well…

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The forum ‘Programming’ is closed to new topics and replies.
        There is currently 0 users and 72 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