The easiest way of creating sounds from an EDF file is by using EDF/EDF+ to WAV. This program is available for Windows but can be run on Linux using wine. Figure 3.1 shows the screen as it is seen on my Suse 9.1
An alternative approach (much more difficult) is to use some mathematical program (Scilab, R, Octave, Matlab...) to create a wav file from the EDF. You can see an example on the edfAsc documentation
Notice that we chose an acceleration rate of 400. The default option of EDFtoWAV for EEG is 200 and this is the acceleration discussed in Easy listening of sleep recordings: tools and examples. There is an equilibrium between time and frequency resolution. To begin hearing sounds I think that a 400 times acceleration is perhaps easier to follow. Then you can begin to use 200 (or even less) to get more time precision.
Running the program is a pleasure. It is very, very easy. You can create mono or stereo files and it is very fast. As a result, we get a nice file containing the sound of the EEG of a whole night and we could hear it.
One small advice: the threshold of hearing is not plain (see the wikipedia article). So, to hear the sounds of the sleeping brain in all its richness you will need a good system of loudspeakers and high volume of reproduction.
To hear it we need an additional tool. We are not familiar with the sounds and we need some guide to relate what we hear with what we know about sleep. One good guide is playing sounds together with their spectrogram. There are a lot of programs that allow that but I like very much Wavesurfer
These are some things that you will be able to do with Wavesurfer
So we created the file st7121j0.wav by accelerating 400 times the signal EEG Pz-Oz of the file st7121j0.rec. We were able to open it with Wavesurfer. We opened the file and chose Demonstration Configuration, then we expand the display to the whole file by pushing the button showing a double arrow inside vertical lines.
We see the result in figure 3.2
We begin to handle the file but we need to adjust some settings. We click the right button in the spectrogram and select properties. Now we can modify the parameters of the spectrogram. We choose 1024 points as length of the FFT, and 10000 as the limit of the displayed spectrogram. There are a lot of parameters that can be modified. One of them is particularly important: in stereo file you can display the spectrogram of all signals or we can display only one signal. This is the setting dialog once modified in figure 3.3
Now we push Apply or OK and we can play with the Image controls. We can see this dialog in figure 3.4
Once we set to 1024 the analysis window, we can play the file with the sound controls. The final result is shown in figure 4.1
To imagine the original spectrogram, we have to divide frequency by 400, and to multiply time by 400. Please compare this figure with figure 2.4 when the spectrogram in proper units is shown.
In the next chapter we are going to listen to the recording. Now we can summarize the steps followed
Let's hear the result in the next chapter.