Skip to content

fix: Restore parameter values when deleting modulator - #46

Merged
lucaromagnoli merged 2 commits into
mainfrom
fix/modulator-delete-restore-values
Jan 17, 2026
Merged

lucaromagnoli merged 2 commits into
mainfrom
fix/modulator-delete-restore-values

Conversation

@lucaromagnoli

Copy link
Copy Markdown
Contributor

Summary

  • Before deleting a modulator, find all linked parameters
  • Read the baseline value from param.X.mod.baseline
  • Deactivate the plink
  • Restore parameter to its baseline value
  • Then delete the modulator

Fixes parameters getting stuck at last modulated value when modulator is deleted.

Test plan

  • Add modulator to a device
  • Link it to a parameter
  • Move the parameter (set a baseline)
  • Let the LFO modulate
  • Delete the modulator
  • Verify parameter returns to baseline value

🤖 Generated with Claude Code

lucaromagnoli and others added 2 commits January 17, 2026 15:44
Before deleting a modulator, get all linked parameters and restore
them to their baseline values. This prevents parameters from getting
stuck at whatever value they had when the modulator was deleted.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use load_preset_by_name instead of TrackFX_SetPresetByIndex to ensure
the Sine preset loads correctly even if REAPER hasn't cached presets yet.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lucaromagnoli
lucaromagnoli merged commit 9ac9983 into main Jan 17, 2026
2 checks passed
@lucaromagnoli
lucaromagnoli deleted the fix/modulator-delete-restore-values branch January 17, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant