Description
The HiFi module is a premium audio solution for Bpod. Its SD and HD versions bring two high resolution Raspberry Pi sound cards under real-time control in the Arduino language using the Teensy 4.1 microcontroller platform. Audio waveforms are transferred to the device via USB, and played back on trigger from the Bpod finite state machine with ~220 microseconds of latency. The HiFi module supports stereo output at sampling rates up to 192kHz. An isolated TTL output channel provides a synchronization signal for external instruments to capture sound onset and offset times. Synthesis functions are provided to render white noise and pure tones with configurable frequency and amplitude. The next trial's waveforms can be loaded to the device without interrupting playback, for usage with TrialManager and BControl. The SD and HD versions of the module hardware differ only in the sound card used: HiFiBerry DAC2 Pro and HiFiBerry DAC2 HD respectively. The HiFi module is intended to replace usage of PC sound cards for nearly all Bpod applications.