Song Torrent: A modular, open-source 96-chamber audio and video recording apparatus with optogenetic activation and inactivation capabilities for Drosophila

Background Many Drosophila species use acoustic communication during courtship and studies of these communication systems have provided insight into neurobiology, behavioral ecology, ethology, and evolution. Recording Drosophila courtship sounds and associated behavior is challenging, especially at high throughput, and previously designed devices are relatively expensive and complex to assemble. Results We present construction plans for a modular system utilizing mostly off-the-shelf, relatively inexpensive components that provides simultaneous high-resolution audio and video recording of 96 isolated or paired Drosophila individuals. We provide open-source control software to record audio and video. We designed high intensity LED arrays that can be used to perform optogenetic activation and inactivation of labelled neurons. The basic design can be modified to facilitate novel study designs or to record insects larger than Drosophila. Fewer than 96 microphones can be used in the system if the full array is not required or to reduce costs. Implications Our hardware design and software provide an improved platform for reliable and comparatively inexpensive high-throughput recording of Drosophila courtship acoustic and visual behavior and perhaps for recording acoustic signals of other small animals.

• We designed high intensity LED arrays that can be used to perform optogene<c ac<va<on and inac<va<on of labelled neurons.
• The basic design can be modified to facilitate novel study designs or to record insects larger than Drosophila.
• Fewer than 96 microphones can be used in the system if the full array is not required or to reduce costs.

Implica<ons:
• Our hardware design and so\ware provide an improved plaaorm for reliable and compara<vely inexpensive high-throughput recording of Drosophila courtship acous<c and visual behavior and perhaps for recording acous<c signals of other small animals.

Background
Drosophila flies perform elaborate social behaviors as part of courtship and ma<ng, which in many species can include acous<c signals (Ewing and Bennet-Clark 1968).For example, depending on the species, males and/or females can produce complex and <me-varying acous<c signals during courtship (LaRue et al. 2015;Arthur et al. 2021).In addi<on, males and females produce sounds during other social encounters, such as aggression and copula<on (Versteven et al. 2017;Kerwin et al. 2020).Individual flies are highly mo<vated to perform these complex behaviors, even in ar<ficial laboratory condi<ons, which has made Drosophila courtship behavior a powerful model for studies of the gene<c and neurobiological basis of social behavior and evolu<on (Auer and Benton 2016).
The acous<c signals produced by Drosophila during social interac<ons are rela<vely weak and are best detected with par<cle-velocity sensi<ve microphones located close to flies (Bennet-Clark 1971, 1984) because the power of the par<cle velocity declines as the cube of the distance.This constraint has complicated the development of high-throughput recording devices of Drosophila courtship song.Drosophila courtship song has been studied by many laboratories over the past 60 years and has historically been recorded using bespoke amplifier and microphone apparatuses and analysis techniques.In 2013, we introduced a mul<-channel device that allowed simultaneous recording of courtship song from 36 pairs of flies (Arthur et al. 2013).This device and related derived designs have been used in mul<ple studies (Shirangi et al. 2013(Shirangi et al. , 2016;;Philipsborn et al. 2014;Stern 2014;Coen et al. 2014;LaRue et al. 2015;Ding et al. 2016Ding et al. , 2019;;Rezával et al. 2016;Clemens et al. 2018;O'Sullivan et al. 2018;Kerwin et al. 2020;Arthur et al. 2021;Shiozaki et al. 2022), although these devices incorporated several sub-op<mal features.
To improve the design, reduce the cost, and allow even greater throughput, we completely redesigned a mul<-channel device for recording courtship song and behavior.Our new design provides simultaneous audio and video recording of 96-channels.Video recording is cri<cally important, because it can be difficult to resolve the social meaning of specific acous<c signals from audio signals alone.There has not previously been available a high throughput recording system that allowed simultaneous monitoring of audio and video.Our new system also incorporates a novel design for <me-controlled, high-intensity LED illumina<on, allowing high-throughput optogene<c func<onal screens of labeled neurons.

Results
The 32-channel recording device we designed previously (Arthur et al. 2013) had several limita<ons that we sought to address with a new design.Specifically, we sought to provide the following improvements.
1. Simplify assembly.The 32-channel system was complex and required extensive manual assembly steps.
2. Reduce maintenance.The 32-channel system used microphones alached with cables that are no longer manufactured and the cable connec<ons fa<gued and broke over <me.We developed a recording apparatus that captures audio and video from 96 behavior chambers simultaneously.An 8 x 12 array of microphones records audio from each chamber from below and two cameras record video from above (Figure 1).All associated so\ware is open source and available on Github (hlps://github.com/janelia-experimentaltechnology/FlySong).Flies are loaded into three 32 chamber plates (8 x 4 array) that sit on top of the microphones (Figure 2).The behavior chambers are built from mostly 3D printed parts and can be easily modified for novel designs.We have implemented designs that allow loading flies from the top, or from the bolom, and keep flies separated un<l the inves<gator is ready to ini<ate the recording session.
The recording apparatus is composed of 12 printed circuit boards, containing 8 microphones each, that connect to a single backplane containing a Field Programmable Gate Array (FPGA) that provides an interface between the microphone boards and the computer (Figure 1A).If one board of 8 microphones fails, it can be replaced easily.The microphone boards can be modified for different layouts, depending on experimental requirements.Analog to digital conversion is performed on each microphone board, elimina<ng the need for an expensive separate analog-to-digital conversion unit.
The 3D-printed fly courtship chambers allow loading of flies ini<ally into separate halves of each chamber, so that males and females remain separate un<l the experiment begins (Figure 2).The bolom of the chambers is a fine plas<c mesh to allow sounds to be detected by microphones below.The top of the chambers is clear acrylic to allow video recording from above.We designed two different loading mechanisms: flies can be loaded through the top via holes in a specialized sliding cover or through the bolom, via slits cut into the white plas<c mesh (Figure 2).In principle, the bolom loading design could allow automated robo<c loading.To increase contrast of flies against the chamber background, so that video tracking so\ware could be used to analyze fly behavior, we 3D printed chamber parts with white plas<c, glued white mesh to the bolom of each chamber, and replaced the microphone covers with white mesh.
Video is captured by two high-resolu<on cameras.The provided so\ware (Fly Recorder) separates the view of 48 behavior chambers captured by each camera into separate channels that are associated with each microphone channel.The so\ware can be used to adjust the cameras posi<on to capture higher resolu<on video from fewer chambers and to define the region of interest (ROI) for video capture.Using the provided so\ware Convert Video, the individual videos can be compressed and converted from .mov to .aviformat.Video files can be assembled into a single video using provided so\ware (hlps://github.com/JaneliaSciComp/video_grid)for manual inspec<on of visual behavior across all chambers a\er comple<on of a recording session (Video 1).
Optogene<c excita<on and inhibi<on of labelled neurons have become important assays for probing neural circuit func<on in Drosophila.We therefore designed high-intensity LED arrays that can be mounted onto the apparatus along with a mirror to redirect stray light (hlps://github.com/janelia-experimental-technology/RGB-IR-LED-Boards).This design provides consistent and strong illumina<on across a large area without obstruc<ng the video recording during optogene<c manipula<ons.An example of video and audio recorded on Song Torrent during optogene<c s<mula<on of a fly expressing the red-shi\ed channel rhodopsin CsChrimson in the descending interneuron pIP10 that drives courtship song is shown in Video 2.

Limita<ons of Song Torrent
We have iden<fied several limita<ons with the current design of Song Torrent.First, while audio can be recorded without recording video, we have not currently implemented the ability to record video without recording audio.Fourth, op<mal microphone recording requires that behavior chambers are placed precisely and directly on top of microphones.If the behavior chambers are displaced from the correct posi<on, even by a few millimeters, the signal will be substan<ally reduced.

Discussion
Song Torrent provides a high-throughput audio and video recording device that allows optogene<c s<mula<on and can be assembled from mostly off-the-shelf components.Most of the electrical components can be purchased using the design specifica<ons that we have provided (hlps://github.com/janelia-experimental-technology/FlySong).Perhaps the trickiest step is to manually solder microphones onto the circuit boards.To facilitate construc<on, assembly, and use of Song Torrent, we provide a detailed assembly guide (Supplementary Material).We have found Song Torrent to be useful both for recording behavior of wild-type flies and for high-throughput screens of flies manipulated with optogene<c reagents (Shiozaki et al. 2022;Lillvis et al. 2023;Li et al. 2023).
We designed a specific layout of Song Torrent microphones and behavior chambers suitable for our experimental requirements, but all of these features can be altered prior to purchasing assembled components.In addi<on, video resolu<on can be increased by reducing the number of chambers recorded or by purchasing higher-resolu<on cameras.The flexibility of Song Torrent should allow audio recording of insects other than Drosophila species and of noncourtship related audio and visual behaviors.chamber can be used to load a pair of flies for a courtship assay.Ini<ally the sliding mechanism is retracted so that each behavior chamber is a half circle (B, C).The top clear plas<c slider is inserted so that one hole is posi<oned over one half circle (B).A\er the fly is loaded in the first half circle, the top plas<c slider is moved so that a second fly can be loaded in the second half circle (C).This is con<nued un<l all required chambers are filled.A\er the 32-channel chamber is placed on top of microphones (D), the sliding mechanism is pushed in to form a full circle courtship arena (C).
Video 1 -Example of output from the video_grid so\ware, illustra<ng 96 pairs of cour<ng flies from a single recording session.

3.
Lower apparatus cost: The Na<onal Instruments digi<zer and MATLAB license required in the original design added substan<al cost.4. Provide an overall design that allowed end-users to flexibly re-organize the recording chambers to suit their requirements.5. Simplify loading of flies into recording chambers while keeping males and females separated un<l experiment begins.6. Improve the so\ware user interface.7. Provide synchronized camera frame triggers.8. Record individual chamber temperatures.9. Drive up to two optogene<c light sources.10.Save all data and metadata to individual WAV files.11.View summary of all 96 videos a\er comple<on of recording.12. Compress individual videos.
Second, we have designed Song Torrent for study of D. melanogaster and closely related species of approximately the same size as D. melanogaster.Study of larger Drosophila species or of other insects may require redesign of the behavior chambers.Third, we placed microphones sufficiently far apart to prevent crosstalk between channels when D. melanogaster and similarly sized Drosophila species sing courtship song.Study of louder acous<c signals, for example those produced by larger Drosophila species, may require redesign of the microphone spacing to prevent crosstalk between channels.

Figure 1 -
Figure 1 -Hardware of the 96-channel Song Torrent audio recording rig.(A) Ninety-six

Figure 2 -
Figure 2 -Behavior chambers for use with Song Torrent.(A) Top view of 32 channel behavior