Every once in a while it happens. (More often if you would believe Mr. Murphy)
A collection of mistakes, failures, and oversights that conspire to destroy the only recording of an event.
Here’s the story…
I sent a student engineer across town to record one of our school orchestras performing their spring concert. Simple stereo archive recording of a live event. Near-coincident pair above the conductor to a flash-based portable recorder (and a backup). What could possibly go wrong?
First of all, the backup. While I’d love to have redundancy for the entire recording chain, in reality that is pretty difficult to do. So we do what we can. If the power goes out, the musicians can’t see, so the concert will probably stop right along with the equipment. If one of the mics, cables, or preamps goes bad, I can always use the one working side and create a pseudo-stereo recording with post-processing. (More on that in another post!) The one place I always insist on redundancy is in the recorder. Maybe this comes from my pre-digital roots, where tape was the weakest link. Maybe it comes from the fact that we have lost confidence monitoring in modern digital recorders. Or from my experience with various digital tape formats and the limitations of error correction. Or maybe from what I know of human nature and how easy it is to forget to hit record. Regardless of the reason, this is where redundancy is required, even if it is a stereo backup of a multitrack recording.
But not this day. My team happened to be recording 9 events at 5 different locations, so equipment was running low. This meant I couldn’t send a backup recorder. “Oh well,” I thought, “I haven’t had any reliability problems with this recorder since I purchased it, so it will be fine.”
Lesson one: always run a backup.
So the student sets up, gets levels, and begins recording several minutes before the concert starts. Everything is going smoothly until – in the middle of a performance – someone walks by and kicks out the power to the recorder. The student quickly replugged the power, but had to reboot the machine and restart recording. The phantom power (being supplied by the recorder) also had to return to powering the mics. All-in-all, about 9 seconds of the concert were missed.
All this could have been avoided if I had followed another rule of mine – keep charged batteries in the portable recorder. Battery powered recorders (and buss powered audio interfaces) add another layer of redundancy, since they will keep on going even if the musicians can’t see. But alas, I had failed to charge the batteries ahead of time.
Lesson two: always charge the batteries.
Lesson three: make sure all cables are trip proof.
I was certainly not pleased when I heard what had happened, but I prefer to look forward into solutions than backward into blame. Unfortunately, I was in for one more surprise…
A corrupted audio file.
When the power was pulled from the flash recorder, it was in the middle of writing to the SD card storage and never had a chance to close the audio files. No audio workstation or general audio software could recognize or open the file from the first part of the concert. 9 missing seconds is one thing – over 30 minutes is quite another!
Audacity to the rescue.
As I was beating my head against a wall trying to get something to open the file, I remembered a feature of Audacity – raw data import. Besides being able to import audio or MIDI data, open-source Audacity can look at and import the raw data from any file.
Since it only looks at the raw data (and not the header), Audacity has no idea what the data is supposed to be. In the case of an audio file, these are things like:
- encoding format
- mono or interleaved
- sample rate
- bit depth (samples per bit)
When trying this recovery process, it is helpful to know as many of these things as possible. Standard pro audio formats (such as WAV, SDII, AIFF) will be PCM, either 16 or 24 bit. Some systems may use floating point, either 32 or 64. Many of the other options refer to telecommunications formats.
Byte order will typically be little-endian, but for the overly curious and computer nerds in the audience, more info can be found here
I knew the file I was trying to resurrect was a 16 bit, 44.1kHz WAV file. Data is organized into 8-bit bytes, but Audacity does not know where to begin with a header less, corrupt audio file. Since audio typically uses longer word lengths (16 or 24 bit), there are 2 or 3 ways the audio sample can fit into 2 or 3 bytes. This is the start offset setting in the import window and finding the correct setting is unfortunately a trial and error process for each corrupted audio file. The start offset will be either 0 or 1 for 16 bit files and 0, 1, or 2 for 24 bit files.
Try each setting starting with 0. The resulting imported audio will either sound like distorted garbage, or…
…it will be the audio you thought was lost forever!
Once you find the correct settings, simply save the audio as a new wave file (or whatever format you need).
Big problem solved – the audio from the first half of the concert was back. But what to do about the missing 9 seconds? We got lucky, as they were part of a musical repeat. The missing seconds were cloned into place. Admittedly not a true archive of the event, all-in-all a satisfactory outcome.