Tympan / Tympan_Library

Arduino/Teensy Library for Tympan Open Source Hearing Aid
MIT License
116 stars 31 forks source link

Adding Filterbank and Compressor Bank for easing App GUI #48

Closed chipaudette closed 2 years ago

chipaudette commented 2 years ago

This is a big edit to the underlying time-domain processing approach for the WDRC-based examples.

Previously, we would simply wire up X filters in parallel, followed by X compressors in parallel. While they were easy to connect together, getting an App GUI to manage all of these free-floating processing blocks was tough and effortful. The resulting code was fragile and difficult to apply to other example sketches.

So, I created a filterbank class (right now, it's only been tested with FIR filters, not IIR filters) to bring together X parallel filters under one structure. This filterbank class manages the individual filters and it holds pre-written GUI elements to make phone interactions much easier and to make it possible to reproduce the GUI for other sketches.

Similarly, I created a class that is a bank of WDRC compressors. The WDRC has many, many parameters. The compressor bank class helps manage the configuration of the individual WDRC via the app.

Finally, to use the new compressor bank and filterbank, I completely refactored the example 05-FullSystems\WDRC_8BandFIR_full. I will refactor the other examples to follow suit. But, that'll be later.