-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Specify an audio file for the audible bell #8366
Comments
Which audio file types will the terminal be supporting in this case? Only wav? |
It probably shouldn't just be .wav - hopefully XAML/WinRT have some convenient APIs we could use for loading and playing audio files that'll accept a wide gamut of file types |
I would like this to be an option as well if possible or make the sounds available at least. |
If WinRT has spatial audio APIs, I might be able to hear which monitor contains the terminal that is ringing the bell. |
If there's not a lot of demand for a per-profile setting, I'd also be on favour of us handling this with a custom sound event that could be configured from the control panel. That way it could (hopefully) be shared with conhost too. There's no reason why it couldn't also be set from within the Terminal settings GUI, once that's in place. It's just that the underlying config would be stored in the registry rather than the current json file. See also: https://docs.microsoft.com/en-us/windows/win32/uxguide/vis-sound |
I think this should be global in Windows instead of a Terminal feature. I've suggested years ago, especially for multi-monitor setups, to have all apps audio be spatially located according to their position. It can be difficult since Windows typically knows which process the sound is coming from but not which window precisely, but anchoring the sound to the top level window of each process would be a great option. Note Windows Mixed Reality actually does this for UWP apps already, as it is even more important when your apps are all around you in the WinMR home 3D environment instead of in a 2D desktop. |
PSReadLine 2.1.0 seems to be using Console.Beep(1221, 50) by default: Cmdlets.cs, Render.cs. Perhaps Windows Terminal could offer a configurable beep as an alternative to an audio file.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It would be nice if the bell were configurable per-profile. That way if you had something that emitted a bell when it was finished executing a long-running process, you could easily distinguish it from the default bell. |
@bbhoss yep, we're definitely planning on making this per-profile. In fact, the |
If possible, I would very much like the ability to set a bunch of bell sounds and have it pick a random one each time. I think it would make situations where you get a bunch of bell tones one after the other nicer if you had a selection. My particular use case is picking all the Untitled Goose Game harmonica honk noises so I get a harmony when I hit ^c a bunch of times |
Okay at first I was like "this is an okay feature request but not one we'd likely get to" but now I'm all "this is a P0 must-ship for v2" 😄 |
honk-001.mp4(obviously, audio on) |
## Summary of the Pull Request Adds a per-profile setting for setting the audio sound for the bell. The setting is `bellSound`, it accepts a path. We'll use the file at that path as the sound for the bell. If it doesn't exist, then oh well, so sound for you. It'll also secretly accept an array of paths. If you provide an array, it will pick one at random. ## PR Checklist * [x] Closes #8366 * [x] I work here * [ ] Tests - lol this is the hackathon, I'm just messing around * [ ] Requires documentation to be updated ## Validation Steps Performed I'm not suggesting that anyone go to [this post](https://www.reddit.com/r/untitledgoosegame/comments/d77le4/honk_ringtones/) and download a zip full of `honk.mp3`s. I'm definitely not suggesting you add it to your settings like ```jsonc "bellSound": [ "C:\\Users\\migrie\\Downloads\\memes\\honks\\Honk1.mp3", "C:\\Users\\migrie\\Downloads\\memes\\honks\\Honk2.mp3", "C:\\Users\\migrie\\Downloads\\memes\\honks\\Honk3.mp3", "C:\\Users\\migrie\\Downloads\\memes\\honks\\Honk4.mp3", "C:\\Users\\migrie\\Downloads\\memes\\honks\\Honk-muffled1.mp3", "C:\\Users\\migrie\\Downloads\\memes\\honks\\Honk-muffled2.mp3", "C:\\Users\\migrie\\Downloads\\memes\\honks\\Honk-muffled3.mp3" ] ``` No, don't do that. https://user-images.githubusercontent.com/18356694/137389503-91e43dba-8f7b-4078-9d35-23ceb2ac9432.mp4 * [x] It surprisingly works elevated * [x] We should probably accept env vars in these paths * [x] We may only want one `MediaPlayer` per terminal, rather than one per pane * [ ] We may want to validate the paths, and discard ones that don't exist. * [x] alternatively, _meh_
🎉 Thank you so much for implementing my suggestion! Do you know when the next release is likely to be? |
@Lexicality At this moment, no. We've been on a bit of a slow burn leading up to the holidays. I imagine it won't be for at least a few more weeks. |
🎉This issue was addressed in #11511, which has now been successfully released as Handy links: |
Description of the new feature/enhancement
Please let me configure the audible bell so that it plays a sound other than "Critical Stop". I'd like to select a sound with a shorter duration and perhaps lower volume.
This request is for Windows Terminal, not the console host.
Proposed technical implementation details (optional)
Ever since #7679, the implementation of the audible bell hardcodes SND_ALIAS_SYSTEMHAND:
terminal/src/cascadia/TerminalApp/Pane.cpp
Lines 373 to 374 in 67dfbd2
I can think of two ways to make this configurable:
Let me specify the path of a sound file in settings.json. I think this should be configurable per profile, like the bellStyle setting (Feature Request: disable bell #2360) is.
Alternatively, register Windows Terminal with the "Change system sounds" feature in Control Panel so that I can choose a sound there. According to C++ at Work: Web Version Checking, Adding Sound to an App, this involves the HKEY_CURRENT_USER\AppEvents\Schemes\Apps Registry key and the SND_APPLICATION flag. I suspect that the MSIX packaging of Windows Terminal won't allow writing to such Registry keys, though.
The text was updated successfully, but these errors were encountered: