memorysplice

Forum Replies Created

Viewing 19 posts - 41 through 59 (of 59 total)
  • Author
    Posts
  • in reply to: Sysex dump with multiple separate messages #64714
    memorysplice
    Participant
      • Topics: 14
      • Replies: 59
      • Total: 73

      I do somewhat have a understanding of what the sysex messages mean due to process of elimination. My question is do I treat all 55 messages as one message and attempt to continue or is there a different way to deal with everything in regards to this post.

      This is a very basic guide to manage sysex dumps.

      In theory your panel is finished and you created a modulator for each byte from the dump.

      Now you need to request a dump from the synth. You need to know the sysex command for this. This is an example dump request, that can be added to the LUA code of a button, for instance:

      m = CtrlrMidiMessage({0xF0, 0x00, 0x20, 0x33, 0x01, 0x10, 0x30, 0x00, 0x00, 0xF7}) -- REQUEST PATCH MESSAGE
      panel:sendMidiMessageNow(m) -- SENDS THE DUMP REQUEST MESSAGE

      Once you send the dump request, the synth will respond sending a sysex message containing the data of the patch. This message usually contains a header followed by the parameters of the synth engine, and this is the part you need to manage. This is an reduced example of a sysex patch:

      
      f0 00 20 33 01 00 10 00 00 0c 01 02 7d 00 00 00 00 00 00 40 00 00 00 00 00 00 40 00 00 40 60 40 00 00 40 f7

      You need to know where the actual data of patch starts, in this case is byte 9 (0c)(starting from the first byte that is number 0).

      In order to manage the sysex dump received, you need to create a LUA method for “Called when panel receives a MIDI message” panel property. This is a basic method for this:

      midiMessageReceived = function(midiMessage)
      	s = midiMessage:getSize() -- Size of the midi dump received
      	if s == 524 then -- if size match the expected size of the dump requested
      		PatchDataLoaded = midiMessage:getData() -- create a memoryblock with the data dump
      		programData 	= midiMessage:getData():getRange(09,514) -- create a memory block with the synth engine data, leaving the header
      		assignValues(midiMessage,false) -- call a script to assign each byte to each modulator.
      	end
      end

      Now the assignValues script will look like this:

      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

      Of course, you need to know the target modulator for each byte of the dump.

      Now to send a patch to the synth, you can do it in several ways: you can send each modulator individually, or collect all modulator values in a memoryBlock and send it to the synth in the same form the panel will receive a dump patch.

      To do it individually, just create a button and add this lua method:

      
      function sendPatch()	
      
      	a = panel:getModulatorByName("Portamento"):getValue() -- get the value of this modulator
      	panel:getModulatorByName("Portamento"):setModulatorValue(a,false,true,false) -- set the same value for this modulator, sending it to the synth
      	a = panel:getModulatorByName("Osc1 Volume"):getValue() -- get the value of this modulator
      	panel:getModulatorByName("Osc1 Volume"):setModulatorValue(a,false,true,false) -- set the same value for this modulator, sending it to the synth
      .
      .
      .
      -- and so on till the last modulator.
      end

      Your modulators could be arranged in some way to do this more easy. In the following case, modulators where created in the same order they have in a dump message (so modulator with index 0 corresponds to dump’s byte 0 and so on)

      function sendPatch()
      	for n = 0, 514, 1 do -- the amount of modulators to send 
      		a = panel:getModulatorByIndex(n) -- get modulator with index n			
      		b = a:getModulatorValue() -- get it's value
      		a:setModulatorValue(b, false,true,false) -- set it's value, sending it to the synth.
      	end
      end

      If you want to send the patch to the synth as a single dump the procedure is similar; collect modulator values, add them to a memoryBlock and send the memoryBlock as a sysex message:

      
      function sendPatch()
      	a = panel:getModulatorByName("Portamento"):getValue() -- get the value of this modulator
      	PatchDataLoaded:setByte(9,a) -- write it in the memory block in the correct byte
      	a = panel:getModulatorByName("Osc1 Volume"):getValue()
      	PatchDataLoaded:setByte(10,a)
      .
      .
      .
      
      	m = CtrlrMidiMessage(PatchDataLoaded:toHexString(1)) -- convert the memory block in a midi message
      	panel:sendMidiMessageNow(m) -- send the midi message to the synth
      end

      Hope that helps.

      in reply to: Sysex dump with multiple separate messages #64614
      memorysplice
      Participant
        • Topics: 14
        • Replies: 59
        • Total: 73

        Here are examples of the messages in question.

        Message one

        00  F0 41 10 00 00 00 0E 12  18 00 00 00 44 69 73 74  | A          Dist|
        10  20 53 65 71 0D 00 00 00  00 00 00 00 6E 03 04 0B  | Seq        n   |
        20  0C 00 00 01 01 01 01 00  00 00 00 6E F7           |           n |
        

        Message two

        00  F0 41 10 00 00 00 0E 12  18 00 01 00 7F 40 00 00  | A           @  |
        10  02 01 00 01 00 00 0A 01  64 01 00 28 28 00 02 00  |        d  ((   |
        20  30 00 32 00 00 F7                                 |0 2   |
        

        Message three

        00  F0 41 10 00 00 00 0E 12  18 00 02 00 00 7F 32 32  | A            22|
        10  01 00 40 00 40 00 40 00  40 00 00 00 00 08 00 06  |  @ @ @ @       |
        20  04 08 00 00 0A 08 00 00  05 08 00 07 0F 08 00 00  |                |
        30  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        40  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        50  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        60  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        70  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        80  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        90  00 08 00 00 00 08 00 00  00 08 00 00 00 53 F7     |             S |
        

        Message four

        00  F0 41 10 00 00 00 0E 12  18 00 04 00 06 7F 7F 00  | A              |
        10  01 00 40 00 40 00 40 00  40 00 00 00 00 08 00 00  |  @ @ @ @       |
        20  00 08 00 00 00 08 00 00  0B 08 00 00 00 08 00 00  |                |
        30  00 08 00 03 0E 08 00 04  02 08 00 00 00 08 00 00  |                |
        40  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        50  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        60  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        70  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        80  00 08 00 00 00 08 00 00  00 08 00 00 00 08 00 00  |                |
        90  00 08 00 00 00 08 00 00  00 08 00 00 00 3D F7     |             = |
        

        .
        .
        .

        Message 54

        0  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                                                | |
        

        Message 55

        00  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                    | 

        @ d |
        `

        in reply to: what do you need to know in order to make panels? #64386
        memorysplice
        Participant
          • Topics: 14
          • Replies: 59
          • Total: 73

          I wanted to say thank you for responding and helping out. I still do not completely understand everything so far, I do seem to have it updating. I will experiment and get back with my results.

          • This reply was modified 8 years, 5 months ago by memorysplice.
          in reply to: what do you need to know in order to make panels? #64385
          memorysplice
          Participant
            • Topics: 14
            • Replies: 59
            • Total: 73

            I was messing around with it with this code and got it to update.

            midiMessageReceived = function(midiMessage)
            
            		s = midiMessage:getSize()
            
            		if s == 45 then -- if size match the expected size of the dump requested
            			PatchDataLoaded = midiMessage:getData() -- create a memoryblock with the data dump
            			programData = midiMessage:getData():getRange(11,45-11) -- create a memory block with the synth engine data, leaving the header
            			assignValues(midiMessage,false) -- call a script to assign each byte to each modulator.
            		end
            end
            
            function assignValues(midiMessage,var)
            	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
            in reply to: what do you need to know in order to make panels? #64377
            memorysplice
            Participant
              • Topics: 14
              • Replies: 59
              • Total: 73

              Here is an example of the sysex dump, in case I am misunderstanding

              00 F0 41 10 00 00 00 0E 12 18 00 00 00 55 6E 6C 65 | A Unle|
              10 61 73 68 20 58 69 0D 00 00 00 00 00 7F 03 06 0B |ash Xi |
              20 00 00 00 01 01 01 01 00 00 00 00 13 F7 | |
              `

              The sysex number “F0” is number 0 while the sysex number “55” is number 12. Am I correct in my understanding?

              The reason why I am sharing this is to understand how this works so I can work on other dumps.

              in reply to: what do you need to know in order to make panels? #64288
              memorysplice
              Participant
                • Topics: 14
                • Replies: 59
                • Total: 73

                Here is where I am at. I can request a dump from my JD-Xi. of 45 bytes. I understand where the bytes correspond in the dump to the parameters that I can map. Here is an example of the code that I am working on.

                --
                -- Called when a panel receives a midi message (does not need to match any modulator mask)
                -- @midi   CtrlrMidiMessage object
                --
                
                midiMessageReceived = function(midiMessage)
                
                		s = midiMessage:getSize()
                
                		if s == 45 then -- if size match the expected size of the dump requested
                			PatchDataLoaded = midiMessage:getData() -- create a memoryblock with the data dump
                			programData = midiMessage:getData():getRange(12,45) -- create a memory block with the synth engine data, leaving the header
                			assignValues(midiMessage,false) -- call a script to assign each byte to each modulator.
                		end
                end
                
                function assignValues(midiMessage,var)
                	panel:getModulatorByName("Letter 1"):setModulatorValue(programData:getByte(12), false, var, false)
                	panel:getModulatorByName("Letter 2"):setModulatorValue(programData:getByte(13), false, var, false)
                	panel:getModulatorByName("Letter 3"):setModulatorValue(programData:getByte(14), false, var, false)
                	panel:getModulatorByName("Letter 4"):setModulatorValue(programData:getByte(15), false, var, false)
                end

                The question I have is what am I doing wrong because I can not update the parameters that I have created. When I press the program request button that I have made the parameters revert to the lowest number vs showing what is on the synth.

                Attachments:
                You must be logged in to view attached files.
                in reply to: what do you need to know in order to make panels? #61192
                memorysplice
                Participant
                  • Topics: 14
                  • Replies: 59
                  • Total: 73

                  I have no background in LUA and I do not understand how to utilize the directions in application to my panel that I am working on. Can someone explain this to me or point me in the correct direction so I can finish this quickly. I can make a sysex dump. that is as far as I can get.

                  • This reply was modified 8 years, 6 months ago by memorysplice.
                  in reply to: Help using midi dump to change parameters on panel? #60824
                  memorysplice
                  Participant
                    • Topics: 14
                    • Replies: 59
                    • Total: 73

                    Thank you very much!!! This is what I was looking for. 🙂

                    in reply to: Ctrlr – Step by step guide #59408
                    memorysplice
                    Participant
                      • Topics: 14
                      • Replies: 59
                      • Total: 73

                      I am looking forward to the day there is documentation on how to create a librarian. That would be so clutch.

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

                        Also if you were ever part of the Camarilla, Pixie Bruner says hi!

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

                          Thank you for the response!!! I will try to figure out how to implement your advice and report back. Also I will check the step by step guide. I have been patiently waiting for the completion of the step by step guide for guidance for learning how to code in lua. Thank you.

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

                            Can anyone take time out of their day and throw me a bone? 🙂

                            in reply to: Ctrlr – Step by step guide (in DEV version) #54456
                            memorysplice
                            Participant
                              • Topics: 14
                              • Replies: 59
                              • Total: 73

                              Thank you!!!

                              in reply to: How to get two way sysex communication? #49068
                              memorysplice
                              Participant
                                • Topics: 14
                                • Replies: 59
                                • Total: 73

                                I figured it out. I was getting parameter changes but without proper checksum. Thank you!

                                in reply to: sysex message with funky checksum #49067
                                memorysplice
                                Participant
                                  • Topics: 14
                                  • Replies: 59
                                  • Total: 73

                                  I figured it out. I was getting parameter changes but without proper checksum. Thank you!

                                  in reply to: How to get two way sysex communication? #48622
                                  memorysplice
                                  Participant
                                    • Topics: 14
                                    • Replies: 59
                                    • Total: 73

                                    Also if it helps I am using the setmodularvalue in the lua editor console.

                                    in reply to: How to get two way sysex communication? #48620
                                    memorysplice
                                    Participant
                                      • Topics: 14
                                      • Replies: 59
                                      • Total: 73

                                      I have 2 way communication with midi cc and nrpn messages. What I am trying to figure out is 2 way communication using sysex strings

                                      • This reply was modified 8 years, 11 months ago by memorysplice.
                                      in reply to: How to get two way sysex communication? #48570
                                      memorysplice
                                      Participant
                                        • Topics: 14
                                        • Replies: 59
                                        • Total: 73

                                        I have parameters that output sysex string. When I change the value on the synth, I want ctrlr panel to change, showing that the parameter has changed.

                                        in reply to: Proteus 2000 started #32841
                                        memorysplice
                                        Participant
                                          • Topics: 14
                                          • Replies: 59
                                          • Total: 73

                                          I will be avalable after thanksgiving. Do you know anything about programming?

                                        Viewing 19 posts - 41 through 59 (of 59 total)
                                        Ctrlr