Skip to content

Commit

Permalink
Fix save names
Browse files Browse the repository at this point in the history
  • Loading branch information
emmabritton committed Dec 22, 2023
1 parent d0470dc commit 726ec00
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### Version 0.2.1
- Tidy up UI
- Fix save names

### Version 0.2.0
- Add themes
- Add waveform view
Expand Down
2 changes: 2 additions & 0 deletions src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ impl Controller {
_ => {}
}
}
save.osc = self.osc_type;
save.duty = self.cycle;
save.fix_name();
save
}
Expand Down
10 changes: 8 additions & 2 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,15 @@ impl SoundSave {
false => " - ".to_string(),
true => format!("{:.1}", self.drive),
};
let duty = match self.duty {
DutyCycle::Eight => "1/8",
DutyCycle::Quarter => "1/4",
DutyCycle::Third => "1/3",
DutyCycle::Half => "1/2",
};
self.name = format!(
"{} {: >4} {:.1} {:.1} {:.1} {:.1} {} {}",
osc, self.freq, self.attack, self.decay, self.sustain, self.release, crunch, drive
"{} {: >4} {:.1} {:.1} {:.1} {:.1} {} {} {}",
osc, self.freq, self.attack, self.decay, self.sustain, self.release, crunch, drive, duty
)
}

Expand Down

0 comments on commit 726ec00

Please sign in to comment.