Clipboard and strip settings
- Copy and paste (
session/presets.rs): the clipboard lives in the UI (src/fxHost.ts), so it survives opening another project.copy_pluginreturns thePluginSlotwith a VST3’s state captured from its controller;paste_pluginmakes new instances (new uids) on each target track, keeping a side-chain only where its source exists and causes no loop.paste_eqreplaces Channel EQ settings. - Reordering (
session/insert_order.rs):move_insertpermutes the project’s slots and sendsCmd::ReorderInserts { track, order }; the engine moves the runningInsertDsps through a fixed array, so nothing is allocated or reloaded and each plug-in keeps its state, editor and tail. On undo,restore_insert_orderrecognises a pure permutation and reorders instead of reinstantiating. - Moving to another strip (
move_plugin) goes through copy,make_room(shifts the target slot’s plug-in to the nearest free slot) and paste, then removes the original unless copying. The new instance has a new uid, socarry_automationre-keys the plug-in’s automation lanes to it and moves them to the target strip (automation::take_plugin_lanes; Stereo Out included); a copy starts without lanes.src/laneFollow.tskeeps the lane the UI shows on the moved plug-in. - The UI side is
src/slotDrag.ts: a drag from a slot’s name, Alt to copy, Esc to cancel, and themove_plugincommand on drop.
Channel strip settings
Section titled “Channel strip settings”- A
StripSetting(strip_settings.rs) is a strip’s instrument, Audio FX slots and Channel EQ.copy_stripcaptures one, VST3 states included, likecopy_plugin; the clipboard lives in the UI (src/stripSettings.ts). paste_strip(session/strip_settings.rs) replaces every Audio FX slot and the EQ of each target, and the instrument of an instrument track when the setting has one, with new instances (new uids; side-chains filtered as inpaste_plugin). A VST3 that fails to instantiate stays in its slot with its state, as a missing plug-in.reset_stripapplies an empty setting (instrument included) and resets volume and pan. Both are one undo step with plug-in states captured, sorestore()reinstantiates what changed.- Saved settings go through
strip_settings::{list, read, write, delete}in a root folder (user_root()for the app, a scratch folder in tests); saving drops side-chain sources and trailing empty slots (portable). - Commands:
copy_strip,paste_strip,reset_strip,list_strip_settings,save_strip_setting,load_strip_setting,delete_strip_setting, and, for the clip indicators,reset_clip_indicators.