Skip to content

Add Saving and Loading Presets - #40

Merged
OpenSauce merged 2 commits into
mainfrom
add-presets
Aug 2, 2025
Merged

Add Saving and Loading Presets#40
OpenSauce merged 2 commits into
mainfrom
add-presets

Conversation

@OpenSauce

Copy link
Copy Markdown
Owner

Closes #15

Adds functionality to save and load presets, serialises the stage configs to and from JSON and adds in the relevant GUI functionality. It's a little bit messy but gets the job done.

Screenshot_20250802_120755

Copilot AI review requested due to automatic review settings August 2, 2025 11:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds preset functionality to the Rustortion amplifier application allowing users to save, load, and manage amplifier configurations. The implementation serializes stage configurations to JSON format and provides GUI controls for preset management.

  • Introduces a PresetManager for handling preset persistence with JSON serialization
  • Adds a PresetBar component with controls for loading, saving, updating, and deleting presets
  • Creates three default presets (Clean, Crunch, Lead) with predefined stage configurations

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/gui/preset.rs Core preset functionality with Preset struct, PresetManager for file operations, and default preset creation
src/gui/components/preset_bar.rs GUI component providing preset selection dropdown and management buttons
src/gui/app.rs Integration of preset functionality into main application with message handling
src/gui/messages.rs New message types for preset operations
src/gui/config/*.rs Added serde derive macros to enable JSON serialization of stage configurations
presets/*.json Default preset files generated by the application
Cargo.toml Added serde_json dependency for JSON serialization

Comment thread src/gui/preset.rs Outdated
Comment thread src/gui/preset.rs Outdated
Comment thread src/gui/preset.rs
Comment thread src/gui/preset.rs
Comment thread src/gui/app.rs
Comment thread src/gui/app.rs
Comment thread src/gui/app.rs
@OpenSauce OpenSauce added this to the v1 milestone Aug 2, 2025
@OpenSauce
OpenSauce merged commit 1e5b521 into main Aug 2, 2025
2 checks passed
@OpenSauce
OpenSauce deleted the add-presets branch August 2, 2025 11:43
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.

Saving and Loading Chains

2 participants