sxformat changing numbers

tekfunkdub's icon

so I am trying to send sysex that has 2 parameters that change. I have some Javascript that processes these numbers and then I send them to sxformat via 2 inlets.

sxformat 240 67 16 94 16 0 48 / is $i1 / is $i2 / 247

I have message windows also coming from the javascript object so that I can see what numbers sxformat is getting. the 1st number always comes through correctly. the 2nd number, however gets weird. here are some of what sxformat is doing with the 2nd number

127 = 126

126 = 127

125 = 127

124 = 126

121 = 125

Now what is weirder is that sometimes, depending on the 1st number, the second might not change.

what I want is for sxformat to use whatever number I feed it. what exactly is / is $i2 / doing ? why does / is $i1 / come through right every time?

Very confused....

tekfunkdub's icon

ok, I have figured out that in this case when I send 2 parameters via 2 inlets in sxformat, it sends a message with the updated parameter in the 1st inlet, but uses the previous parameter for the 2nd inlet

tekfunkdub's icon

ok so I needed a pipe between my javascript and sxformat's left inlet so that it gets the current params before sending

Roman Thilenius's icon

js brakes the order because it is so slow.

[buddy] might be of help in these situations.

Source Audio's icon

maybe js outputs itered , not list of 2 items.

and no need for sxformat unless you must use some functions from it

beside pure sysex list