1 unstable release
| 0.1.0 | Aug 7, 2023 |
|---|
#1196 in Audio
1MB
227 lines
Grande Sonnerie
The goal of this app is to provide hour and minute repeater on your PC in the same way that is found in such watches as Casio (everyone knows their hourly beep-beep), Vacheron Constantin and Patek Phillippe.
Installation
$ cargo install grande-sonnerie
Usage
Configuration
Upon first launch two default config files will be created in
~/.config/grande-sonnerie: config.toml and casio.toml, as well as
a directory with default coucou movement.
config.toml
offsetis responsible for setting timezonesonneriewill load sounds from the directory of the same namemovementwill load configuration of the same name for setting chimes
casio.toml
grandis a list of integers on whichgrandwill chimehoursis a list of integers that defines hours on which they will be repeatedhours_divis an integer which allows equally splitiing hours to chime.hours_div: 3will make hours chime every third hourminutessimilar tohoursminutes_divsimilar tohours_div, but splits hour into equal parts.minutes_div: 15will make minutes chime every quarter-hourtwelve_hour13th hour will chime one time instead of thirteen etc (recommended withmultichime: true)multichimewill make sounds repeat according to hour/minute, see examples below
Examples
Defaults
config.toml:
offset = [0, 0, 0]
sonnerie = 'coucou'
movement = 'casio'
casio.toml:
grand: none
hours: none
hours_div: 1
minutes: none
minutes_div: none
twelve_hour: false
multichime: false
UTC timezone, chimes once every hour with coucou/hour.wav.
My personal config
config.toml:
offset = [3, 0, 0]
sonnerie = 'coucou'
movement = 'pp'
pp.toml:
grand = [10, 18]
hours_div = 1
minutes_div = 15
twelve_hour = true
multichime = true
UTC+3, chimes:
coucou/grand.wavon 10:00 and 18:00 before everything elsecoucou/hour.wavevery hour, repeats according to the hours in 12h formatcoucou/minute.wavevery 15 minutes of an hour, repeats according to quarters of hour
So at 18:00 it will chime Grand, then Hour six times. At 18:45 it will just chime Minutes three times (45 is 3/4 of an hour).
Sounds
Three sounds are expected: grand, hour, and minute. Currently only .wav
is supported:
$ ffmpeg -i yoda-death-sound-effect.mp3 grand.wav
To do
- Implement arrays of sounds to play consecutively (Westminster chimes)
- Change CPU-eating sound implementation to something more sane
- Actual repeater (press a button to hear time)
Dependencies
~2–33MB
~433K SLoC