-
-
Notifications
You must be signed in to change notification settings - Fork 518
feat: change 'playback pitch' option to semitone mode #7579
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I'm not sure if it's a good idea to keep the old pitch setting because it might be confusing to have different ways to set the pitch. Perhaps using semitones is more intuitive, so at least in my opinion we should drop the old preset values and change the slider to use semitone steps as well instead of using the pitch percentage. Opinions @dhanuarf @FineFindus ? |
app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt
Outdated
Show resolved
Hide resolved
Agreed, having two UI elements for editing the same value is pretty bad UX. I think having the slider is better, considering the value is discrete and bounded (i.e. it cannot be freely edited). On a more general note, what's the use case for changing the pitch? I assume it would be for manual adjustment when changing speed, but maybe that should better be done automatically? |
app/src/main/java/com/github/libretube/ui/sheets/PlaybackOptionsSheet.kt
Outdated
Show resolved
Hide resolved
I do agree of removing the preset. But changing the slider back to discrete with semitone steps, I personally prefer the slider to be continuous. But this is your project so the decision is up to you. The reason I prefer continuous slider is because for more accurate pitch tuning. There are some songs that are tuned differently than the typical tuning. For example, standard tuning is typically tuned with the note A4 at 440hz. But there are some songs where the note A4 is tuned to 432hz. So if your musical instrument is tuned with A4=440hz, the songs sound a bit out of tune. With a semitone calculator like https://www.omnicalculator.com/other/semitone, you can calculate the semitone difference and then enter the value in the app. But this feature probably will only useful for some music nerds, not general people. So again, the decision is yours, I'll just follow along. |
I'm not sure about general cases, but at least in my case, as someone who plays musical instrument, I like changing the playback pitch when I want to play along to some songs that have different tuning than my instrument. Or maybe there are others who want to sing along but the song is out of their vocal range so they adjust the playback pitch to fit their vocal range better. Or maybe there are some others who are sensitive to high-pitched sound, so they tune down the playback pitch for comfortable listening. Or maybe there are some people who just like to change the playback pitch just for gigs and giggles, I'm not sure. But yeah, the ability to change the playback speed is enough for generic usage. |
deacd72 update: Also, should we change back the playback speed to decimal values or keep them at percentages? |
I agree, semitones might be too big steps for some people, so a continuous slider makes sense.
I prefer decimal values because that's the way most other apps do it as well, so it's more intuitive. |
5a364ff changes the minus&plus button into musical flat&sharp button. I tried to use the unicode version of these symbols to simplify things, but they look ugly. So I replace them to use icons. ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I've just adjusted the margins and padding a bit to make everything look more consistent, apart from that lgtm.
- old playback pitch presets is removed
- "Semitone" textview is removed
Actually, just right now I was just looking for a way to turn the slider into centered like in here: https://m3.material.io/components/sliders/overview, but cant seem find a way to do that. |
That's only possible after upgrading to MD3 Expressive afaik, see the WIP PR #7444 |
This PR adds semitone increment and decrement when changing pitch in playback option.
The UI is slightly modified, padding is added on the left side just to create some kind of "separation" between
Playback speed
andPitch
.Slight downside:
stepSize
inPitch slider
is removed to accommodate the changes.screen-20250728-235845.mp4