Single word symbols enclosed in quotations

Wolfram.Static's icon

I'm trying to use Max to interface with some external hardware (Q-SYS core), and I'm trying to establish bi-directional communication with it. I've got the majority of the communication protocol down, but I am having a really hard time dealing with a specific problem on the receiving end.

Q-SYS sends back a message that I receive in Max that is formatted as

cv (NamedControl) (ParameterString) (ParameterValue) (ParameterPosition)

The string, value, and position are all the same data, just formatted differently. Depending upon which Parameter I'm querying, I use a different one of these 3 items.

My problem is lying with the string. If the string is only one word, it's sent back with no enclosing quotations, but if there's a second word in the string, it DOES include quotations. This has made routing the data how I need it quite a headache, so I've been trying to standardize the formatting.

I've come to realize that it's because Max doesn't like to allow single words to be enclosed in quotations, even when in a list. I've run into this in the past, but had completely forgotten about it, and now my Max is quite rusty.

So my question is this. Is it possible to get a single word symbol to retain quotation marks through a number of processes (currently route -> regexp -> route -> unpack -> sprintf -> route)

Or is there a better way of keeping this list properly maintained through my structure? It seems like my regexp is already stripping the quotes off of it even if it is multiple words, or a symbol consisting of just numbers.

Would love some help generating some consistency here.

P.S. Heavily sleep deprived at this point, so apologies if anything is unclear/rambly.

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

Source Audio's icon

slice parts in case structure is allways the same

Wolfram.Static's icon

Totally neglected to reply to this, but thanks Source Audio! This did exactly what I needed. Have not found any edge cases where this won't work, so I think I'm set with the slice!