cadence’s website.

Some changes will be applied after reloading.
Some changes will be applied after reloading.

Userscript to improve notification sounds in Element (Matrix)

Just Use SchildiChat

SchildiChat is a much improved version of Element for desktop, web, and Android. I have since added these sound effects to it in a PR. The softer sounds are default (but you can switch back to Element's, if you desire).

Please just use SchildiChat.

The original post continues below.

Background

There are two problems with Element's notification sound. Firstly the sound, secondly its frequency.

On the internet, text conversations are often fragmented into several small messages as one person thinks of more things to say. The other person then replies.

Conversations are also asynchronous, which means that they don't take place in real time. Somebody can walk away from their computer, come back later, and reply to the message without breaking the flow too badly. You can't do this with a phone call, for example. Taking time to reply is acceptable etiquette.

Because of this, you don't need to notified for every message you receive. If somebody tells you something over the course of a couple of minutes in 4 separate messages, you only need one notification sound for that. You'll remember that you have something to check, and when you do check, you'll see the conversation. Having an extra 3 notification sounds won't make a difference, it only serves to be annoying.

The userscript

The userscript solves the first problem by replacing the sound, and the second problem by limiting the frequency of notification sounds.

The new ringtone was created by Ana Gelez and the new message sound was created by my friend Quarky.

Here is the first part of the userscript, to show you how to change the settings:

// **** CUSTOM SETTINGS HERE **** //

// after the application makes an audible notification sound, all sounds arriving in the next [TIME] will be completely silenced.
const gapBetweenSounds = 10*60*1000 // 10 minutes

// when you focus the application and check messages, this will reset the timer so the next received message will always notify again.
// depending on your system, this focus detection could be unreliable, causing you to miss notification sounds!
const resetOnFocus = true

// replace the default sound effects with ones of your own choosing.
// if you want to design your own sounds, you need to put ogg and mp3 files on the server.
const customSounds = {
  messageAudio: { // when you receive a message
    url: "https://umbreon.heyquark.com/files/notif", // default is "media/message"
    volume: 1
  },
  ringAudio: { // when you receive a call
    url: "https://umbreon.heyquark.com/files/ring", // default is "media/ring"
    volume: 1
  },
  ringbackAudio: { // when you place a call
    url: "https://umbreon.heyquark.com/files/ring", // default is "media/ringback"
    volume: 0.5
  }
}

// **** END OF CUSTOM SETTINGS **** 

You can view the whole script and install it by clicking here. You must have a browser extension like ViolentMonkey installed already. This linked code is licensed under CC0 meaning you can do anything you want with it. If you want to officially make this part of Element, you have my full blessing - but please just use SchildiChat.

Have fun!

— Cadence

A seal on a cushion spinning a globe on its nose.
Another seal. They are friends!