/// <reference path="../CommandGlobals.d.ts" />

project.mapSelectedChannels(
  (channelData, selectionStart, selectionEnd) => {
    const newChannelData = new Float32Array(channelData.length - (selectionEnd - selectionStart));
    newChannelData.set(channelData.subarray(0, selectionStart));
    newChannelData.set(channelData.subarray(selectionEnd, channelData.length), selectionStart);
    return newChannelData;
  }
);

project.selectionEnd = project.selectionStart;
