addDeviceInputToTrack

abstract fun addDeviceInputToTrack(trackIndex: Int, channelIndices: List<UInt>): Int

AppModel::addDeviceInputToTrack, returning the new source node id, or a negative value on failure. The undoable counterpart is ProjectCommands.addDeviceInputToTrack, which takes the node id this returns; prefer that one from a UI.