Pre-selected midi-ports

Vadim Kupriyanov's icon

Hi!

Is there way to specify port to be selected in list of devices on start of standalone application, if I use no midiin/midiout objects (@name), but midiinfo + list of devices?

Screen-Shot-2016-09-11-at-23.09.22.jpeg
jpeg
Vadim Kupriyanov's icon
Max Patch
Copy patch and select New From Clipboard in Max.

If I make use this patch - it is not working (port "from Max 1") not selected on start.

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

And, if I use this - port "from Max 1" selected, but start to work only after I reselect this one by hand

Screen-Shot-2016-09-12-at-01.32.59.jpeg
jpeg
joeman's icon

Looks like a simple order of operations problem. Easy fix. Put the [midiinfo] to the right of the {set from Max 1} so that it gets triggered first, and then the port is selected. Or use the [t b b] out of [loadbang] to order the events.

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

No, it's not helps - when I load this patch, I see "from Max 1" selected, but really midi outs to first port from list - AU DLS synth 1.. Pressing to knob before {set from Max 1} and on object {set from Max 1} also not helps, only after I manually select "from Max 1" item from list - midi start to going to Max 1 out. It seems like {set from Max 1} message is not enough for complete switch..

Screen-Shot-2016-09-12-at-13.21.38.jpeg
jpeg
joeman's icon

Of course, you are only 'setting' the umenu object. Setting doesn't cause output. You need to send "from Max 1" as a symbol into the midiout object/s which won't happen if you only set the [umenu] object.

The correct message to send [umenu] to also trigger output is:

{symbol from Max 1}
|
[umenu]

Joe

Vadim Kupriyanov's icon

Thanks a lot!

joeman's icon

No worries Vadim, you'll find the message 'set' behaves this way pretty much all the time in Max. Cheers