Sysex dump with multiple separate messages

Home Forums General Programming Sysex dump with multiple separate messages

Viewing 19 posts - 21 through 39 (of 39 total)
  • Author
    Posts
  • #65230
    memorysplice
    Participant
      • Topics: 14
      • Replies: 59
      • Total: 73

      Thank you for your patience. I greatly appreciate you and everyone else trying to help.

      #65231
      memorysplice
      Participant
        • Topics: 14
        • Replies: 59
        • Total: 73

        I think this is something I can run with! Thank you! I will try right now.

        #65240
        memorysplice
        Participant
          • Topics: 14
          • Replies: 59
          • Total: 73

          I do have a question in regards to the “assignValues script”

          
          function assignValues(midiMessage,var)
          	panel:getModulatorByName("Portamento"):setModulatorValue(programData:getByte(0), false,var,false) -- assign the first byte of programData memoryBlock to it's correspondent modulator
          panel:getModulatorByName("Osc1 Volme"):setModulatorValue(programData:getByte(1), false,var,false) -- assign the second byte of programData memoryBlock to it's correspondent modulator. 
          .
          .
          .
          -- And so on till the last byte.
          end
          

          Do I use continue to use this script or am I missing something?

          • This reply was modified 8 years, 4 months ago by memorysplice.
          #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.

            #65249
            memorysplice
            Participant
              • Topics: 14
              • Replies: 59
              • Total: 73

              I am going to try this on a much simpler synth to master first I just want to walk over everything over with you first.

              Here are 3 of the 4 messages that I am sending

              Message 1
              F0 41 10 00 00 7B 11 00 20 00 00 00 00 60 F7
              Message 2
              F0 41 10 00 00 7B 11 00 20 10 00 00 00 50 F7
              Message 3
              F0 41 10 00 00 7B 11 00 20 20 00 00 00 40 F7
              and so on

              Here are 3 examples of sysex dumps that I am receiving from the synth in question.

              
              address is in [ ] 
              bytes are in " "
              message 1
                  [ F0 41 10 00 00 7B 12 00  20 00 00 ]
                  " 01 7F 00 7F 00 7F 00 7F 00 00 00 00 00  00 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 5C " 
              73 = checksum 
              F7 = End of Message
              
              message 2
              
              00  [ F0 41 10 00 00 7B 12 00  20 10 00 ]
                  " 00 0B 3C 49 49 10  1E 32 "
              27 = checksum
              F7 = End of Message
              
              message 3
              
              00  [ F0 41 10 00 00 7B 12 00  20 20 00 ]
                  " 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 20  00 00 00 00 00 " 
              40 = Checksum 
              F7 = End of message
              
              • This reply was modified 8 years, 4 months ago by memorysplice.
              • This reply was modified 8 years, 4 months ago by memorysplice.
              • This reply was modified 8 years, 4 months ago by memorysplice.
              #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.
                #65339
                memorysplice
                Participant
                  • Topics: 14
                  • Replies: 59
                  • Total: 73

                  I got it to properly dump and thank you! I do have a problem. When I press a note on the synth, it will click output a bunch of sysex paramater changing the synth and the panel to 0. What are your thoughts?

                  #65341
                  memorysplice
                  Participant
                    • Topics: 14
                    • Replies: 59
                    • Total: 73

                    Fixed it. Some kind of midi loop issue.

                    #65577
                    memorysplice
                    Participant
                      • Topics: 14
                      • Replies: 59
                      • Total: 73

                      One more thing, Part of the dump in question as messages that are broken into multiple “ms” “ls” byte messages how do I utilize lua code to update the parameters for my panel?

                      #65689
                      daimondamps
                      Participant
                        • Topics: 8
                        • Replies: 80
                        • Total: 88

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

                        #65693
                        memorysplice
                        Participant
                          • Topics: 14
                          • Replies: 59
                          • Total: 73

                          Trying now. Thank you!

                          #65698
                          memorysplice
                          Participant
                            • Topics: 14
                            • Replies: 59
                            • Total: 73

                            daimondamps can you break down how the code works so I can utilize it ?

                            #65699
                            memorysplice
                            Participant
                              • Topics: 14
                              • Replies: 59
                              • Total: 73

                              I am getting a error message

                              Error message: [string “receivedMidi”]:89: attempt to index global ‘programData’ (a nil value)

                              #65794
                              memorysplice
                              Participant
                                • Topics: 14
                                • Replies: 59
                                • Total: 73

                                Never mind, I got it now.

                                #66003
                                memorysplice
                                Participant
                                  • Topics: 14
                                  • Replies: 59
                                  • Total: 73

                                  Actually I do not have it. I am still having problems. If daimondamps or anyone else can explain this to me, that would be awesome!

                                  
                                  modvalue = 128 * programData:getByte(x) + programData:getByte(x+1)
                                  
                                  
                                  #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

                                    #66135
                                    memorysplice
                                    Participant
                                      • Topics: 14
                                      • Replies: 59
                                      • Total: 73

                                      Here is what I tried to use and it is not working. Maybe someone can spot the issue with the code

                                      
                                      	CS_ATTACK = 128 * midiMessage:getLuaData():getByte(15) + midiMessage:getLuaData():getByte(16+1)
                                      
                                      	panel:getModulatorByName("CS_ATTACK"):setModulatorValue(CS_ATTACK, false, false, false)
                                      
                                      #66136
                                      memorysplice
                                      Participant
                                        • Topics: 14
                                        • Replies: 59
                                        • Total: 73

                                        Keep in mind the value of the parameter can go from 0-255.

                                        #66201
                                        memorysplice
                                        Participant
                                          • Topics: 14
                                          • Replies: 59
                                          • Total: 73

                                          Figured it out using this solution.

                                        Viewing 19 posts - 21 through 39 (of 39 total)
                                        • The forum ‘Programming’ is closed to new topics and replies.
                                        There is currently 0 users and 40 guests online
                                        No users are currently active
                                        Forum Statistics
                                        Threads: 2,495, Posts: 17,374, Members: 77,605
                                        Most users ever online was 12 on January 22, 2019 3:47 pm
                                        Ctrlr