GeekFunkLabs / fluidpatcher

A performance-oriented patch interface for FluidSynth
MIT License
124 stars 15 forks source link

Add audio feedback to headless Pi #11

Closed Timendus closed 3 years ago

Timendus commented 3 years ago

First of all, thanks for an awesome project. I plan to use this mainly for my camping trips, playing music with friends around the campfire 🔥 🎶 🎹

What I thought the headless version of this software lacks for that purpose is a way to get a better idea of what the Pi is doing. It felt a bit too much like a black box when I don't have my laptop connected to it. So I added the option to enable audio feedback. It's off by default so it doesn't annoy people who want to use a headless Pi on stage, and in other more professional settings. The feedback can be enabled by setting audiofeedback to 1 in squishboxconf.yaml.

When enabled, the headless Pi will beep at you in various ways when:

The sound effects were made by me using GarageBand, so there should be no copyright issues there. The files have been given descriptive names so people can easily swap them out for their own sounds.

It adds one dependency, simpleaudio. On Linux, this module depends on python3-dev and libasound2-dev, but I think those are already dependencies of this project..? At least I didn't have to install anything new (besides pip3 install simpleaudio) to get this to work. Same on MacOS, it "just worked" for me. I guess this will require some changes to the install script, but I don't see that in this repository, so I can't fix that for you.

The only thing that's bugging me is the shut down timing. I expected to hear the shut down sound two seconds after the 'about to shut down' sound, but it takes a second or maybe two longer. I'm not sure why, and it's not really a big issue, but I thought I should mention it.

As you may be able to tell from the commit messages, I'm not a Python developer. So I hope my code makes enough sense for you to be able to merge it. If not, I can make changes where necessary, or feel free to start from scratch 😉

Cheers and thanks again, Tim

albedozero commented 3 years ago

It's been a bit on this pull request, but I feel I can make a choice now that I've finished some of my planned updates for the v0.5 release. I appreciate the work, and fully support and encourage modification of the project, but I'm not going to merge this into the main branch for the following reasons:

Again, thanks for the pull request and interest in the project - I figured a lot of things out looking into this.