arraytostring not behaving as expected

Discuss problems and solutions.
Post Reply
bint
Newbie
Posts: 17
Joined: 26 Dec 2012 02:11
Location: Sydney, Australia
Contact:

arraytostring not behaving as expected

Post by bint »

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!
Attachments
SysExDump.jzml
(226 Bytes) Downloaded 63 times
EvolverProgrammer.jzml
(23.51 KiB) Downloaded 57 times
bint
Newbie
Posts: 17
Joined: 26 Dec 2012 02:11
Location: Sydney, Australia
Contact:

Re: arraytostring not behaving as expected

Post by bint »

looks like there have been a few downloads of my attached files - was anybody able to recreate my problem?

cheers!
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: arraytostring not behaving as expected

Post by Macciza »

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
EvolverProgrammerFIXED.jzml
(29.49 KiB) Downloaded 79 times
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]
bint
Newbie
Posts: 17
Joined: 26 Dec 2012 02:11
Location: Sydney, Australia
Contact:

Re: arraytostring not behaving as expected

Post by bint »

Thanks Macciza, I'm on holidays right now but will try this out as soon as possible.
Post Reply