auto-pi-lot / autopilot

Distributed behavioral experiments
https://docs.auto-pi-lot.com
Mozilla Public License 2.0
93 stars 24 forks source link

Sound Output Calibration #158

Open sneakers-the-rat opened 2 years ago

sneakers-the-rat commented 2 years ago

Long time coming! Need to be able to calibrate sound output!

We have a bit of a (relatively undocumented) calibration system, where hardware objects have a calibration property that saves/loads on get/set, so this can likely patch into that.

Process

Calibration Types

Implementation Questions

mikewehr commented 2 years ago

•we should definitely have the option of a frequency look-up table for pure tones, in addition to any Inverse filter. An inverse filter is more general but requires tradeoffs and will never be ideal. In contrast a look-up table can be ideal if all you're doing is delivering pure tones (especially if you calibrate at the exact frequencies you intend to use). •I've always applied calibration at sample generation time, which has worked well and seems the most bulletproof to me.

sneakers-the-rat commented 2 years ago

would a calibration routine that can use a sound/array of sounds make sense then? eg. would implement dynamic ripples as a sound class and specify that as the test sound. and then a sound can have a default type of calibration as a class attribute, but the calibration method can take a calibration method as an arg?