fundorin

Forum Replies Created

Viewing 20 posts - 41 through 60 (of 66 total)
  • Author
    Posts
  • in reply to: Midi send from Lua #70522
    fundorin
    Participant
      • Topics: 8
      • Replies: 66
      • Total: 74

      I’ve added this function:

      Which gives this output, when used:

      Using this function in script to send midi to output:

      Doesn’t work.

      It’s very hard for me to write a working script in Ctrlr without a proper documentation.

      in reply to: Midi send from Lua #70521
      fundorin
      Participant
        • Topics: 8
        • Replies: 66
        • Total: 74

        I’ve tried this code, but it doesn’t output anything to midi-ox, though it doesn’t produce errors when script is executed.
        Am I missing some important arguments, trying to send CC message 40 (decimal) with value 1 (decimal) and channel 15 (decimal) to midi out port? Message type, maybe?

        
        midiMsg = string.format('%.2x', transport[5])	
        midiValue = string.format('%.2x', oscValue)	
        midiChannel = string.format('%.2x', channel)
        panel:sendMidiMessageNow(CtrlrMidiMessage(midiMsg..oscValue..channel))
        
        in reply to: Midi send from Lua #70518
        fundorin
        Participant
          • Topics: 8
          • Replies: 66
          • Total: 74

          Thanks for a suggestion, but I can’t beleive that there’s no easier way to send midi messages in Ctrlr, besides hex values. I believe, there must be an easier way, like decimal values for CC,value,channel.
          I will search through source for it, tomorrow and will report back if no one would suggest an easier way.

          in reply to: OSC. String as an argument. #70501
          fundorin
          Participant
            • Topics: 8
            • Replies: 66
            • Total: 74

            I’m using Ctrlr in standalone mode in Windows 10, but it works the same way as VST.
            You only need one port in settings, actually. Slider1 purpose is only for sending OSC.
            Pink window’s purpose is to show osc commands, but it didn’t work for me, sometimes, so in my demo panel all osc feedback is only shown in Lua console.

            I’ve tried now and it wasn’t working for me, either. Then, I closed all other panels in Ctrlr, except OSC2 panel, restarted Ctrlr and now I can see OSC feedback in the console again.

            http://i.imgur.com/ncZxpR3.png

            https://dl.dropboxusercontent.com/u/8162257/OSC2.panel

            in reply to: !!! IMPORTANT LUA PROBLEMS #70498
            fundorin
            Participant
              • Topics: 8
              • Replies: 66
              • Total: 74

              I thought that it’s a natural behaviour of Ctrlr to crash when something is wrong in Lua script, but, thanks to Possemo, .11 doesn’t crash like .16. Hope that rewrite will fix this issue. And also OSC string argument problem, that I’m experiencing. 😉

              P.S. I’ll be happy to provide any additional information about that issue in any form here or at Github.

              in reply to: OSC. String as an argument. #70497
              fundorin
              Participant
                • Topics: 8
                • Replies: 66
                • Total: 74

                Hi, proton. You need to go to midi settings of Ctrlr, enable OSC, choose UDP and ports 9999.

                in reply to: Endless Rotary Encoders #70464
                fundorin
                Participant
                  • Topics: 8
                  • Replies: 66
                  • Total: 74

                  The crucial thing I’m interested in is OSC string values. Everything else can be learned by trial and error, I suppose.

                  P.S. Done.

                  • This reply was modified 7 years, 4 months ago by fundorin.
                  in reply to: Endless Rotary Encoders #70455
                  fundorin
                  Participant
                    • Topics: 8
                    • Replies: 66
                    • Total: 74

                    It’s ok, if encoders isn’t possible at this side. It’s just looks. The most important part is to have an ability to receive and send OSC.
                    I know that Ctrlr is open-source, but I’m not a programmer, so it doesn’t give any benefit to me.
                    Meantime, I’ve made UI part of the panel (except pots and faders):

                    in reply to: OSC. String as an argument. #70453
                    fundorin
                    Participant
                      • Topics: 8
                      • Replies: 66
                      • Total: 74

                      There’s a problem with a very first step of your code, if one tries to adopt it to OSC:
                      local messageSize = sysexData:getSize()

                      Both
                      local messageSize = arguments:getSize()
                      and
                      local messageSize = arguments[0]:getSize()

                      wuold return an error “Error message: [string “onOSCMessage”]:19: attempt to call method ‘getSize’ (a nil value)” to console, cause agruments is userdata.

                      P.S. I’ve posted about this issue in several threads, so you can check details and example in this thread, if you like.

                      in reply to: Endless Rotary Encoders #70440
                      fundorin
                      Participant
                        • Topics: 8
                        • Replies: 66
                        • Total: 74

                        It is fine with sliders, but for endless encoder it’s pointless to see the position of the encoder, cause it doesn’t have any marks and is just a circular knob.
                        You can add additional representation of the value, using an LCD or, in case of my controller, LED ring around the encoder. And it can be two completely different parameters: 1 is what encoder sends and 2 is what LED or LCD shows.
                        I feel like LED ring could be placed on a layer below encoders to represent it’s value.
                        Wish there was real encoder element available, though.

                        Encoders are the top left row, while pots are the bottom one:

                        • This reply was modified 7 years, 5 months ago by fundorin.
                        in reply to: midi2osc bridge with lua #70438
                        fundorin
                        Participant
                          • Topics: 8
                          • Replies: 66
                          • Total: 74

                          As far as I remember, Atom finally added OSC support after I asked him about it and explained in which situation OSC could be useful in Ctrlr.
                          After that, I was busy and only now have some time to realise the idea that I had in mind at that time.
                          I realise that nearly nobody have used OSC for now, but if everything would work properly with OSC part, Ctrlr can become a Lemur/TouchOSC alternative for desktops.

                          in reply to: midi2osc bridge with lua #70436
                          fundorin
                          Participant
                            • Topics: 8
                            • Replies: 66
                            • Total: 74

                            Possemo, could you confirm this issue? To test it, create new control surface in Reaper’s preferences (Control Surfaces/Add/OSC).

                            Set everything like in this picture (use your own IP address,though):

                            Open Ctrlr, load this panel – https://dl.dropboxusercontent.com/u/8162257/OSC2.panel
                            Then, in Ctrlr, Panel/Lua editor.

                            Select “onOscMessage” script. Restart Reaper or add any track in it and rename it.
                            Lua console in Ctrlr should output osc messages from Reaper. With Default.ReaperOSC, selected in Reaper’s Control Surface setting, there should be many osc commands in console, but that’s fine. You need those, which have type “s” (string).

                            For example – LUA>> OSC: /track/name Value: 84 Type: s

                            The problem is that the value is a decimal representation of the ASCII table for the first character while it should be a text.

                            You can experiment with string 17 of the script. Changing tonumber to tostring doesn’t help, for example.

                            I would love to have a little help with this issue.

                            P.S. standalone Ctrlr 5.4.11 x64 (about shows 5.3.201), windows 10.

                            in reply to: Endless Rotary Encoders #70431
                            fundorin
                            Participant
                              • Topics: 8
                              • Replies: 66
                              • Total: 74

                              Is it a good idea to also add spring to fader, so it’ll always jump back to zero after movement?
                              So only downside is that it would be impossible to scroll fader in circular endless motion.

                              Anyways, I won’t start implementing this, until I’ll find a way to deal with incoming OSC strings from host.

                              in reply to: Open Sound Control – OSC Support #70427
                              fundorin
                              Participant
                                • Topics: 8
                                • Replies: 66
                                • Total: 74

                                I feel like I’m flooding all over this forum, but there’s an issue when OSC message’s value is a string and not a floating number. Only first character of the string can be accesed by using string.format(‘%s’, arguments[0].s). It should reveal the whole string instead.
                                I wonder, what is the structure of ‘agruments’ table?
                                VSTLua puts all incoming osc messages (bundles and single messages are handled differently, though) in a 2d table, from where I could get all the necessary pairs, but with Ctrlr I nearly broke my mind, trying to figure out of how to get all messages with corresponding values. Help, please.
                                I’m also interested, where should I declare global variables, that would represent CC numbers for groups of controls (faders,pots,buttons 1-8) so I could access them from any other script. Thanks.

                                in reply to: Endless Rotary Encoders #70421
                                fundorin
                                Participant
                                  • Topics: 8
                                  • Replies: 66
                                  • Total: 74

                                  My controller sends 1++ midi value (with acceleration up to 12) clockwise and 65++ CCW.
                                  Is it possible to map those values to pots? What if physical controller on synth is encoder for changing onboard patches? How it should be done within Ctrlr?

                                  in reply to: midi2osc bridge with lua #70420
                                  fundorin
                                  Participant
                                    • Topics: 8
                                    • Replies: 66
                                    • Total: 74

                                    It seems like only first character of the string returns by osc library.

                                    in reply to: midi2osc bridge with lua #70419
                                    fundorin
                                    Participant
                                      • Topics: 8
                                      • Replies: 66
                                      • Total: 74

                                      I feel like it somehow connected with how we’re asking for arguments[0].
                                      For “asd” track name
                                      arguments[0].s gives 97 (letter “a”, I suppose)
                                      arguments[0].c gives 97
                                      arguments[0].f gives 9.2249397685399e-039

                                      in reply to: midi2osc bridge with lua #70413
                                      fundorin
                                      Participant
                                        • Topics: 8
                                        • Replies: 66
                                        • Total: 74

                                        This code shows the first character of the track’s name and I’m yet to find how to display second character, at least, and glue them together.

                                        • This reply was modified 7 years, 5 months ago by fundorin.
                                        in reply to: midi2osc bridge with lua #70411
                                        fundorin
                                        Participant
                                          • Topics: 8
                                          • Replies: 66
                                          • Total: 74

                                          I must also mention, that values stored in “arguments” table have “userdata” type.

                                          in reply to: midi2osc bridge with lua #70410
                                          fundorin
                                          Participant
                                            • Topics: 8
                                            • Replies: 66
                                            • Total: 74

                                            I’ll definetily switch to an earlier version, but current issue isn’t about the version, I think.
                                            The problem is that DEMO-OSC panel intended to parse osc message as (path, type, arguments), where:

                                            path is osc command
                                            (i.e. /track/1/volume),

                                            types is an argument type
                                            (i.e. “f” aka “float” for numbers in “/play, 1”
                                            or “s” aka “string” for text, like track name in “/track/name/, ‘Rhythm Guitar'”

                                            arguments is a table of arguments. Reaper sends only one argument for any type of command, so it’s safe to always use “arguments[0]” to access the argument’s value.

                                            The thing is that when agrument type is a string, I get argument value as a number, like “4.545054e+30” for track name “qwerty” and can’t understand how to convert this number back in text format and store as value inside Lua script.

                                          Viewing 20 posts - 41 through 60 (of 66 total)
                                          Ctrlr