use channel index in patch::readPlugins and patch::write