Handling Device Disconnects

A project log for Piano signal processor

Add metronome, reverb, compression, recording in an outboard box.

lion mclionheadlion mclionhead 03/23/2021 at 18:550 Comments

Finally ended up with a satisfying GUI that could control line input for monitoring a microphone.  64 bit file support is still an issue with the raspberry pi's because they're 32 bit.  It may never be tested with 64 bit file support because lions have never played more than 2 hours at a time without stopping.  

It detects disconnection & connection of the instrument but not disconnection of ALSA.  The soundcard just doesn't get disconnected.  Recovery after the loss of any peripheral would be best done by restarting the program inside a loop, but that would make it hard to debug.  If it restarted the program during a disconnect, it would stop recording.

The final solution with the web interface was to have it read the board state once when it starts, then ignore the board state in favor of user input thereafter.  It continuously polls to get the state of the recording.  

If another GUI starts or if the board reboots, the 1st GUI just won't show any valid board state.  There's no plan to have the board reboot on its own.  The board could send a flag requiring the GUI to reset, but it's a bit overcomplicated.

There was some desire to have a VU meter.  The digital stage in the CP33 doesn't have variable volume.  It's calibrated for an average playing volume & just clips when it's too loud.  A VU meter would have no purpose & take up space.  

The thought isn't lost of continuing to expand the signal processor to capture MIDI & generate human readable notation.  It could pass through MIDI to a phone or it could use its own monitor on HDMI.  All gadgets have been evolving to a dumb web based GUI with all the computation on a single board confuser.