BAVSA -- binaural beat visual analysis tool ------------------------------------------- This tool is designed to make it easier to check for the presence of binaural beat tones in a stereo recording, and to read off their parameters: carrier frequency, beat (or brainwave) frequency, and amplitude. This has many uses. For one thing, it can be used to check the output of binaural beat software like my SBaGen tool (and all the various others), to make sure that they are working properly. It can also be used to check that commercial products do actually do what they say they are doing. (As an example, I heard about one product which claimed to do very many things, but actually contained no binaural beats at all! All the CDs in the set were identical! I don't wish to frighten people unnecessarily, though. Other companies, such as the Monroe Institute and CenterPointe, have put a lot of work into making good use of binaural beat technology.) Note that this software is fairly technical. If you're not happy to get your hands dirty, then you might find this too complicated -- but still, there is no harm in trying. Legal stuff ----------- Copyright (c) 2002-2005 Jim Peters, . This is free software, released under the GNU General Public Licence version 2. See the file COPYING for details, or visit . FFTW code is Copyright (c) 1997-1999 Massachusetts Institute of Technology, released under the GNU GPL. See for the original sources. The SDL library code is released under the GNU Lesser General Public Licence version 2 or later. See file COPYING.LIB for details. See for more information on this project. "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation." "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details." "You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA" Using the tools --------------- Download the ZIP file and unpack it. This should give you a new directory which contains the executables for Windows at the top level, along with Linux executables and docs under 'linux', and also the source code in two subdirectories. (For Linux users: if the executables don't work on your version of Linux, you can rebuild from source -- see the 'mk' scripts under the src-* directories -- I'm assuming that Linux people will be able to figure most of this out for themselves, and I'll concentrate in this document on making things as simple as possible for Windows users. Also check out the usage texts of the tools for additional options.) So, assuming you already have WAV files of the binaural beat soundtrack you want to analyse (extracted from a CD, recorded from the soundcard line in, or generated by a binaural beat program), simply drag these WAV files into the "bavsa" directory, next to the executables. Now double-click on the 'bavsa.exe' program. This will open up a DOS window and work through the WAV files one by one, analysing them and producing BAV analysis files as output. You can re-run the 'bavsa' program at any time, and it will analyse any new WAV files you have dragged in, or re-analyse the WAV files if you delete the BAV files. Note that this analysis may take some time. On a 600MHz machine, you can probably expect the analysis to take one hour for every hour of audio, i.e. roughly real time. Once this is done, you can run the 'bavsa-view' program by double-clicking on it. This allows you to view the BAV analysis files. By default 'bavsa' takes a snapshot of the WAV file every 5 seconds all the way through the recording, looking at frequencies between 0Hz and 1500Hz with an accuracy of 0.1Hz. 1000-1500Hz is said to be the upper limit for effective binaural beat carriers. If you need more accuracy than 0.1Hz, or a different frequency range, it is possible to do this by giving command-line options to 'bavsa', but this involves using the DOS prompt or a BAT script, so this is more advanced. In any case, the job of 'bavsa-view' is now to show you these snapshots taken during the analysis. In each snapshot you see the carrier frequency (i.e. the audible frequency) varying horizontally across the display. This is the scale at the top of the window. The beat (brainwave) frequency varies vertically. This is the scale on the left hand side. The central display shows coloured peaks which indicate where the frequencies are present. Across the middle of the display is 0Hz, which indicates no beats. Normal music or tones with no binaural beat effect will appear with 0Hz beat frequency, so you will want to ignore these. What you are looking for are peaks away from 0Hz, to one side or the other, which aren't present on the other side, i.e. something asymmetrical. To help you look for and clearly see these peaks, you can make many adjustments to the display, as follows: Left-click with the mouse: recentre and zoom in Right-click with the mouse: recentre and expand out Middle-click with the mouse: recentre Arrows: move display around Z,X: zoom in, expand out PgUp,PgDn: move forwards/backwards in time Space,BackSp: move forwards/backwards in time 1,2,3,4,5,6,7,8,9,0: Select different brightness levels for the display -,=,+: Decrease or increase the brightness in smaller steps G,H,J,K,L: Slant the peaks in different directions. 'J' shows a top-down view, which is best when trying to measure the frequencies accurately. [,]: Change to the previous/next file Esc,Q: Quit the program Having a slanted view (e.g. 'H') is useful to see the peaks, and you may find that it also helps to adjust the brightness so that the interesting peaks appear as just purple humps instead of huge towering white peaks. However, I'm sure you will find your own way of identifying the peaks best. Remember that there may be noise on the soundtrack, or other 'random' events. Noise may show occasional peaks, but what you are really looking for are peaks that stay the same from one moment to the next, i.e. which are still there on the next snapshot when you press PgUp or PgDn. If you want to measure a peak, you need to point the mouse at the base of the peak, not the top. This can be hard to find accurately when the peaks are tall, so use the 'J' display to make it clearer. Point the mouse at the peak area (without clicking), and the status line will show a measurement of the binaural beat carrier, frequency and amplitude in SBaGen's format. This is expressed as follows: / For example: 200+10/1.5. This means a carrier of 200Hz, and a beat of 10Hz. This actually corresponds to two tones, 195Hz in one ear, and 205Hz on the other ear. The 1.5 is the amplitude expressed as a percentage of full-scale -- in other words, 100 would be the highest possible amplitude. Most binaural tones are used at levels of 1% or even lower, as they do not need to be loud to be effective. This is all you need to know to operate the program with its default settings, and hopefully you will some good measurements from your soundtracks with these settings. However, if you want to make some tweaks or customisation to the analysis, read on. More advanced use ----------------- This will mean using the command-line or a script to give extra options to the tools. In particular the 'bavsa' analysis tool takes several options. First, the frequency range and accuracy can be controlled with the -f option: -f -/ For example, "-f 0-500/0.04" would analyse the range 0Hz to 500Hz in steps of 0.04Hz. To increase the accuracy of the measurement readings provided by 'bavsa-view', it is necessary to make the steps smaller here. A step of 0.1Hz gives a theoretical accuracy of about +/- 0.2Hz in the beat frequency measurements. Note that 'bavsa' might use a more accurate measurement than you specify if that is necessary to accomodate the requested window width in the FFT. The time parameters can be controlled with the -t option: -t / The window length is the time-period which is processed to generate each 'snapshot'. Shorter windows can capture more fast-changing detail, and longer windows can be used to help reduce that. A Blackman window is used. The FFT parameters are selected to give as close as possible the frequency steps requested (or whole fractions of them, if the window length is too long for that). The second parameter here, , is the time-step from one frequency snapshot to the next through the file. The default is 5 seconds with a window-length of 7 seconds. Finally, the sampling rate can be changed with the -r option: -r Note that the WAV files are checked, and if they don't have the right sampling rate, they are rejected with an error. Files to process can be specified on the command-line. The default of processing all WAV files in the program directory is helpful for Windows users, although I know that this is not a conventional arrangement on UNIX. The 'bavsa-view' tool only takes two options, which select the type of display to use: -F Run full-screen with the given mode, xx may be 16 or 32. For example: 800x600x16 -W Run as a window with the given size: x In any case, you can manually resize the window after the tool has started. Conclusion ---------- I hope that you find this software useful. If you need to contact me, my details are on my website: http://uazu.net/contact/ Cheers -- Jim ------------------------------------------------------------------------