My template (EvolverProgrammer.jzml - attached) receives a 226 Byte SysEx dump in function ReceiveState(MIDI_ARGS) then uses a function ArrayToHex(array) to convert 8 Bytes to hex, and then return them as a string using arraytostring. This string is then displayed on a monitor object.
Since I only do 8 Bytes at a time (this is the "packet" size for the DSI Evolver) I need to make multiple calls to ArrayToHex(array).
PROBLEM: the 15th call to ArrayToHex(array), and every call after that returns 0. The reason I think it's an issue with arraytostring() is that if I modify ArrayToHex(array) to do all the munging but then just return the decimal values, i.e. not call arraytostring(), everything works fine.
I've been working at for a while and am a bit stumped - anyone got any ideas? Am I doing something obviously stupid? I can work around it for now, but it concerns me that I don't understand why it's not working - it might come back to bite me!
Attached are the template file, and a sysex dump (SysExDump.jzml) I've been using to troubleshoot (you need to change the extension to .syx as there was an issue uploading a .syx file). You can use this free program to send the sysex to Lemur: http://www.snoize.com/SysExLibrarian/
thanks!
arraytostring not behaving as expected
arraytostring not behaving as expected
- Attachments
-
- SysExDump.jzml
- (226 Bytes) Downloaded 64 times
-
- EvolverProgrammer.jzml
- (23.51 KiB) Downloaded 59 times
Re: arraytostring not behaving as expected
looks like there have been a few downloads of my attached files - was anybody able to recreate my problem?
cheers!
cheers!
Re: arraytostring not behaving as expected
HI Bint
One way to approach such problems is to split it down and see what works . . .
I tweaked your Project a bit - in search of a solution
Basically it now writes the incoming sysex to 2 smaller arrays - SYX and SYX2
I also split the processing algorithm to match the new arrays and execute when they change I will refer the matter on to investigate the reason behind the initial issue
MM
One way to approach such problems is to split it down and see what works . . .
I tweaked your Project a bit - in search of a solution
Basically it now writes the incoming sysex to 2 smaller arrays - SYX and SYX2
I also split the processing algorithm to match the new arrays and execute when they change I will refer the matter on to investigate the reason behind the initial issue
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: arraytostring not behaving as expected
Thanks Macciza, I'm on holidays right now but will try this out as soon as possible.