Send target of sidechain device is not copied via active_preset_data

If you copy a sidechain device to another track, by setting the destination active_preset_data to the source’s active_preset_data, the send target will not be kept, even though it still is right placed to the target track.

The target is kept, if you copy a normal send device though.

Maybe this is done by purpose. If not, it might be helpful to have consistency here, e.g. for fladd’s split tracks tool.

The copied active preset data shows that the DestChainIndex and DestEffectIndex always will be set to -1:

    <DestChainIndex>
      <Value>-1</Value>
      <Visualization>Device only</Visualization>
    </DestChainIndex>
    <DestEffectIndex>
      <Value>-1</Value>
      <Visualization>Device only</Visualization>
    </DestEffectIndex>

I assume this is for preventing possible corrupt routings. But maybe this check could be placed at the listenener of active_preset_data instead? No idea… :slight_smile:

But the send device has a prevent logic, too, but here you can select simply corrupt routings, the device simply goes silent then and shows a warning symbol. Why not transfer that logic to the sidechain device?

EDIT: Ah, it’s true for other meta devices, e.g. meta mixer, too…

…Or maybe the song object could have a method

move_device(source_track_index, source_device_index, target_track_index, target_device_index)

Here the same functionality as the drop’n’drop and direct copy/paste (not xml paste) could be provided, since this one keeps the targets. Also copying active_preset_data is automatically done.