tosymbol M4L bug

newtfish's icon

Hi,

Im using tosymbol in a device. There is a bug, when two devices are used in a set on different tracks, where tosymbol will concatenate messages from both devices (its very strange). This only happens when the device is closed (not being edited).

Max Patch
Copy patch and select New From Clipboard in Max.

Try this, put this in a device in your set, then copy the device to a different track

Right click on the titlebar of the device and open the max window

You will see sometimes tosymbol prints "asasas saasasasasas saasas" instead of "asasas saasas"

This took me absolutely ages to debug, its a really strange error. Id be really pleased to find out if others can confirm/recreate.

This is happening on Max 5, on Max6 it works fine.

If tosymbol doesnt work in Max5, is there any way I can wrap a message in quotes?

Andrew Pask's icon

It's likely that you'll run in to more problems than this if you're creating 1000 unique symbols every second. Even if this worked I wouldn't do it.

What problem is this code trying to solve? Perhaps we can think of another way of doing it.

-A

newtfish's icon

Hi Andrew,

Thanks for the advice. Im using this for OSC messages. Youre right, I tried solving another way now and it works much better.

I was trying to prepend a message before all OSC messages in a patch, using tosymbol, and combine. So I just switched tosymbol for zl slice, combine and zl join and it worked like a charm.

Cheers