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

New feature: Sound packs #12

Merged
merged 6 commits into from
Jul 12, 2022
Merged

Conversation

cloudrac3r
Copy link

@cloudrac3r cloudrac3r commented Jul 6, 2022

The default notification and call sounds in Element have long been detested. This feature allows for many custom sound packs and the user can switch between them at will.

The new default sound pack is Schildi. People can switch back to Element's sounds if they prefer.

The new ring sound (and ringback) is copyright (c) Ana Gelez, Apache License, and has been offered as a sound for Element, though was never accepted. The new message notification sound is public domain.

Sources:
https://github.com/matrix-org/matrix-react-sdk/pull/4500/files
https://heyquark.com/general/2022/07/04/microblogging-2/

A desirable feature would be some way to preview the selected sounds in the settings menu, but that's not a showstopper.

Feel free to change the text in the settings menu depending on how much or how little you want to poke fun at the Element people.

Important: This must be merged at the same time as my change in element-web, which I am about to create a pull request for.

  • I agree to release my changes under this project's license

This PR currently has no changelog labels, so will not be included in changelogs.

A reviewer can add one of: T-Deprecation, T-Enhancement, T-Defect, T-Task to indicate what type of change this is, or add Type: [enhancement/defect/task] to the description and I'll add them for you.

cloudrac3r added a commit to cloudrac3r/element-web that referenced this pull request Jul 6, 2022
SchildiChat/matrix-react-sdk#12

The audio elements are now rendered by matrix-react-sdk, so this
commit is to remove them from the HTML source.
cloudrac3r and others added 3 commits July 10, 2022 14:17
The default notification and call sounds in Element have long been
detested. This feature allows for many custom sound packs and the user
can switch between them at will.

The new default sound pack is Schildi. People can switch back to
Element's sounds if they prefer.

The new ring sound (and ringback) is copyright (c) Ana Gelez, Apache
License, and has been offered as a sound for Element, though was never
accepted. The new message notification sound is public domain.

Sources:
https://github.com/matrix-org/matrix-react-sdk/pull/4500/files
https://heyquark.com/general/2022/07/04/microblogging-2/

A desirable feature would be some way to preview the selected sounds
in the settings menu, but that's not a showstopper.
@su-ex
Copy link
Member

su-ex commented Jul 10, 2022

Can you maybe check the box to allow changes so I can push to your branch?
I've changed, fixed and enhanced some stuff.
But there's something I couldn't fix yet: Calling somebody makes both sounds ring simultaneously. That's really weird, for notifications of new messages it works.

@su-ex
Copy link
Member

su-ex commented Jul 10, 2022

So, I've tested this now with desktop as electron build as well and it works the same as with web in browser. 👍
Do you have any other tone for call ended as well by any chance?
Any maybe we should attribute the sounds like with Android, for desktop those go usually into Settings > Help and About > Credits.

@su-ex
Copy link
Member

su-ex commented Jul 10, 2022

Also, is there maybe a better place than in the settings notification tab? The sound when making a call to somebody else is always there, even if notifications are entirely disabled. So it should probably always be shown (don't change anything there yet until I've pushed, in this area is a lot I have changed, so this will only lead to conflicts).

@cloudrac3r
Copy link
Author

Can you maybe check the box to allow changes so I can push to your branch?

Done, I think.

Calling somebody makes both sounds ring simultaneously.

Do you mean both the old and the new sound play at the same time? This shouldn't be technically possible. You should test again - if you were testing locally, you might have heard the new sound from one client and the old sound from a different client.

Do you have any other tone for call ended as well by any chance?

I don't have a sound for this. I think it is fairly soft and inoffensive, so I don't feel the need to create a replacement.

So it should probably always be shown

Sure thing!

And maybe we should attribute the sounds like with Android, for desktop those go usually into Settings > Help and About > Credits.

I think this is a good idea too! I couldn't find the file to change, though.

The correct attribution is:

Ring sound copyright Ana Gelez, Apache license
Message sound created by Ash Logan, CC 0

@su-ex
Copy link
Member

su-ex commented Jul 10, 2022

Can you maybe check the box to allow changes so I can push to your branch?

Done, I think.

I've pushed my changes. ✔️

Calling somebody makes both sounds ring simultaneously.

Do you mean both the old and the new sound play at the same time? This shouldn't be technically possible. You should test again - if you were testing locally, you might have heard the new sound from one client and the old sound from a different client.

Yes, that's what I mean: While calling somebody, it's playing both the old and new sound simultaneously, weird.
Maybe @SpiritCroc can check as well with these changes (don't forget the changes for element-web, rebase not yet done in the PR branch).

Do you have any other tone for call ended as well by any chance?

I don't have a sound for this. I think it is fairly soft and inoffensive, so I don't feel the need to create a replacement.

So it should probably always be shown

Sure thing!

That's something I haven't changed yet.

I think this is a good idea too! I couldn't find the file to change, though.

The correct attribution is:

Ring sound copyright Ana Gelez, Apache license
Message sound created by Ash Logan, CC 0

I've added a commit with that.

@su-ex
Copy link
Member

su-ex commented Jul 10, 2022

Ok, now it only played a single sound (the one chosen), even after switching between the two options.
Whatever, it's probably fine and has been some glitch introduced through heavy testing and code changing while that.

Once the sound pack option is shown always, this is probably fine to merge. 👍
Then we have time to test for a few days until the next release if sounds still work.

@su-ex
Copy link
Member

su-ex commented Jul 10, 2022

The new message sound is so much better! 🎉

@cloudrac3r
Copy link
Author

Once the sound pack option is shown always, this is probably fine to merge.

Done, it was an easy change.

For some reason my browser is no longer displaying the rooms I'm in. I'm assuming this is some other problem with my build, that is occurring because I still have no idea how to set up a consistent development environment for SchildiChat. If rooms are displaying for you then that means my code is good and nothing got messed up.

@cloudrac3r
Copy link
Author

I trashed my local copies and recompiled everything and it works perfectly now. I dunno what was wrong before. I do know that this code is good.

@su-ex
Copy link
Member

su-ex commented Jul 12, 2022

Ok, great, let's go! 🥳

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.

2 participants