Make pairs of adstatus outputs?

bkshepard's icon

Hi folks,

Is there an easier, more efficient way to do this? When [adstatus output 1] reports the outputs to a umenu, I get a list of single outputs like:

Off
1 output
2 output
3 output
4 output
5 output
6 output
etc.

I would like to turn it onto a list of stereo pair outputs like:

Off
1-2 output
3-4 output
5-6 output
etc.

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

This works, but I have a feeling there might be a better way. Thanks in advance for any tips and suggestions.

jvkr's icon

By chance I had a similar wish just two days ago. Looking at both our patches, and taking a few minutes (and another coffee) I could simplify it to below, and make sure it works for all drivers and is set correctly when the driver changes.

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

_
johan

bkshepard's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Very nice, johan! I like the use of the [maximum] object, and using slice instead of regexp is much slicker, thanks. I tweaked yours a bit to allow the grouped menu to contain the name as well as the output number.