Tronic

Forum Replies Created

Viewing 20 posts - 21 through 40 (of 45 total)
  • Author
    Posts
  • in reply to: Advice before starting the project. #3663
    Tronic
    Participant
      • Topics: 7
      • Replies: 45
      • Total: 52

      Thanks for your patience atom.
      I would now like to ask you, I have not found any way to get a list of files in a folder.
      I was trying out the functions of the library "os" the LUA, but again I think that it is not present.
      This time I tried it with a blank panel … <img decoding=” title=”Smile” />
      or can I use something else?

      in reply to: Advice before starting the project. #3662
      Tronic
      Participant
        • Topics: 7
        • Replies: 45
        • Total: 52

        ok sorry, now I understand why.
        "table", in another of my methods, had been reassigned, and since the variables are propagated, it pointed to it, not to the original function of the library.

        so my mistake, not a bug, sorry for the inconvenience :oops:

        an advice for all the fools like me :mrgreen:
        I think that for safety you should not name the "table" with the name, table, or it will reassign another function to it.

        in reply to: Advice before starting the project. #3660
        Tronic
        Participant
          • Topics: 7
          • Replies: 45
          • Total: 52

          possible dependence of some framework 3.5 or 4?

          in reply to: Advice before starting the project. #3658
          Tronic
          Participant
            • Topics: 7
            • Replies: 45
            • Total: 52

            <img decoding=” title=”Sad” />
            I’m on Win7 x64

            ideas about what I could do to understand why it does not work on my system?

            in reply to: Advice before starting the project. #3655
            Tronic
            Participant
              • Topics: 7
              • Replies: 45
              • Total: 52

              this or as your I get this
              [code:1zh8ch0v]>>> t = { 3,2,5,1,4 }
              table.sort (t, function(a,b) return a<b end)
              console (table.concat(t, ", "))
              ERROR: [string "t = { 3,2,5,1,4 }..."]:2: attempt to call field ‘sort’ (a nil value)[/code:1zh8ch0v]

              in reply to: Advice before starting the project. #3653
              Tronic
              Participant
                • Topics: 7
                • Replies: 45
                • Total: 52

                This is the error I get
                [code:vcbxvife]ERROR: [string "t = { 3,2,5,1,4 }..."]:2: attempt to call field ‘sort’ (a nil value)[/code:vcbxvife]

                maybe I forgot to specify that I use the WINDOWS version
                tested on both the 32bit and the 64bit

                in reply to: Advice before starting the project. #3651
                Tronic
                Participant
                  • Topics: 7
                  • Replies: 45
                  • Total: 52
                  "Tronic":25ajj46r wrote:
                  I was unable to have the ability to manage the table, with the functions sort, insert, and so on.
                  [/quote:25ajj46r]
                  added this to bug list [LINK][/url:25ajj46r]
                  in reply to: Advice before starting the project. #3649
                  Tronic
                  Participant
                    • Topics: 7
                    • Replies: 45
                    • Total: 52

                    this code works well for me, even if I press cancel,
                    but the large files, passed to the console output, freeze CTRLR.
                    instead seems to load fine without assigning them to the console output.
                    buffer console too small?

                    in reply to: Advice before starting the project. #3647
                    Tronic
                    Participant
                      • Topics: 7
                      • Replies: 45
                      • Total: 52

                      @dasfaker
                      thanks, it works
                      I had not thought about this possibility.

                      in reply to: Advice before starting the project. #3644
                      Tronic
                      Participant
                        • Topics: 7
                        • Replies: 45
                        • Total: 52

                        atom I confirm that I was unable to have the ability to manage the table, with the functions sort, insert, and so on.
                        I take this opportunity to ask another question:
                        how to prevent a lua function is executed when you start the application?
                        I have assigned the lua function to the modulator, it is immediately executed when the application starts.

                        in reply to: Creating a slider with positive and negative values #3716
                        Tronic
                        Participant
                          • Topics: 7
                          • Replies: 45
                          • Total: 52

                          I could not resist to understand how we could do, and that is the function in LUA
                          I hope it will be useful

                          [code:1sjvtmtd]– @Tronic~2012

                          — Called when a modulator value changes

                          function K3m_Sysex_Formula(modulator,value)

                          — Get modulator Value
                          modulator = panel:getModulatorByName("Synth-2")
                          value = modulator:getModulatorValue()

                          — Binary Manipulation
                          if value < 0 then — Check if modulator value is negative
                          absvalue = value*-1 — Make value always positive
                          bin = CtrlrLuaBigInteger(absvalue) — Assign bin to class BigInteger
                          bin:setBit(7,true) — Set only one bit to 1
                          else
                          bin = CtrlrLuaBigInteger(value)
                          bin:setBit(7,false)
                          end

                          — Split Byte to two separate Byte
                          msb = bin:getBitRangeAsInt(4,4) — Get only 4bit and make it integer
                          lsb = bin:getBitRangeAsInt(0,4)

                          — Create & Send Sysex Message
                          sysex = CtrlrMidiMessage({0xF0,0x40,0x00,0x10,0x00,0x01,0x08,msb,lsb,0xF7})
                          panel:sendMidiMessageNow(sysex)

                          — Debug
                          byte = bin:toString(2,8)
                          console (string.format("Value=%d Byte=%s msb=%02x lbs=%02x",value, byte, msb, lsb))

                          end
                          [/code:1sjvtmtd]

                          in reply to: Advice before starting the project. #3642
                          Tronic
                          Participant
                            • Topics: 7
                            • Replies: 45
                            • Total: 52

                            As always, thank you.
                            functions you posted work well.

                            To pass data to the file to be saved, the only method I’ve found is = ‘data: loadFromHexString ("f0 00 f7")’
                            other options?

                            another question, but the functions table.insert, table.remove, table.sort etc. are not present?

                            Then when ready will post my work.

                            in reply to: Creating a slider with positive and negative values #3711
                            Tronic
                            Participant
                              • Topics: 7
                              • Replies: 45
                              • Total: 52

                              need to split the value of the knob and MSB4bit LSB4bit
                              setting the maximum value to 24, and the minimum value at -24
                              with the formula
                              F0 40 00 10 00 01 04 ms ls F7
                              but unfortunately only works for the positive part
                              because for the negative part should be added only the first bit, so that it is negative,
                              but I do not know how to add only one bit to sysex byte.

                              in reply to: Creating a slider with positive and negative values #3709
                              Tronic
                              Participant
                                • Topics: 7
                                • Replies: 45
                                • Total: 52

                                I had a look at the manual
                                http://soundprogramming.net/manuals/Kawai_K3_Manual.pdf – page 49
                                and it seems that you have set it correctly.
                                I believe that the center parameter is 7, not 0

                                in reply to: Advice before starting the project. #3640
                                Tronic
                                Participant
                                  • Topics: 7
                                  • Replies: 45
                                  • Total: 52
                                  "dasfaker":282zxkzh wrote:
                                  I’m trying to save a file, but I can’t make it work. I’m using this:

                                  f = utils.saveFileWindow ("Save File", File(""), "*.syx", true)

                                  but it give me an error.

                                  I’m not sure if those commands are registered and how to put it down:

                                  f:replaceFileContentWithData (data)
                                  data = f:loadFileAsData()[/quote:282zxkzh]

                                  yes same here.

                                  I looked at the source code:
                                  file: CtrlrLuaUtils.cpp
                                  [code:282zxkzh]CtrlrLuaFile CtrlrLuaUtils::saveFileWindow(const String &dialogBoxTitle, const File &initialFileOrDirectory, const String &filePatternsAllowed, bool useOSNativeDialogBox)
                                  CtrlrLuaFile CtrlrLuaUtils::openFileWindow(const std::string &dialogBoxTitle, const File &initialFileOrDirectory, const std::string &filePatternsAllowed, bool useOSNativeDialogBox)
                                  [/code:282zxkzh]
                                  openFileWindow(const std::string[/color:282zxkzh] &dialogBoxTitle,
                                  saveFileWindow(const String[/color:282zxkzh] &dialogBoxTitle,
                                  <img decoding=:” title=”Question” />

                                  in reply to: Advice before starting the project. #3638
                                  Tronic
                                  Participant
                                    • Topics: 7
                                    • Replies: 45
                                    • Total: 52

                                    Thanks so much atom.
                                    I’ll try to put down some code.

                                    in reply to: Advice before starting the project. #3635
                                    Tronic
                                    Participant
                                      • Topics: 7
                                      • Replies: 45
                                      • Total: 52

                                      Many thanks Atom,
                                      but in fact I did not think of this as an opportunity to dynamically create the controls,
                                      but take only the values ​​of various modulators in a group, create an array with them and then save to a file.

                                      I was trying to use this API function but without success:
                                      [code:3mmu0lrq]luabind::object getModulatorsWildcard (const std::string wildcardMatch, const bool ignoreCase=true)[/code:3mmu0lrq]
                                      [i:3mmu0lrq]Get an array of modulators by their name, the name is matched agains a wildcard expression.
                                      So for example .getModulatorsWildcard ("*DEF", true) would return all modulators with names ending with DEF This isn’t a full-blown regex though!
                                      The only wildcard characters supported are "*" and "?".[/i:3mmu0lrq]

                                      so as to have the list of controls based on Wildcard option, and then assign to an array, take the values ​​of the modulators and pass them as data to the file.

                                      If you do not steal too much time, and you think it is a reasonable option, you could have an example of how to do this?


                                      @dasfaker

                                      do not worry, because they are indeed useful things for me

                                      in reply to: Advice before starting the project. #3628
                                      Tronic
                                      Participant
                                        • Topics: 7
                                        • Replies: 45
                                        • Total: 52

                                        I had a look at API
                                        You think I can realize the function in LUA using this class?
                                        Or maybe I’m missing something.
                                        [code:320u68zb]class CtrlrLuaXmlElement
                                        class CtrlrLuaMemoryBlock
                                        class CtrlrLuaFile
                                        class CtrlrLuaUtils
                                        File CtrlrLuaUtils::openFileWindow
                                        File CtrlrLuaUtils::saveFileWindow[/code:320u68zb]

                                        in reply to: Advice before starting the project. #3626
                                        Tronic
                                        Participant
                                          • Topics: 7
                                          • Replies: 45
                                          • Total: 52
                                          "atom":n1a2z13g wrote:
                                          there is the modulator list option that can export to csv, html, xml but if you want to "import" it later then it’s not for you, why do you want to export/import parameters ?[/quote:n1a2z13g]
                                          I try to give an example of use.
                                          My synth has internally different machines for the synthesis, a section fx, and a section lfo.
                                          each machine has different parameters for synthesis, for example: start the sample, the end of the sample, etc..
                                          then save to a file only the synthesis section, and then recall it, but without changing the fx section, or LFO, which would eventually even they can be saved in separate files, so you have the sub-patch, for each group of parameters.
                                          So you do not have a patch only saved as a program, but you can load presets for example only the synthesis section.
                                          in reply to: Advice before starting the project. #3624
                                          Tronic
                                          Participant
                                            • Topics: 7
                                            • Replies: 45
                                            • Total: 52

                                            Thank you for your attention.
                                            What most interests me know and if you can have the opportunity to save a group of parameters in a separate file, in any format, "txt" or "xml" or whatever.
                                            And have a function to retrieve them with a browser or a panel that will be a list.
                                            Thank you and excuse me if I can not explain very well.

                                          Viewing 20 posts - 21 through 40 (of 45 total)
                                          Ctrlr