fundorin

Forum Replies Created

Viewing 20 posts - 21 through 40 (of 66 total)
  • Author
    Posts
  • in reply to: Novation SL MkII and Reaper (MIDIOSC bridge) #70605
    fundorin
    Participant
      • Topics: 8
      • Replies: 66
      • Total: 74

      Thx for your explanations, I see a bit better…
      – Based on user/fx/inst/mixer selection, I would set a variable so one knows at any time what is selected
      – Based on that variable, you could change all labels of the controls. When a contorl is modified, the corresponding OnChange Lua method will perform an if..then..elseif… to know what action to perform

      I’ve started this midi2osc bridge using oscii-bot, at first. Then, I’ve switched to Processing. Then, to VSTLua. Tried a bunch of other software (probably, every one) and got back to Ctrlr, cause it doesn’t scare me with programming scripts, as it did a year ago.
      So, I have half of the code ready to be transfered from script that was partially made in VSTLua to Ctrlr. Including four different modes.

      – LED ring behaviour: I’m not aware of the 6 possibilities. Do you mean for the same rotary button? If yes, then you need to build 6 images (each containing the same number of frames) and then I suppose you can switch the image resource according to the wished behaviour

      Yes, the same encoder. I’m defenitely going to switch images, if “tabless” tabs aren’t possible.
      This modes are available for encoder LEDs:

      I’ve also made a demo video long ago (better than pictures):

      – devices: I didn’t find a way to know if the smiley was happy or sad. I can only find if my synth is in the list

      What about setting your device as input and output after you found it in the list?
      It seems like I’ve seen something like this in Ctrlr source. It seems to be possible to do this with VstLua – https://dl.dropboxusercontent.com/u/8162257/nativemidi.lua, though I never tried. What about Ctrlr?

      P.S. I feel like I need to add a screenshot of my panel to this thread, in case someone else is interested. 😉

      in reply to: [SOLVED] Command to open an uiTabs with a button #70604
      fundorin
      Participant
        • Topics: 8
        • Replies: 66
        • Total: 74

        I’ve started a new thread – http://ctrlr.org/forums/topic/novation-sl-mkii-and-reaper-midiosc-bridge/
        I’ll answer you there, then, goodweather. 🙂

        in reply to: Ctrlr – Step by step guide #70598
        fundorin
        Participant
          • Topics: 8
          • Replies: 66
          • Total: 74

          I feel like it might be easier for you to use if..then statements to do what you want with lua script. Like:

          
          if 1 <= modulator_value <= 13 then
            do_something
          elseif 14 <= modulator_value <= 28 then
            do_something_else
          end
          

          But I would use separate modulators with different min/max values and same CC.

          in reply to: [SOLVED] Command to open an uiTabs with a button #70596
          fundorin
          Participant
            • Topics: 8
            • Replies: 66
            • Total: 74

            I think that I can activate different layers visibility upon user…mixer buttons press (didn’t check if it’s possible, though), but it would be harder to arrange during the development process, switching back and forth between layers.

            The other way I could go is to leave one set of controls and make them do different things, based on global variables state, triggered by pressing fx..mixer.

            One of the things I want do be able to change is LED rings behaviour. As you might know, there are six different display modes for them.

            In fact, the main purpose of the panel I’m developing is to be able to control Reaper from SL MkII (midi) via OSC commands and get feedback from Reaper. So, there could be no GUI at all, but I want Ctrlr to duplicate all visual feedback that is going to SL and also be able to control Reaper directly from Ctrlr (don’t know exactly why I need this, yet).

            Anyway, for now I’m just waiting for the new Ctrlr build from atom, which should fix two essential bugs in OSC subsystem of Ctrlr. Until then, I’m just slowly learning some possibilities of Ctrlr, like “tabless” tabs.

            Page buttons are used to switch banks of 8 tracks now. At least, the left ones. I might use right ones to switch banks in step of one track.

            BTW, do you know how to assign midi out and in devices with a single press of the button, in case if Ctrlr was started before turning on midi controller?
            Pressing “refresh devices” doesn’t turn sad smileys into happy ones, even if controller in already on.
            One needs to deselect and then select midi device in settings manually to make them connected with Ctrlr. Kinda annoying, as for me.

            in reply to: UDP close on exit #70567
            fundorin
            Participant
              • Topics: 8
              • Replies: 66
              • Total: 74

              Thank you. Will be waiting for an update.

              P.S. Sent you a private message, that might be important.

              in reply to: [SOLVED] Command to open an uiTabs with a button #70560
              fundorin
              Participant
                • Topics: 8
                • Replies: 66
                • Total: 74

                Thanks goodweather. What I have is a complete GUI and now I want to change layout with user/fx/inst/mixer buttons in the bottom right corner, but don’t want any tabs being visible.

                View post on imgur.com

                in reply to: UDP close on exit #70557
                fundorin
                Participant
                  • Topics: 8
                  • Replies: 66
                  • Total: 74

                  I wrote about it at Github. I can’t find a way to get string agrument/value from OSC command. Only float or int numbers.
                  Instead of returning a string, this function returns only the first character.
                  arguments table contains some userdata and I don’t know how to retreive string value out of it.
                  The code below is what I’m using.

                  
                  onOSCMessage = function(path, types, arguments)
                  
                  	action = path
                  	oscType = types	
                  
                  	if types=='f' then
                  		value = tonumber(arguments[0].f)
                  	elseif types=='s' then
                  		value = string.format('%s', arguments[0].s)
                  	end
                  	console('OSC: '..action..' Value: '..value..' Type: '..oscType)
                  

                  And this is the console output. When I’m selecting a track, Reaper returns track name. In this case, the name of the track is “qwerty”, but the value shown is 113, which is a decimal representation of the first character in the name, which is “q”.

                  
                  LUA>> OSC: /device/track/select/2 Value: 1 Type: f
                  LUA>> OSC: /track/name Value: 113 Type: s
                  LUA>> OSC: /track/2/name Value: 113 Type: s
                  

                  I’ve tried different ways to get the full string, but nothing worked.

                  in reply to: [SOLVED] Command to open an uiTabs with a button #70555
                  fundorin
                  Participant
                    • Topics: 8
                    • Replies: 66
                    • Total: 74

                    Is it possible to hide tab headers and use buttons to switch tabs, instead.
                    I know how to switch tabs with buttons (included demo panel shows exactly how it should be done), but I want to add swutch buttons inside all four tabs and switch between tabs with those buttons, so I could remove tab headers.

                    Yellow area should not be visible/exist:

                    in reply to: UDP close on exit #70550
                    fundorin
                    Participant
                      • Topics: 8
                      • Replies: 66
                      • Total: 74

                      Glad to here from you, atom.
                      This and OSC handler method in CtrlrPanelOSС.cpp (lines 159-185) are the only two things preventing me from making a fully working MIDI<>OSC bridge. If Ctrlr would correctly open/close udp ports and handle strings, I would be happy.

                      in reply to: UDP close on exit #70547
                      fundorin
                      Participant
                        • Topics: 8
                        • Replies: 66
                        • Total: 74

                        I’ve been able to add button that enables UDP port and sets it to 9999. That’s fine.

                        The thing is that if I remove Ctrlr vst from Reaper and add it again, osc commands aren’t showing in console, anymore.

                        I believe, this is happening because when vst plugin is deleted from FX chain, Ctrlr doesn’t close UDP port, so the new instance can’t communicate via that port.
                        Is there a trigger in Ctrlr, that will launch Lua script on panel close/Ctrlr remove from host?

                        in reply to: UDP close on exit #70546
                        fundorin
                        Participant
                          • Topics: 8
                          • Replies: 66
                          • Total: 74

                          23:40 here, in Russia, now. 😉

                          in reply to: UDP close on exit #70544
                          fundorin
                          Participant
                            • Topics: 8
                            • Replies: 66
                            • Total: 74

                            Thanks, proton. Where did you get this info?

                            Did you try to get full string arguments instead of only first character today?
                            Could this issue be connected with atom’s announcement about luabind problems in Lua 5.3?

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

                              I don’t get how panel:sendMidiMessageNow(CtrlrMidiMessage(event)) requires hex values to send a proper midi message, but onMidiMessage function returns byte values in decimal format and not in hex:

                              
                              onMidiMessage = function( midi)
                              midiCC = midi:getLuaData():getByte(1)
                              midiValue = midi:getLuaData():getByte(2)
                              
                              console(tostring(midiCC))
                              console(tostring(midiValue))
                              console("Midi message received")
                              

                              Can anyone clarify this issue for me?

                              Not like that’s a big issue. In fact, I can live with that. I’m more concern about not being able to get full arguments from OSC messages, then this. 🙂

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

                                In case someone else would need this in future, sendMidi function looks like this:

                                
                                function sendMidi(midiMessage)
                                	panel:sendMidiMessageNow(CtrlrMidiMessage(midiMessage))
                                end
                                

                                setCC function:

                                
                                function setCC(msg, value, channel)
                                	midiType = "B" -- ControlChange
                                	midiChannel = string.format('%x', channel)	
                                	midiMsg = string.format('%.2x', msg)	
                                	midiValue = string.format('%.2x', value)	
                                return midiType..midiChannel..midiMsg..midiValue
                                end
                                

                                Code to send midi out, if incoming OSC message is matching the pattern:

                                
                                if oscMsg:match('/repeat') then	--oscMsg is path from OSC message
                                	midiMessage = setCC(transport[5], oscValue, channel)
                                	sendMidi(midiMessage)
                                

                                transport[5] contains midi CC number in decimal format (repeat button on my midi controller)
                                oscValue changes between 1 and 0, depending of repeat button state in Reaper.
                                global variable channel set to 15 (16 channel – 1)

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

                                  This is the final code to form CC from given arguments:

                                  
                                  function setCC(msg, value, channel)
                                  		midiType = "B" -- ControlChange
                                  		midiChannel = string.format('%x', channel)	
                                  		midiMsg = string.format('%.2x', msg)	
                                  		midiValue = string.format('%.2x', value)	
                                  return midiType..midiChannel..midiMsg..midiValue
                                  end
                                  

                                  I’ll now add a wrapper function to shorten
                                  panel:sendMidiMessageNow(CtrlrMidiMessage(midiMessage))
                                  to something like sendMidi(midiMessage)

                                  • This reply was modified 7 years, 4 months ago by fundorin.
                                  in reply to: Midi send from Lua #70535
                                  fundorin
                                  Participant
                                    • Topics: 8
                                    • Replies: 66
                                    • Total: 74

                                    Proton, f0..f7 isn’t necessary when sending CC messages. Thank you both!

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

                                      Possemo, you’re right!
                                      I can now send CC messages to channel 16!

                                      View post on imgur.com

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

                                        Thank you. Mine is also working, but I want regular CC message type, and not Sysex (blue messages in midi-ox).

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

                                          Thanks proton. Sysex is sent now, but I don’t want it to be a sysex message, just a regular CC message. In midi-ox blue lines show when I send regular CC via panel’s modulator and yellow/grey is the same message in sysex format, using your suggestion, though I doubt, that it’s the same. 🙂

                                          View post on imgur.com

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

                                            Monitor doesn’t show anything (both input and output enabled in monitor).

                                            Is it necessary to use sysex even for CC messages?

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