daimondamps

Forum Replies Created

Viewing 20 posts - 41 through 60 (of 80 total)
  • Author
    Posts
  • in reply to: Global Variable issue. It's drive me crazy. #83436
    daimondamps
    Participant
      • Topics: 8
      • Replies: 80
      • Total: 88

      Ah ok I see, well you couldn’t know that. Btw.: nrpn’s are not sysex. All Sysex messages begin with f0 and end with f7. Nrpn’s are a kind of special CC’s. But that may be nitpicking.

      In KPA NRPNS can be accesed with sysex messages.

      Ok – I’ve found that latest nightly build do not work for me. I’ve downoaded latest recommended version from main site and it is working now with global variables.

      Next thing. Im working for something like FirsTimeRun Window where the user Can set devices only once.
      I will be runing this script in after panel loaded callback.

      What this script does – it checks if panelMidiInputDevice is “– None” then lists avaliable MIDI devices and put it in combobox in modal window.
      When user select in and out device and click ok- it wil set those choices as
      panelMidiInputDevice property for example. And this is almost working.

      The thing is Restricted Instance don’t save these setting on exit, and my script is triggered on every run.

      Here’s code that i have:

      if panel:getProperty("panelMidiOutputDevice")=="-- None" or panel:getProperty("panelMidiInputDevice")=="-- None" then
      
      		saMidiInputDevices = StringArray()
      		for i=0,(utils.getMidiInputDevices():size()) do
      			saMidiInputDevices:set(i, utils.getMidiInputDevices():get(i))
      		end
      
      		saMidiOutputDevices = StringArray()
      		for i=0,(utils.getMidiOutputDevices():size()) do
      			saMidiOutputDevices:set(i, utils.getMidiOutputDevices():get(i))
      		end
      
      		
      
      		modalWindow = AlertWindow("\nFirst time run setup.\nPlease select you MIDI Input and Otput Device", " ", AlertWindow.InfoIcon)
      		modalWindow:addButton("    OK    ", 1, KeyPress(KeyPress.returnKey),KeyPress())
      		modalWindow:addButton("Cancel", 0, KeyPress(KeyPress.escapeKey),KeyPress())
      		modalWindow:addComboBox ("cmbMidiInputDevices", saMidiInputDevices, "MIDI Input Device")
      		modalWindow:addComboBox ("cmbMidiOutputDevices", saMidiOutputDevices, "MIDI Output Device")
      		modalWindow:addTextBlock ("Program will be closed to save changes.")
      
      		ret = modalWindow:runModalLoop()
      
      		if ret == 1 then
      
      			panel:setPropertyString("panelMidiInputDevice",modalWindow:getComboBoxComponent("cmbMidiInputDevices"):getText())
      			panel:setPropertyString("panelMidiOutputDevice",modalWindow:getComboBoxComponent("cmbMidiOutputDevices"):getText())
      			panel:setPropertyString("panelMidiControllerDevice",modalWindow:getComboBoxComponent("cmbMidiInputDevices"):getText())
      
      			--panel:setProgramState(true)
      			--stateData:setProperty("MIDIin", modalWindow:getComboBoxComponent("cmbMidiInputDevices"):getText(), nil)
      			--stateData:setProperty("MIDIout", modalWindow:getComboBoxComponent("cmbMidiOutputDevices"):getText(), nil)
      
      		end
      
      		modalWindow:setVisible (false)
      
      end
      
      end
      in reply to: Global Variable issue. It's drive me crazy. #83420
      daimondamps
      Participant
        • Topics: 8
        • Replies: 80
        • Total: 88

        They publish some beta version of the firmware. And in past times there was a hidden sysexes to enable new delays for example. Some user found a “bug” which enable those new delays and I looked at preset midi file and concluded sysex (nrpn and value) to enable those new features. I’ve published this on this guy thread . They wanted to show this at NAMM as a new feature so I think they were angry that someone posted this. Voila!! 😛 That was my stupid mistake.

        in reply to: Global Variable issue. It's drive me crazy. #83415
        daimondamps
        Participant
          • Topics: 8
          • Replies: 80
          • Total: 88

          No – they are makers of Acces Virus. Unlimited free updates and software . But they dont like if someone post some sysex stuff because their whole device is based on MIDI . Files (profile of the amps) are in fact MIDI files. RigManager(software for managing Rig files) is based on MIDI via USB. I was trying to convice them to publih USB driver which will expose MIDI ports. Hell – I have done it by myself with usblib and https://www.tobias-erichsen.de/software/virtualmidi.html . I ask Atom to implement usblib in CTRLR and he done this. But USBLIB is blocking their driver for communication with their software RigManager. So i don’t published this for other users.

          They added some feature which will be sending CC messages when user changes something in the device(which have a bug now so its not working) . I think I can use that and get rid of query method. Just initial dump.

          in reply to: Global Variable issue. It's drive me crazy. #83409
          daimondamps
          Participant
            • Topics: 8
            • Replies: 80
            • Total: 88

            Yes my panel is free for all , only small donate button for guitar players who want to buy me a beer 🙂
            I have published this version in closed FB group and on the Kemper user forum (where I was banned for posting supper top secret hidden SysexMessages 😛 ) https://www.kemper-amps.com/forum/index.php/Thread/19728-KPAEditor-Community-Project-vst-standalone-win-mac-linux-based-on-http-ctrlr-org/?postID=423418#post423418

            Dropbox is not a good solution. It would be great if you could publish it on ctrlr site when i finish.

            One more question. I’m using “query device” method to have up-to date values for modulators. It is just timer that periodically ask device for dumps of modulators values. I’m assign retrivet values to modulators via script.
            The problem is sometimes when user change modulator on a panel in the same time it recive message with different value (from past time ) and the modulator is getting back to that value. Now First solution was to write script wchich will be muting MIDI input and resseting query timer when the user is using any modulator.
            But when I’m using this script with the property
            luaPanelModulatorValueChanged it is triggered also when modulator is changed via the recivedMidi lua script.

            How to avoid that .What are yours solutions to remedy such situations?

            in reply to: Global Variable issue. It's drive me crazy. #83403
            daimondamps
            Participant
              • Topics: 8
              • Replies: 80
              • Total: 88

              a working syntax for setting global variables:

              panel:setProperty(“panelGlobalVariables”,m1..”:”..m2..”:”..m3, false)

              Thank you 🙂 You saved my life.
              Still I have some strange issue that this variable k0 is resseted back to 0 . I have to track this down.

              Btw. on what kind of panel are you working on? Is it downloable somewhere?

              I’m working on Kemper Profiling Amplifier FX editor (see the pic) .
              You can download it here : https://www.dropbox.com/s/86d5ds3d0z55fzu/KPA_FX_EDITOR_1_11.bpanelz?dl=0
              or executable version here : https://www.dropbox.com/s/t0rp7lwqprwlmpw/KPA_FX_EDITOR_1_11.rar?dl=0
              I will upload this panel to github when I finish .
              Yest I know – it’s ugly but my priority was to have all the controls on one screen.

              I have another problem : how to enable the user to enter mapped value in uiFixedImageSlider?
              There was a topic about this but noone answered.

              Typed Values in uiFixedImageSlider

              this tells me that i don’t fully understand what a global
              variable is

              We are talking about predefined build in global variables k0 , k1 ….k16 that you can use in midi predefined messages for modulators or you can us it for value calculation for example without using a LUA.

              Attachments:
              You must be logged in to view attached files.
              in reply to: Typed Values in uiFixedImageSlider #83279
              daimondamps
              Participant
                • Topics: 8
                • Replies: 80
                • Total: 88

                I would like to know this too . Any help?

                This has probably been asked before, but with the uiFixedImageSlider component is there a way that the mapped values can be entered in the box to select value, rather than the slider Index.

                in reply to: Sysex dump with multiple separate messages #66058
                daimondamps
                Participant
                  • Topics: 8
                  • Replies: 80
                  • Total: 88

                  your modulator value(modvalue) which is 14bit (MS and LS) is calculated
                  modvalue = 128 * programData:getByte(MS) + programData:getByte(LS)

                  in simpler form
                  modvalue = (128*MS) + LS

                  in reply to: Sysex dump with multiple separate messages #65689
                  daimondamps
                  Participant
                    • Topics: 8
                    • Replies: 80
                    • Total: 88

                    modvalue = 128 * programData:getByte(x) + programData:getByte(x+1)

                    in reply to: Sysex dump with parameters dumping to two bytes "ms" "ls" #65688
                    daimondamps
                    Participant
                      • Topics: 8
                      • Replies: 80
                      • Total: 88

                      modvalue = 128 * programData:getByte(x) + programData:getByte(x+1)

                      in reply to: Sysex dump with multiple separate messages #65252
                      daimondamps
                      Participant
                        • Topics: 8
                        • Replies: 80
                        • Total: 88

                        function assignValues(midiMessage)

                        This is a definition of a function . You have to invoke the function after line:
                        if ( midiMessage:getData():getByte(10) == 0x00) then
                        –you are processing 1’st message (if it arrives – this fragment will process this message)

                        modulator1= midiMessage:getData():getByte(12)
                        modulator2= midiMessage:getData():getByte(13)
                        assignValues(midiMessage)

                        But this is bad solution because your midiMessage depends on sysex byte 10

                        – you can just omit the function and write :

                        if  ( midiMessage:getData():getByte(10) == 0x00) then 
                        	--you are processing 1'st message (if it arrives - this fragment will process this message)
                        
                        		modulator1= midiMessage:getData():getByte(12)
                             	modulator2= midiMessage:getData():getByte(13)
                        panel:getModulatorByName("SW_SAW"):setModulatorValue(modulator1, false, false, false)
                        	panel:getModulatorByName("MIXER_SAW"):setModulatorValue(modulator2, false, false, false)
                        
                        elseif ....blahblahblah
                        • This reply was modified 8 years, 4 months ago by daimondamps.
                        • This reply was modified 8 years, 4 months ago by daimondamps.
                        • This reply was modified 8 years, 4 months ago by daimondamps.
                        in reply to: Sysex dump with multiple separate messages #65243
                        daimondamps
                        Participant
                          • Topics: 8
                          • Replies: 80
                          • Total: 88

                          No – this is just a function ,

                          when you call this function from other X script – it will return to the X script when the function is finished and the script will go on.

                          in reply to: Sysex dump with multiple separate messages #65224
                          daimondamps
                          Participant
                            • Topics: 8
                            • Replies: 80
                            • Total: 88

                            So I will try once more:)
                            No matter how do you invoke your device to sending sysex messages.
                            Panel recive callback is invoken once per sysex message. So you have to write a scripti MessageReceived = function(midiMessage) that will handle every midi sysex message that your device is sending.

                            So lets say you have following messages( and I am assuming that byte 11 of that message is unique for every group of parameters) :
                            1’st message
                            F0 41 10 00 00 00 0E 12 18 00 3F 00 00 7F 00 00 | A ? |
                            10 01 01 01 01 01 01 01 01 01 01 08 00 00 08 00 08 | |
                            20 00 08 00 01 7F 40 40 00 00 00 00 00 00 00 00 00 | @@ |
                            30 F7

                            and next message
                            2’nd message
                            F0 41 10 00 00 00 0E 12 18 00 40 00 00 05 03 00 | A @ |
                            10 01 60 05 40 00 64 00 00 16 F7

                            What you need to do is :

                            MessageReceived = function(midiMessage)
                            
                            if  ( midiMessage:getData():getByte(11) == 0x3f) then
                            --you are processing 1'st message (if it arrives - this fragment will process this message)
                            
                                 modulator1= midiMessage:getData():getByte(byte from 1'st message for your modulator)
                                 modulator2=.....
                            
                            elseif  ( midiMessage:getData():getByte(11) == 0x40) then
                            
                            --you are processing 2'cond message (if it arrives - this fragment will process this message)
                                 modulator3= midiMessage:getData():getByte(byte from 2'st message for your modulator)  
                            .
                            .
                            . 
                            elseif ( midiMessage:getData():getByte(n) == 0xXX)
                            --you are processing N'th message          
                            .
                            .
                            else
                            --you are processing any other message
                            end
                            • This reply was modified 8 years, 4 months ago by daimondamps.
                            • This reply was modified 8 years, 4 months ago by daimondamps.
                            • This reply was modified 8 years, 4 months ago by daimondamps.
                            • This reply was modified 8 years, 4 months ago by daimondamps.
                            • This reply was modified 8 years, 4 months ago by daimondamps.
                            in reply to: Sysex dump with multiple separate messages #65212
                            daimondamps
                            Participant
                              • Topics: 8
                              • Replies: 80
                              • Total: 88

                              No.each time ctrlr recives a midi message your script is ivoked.. Is up to you how to handle icoming messages. Like i wroted before you could filter incoming messages with if else statment and the Command byte from incomming messages and assign the values in if else blocks.

                              in reply to: Sysex dump with multiple separate messages #65204
                              daimondamps
                              Participant
                                • Topics: 8
                                • Replies: 80
                                • Total: 88

                                Ok, so if you have byte in sysex that will tell you what sysex is this you can construct your code like:

                                If (midiMessage:getData():getByte(yourmagical commad byte)==02) then
                                Modulator1=….
                                elseif(secod type of sysx message) then
                                Modulator2=…

                                Else
                                End

                                in reply to: Sysex dump with multiple separate messages #65115
                                daimondamps
                                Participant
                                  • Topics: 8
                                  • Replies: 80
                                  • Total: 88

                                  The beginning of the messages are alway the same but after 0x18 there are some bytes which may help you to identify message types.
                                  F0 41 10 00 00 00 0E 12 18 00 02 00
                                  So you must read those byte and then assign data to the correct variables.

                                  I found this:http://www.synthforum.nl/forums/showthread.php?t=192504

                                  and this panel :
                                  http://www.stephenm.be/JDXI/Ctrlr-JD-Xi-R6-Steph-001.zip

                                  • This reply was modified 8 years, 4 months ago by daimondamps.
                                  in reply to: Sysex dump with multiple separate messages #65021
                                  daimondamps
                                  Participant
                                    • Topics: 8
                                    • Replies: 80
                                    • Total: 88

                                    Do you have some specification of SYSEX that your device is sending?
                                    You need something like:

                                    1byte F0
                                    2byte : device ID
                                    3byte: command
                                    4byte: length of data
                                    5……..x data
                                    F7

                                    So with this info you could interpret incoming messages by command byte
                                    or something else.

                                    in reply to: what do you need to know in order to make panels? #64381
                                    daimondamps
                                    Participant
                                      • Topics: 8
                                      • Replies: 80
                                      • Total: 88

                                      So you have to use

                                      programData = midiMessage:getData():getRange(13,45 -12)
                                      panel:getModulatorByName("Letter 1"):setModulatorValue(programData:getByte(1), false, false, false)

                                      or

                                      panel:getModulatorByName("Letter 1"):setModulatorValue(midiMessage:getByte(13), false, false, false)

                                      • This reply was modified 8 years, 5 months ago by daimondamps.
                                      • This reply was modified 8 years, 5 months ago by daimondamps.
                                      • This reply was modified 8 years, 5 months ago by daimondamps.
                                      in reply to: what do you need to know in order to make panels? #64379
                                      daimondamps
                                      Participant
                                        • Topics: 8
                                        • Replies: 80
                                        • Total: 88

                                        In Lua you start indexing with 1 not 0:)
                                        Which byte from this message you want to get as Letter 1?

                                        • This reply was modified 8 years, 5 months ago by daimondamps.
                                        in reply to: what do you need to know in order to make panels? #64296
                                        daimondamps
                                        Participant
                                          • Topics: 8
                                          • Replies: 80
                                          • Total: 88

                                          Hi
                                          your programData is midimessage from 12 byte and length of 45 bytes.
                                          s = midiMessage:getSize() is a size of the whole message from F0 to F7

                                          With programData:getByte(12) you are getting 14th byte of midimessage.
                                          Try to use
                                          programData = midiMessage:getData():getRange(12,45 -12)

                                          function assignValues(programData)
                                          	panel:getModulatorByName("Letter 1"):setModulatorValue(programData:getByte(1), false, false, false)
                                          	panel:getModulatorByName("Letter 2"):setModulatorValue(programData:getByte(2), false, false, false)
                                          	panel:getModulatorByName("Letter 3"):setModulatorValue(programData:getByte(3), false, false, false)
                                          	panel:getModulatorByName("Letter 4"):setModulatorValue(programData:getByte(4), false, false, false)
                                          end
                                          • This reply was modified 8 years, 5 months ago by daimondamps.
                                          • This reply was modified 8 years, 5 months ago by daimondamps.
                                          • This reply was modified 8 years, 5 months ago by daimondamps.
                                          in reply to: stateData #63609
                                          daimondamps
                                          Participant
                                            • Topics: 8
                                            • Replies: 80
                                            • Total: 88

                                            EDIT:
                                            I’ve renamed (removed and created again) my SaveStateData(stateData) to savedata(stateData)
                                            and now is working 🙂
                                            Something must went wrong with name SaveStateData for the method.

                                            Sometimes I just need to sleep with the problem to solve it:D

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