Modify connection channel on connect?
Posted: Fri Apr 19, 2013 8:38 pm
For my PatchBay machine, I want to have an attribute option to assign new input connections to the first unused input channel. I thought that I would be able to do the following but DestinationChannel is read-only...
Is there an alternative method to achieve the same thing?
Code: Select all
// Handle auto-assign channels
if(Machine.Attributes[2].Value == 1)
{
for (int i = 0; i < Patch.NumInputs; i++)
{
if (!InputConnections.ContainsValue(i))
{
c.DestinationChannel = i; // Not allowed
break;
}
}
}