goodweather

Forum Replies Created

Viewing 20 posts - 361 through 380 (of 550 total)
  • Author
    Posts
  • in reply to: How to transmit sysex message by changing a tab #70187
    goodweather
    Participant
      • Topics: 45
      • Replies: 550
      • Total: 595
      • ★★★

      With a modulator having Midi properties and for example a CC message associated, you can connect an OnChange method as the one I provided above.
      As you can see, the last parameter is Source and is a number.
      Checking for Source==2 means that the change is coming from the hardware synth.

      I’m using this all the time, to change tabs automatically when I’m turning a knob on my Pro2 so that I get the corresponding tab in Ctlr display (see Pro2 panel).

      Code is like:

      if source==2 then
      	panel:getComponent("Pro2Tabs"):setProperty ("uiTabsCurrentTab", 0, false)
      end
      

      Replace 0 by the corresponding tab number…

      To be tested if it also work when the Midi properties is on Sysex and when the sysex string is matching.

      in reply to: Toggle two SysEx strings #70185
      goodweather
      Participant
        • Topics: 45
        • Replies: 550
        • Total: 595
        • ★★★

        😉

        in reply to: Toggle two SysEx strings #70175
        goodweather
        Participant
          • Topics: 45
          • Replies: 550
          • Total: 595
          • ★★★

          Well, I’m putting isPanelReady in all _OnChange and _OnClick methods otherwise you get soon or later issues…
          Also, I’m avoiding putting too many functions in functions even if it works perfectly. More a visual matter and more for code readability.

          Now, to shorten even further the code, you can just have everything in one line in fact…

          Mute_OnChange = function(mod, value)
          
          panel:sendMidiMessageNow(CtrlrMidiMessage(string.format("F0 41 12 3A 12 70 01 09 %.2x %.2x F7", value, 6-value)))
          
          end

          Have a nice w-e 🙂

          in reply to: Toggle two SysEx strings #70153
          goodweather
          Participant
            • Topics: 45
            • Replies: 550
            • Total: 595
            • ★★★

            Hi Poss, was chatting with Pulse and proposed him to post this question on the forum as I thought that maybe it is possible to use the sysex Midi properties of the component for that. I now how to get the value of the button in the sysex string (explained by Atom in his Getting started doc) but don’t think it is possible to make a calculation on one byte (second to last byte would be 06 – button value).

            Hi Pulse, here is the code and instructions I spoke in our chat…

            – Check my Step by Step guide for some introduction to Lua and some references
            – Open your panel then open Lua editor (in Panel menu)
            – Create a method isPanelReady()

            --
            -- Check if the panel is not busy to load or receiving a program
            --
            isPanelReady = function()
            
            	if panel:getBootstrapState() == false and panel:getProgramState() == false then
            		return (true)
            	else
            		return (false)
            	end
            
            end
            

            – Save and compile
            – Create a method Mute_OnChange with luaModulatorValueChange selected in the Initialize from template combo

            --
            -- Called when a modulator value changes
            -- @mod   http://ctrlr.org/api/class_ctrlr_modulator.html
            -- @value    new numeric value of the modulator
            --
            Mute_OnChange = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
            
            	-- No action if the panel is in bootstrap or program states
            	if not isPanelReady() then
            		return
            	end
            
            	if value==1 then
            		-- Mute ON
            		msg = CtrlrMidiMessage({0xF0, 0x41, 0x12, 0x3A, 0x12, 0x70, 0x01, 0x09, 0x01, 0x05, 0xF7})
            	else
            		-- Mute OFF
            		msg = CtrlrMidiMessage({0xF0, 0x41, 0x12, 0x3A, 0x12, 0x70, 0x01, 0x09, 0x00, 0x06, 0xF7})
            	end
            	panel:sendMidiMessageNow(msg)
            
            end
            

            – Save and compile
            – Select your toggle and select the Mute_OnChange method in the property Called when the modulator value change

            Should work fine 🙂
            Good luck!

            in reply to: DSI Pro 2 panel #70076
            goodweather
            Participant
              • Topics: 45
              • Replies: 550
              • Total: 595
              • ★★★

              0.27 version published
              It includes the correction of the issue identified by BobTheDog (thx!) for Mac users.
              No other change so PC users do not need to download this one…
              http://ctrlr.org/dsi-pro2-editor-and-librarian/

              in reply to: Implementing a Librarian for panel #70072
              goodweather
              Participant
                • Topics: 45
                • Replies: 550
                • Total: 595
                • ★★★

                Don’t know if you have looked at the Pro2 panel manual included in the zip file (I attach it here separately). Pages 20-26 are describing typical librarian functions you should implement.
                I will describe the implementation in the Step by Step 2.0 guide.

                But of course, as Possemo indicates, the base is to know the structure of single patch sysex then full banks sysex. From there, build load/save single patch then proceed with other functions as move/replace/copy.

                You can work with tables as Poss indicates or work with MemoryBlocks and files on the disk as I’m doing.
                Personaly, I think the MemoryBlocks are very easy to handle and at the same time are the base for sending/receiving Midi messages.
                You also have a large bunch of functions to manipulate them (https://www.juce.com/doc/classMemoryBlock). I will also descrive their usage in the Step by Step 2.0 guide.

                Good luck 🙂

                Attachments:
                You must be logged in to view attached files.
                in reply to: getByte Question #70051
                goodweather
                Participant
                  • Topics: 45
                  • Replies: 550
                  • Total: 595
                  • ★★★

                  You can also create one method that you call “Miscellaneous” and where you put things like:

                  
                  --
                  -- Returns HEX representation of a DECimal number
                  --
                  dec2hex = function(num)
                  
                      local hexstr = '0123456789ABCDEF'
                      local s = ''
                  
                      while num > 0 do
                          local mod = math.fmod(num, 16)
                          s = string.sub(hexstr, mod+1, mod+1) .. s
                          num = math.floor(num / 16)
                      end
                      if s == '' then s = '0' end
                      return s
                  
                  end
                  
                  --
                  -- 	For the conversion of a DECimal number to anything else
                  --	it is just needed to use the built-in Lua function tonumber(string, base)
                  --
                  --	print(tonumber("0100",2))
                  --	4
                  -- 	print(tonumber("3F",16))
                  -- 	63
                  
                  --
                  -- Returns HEX representation of a String
                  --
                  function str2hex(str)
                      local hex = ''
                      while #str > 0 do
                          local hb = dec2hex(string.byte(str, 1, 1))
                          if #hb < 2 then hb = '0' .. hb end
                          hex = hex .. hb
                          str = string.sub(str, 2)
                      end
                      return hex
                  end
                  
                  
                  in reply to: getByte Question #70049
                  goodweather
                  Participant
                    • Topics: 45
                    • Replies: 550
                    • Total: 595
                    • ★★★

                    Hi, you can have a look at my Pro2 panel
                    LoadProgramData method + ProgramProceed_OnChange (under Programs library) + methods under Midi
                    If it doesn’t help, let me know and we can look further 🙂

                    in reply to: Callback error – something's changed #70030
                    goodweather
                    Participant
                      • Topics: 45
                      • Replies: 550
                      • Total: 595
                      • ★★★

                      OK. Well, I took the habit to do the test on all methods. Don’t understand why this is happening but OK, once you know it you can avoid it 😉

                      in reply to: Callback error – something's changed #70026
                      goodweather
                      Participant
                        • Topics: 45
                        • Replies: 550
                        • Total: 595
                        • ★★★

                        No pbm.
                        Of course, only the modulators you are using in Lua… (in my Pro2 panel, I’m using almost all of them) 🙂

                        in reply to: Callback error – something's changed #70019
                        goodweather
                        Participant
                          • Topics: 45
                          • Replies: 550
                          • Total: 595
                          • ★★★

                          Hi, it could be good to see your full function… it may be an error of the function rather than the statement.

                          What I’m usually doing is to initialize all modulators at panel load (this is also advised by atom as it is better for the performance).
                          txtProgramName = panel:getModulatorByName("txtProgramName")

                          Then you can get the actual text in one statement instead of two:
                          txtProgramName:getComponent():getProperty("uiLabelText")

                          If interested, you can use a popup instead of a rename within the LCD (I sued this in the Pro2 panel):

                          --
                          -- Called when a modulator value changes
                          -- @mod   http://ctrlr.org/api/class_ctrlr_modulator.html
                          -- @value    new numeric value of the modulator
                          --
                          Rename_OnChange = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
                          
                          	-- No action while loading a program or if the panel is in bootstrap or program states
                          	if bLoadingProgram or not isPanelReady() then
                          		return
                          	end	
                          
                          	Rename_OnClick(mod:getComponent())
                          
                          	sName = trim(txtProgramName:getComponent():getProperty("uiLabelText"))
                          	sName = utils.askForTextInputWindow ("Rename program", "This is only changing the name of the program in the panel.\nYou will have to Save the program to apply your changes.\nThe program name will be truncated at 20 characters.", tostring(sName), "Program name:", false, "OK", "Cancel");
                          	txtProgramName:getComponent():setPropertyString ("uiLabelText", string.sub(tostring(sName),1,20))
                          	txtCurrentValue:getComponent():setPropertyString ("uiLabelText", string.sub(tostring(sName),1,20))
                          
                          end
                          in reply to: Will this workflow work #70009
                          goodweather
                          Participant
                            • Topics: 45
                            • Replies: 550
                            • Total: 595
                            • ★★★

                            Hi, you can look at my DSI Pro2 panel. I’m doing the same as this is classical dump file management 🙂

                            in reply to: Devel update #69997
                            goodweather
                            Participant
                              • Topics: 45
                              • Replies: 550
                              • Total: 595
                              • ★★★

                              Thx atom! Have good vacations! Sometimes it is good to stay a bit away from the PC even if it is tough for all of us 🙂

                              in reply to: DSI Pro 2 panel #69950
                              goodweather
                              Participant
                                • Topics: 45
                                • Replies: 550
                                • Total: 595
                                • ★★★

                                0.26 version published with some corrections…
                                http://ctrlr.org/dsi-pro2-editor-and-librarian/

                                in reply to: DSI Pro 2 panel #69944
                                goodweather
                                Participant
                                  • Topics: 45
                                  • Replies: 550
                                  • Total: 595
                                  • ★★★

                                  Héhé… Yes, RTFM and follow the instructions 🙂

                                  Maybe we can take this savestate/loadstate as another topic on the forum or exchange by PMs.
                                  I’m only saving/loading the minimum then I’m initializing everything based on the values so I have control.

                                  At this stage and maybe due to lack of full knowledge, I don’t trust Ctrlr fully. May be wrong but ok, it is like that…
                                  Main reason is that sometimes you don’t know what is happening and there are still many things happening in the background at Ctrlr startup or panel load or…
                                  Still enough meat to fill my Step by step guide 🙂 🙂

                                  in reply to: DSI Pro 2 panel #69941
                                  goodweather
                                  Participant
                                    • Topics: 45
                                    • Replies: 550
                                    • Total: 595
                                    • ★★★

                                    Corrected/modified today:

                                    • FM and AM intervals are 0-255 and not 127 (was just a display issue)
                                    • Added test at beginning of PackDsiData to avoid issues at panel load (forgotten in that function)
                                    • Glide mode combo added

                                    Will publish those changes after a few more user’s feedback…

                                    in reply to: DSI Pro 2 panel #69940
                                    goodweather
                                    Participant
                                      • Topics: 45
                                      • Replies: 550
                                      • Total: 595
                                      • ★★★

                                      Thx for your quick feedback Possemo!
                                      Well, 3 features and maybe a bug…

                                      • You have probably not installed the font provided in the zip file and it is described in the manual that this is a must to do in order to have a good display 🙂 I tried integrating the font in resources but this gave a lot of issues so I’m afraid it is a bit buggy. I will retry that integration later to check if it is better or to find the actual reason
                                      • I will check the value ranges for FM/AM. Can indeed be wrong (so much parameters in this great synth…)
                                      • On normal use you are not supposed to see the FilterSelection modulator… It is a way to manage the 2 filter enable buttons + Osc split
                                      • Glide parameters are indeed missing but this is also stated in the manual (I promised releasing now and saw that only recently…)

                                      Once again, thx for your very quick feedback; Much appreciated 🙂

                                      in reply to: linking a button to set an xy pad to initial value #69914
                                      goodweather
                                      Participant
                                        • Topics: 45
                                        • Replies: 550
                                        • Total: 595
                                        • ★★★

                                        Scripting would probably be the easiest. You probably only need 1 command setting the x and y coordinate…
                                        Did you search on the forum (sorry no time to dig into that for now…)?

                                        in reply to: no midi signal in ableton from ctrlr #69871
                                        goodweather
                                        Participant
                                          • Topics: 45
                                          • Replies: 550
                                          • Total: 595
                                          • ★★★

                                          Can’t help you a lot as I never did a VST panel (but will be very soon 🙂 )…
                                          So, my only tip is: is your panel working with your control surface with Ctrlr standalone?

                                          in reply to: Build issue under Windows #69870
                                          goodweather
                                          Participant
                                            • Topics: 45
                                            • Replies: 550
                                            • Total: 595
                                            • ★★★

                                            Exactly. Just take the the .exe file for Windows in the Download section and use Ctrlr… Why recompiling?

                                          Viewing 20 posts - 361 through 380 (of 550 total)
                                          Ctrlr