enormandeau / meditation-timer

Simple meditation timer for Linux
GNU General Public License v3.0
21 stars 5 forks source link

Update meditation_timer.py #14

Closed fn-ix closed 3 years ago

fn-ix commented 5 years ago

Since I don't know any python, I wasn't sure how to make the variable for sleep a command option for the user, and I just went with the time that is most suitable for the chime sound I use, but if you know how to make it and it's not too complicated for you, it would be a nice addition as well.

Note also that in this case when mpv plays the new sound over the old one, the sound streams are combined, unlike how it worked with pygame where the old stream was interrupted. Personally I prefer this method, since some of the bell sounds are very long and so it sounds more realistic to hear the new strike combine with the weak wind-out in the background. When real bells are used, a new strike also interferes with the sound pattern from the previous strike; bells aren't usually silenced before a new strike.

This solution contains one bug though: the final end chime seems to be played only for the duration of sleep and is then abruptly stopped. It should play until the end of the file, but I couldn't figure out what was wrong.