Home › Forums › General › Programming › Sysex dump with multiple separate messages
- This topic has 38 replies, 4 voices, and was last updated 8 years, 4 months ago by memorysplice.
-
AuthorPosts
-
December 8, 2015 at 3:22 pm #65230
Thank you for your patience. I greatly appreciate you and everyone else trying to help.
December 8, 2015 at 3:25 pm #65231I think this is something I can run with! Thank you! I will try right now.
December 8, 2015 at 4:34 pm #65240I 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.
December 8, 2015 at 4:52 pm #65243No – 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.
December 8, 2015 at 5:40 pm #65249I 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 onHere 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.
December 8, 2015 at 6:12 pm #65252function 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.
December 8, 2015 at 11:12 pm #65339I 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?
December 8, 2015 at 11:26 pm #65341Fixed it. Some kind of midi loop issue.
December 10, 2015 at 11:40 pm #65577One 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?
December 12, 2015 at 4:44 pm #65689modvalue = 128 * programData:getByte(x) + programData:getByte(x+1)
December 12, 2015 at 5:04 pm #65693Trying now. Thank you!
December 12, 2015 at 5:43 pm #65698daimondamps can you break down how the code works so I can utilize it ?
December 12, 2015 at 6:02 pm #65699I am getting a error message
Error message: [string “receivedMidi”]:89: attempt to index global ‘programData’ (a nil value)
December 13, 2015 at 6:16 pm #65794Never mind, I got it now.
December 14, 2015 at 4:15 pm #66003Actually 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)
December 15, 2015 at 1:09 am #66058your 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) + LSDecember 15, 2015 at 11:13 pm #66135Here 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)
December 15, 2015 at 11:14 pm #66136Keep in mind the value of the parameter can go from 0-255.
December 16, 2015 at 5:53 am #66201 -
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.