Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playback): add random variation on each keypress (#24) #44

Merged
merged 9 commits into from
Oct 18, 2023

Conversation

Xenira
Copy link
Contributor

@Xenira Xenira commented Oct 14, 2023

Description of change

Adds the possibility of random variation for each keypress

  • Volume
  • Tempo / Pitch

I added some values to the default preset. Maybe play around with those to find sensible defaults. ✔️

Closes #24

Configuration

I added configuration possibilities in 3 places:

  1. CLI Arguments. These will override all settings defined in Presets.
  2. KeyConfig in Preset. These will override settings defined in the parent Preset.
  3. Preset. Will apply to all KeyConfigs that do not provide variation.

Currently the cli only accepts one value, that is used for both changes up and down, while the config file takes separate values. I am looking into a convenient way to allow both for the cli as well.

The cli accepts (up to) two comma separated values. If only one is defined it is used for both.

How has this been tested? (if applicable)

  • Set high values in config and use 👂
  • Set high values in cli and use 👂
  • Watch trace logs.

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2023

Codecov Report

Attention: 74 lines in your changes are missing coverage. Please review.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
src/config.rs 30.90% <14.28%> (-1.13%) ⬇️
src/lib.rs 0.00% <0.00%> (ø)
src/main.rs 0.00% <0.00%> (ø)
src/args.rs 16.12% <0.00%> (-25.54%) ⬇️
src/app.rs 0.00% <0.00%> (ø)

📢 Thoughts on this report? Let us know!.

Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

The code looks pretty good! I tried it out and works as expected. Also, left a comment about changing the pitch in #24

Feel free to rebase main and update docs when you have time.

cc @arda-guler for testing / finding the most sane defaults.

src/args.rs Outdated Show resolved Hide resolved
@arda-guler
Copy link
Collaborator

Yeah, well, regarding that "finding the most sane defaults" thing and the pitch implementation...

The indirect implementation here by changing the speed is more than adequate enough IMO. In fact, I'm going to say that as far as my own opinion goes, a 0.1 volume variation and a 0.05 tempo variation sounds so much better - the current example values are a bit too pronounced. It should be a little more subtle.

All else is very good!

@Xenira Xenira force-pushed the sound-variation branch 4 times, most recently from 8be049f to 80421d7 Compare October 16, 2023 21:21
@Xenira Xenira marked this pull request as ready for review October 16, 2023 21:25
@Xenira
Copy link
Contributor Author

Xenira commented Oct 16, 2023

Sorry for the git history confusion... Forgot to sign and messed up fixing it... 🤦

@Xenira Xenira mentioned this pull request Oct 16, 2023
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

Great stuff!

@orhun orhun changed the title Add random variation on each keypress (Resolves #24) feat(playback): add random variation on each keypress (#24) Oct 18, 2023
@orhun orhun merged commit c53334c into orhun:main Oct 18, 2023
14 checks passed
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.

Distinct sound for keys
4 participants